untitled-pixi-live2d-engine 1.3.4 → 1.3.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.
- package/dist/cubism-legacy.es.js +21 -5
- package/dist/cubism-legacy.js +21 -5
- package/dist/cubism-legacy.min.js +1 -1
- package/dist/cubism.es.js +21 -5
- package/dist/cubism.js +21 -5
- package/dist/cubism.min.js +1 -1
- package/dist/index.es.js +21 -5
- package/dist/index.js +21 -5
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +9 -1
package/dist/index.es.js
CHANGED
|
@@ -105,7 +105,7 @@ const config = {
|
|
|
105
105
|
preserveExpressionOnMotion: true,
|
|
106
106
|
cubism: CubismFrameworkConfig
|
|
107
107
|
};
|
|
108
|
-
const VERSION = "1.3.
|
|
108
|
+
const VERSION = "1.3.5";
|
|
109
109
|
const logger = {
|
|
110
110
|
log(tag, ...messages) {
|
|
111
111
|
if (config.logLevel <= config.LOG_LEVEL_VERBOSE) {
|
|
@@ -2854,13 +2854,29 @@ class Live2DPipe {
|
|
|
2854
2854
|
constructor(renderer) {
|
|
2855
2855
|
this.renderer = renderer;
|
|
2856
2856
|
}
|
|
2857
|
+
addPrepare(prepare, instructionSet) {
|
|
2858
|
+
var _a, _b;
|
|
2859
|
+
const renderPipes = this.renderer.renderPipes;
|
|
2860
|
+
(_b = (_a = renderPipes.batch) == null ? void 0 : _a.break) == null ? void 0 : _b.call(_a, instructionSet);
|
|
2861
|
+
instructionSet.add({
|
|
2862
|
+
renderPipeId: "live2d",
|
|
2863
|
+
action: "prepare",
|
|
2864
|
+
canBundle: false,
|
|
2865
|
+
prepare
|
|
2866
|
+
});
|
|
2867
|
+
}
|
|
2857
2868
|
addRenderable(model, instructionSet) {
|
|
2858
2869
|
var _a, _b;
|
|
2859
2870
|
const renderPipes = this.renderer.renderPipes;
|
|
2860
2871
|
(_b = (_a = renderPipes.batch) == null ? void 0 : _a.break) == null ? void 0 : _b.call(_a, instructionSet);
|
|
2861
2872
|
instructionSet.add(model);
|
|
2862
2873
|
}
|
|
2863
|
-
execute(
|
|
2874
|
+
execute(instruction) {
|
|
2875
|
+
if (!(instruction instanceof Live2DModel)) {
|
|
2876
|
+
instruction.prepare();
|
|
2877
|
+
return;
|
|
2878
|
+
}
|
|
2879
|
+
const model = instruction;
|
|
2864
2880
|
if (!model.visible || model.alpha <= 0) {
|
|
2865
2881
|
return;
|
|
2866
2882
|
}
|
|
@@ -3272,10 +3288,10 @@ class Live2DModel extends Container {
|
|
|
3272
3288
|
}
|
|
3273
3289
|
};
|
|
3274
3290
|
const effects = this.effects;
|
|
3275
|
-
if (effects == null ? void 0 : effects.length) {
|
|
3276
|
-
this.prepareForRender();
|
|
3277
|
-
}
|
|
3278
3291
|
if (effects) {
|
|
3292
|
+
if (effects.length) {
|
|
3293
|
+
renderPipes.live2d.addPrepare(() => this.prepareForRender(), instructionSet);
|
|
3294
|
+
}
|
|
3279
3295
|
for (let i = 0; i < effects.length; i++) {
|
|
3280
3296
|
const effect = effects[i];
|
|
3281
3297
|
const filters = effect.filters;
|
package/dist/index.js
CHANGED
|
@@ -108,7 +108,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
108
108
|
preserveExpressionOnMotion: true,
|
|
109
109
|
cubism: CubismFrameworkConfig
|
|
110
110
|
};
|
|
111
|
-
const VERSION = "1.3.
|
|
111
|
+
const VERSION = "1.3.5";
|
|
112
112
|
const logger = {
|
|
113
113
|
log(tag, ...messages) {
|
|
114
114
|
if (config.logLevel <= config.LOG_LEVEL_VERBOSE) {
|
|
@@ -2857,13 +2857,29 @@ var __async = (__this, __arguments, generator) => {
|
|
|
2857
2857
|
constructor(renderer) {
|
|
2858
2858
|
this.renderer = renderer;
|
|
2859
2859
|
}
|
|
2860
|
+
addPrepare(prepare, instructionSet) {
|
|
2861
|
+
var _a, _b;
|
|
2862
|
+
const renderPipes = this.renderer.renderPipes;
|
|
2863
|
+
(_b = (_a = renderPipes.batch) == null ? void 0 : _a.break) == null ? void 0 : _b.call(_a, instructionSet);
|
|
2864
|
+
instructionSet.add({
|
|
2865
|
+
renderPipeId: "live2d",
|
|
2866
|
+
action: "prepare",
|
|
2867
|
+
canBundle: false,
|
|
2868
|
+
prepare
|
|
2869
|
+
});
|
|
2870
|
+
}
|
|
2860
2871
|
addRenderable(model, instructionSet) {
|
|
2861
2872
|
var _a, _b;
|
|
2862
2873
|
const renderPipes = this.renderer.renderPipes;
|
|
2863
2874
|
(_b = (_a = renderPipes.batch) == null ? void 0 : _a.break) == null ? void 0 : _b.call(_a, instructionSet);
|
|
2864
2875
|
instructionSet.add(model);
|
|
2865
2876
|
}
|
|
2866
|
-
execute(
|
|
2877
|
+
execute(instruction) {
|
|
2878
|
+
if (!(instruction instanceof Live2DModel)) {
|
|
2879
|
+
instruction.prepare();
|
|
2880
|
+
return;
|
|
2881
|
+
}
|
|
2882
|
+
const model = instruction;
|
|
2867
2883
|
if (!model.visible || model.alpha <= 0) {
|
|
2868
2884
|
return;
|
|
2869
2885
|
}
|
|
@@ -3275,10 +3291,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3275
3291
|
}
|
|
3276
3292
|
};
|
|
3277
3293
|
const effects = this.effects;
|
|
3278
|
-
if (effects == null ? void 0 : effects.length) {
|
|
3279
|
-
this.prepareForRender();
|
|
3280
|
-
}
|
|
3281
3294
|
if (effects) {
|
|
3295
|
+
if (effects.length) {
|
|
3296
|
+
renderPipes.live2d.addPrepare(() => this.prepareForRender(), instructionSet);
|
|
3297
|
+
}
|
|
3282
3298
|
for (let i = 0; i < effects.length; i++) {
|
|
3283
3299
|
const effect = effects[i];
|
|
3284
3300
|
const filters = effect.filters;
|