npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

miijs

v1.7.1

Published

Read, Edit, Write, and make Special Miis from a Wiimote binary file or 3DS QR Code to a binary file or QR code

Downloads

62

Readme

MiiJS

Read, Edit, Write, and make Special Miis from a Wiimote binary file or 3DS QR Code to a binary file or QR code

Installation

npm i miijs OR npm install miijs

Making a Special Mii

To make a special Mii, read in the file using the appropriate function, set mii.info.type="Special";, and then write a new file with the appropriate function.

Functions

  • async read3DSQR(pathToQR), returns JSON
  • write3DSQR(miiJSON, path), writes QR
  • readWiiBin(pathToMii), returns JSON
  • writeWiiBin(miiJSON, path), writes new bin to the path specified
  • render3DSMiiFromJSON(miiJSON, path), writes PNG representation of Mii's face to the path specified
  • convertMii(miiJson, whatConsoleItIsForOriginallly ("3ds" or "wii")), converts the Mii JSON format

Discrepancies in Conversion function

All of these discrepancies only apply when converting from the 3DS to the Wii, converting from the Wii to the 3DS should be a perfect conversion. There is a reason that the Wii supports sending Miis to the 3DS, but not vice versa. Many of the fields on the 3DS are new, and not present on the Wii. This function does its absolute best to backport 3DS Miis, but it is not perfect and never will be. If you rely heavily on 3DS exclusive options in your Mii, the outputted Mii will likely not be satisfactory.

Here is a list of discrepancies this function attempts to handle.

  • The 3DS has four more face shapes, thus some are converted to the closest possible for the Wii
  • The 3DS allows you to set Makeup and Wrinkles simultaneously, as well as having 7 more "makeup" (including beard shadow and freckles) types and 5 more wrinkle types. This is probably one of the messiest conversions since one field has to be ignored entirely if both are set. Since the 3DS has some that are not even close to anything the Wii has, it will ignore these if the other field is set, allowing for the other field to be added in it's place, prioritizing wrinkles over makeup. The outputted Mii will almost certainly require further editing to be satisfactory if these fields are used.
  • The 3DS has 6 extra nose types, all on the second page - these are mapped to similar noses on the first page that the Wii has
  • The 3DS has an extra page of mouth types containing 12 extra mouth types. These are mapped to similar mouths on the other two pages that the Wii supports.
  • The 3DS has two extra lip colors. These are changed into the default Orangey lip color if used since both of the extra colors are closest to this.
  • The Wii does not have the option to "squish" parts to be thinner. This function ignores this field as a result.
  • The 3DS has 60 extra hairstyles. These are mapped to hairstyles the Wii does have, but obviously out of 60 it won't be perfect. There will also be typoes more than likely, but I'm not testing 132 different Miis, sorry 😜. This will not be a perfect conversion and has a decent chance of needing a manual change anyway.
  • The 3DS has an extra page of eye types that the Wii does not, which the function maps to a similar eye type that the Wii does support if used. Will likely require a manual edit.
  • The 3DS has two extra mustaches and two extra beards. These are mapped to a similar beard or mustache if used - the two extra beards will likely need a manual change if used.

Credits

  • kazuki-4ys' MiiInfoEditorCTR, I took the code for how to decrypt and reencrypt the QR codes from here, including the asmCrypto.js file (with some slight modifications to work in my coding style). I believe I also modified the code for rendering the Mii using Nintendo's Mii Studio from here as well.