miijs 1.8.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # MiiJS
2
2
  Read, Edit, Write, and make Special Miis from a Wiimote binary file or 3DS QR Code to a binary file or QR code
3
3
 
4
-
5
- Note: The 3DS and Wii U do the same things with Miis. The Wii U does not however support Special Miis, and so 3DS is the name used for the 3DS/Wii U generation of Miis throughout this project. However, as long as you are not hoping to use Special Miis on the Wii U, as it cannot, the **3DS and Wii U are completely interchangeable** as far as Miis go otherwise.
4
+ ## A Note on Wii U Support
5
+ The 3DS and Wii U do the same things with Miis. The Wii U does not however support Special Miis, and so 3DS is the name used for the 3DS/Wii U generation of Miis throughout this project. However, as long as you are not hoping to use Special Miis on the Wii U, as it cannot, the **3DS and Wii U are completely interchangeable** as far as Miis go otherwise. So anywhere you are working with a Wii U Mii, use the 3DS function/process. Be aware the Wii U cannot process Special Miis.
6
6
 
7
7
  ## Installation
8
8
  `npm i miijs` OR `npm install miijs`
@@ -13,12 +13,15 @@ To make a special Mii, read in the file using the appropriate function, set `mii
13
13
 
14
14
  # Functions
15
15
  - async read3DSQR(pathToQR), returns JSON
16
- - write3DSQR(miiJSON, path), writes QR
16
+ - write3DSQR(miiJSON, path, fflRes), writes a JPG QR of a 3DS scannable Mii to the path specified. If no fflRes is specified, the QR will render using Nintendo Studio's API. If one is, it will contain a locally rendered version. fflRes must be passed as a buffer (such as `fs.readFileSync('FFLResHigh.dat')`). FFLResHigh.dat will not be provided by the library, but must be provided to the library. `FFLResHigh.dat` can also be placed in the same directory to automatically use it.
17
17
  - readWiiBin(pathToMii), returns JSON
18
- - writeWiiBin(miiJSON, path), writes new bin to the path specified
19
- - render3DSMiiFromJSON(miiJSON, path), writes PNG representation of Mii's face to the path specified
20
- - convertMii(miiJson, whatConsoleItIsForOriginallly ("3ds" or "wii")), converts the Mii JSON format
21
- - generateInstructions(miiJson, whatConsoleTheMiiIsFor, fullInstructions), returns a JSON object of different instruction fields. If full is not set, only the instructions that differ from a default Mii will be returned.
18
+ - writeWiiBin(miiJSON), returns Mii binary which can then be written
19
+ - async render3DSMiiWithStudio(miiJSON, path), writes JPG representation of Mii's face to specific path, using Nintendo's Mii Studio
20
+ - convertMii(miiJson), converts the Mii JSON format to the opposite Mii type and returns the JSON
21
+ - generateInstructions(miiJson, fullInstructions), returns a JSON object of different instruction fields. If full is not set, only the instructions that differ from a default Mii will be returned.
22
+ - async render3DSMii(miiJSON,fflRes), Returns a buffer containing a JPG representation of the Mii's face. FFLResHigh.dat must be passed as a buffer (such as `fs.readFileSync('FFLResHigh.dat')`). FFLResHigh.dat will not be provided by the library, but must be provided to the library. `FFLResHigh.dat` can also be placed in the same directory to automatically use it.
23
+ - convert3DSMiiToStudio(miiJSON), returns a Studio compatible Mii
24
+ - render3DSMiiWithStudio(miiJSON, path), writes a rendering of the Mii using Nintendo Studio's API to the path specified
22
25
 
23
26
  ## Discrepancies in `convertMii` function
24
27
  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.
@@ -42,7 +45,8 @@ Here is a list of discrepancies this function attempts to handle.
42
45
  - 3DS and Wii U
43
46
  - Open Mii Maker, select "QR Code/Image Options", and then select the respective QR Code option, be it scanning a QR code or saving a Mii as a QR code.
44
47
 
45
- -# If you are unable to transfer to the console you wish to, you can use the `generateInstructions` function provided here and manually recreate the Mii on the console using the provided instructions.
48
+ <sub>If you are unable to transfer to the console you wish to, you can use the `generateInstructions` function provided here and manually recreate the Mii on the console using the provided instructions.</sub>
46
49
 
47
50
  # Credits
48
- - [kazuki-4ys' MiiInfoEditorCTR](https://github.com/kazuki-4ys/kazuki-4ys.github.io/tree/master/web_apps/MiiInfoEditorCTR), I repurposed how to decrypt and reencrypt the QR codes from here, including repurposing the asmCrypto.js file in its entirety with very small modifications. I believe I also modified the code for rendering the Mii using Nintendo's Mii Studio from here as well, though I do not remember for certain.
51
+ - [kazuki-4ys' MiiInfoEditorCTR](https://github.com/kazuki-4ys/kazuki-4ys.github.io/tree/master/web_apps/MiiInfoEditorCTR), I repurposed how to decrypt and reencrypt the QR codes from here, including repurposing the asmCrypto.js file in its entirety with very small modifications (it has since been stripped down to only include the functions this library uses). I believe I also modified the code for rendering the Mii using Nintendo's Mii Studio from here as well, though I do not remember for certain.
52
+ - [ariankordi's FFL.js](https://github.com/ariankordi/FFL.js/), All files starting with /^ffl\*/i are from FFL.js, as well as `struct-fu.js`. They're here to support rendering the Miis locally. A lot of modifications had to be made to work in Node.js, and while it was a fair bit of work, it's far less than rewriting it from the ground up (Particularly as someone almost fully new to 3D rendering) and locally rendering Miis would not have been possible without this repo.