reze-engine 0.16.0 → 0.16.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/dist/pmx-loader.d.ts.map +1 -1
- package/dist/pmx-loader.js +26 -13
- package/package.json +1 -1
- package/src/pmx-loader.ts +24 -12
package/dist/pmx-loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pmx-loader.d.ts","sourceRoot":"","sources":["../src/pmx-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAWN,MAAM,SAAS,CAAA;AAGhB,OAAO,EAA0B,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEzE,qBAAa,SAAS;IACpB,OAAO,CAAC,IAAI,CAAU;IACtB,OAAO,CAAC,MAAM,CAAI;IAClB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,QAAQ,CAAI;IACpB,OAAO,CAAC,mBAAmB,CAAI;IAC/B,OAAO,CAAC,eAAe,CAAI;IAC3B,OAAO,CAAC,gBAAgB,CAAI;IAC5B,OAAO,CAAC,iBAAiB,CAAI;IAC7B,OAAO,CAAC,aAAa,CAAI;IACzB,OAAO,CAAC,cAAc,CAAI;IAC1B,OAAO,CAAC,kBAAkB,CAAI;IAC9B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,mBAAmB,CAA4B;IACvD,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,QAAQ,CAA0B;IAC1C,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,WAAW,CAAY;IAC/B,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,MAAM,CAAc;IAE5B,OAAO;WAIM,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAI9C,MAAM,CAAC,cAAc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AIM,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAI9C,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK;WAIpC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAKxF,OAAO,CAAC,KAAK;IAiBb,OAAO,CAAC,WAAW;IA+CnB,OAAO,CAAC,aAAa;IA+FrB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,cAAc;IAoEtB,OAAO,CAAC,UAAU;IAsKlB,OAAO,CAAC,WAAW;IA2JnB,OAAO,CAAC,iBAAiB;IAgDzB,OAAO,CAAC,gBAAgB;IAyFxB,OAAO,CAAC,WAAW;IAmGnB,OAAO,CAAC,kBAAkB;IAmC1B,OAAO,CAAC,OAAO;IAiJf,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,OAAO;IAmBf,OAAO,CAAC,QAAQ;CAIjB"}
|
package/dist/pmx-loader.js
CHANGED
|
@@ -482,21 +482,18 @@ export class PmxLoader {
|
|
|
482
482
|
this.getFloat32(); // x
|
|
483
483
|
this.getFloat32(); // y
|
|
484
484
|
this.getFloat32(); // z
|
|
485
|
-
this.getFloat32(); //
|
|
486
|
-
this.getFloat32(); //
|
|
487
|
-
this.getFloat32(); //
|
|
485
|
+
this.getFloat32(); // rotation quaternion x
|
|
486
|
+
this.getFloat32(); // rotation quaternion y
|
|
487
|
+
this.getFloat32(); // rotation quaternion z
|
|
488
|
+
this.getFloat32(); // rotation quaternion w
|
|
488
489
|
}
|
|
489
|
-
else if (morphType
|
|
490
|
-
// UV morph
|
|
490
|
+
else if (morphType >= 3 && morphType <= 7) {
|
|
491
|
+
// UV morph + additional UV channels 1-4; offset is always a Float4 per spec
|
|
491
492
|
this.getIndex(this.vertexIndexSize); // vertexIndex
|
|
492
|
-
this.getFloat32(); //
|
|
493
|
-
this.getFloat32(); //
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
// UV morph types 4-7 (additional UV channels)
|
|
497
|
-
this.getIndex(this.vertexIndexSize); // vertexIndex
|
|
498
|
-
this.getFloat32(); // u
|
|
499
|
-
this.getFloat32(); // v
|
|
493
|
+
this.getFloat32(); // x
|
|
494
|
+
this.getFloat32(); // y
|
|
495
|
+
this.getFloat32(); // z
|
|
496
|
+
this.getFloat32(); // w
|
|
500
497
|
}
|
|
501
498
|
else if (morphType === 8) {
|
|
502
499
|
// Material morph
|
|
@@ -531,6 +528,22 @@ export class PmxLoader {
|
|
|
531
528
|
this.getFloat32(); // toonCoeff b
|
|
532
529
|
this.getFloat32(); // toonCoeff a
|
|
533
530
|
}
|
|
531
|
+
else if (morphType === 9) {
|
|
532
|
+
// Flip morph (PMX 2.1): same layout as group morph
|
|
533
|
+
this.getNonVertexIndex(this.morphIndexSize); // morphIndex
|
|
534
|
+
this.getFloat32(); // ratio
|
|
535
|
+
}
|
|
536
|
+
else if (morphType === 10) {
|
|
537
|
+
// Impulse morph (PMX 2.1)
|
|
538
|
+
this.getNonVertexIndex(this.rigidBodyIndexSize); // rigidbodyIndex
|
|
539
|
+
this.getUint8(); // local flag
|
|
540
|
+
this.getFloat32(); // velocity x
|
|
541
|
+
this.getFloat32(); // velocity y
|
|
542
|
+
this.getFloat32(); // velocity z
|
|
543
|
+
this.getFloat32(); // torque x
|
|
544
|
+
this.getFloat32(); // torque y
|
|
545
|
+
this.getFloat32(); // torque z
|
|
546
|
+
}
|
|
534
547
|
}
|
|
535
548
|
}
|
|
536
549
|
this.morphs.push(morph);
|
package/package.json
CHANGED
package/src/pmx-loader.ts
CHANGED
|
@@ -559,19 +559,17 @@ export class PmxLoader {
|
|
|
559
559
|
this.getFloat32() // x
|
|
560
560
|
this.getFloat32() // y
|
|
561
561
|
this.getFloat32() // z
|
|
562
|
-
this.getFloat32() //
|
|
563
|
-
this.getFloat32() //
|
|
564
|
-
this.getFloat32() //
|
|
565
|
-
|
|
566
|
-
|
|
562
|
+
this.getFloat32() // rotation quaternion x
|
|
563
|
+
this.getFloat32() // rotation quaternion y
|
|
564
|
+
this.getFloat32() // rotation quaternion z
|
|
565
|
+
this.getFloat32() // rotation quaternion w
|
|
566
|
+
} else if (morphType >= 3 && morphType <= 7) {
|
|
567
|
+
// UV morph + additional UV channels 1-4; offset is always a Float4 per spec
|
|
567
568
|
this.getIndex(this.vertexIndexSize) // vertexIndex
|
|
568
|
-
this.getFloat32() //
|
|
569
|
-
this.getFloat32() //
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
this.getIndex(this.vertexIndexSize) // vertexIndex
|
|
573
|
-
this.getFloat32() // u
|
|
574
|
-
this.getFloat32() // v
|
|
569
|
+
this.getFloat32() // x
|
|
570
|
+
this.getFloat32() // y
|
|
571
|
+
this.getFloat32() // z
|
|
572
|
+
this.getFloat32() // w
|
|
575
573
|
} else if (morphType === 8) {
|
|
576
574
|
// Material morph
|
|
577
575
|
this.getNonVertexIndex(this.materialIndexSize) // materialIndex
|
|
@@ -604,6 +602,20 @@ export class PmxLoader {
|
|
|
604
602
|
this.getFloat32() // toonCoeff g
|
|
605
603
|
this.getFloat32() // toonCoeff b
|
|
606
604
|
this.getFloat32() // toonCoeff a
|
|
605
|
+
} else if (morphType === 9) {
|
|
606
|
+
// Flip morph (PMX 2.1): same layout as group morph
|
|
607
|
+
this.getNonVertexIndex(this.morphIndexSize) // morphIndex
|
|
608
|
+
this.getFloat32() // ratio
|
|
609
|
+
} else if (morphType === 10) {
|
|
610
|
+
// Impulse morph (PMX 2.1)
|
|
611
|
+
this.getNonVertexIndex(this.rigidBodyIndexSize) // rigidbodyIndex
|
|
612
|
+
this.getUint8() // local flag
|
|
613
|
+
this.getFloat32() // velocity x
|
|
614
|
+
this.getFloat32() // velocity y
|
|
615
|
+
this.getFloat32() // velocity z
|
|
616
|
+
this.getFloat32() // torque x
|
|
617
|
+
this.getFloat32() // torque y
|
|
618
|
+
this.getFloat32() // torque z
|
|
607
619
|
}
|
|
608
620
|
}
|
|
609
621
|
}
|