miijs 2.3.3 → 2.4.0

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/fflWrapper.js CHANGED
@@ -1,41 +1,41 @@
1
- // Compatibility layer for ffl.js
2
- const structFu = require('struct-fu');
3
-
4
- // Monkey-patch struct-fu BEFORE ffl.js loads
5
- const originalStruct = structFu.struct;
6
- structFu.struct = function(...args) {
7
- const result = originalStruct.apply(this, args);
8
- const originalUnpack = result.unpack;
9
- const originalPack = result.pack;
10
-
11
- result.unpack = function(data) {
12
- if (data && !(data instanceof Buffer) && data.buffer) {
13
- data = Buffer.from(data);
14
- }
15
- return originalUnpack.call(this, data);
16
- };
17
-
18
- result.pack = function(obj) {
19
- if (obj && typeof obj === 'object') {
20
- for (let key in obj) {
21
- if (key.startsWith('_padding') && Array.isArray(obj[key])) {
22
- obj[key] = Buffer.from(obj[key]);
23
- }
24
- }
25
- }
26
- return originalPack.call(this, obj);
27
- };
28
-
29
- return result;
30
- };
31
-
32
- // Set up globals
33
- global._ = structFu;
34
- global.THREE = require('three');
35
-
36
- // Load ffl.js - it will use the patched struct-fu
37
- const fflPath = require.resolve('ffl.js/ffl.js');
38
- delete require.cache[fflPath]; // Clear cache
39
- const fflModule = require('ffl.js/ffl.js');
40
-
1
+ // Compatibility layer for ffl.js
2
+ const structFu = require('struct-fu');
3
+
4
+ // Monkey-patch struct-fu BEFORE ffl.js loads
5
+ const originalStruct = structFu.struct;
6
+ structFu.struct = function(...args) {
7
+ const result = originalStruct.apply(this, args);
8
+ const originalUnpack = result.unpack;
9
+ const originalPack = result.pack;
10
+
11
+ result.unpack = function(data) {
12
+ if (data && !(data instanceof Buffer) && data.buffer) {
13
+ data = Buffer.from(data);
14
+ }
15
+ return originalUnpack.call(this, data);
16
+ };
17
+
18
+ result.pack = function(obj) {
19
+ if (obj && typeof obj === 'object') {
20
+ for (let key in obj) {
21
+ if (key.startsWith('_padding') && Array.isArray(obj[key])) {
22
+ obj[key] = Buffer.from(obj[key]);
23
+ }
24
+ }
25
+ }
26
+ return originalPack.call(this, obj);
27
+ };
28
+
29
+ return result;
30
+ };
31
+
32
+ // Set up globals
33
+ global._ = structFu;
34
+ global.THREE = require('three');
35
+
36
+ // Load ffl.js - it will use the patched struct-fu
37
+ const fflPath = require.resolve('ffl.js/ffl.js');
38
+ delete require.cache[fflPath]; // Clear cache
39
+ const fflModule = require('ffl.js/ffl.js');
40
+
41
41
  module.exports = fflModule;
