pixi-live2d-display-advanced 0.5.4 → 0.5.5

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.
@@ -78,7 +78,7 @@ const config = {
78
78
  preserveExpressionOnMotion: true,
79
79
  cubism4: CubismConfig
80
80
  };
81
- const VERSION = "v0.5.4";
81
+ const VERSION = "v0.5.5";
82
82
  const logger = {
83
83
  log(tag, ...messages) {
84
84
  if (config.logLevel <= config.LOG_LEVEL_VERBOSE) {
@@ -102,6 +102,9 @@ function clamp(num, lower, upper) {
102
102
  function rand(min, max) {
103
103
  return Math.random() * (max - min) + min;
104
104
  }
105
+ function MBToByte(mb) {
106
+ return 1024 * 1024 * mb;
107
+ }
105
108
  function copyProperty(type2, from, to, fromKey, toKey) {
106
109
  const value = from[fromKey];
107
110
  if (value !== null && typeof value === type2) {
@@ -5779,7 +5782,10 @@ class Live2DModel extends Container {
5779
5782
  this.internalModel.update(this.deltaTime, this.elapsedTime);
5780
5783
  this.deltaTime = 0;
5781
5784
  }
5782
- const internalTransform = tempMatrix.copyFrom(renderer.globalUniforms.uniforms.projectionMatrix).append(this.worldTransform);
5785
+ const internalTransform = tempMatrix.copyFrom(renderer.projection.projectionMatrix).append(this.worldTransform);
5786
+ if (this.filters && this.filters.length > 0) {
5787
+ internalTransform.scale(-1, 1);
5788
+ }
5783
5789
  this.internalModel.updateTransform(internalTransform);
5784
5790
  this.internalModel.draw(renderer.gl);
5785
5791
  renderer.state.reset();
@@ -6712,6 +6718,7 @@ export {
6712
6718
  Live2DPhysics,
6713
6719
  Live2DPose,
6714
6720
  Live2DTransform,
6721
+ MBToByte,
6715
6722
  ModelSettings,
6716
6723
  MotionManager,
6717
6724
  MotionPreloadStrategy,
package/dist/cubism2.js CHANGED
@@ -79,7 +79,7 @@ var __async = (__this, __arguments, generator) => {
79
79
  preserveExpressionOnMotion: true,
80
80
  cubism4: CubismConfig
81
81
  };
82
- const VERSION = "v0.5.4";
82
+ const VERSION = "v0.5.5";
83
83
  const logger = {
84
84
  log(tag, ...messages) {
85
85
  if (config.logLevel <= config.LOG_LEVEL_VERBOSE) {
@@ -103,6 +103,9 @@ var __async = (__this, __arguments, generator) => {
103
103
  function rand(min, max) {
104
104
  return Math.random() * (max - min) + min;
105
105
  }
106
+ function MBToByte(mb) {
107
+ return 1024 * 1024 * mb;
108
+ }
106
109
  function copyProperty(type2, from, to, fromKey, toKey) {
107
110
  const value = from[fromKey];
108
111
  if (value !== null && typeof value === type2) {
@@ -5780,7 +5783,10 @@ var __async = (__this, __arguments, generator) => {
5780
5783
  this.internalModel.update(this.deltaTime, this.elapsedTime);
5781
5784
  this.deltaTime = 0;
5782
5785
  }
5783
- const internalTransform = tempMatrix.copyFrom(renderer.globalUniforms.uniforms.projectionMatrix).append(this.worldTransform);
5786
+ const internalTransform = tempMatrix.copyFrom(renderer.projection.projectionMatrix).append(this.worldTransform);
5787
+ if (this.filters && this.filters.length > 0) {
5788
+ internalTransform.scale(-1, 1);
5789
+ }
5784
5790
  this.internalModel.updateTransform(internalTransform);
5785
5791
  this.internalModel.draw(renderer.gl);
5786
5792
  renderer.state.reset();
@@ -6712,6 +6718,7 @@ var __async = (__this, __arguments, generator) => {
6712
6718
  exports2.Live2DPhysics = Live2DPhysics;
6713
6719
  exports2.Live2DPose = Live2DPose;
6714
6720
  exports2.Live2DTransform = Live2DTransform;
6721
+ exports2.MBToByte = MBToByte;
6715
6722
  exports2.ModelSettings = ModelSettings;
6716
6723
  exports2.MotionManager = MotionManager;
6717
6724
  exports2.MotionPreloadStrategy = MotionPreloadStrategy;