package/ideal.jsonc CHANGED
@@ -1,91 +1,91 @@
1
- {
2
- "general":{
3
- "type":0,//[Normal,Favorite,Foreign,Special]
4
- "gender":0,//["Male","Female"],
5
- "favoriteColor":0,//["Red","Orange","Yellow","Lime","Green","Blue","Cyan","Pink","Purple","Brown","White","Black"]
6
- "birthday":"4",
7
- "birthMonth":"17",
8
- "height":100,//Conversion from feet?
9
- "weight":55//Conversion from pounds, indexed to height?
10
- },
11
- "meta":{
12
- "creatorName":"",
13
- "name":"",
14
- "console":"",
15
- "miiId":"148",
16
- "systemId":"148"
17
- },
18
- "perms":{
19
- "mingle":true,
20
- "sharing":true,
21
- "copying":true,
22
- "fromCheckMiiOut":false
23
- },
24
- "face":{
25
- "type":0,
26
- "color":0,//["White","Tanned White","Darker White","Tanned Darker","Mostly Black","Black"],
27
- "feature":0,//["None","Blush","Makeup and Blush","Freckles","Bags","Wrinkles on Cheeks","Wrinkles near Eyes","Chin Wrinkle","Makeup","Stubble","Wrinkles near Mouth","Wrinkles"], ["None","Near Eye Creases","Cheek Creases","Far Eye Creases","Near Nose Creases","Giant Bags","Cleft Chin","Chin Crease","Sunken Eyes","Far Cheek Creases","Lines Near Eyes","Wrinkles"]
28
- "makeup":0//["None","Blush","Orange Blush","Blue Eyes","Blush 2","Orange Blush 2","Blue Eyes and Blush","Orange Eyes and Blush","Purple Eyes and Blush 2","Freckles","Beard Stubble","Beard and Mustache Stubble"]
29
- },
30
- "nose": {
31
- "page": 0,
32
- "type": 0,
33
- "size": 4,
34
- "yPosition": 8
35
- },
36
- "mouth":{
37
- "page":0,
38
- "type":0,
39
- "size":0,
40
- "yPosition":0,
41
- "squash":0,
42
- "color":0//["Peach","Red","Pink"], ["Orange","Red","Pink","Peach","Black"]
43
- },
44
- "mole": {
45
- "on": false,
46
- "size": 4,
47
- "xPosition": 2,
48
- "yPosition": 20
49
- },
50
- "hair":{
51
- "page":0,
52
- "type":0,
53
- "color":0,//["Black","Brown","Red","Reddish Brown","Grey","Light Brown","Dark Blonde","Blonde"]
54
- "flipped":false
55
- },
56
- "eyebrows":{
57
- "page":0,
58
- "type":0,
59
- "rotation":0,
60
- "size":0,
61
- "yPosition":0,
62
- "distanceApart":0,
63
- "squash":0,
64
- "color":0//["Black","Brown","Red","Reddish Brown","Grey","Light Brown","Dark Blonde","Blonde"]
65
- },
66
- "eyes":{
67
- "page":0,
68
- "type":0,
69
- "rotation":0,
70
- "yPosition":0,
71
- "size":0,
72
- "distanceApart":0,
73
- "squash":0,
74
- "color":0//["Black","Grey","Brown","Lime","Blue","Green"]
75
- },
76
- "glasses":{
77
- "type":0,
78
- "size":0,
79
- "yPosition":0,
80
- "color":0//["Grey","Brown","Red","Blue","Yellow","White"], ["Black","Brown","Red","Blue","Yellow","Grey"]
81
- },
82
- "beard":{
83
- "mustache":{
84
- "type":0,
85
- "size":0,
86
- "yPosition":0
87
- },
88
- "type":0,
89
- "color":0//["Black","Brown","Red","Reddish Brown","Grey","Light Brown","Dark Blonde","Blonde"]
90
- }
1
+ {
2
+ "general":{
3
+ "type":0,//[Normal,Favorite,Foreign,Special]
4
+ "gender":0,//["Male","Female"],
5
+ "favoriteColor":0,//["Red","Orange","Yellow","Lime","Green","Blue","Cyan","Pink","Purple","Brown","White","Black"]
6
+ "birthday":"4",
7
+ "birthMonth":"17",
8
+ "height":100,//Conversion from feet?
9
+ "weight":55//Conversion from pounds, indexed to height?
10
+ },
11
+ "meta":{
12
+ "creatorName":"",
13
+ "name":"",
14
+ "console":"",
15
+ "miiId":"148",
16
+ "systemId":"148"
17
+ },
18
+ "perms":{
19
+ "mingle":true,
20
+ "sharing":true,
21
+ "copying":true,
22
+ "fromCheckMiiOut":false
23
+ },
24
+ "face":{
25
+ "type":0,
26
+ "color":0,//["White","Tanned White","Darker White","Tanned Darker","Mostly Black","Black"],
27
+ "feature":0,//["None","Blush","Makeup and Blush","Freckles","Bags","Wrinkles on Cheeks","Wrinkles near Eyes","Chin Wrinkle","Makeup","Stubble","Wrinkles near Mouth","Wrinkles"], ["None","Near Eye Creases","Cheek Creases","Far Eye Creases","Near Nose Creases","Giant Bags","Cleft Chin","Chin Crease","Sunken Eyes","Far Cheek Creases","Lines Near Eyes","Wrinkles"]
28
+ "makeup":0//["None","Blush","Orange Blush","Blue Eyes","Blush 2","Orange Blush 2","Blue Eyes and Blush","Orange Eyes and Blush","Purple Eyes and Blush 2","Freckles","Beard Stubble","Beard and Mustache Stubble"]
29
+ },
30
+ "nose": {
31
+ "page": 0,
32
+ "type": 0,
33
+ "size": 4,
34
+ "yPosition": 8
35
+ },
36
+ "mouth":{
37
+ "page":0,
38
+ "type":0,
39
+ "size":0,
40
+ "yPosition":0,
41
+ "squash":0,
42
+ "color":0//["Peach","Red","Pink"], ["Orange","Red","Pink","Peach","Black"]
43
+ },
44
+ "mole": {
45
+ "on": false,
46
+ "size": 4,
47
+ "xPosition": 2,
48
+ "yPosition": 20
49
+ },
50
+ "hair":{
51
+ "page":0,
52
+ "type":0,
53
+ "color":0,//["Black","Brown","Red","Reddish Brown","Grey","Light Brown","Dark Blonde","Blonde"]
54
+ "flipped":false
55
+ },
56
+ "eyebrows":{
57
+ "page":0,
58
+ "type":0,
59
+ "rotation":0,
60
+ "size":0,
61
+ "yPosition":0,
62
+ "distanceApart":0,
63
+ "squash":0,
64
+ "color":0//["Black","Brown","Red","Reddish Brown","Grey","Light Brown","Dark Blonde","Blonde"]
65
+ },
66
+ "eyes":{
67
+ "page":0,
68
+ "type":0,
69
+ "rotation":0,
70
+ "yPosition":0,
71
+ "size":0,
72
+ "distanceApart":0,
73
+ "squash":0,
74
+ "color":0//["Black","Grey","Brown","Lime","Blue","Green"]
75
+ },
76
+ "glasses":{
77
+ "type":0,
78
+ "size":0,
79
+ "yPosition":0,
80
+ "color":0//["Grey","Brown","Red","Blue","Yellow","White"], ["Black","Brown","Red","Blue","Yellow","Grey"]
81
+ },
82
+ "beard":{
83
+ "mustache":{
84
+ "type":0,
85
+ "size":0,
86
+ "yPosition":0
87
+ },
88
+ "type":0,
89
+ "color":0//["Black","Brown","Red","Reddish Brown","Grey","Light Brown","Dark Blonde","Blonde"]
90
+ }
91
91
  }