@netless/app-slide 0.0.49 → 0.0.50
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/index.d.ts +1 -1
- package/dist/main.cjs.js +4 -4
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +13 -16
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +4 -4
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -1
package/dist/main.es.js
CHANGED
|
@@ -31739,13 +31739,13 @@ void main(void){
|
|
|
31739
31739
|
const t4 = this.ctx.fillTexture.getTexture(this.fillTextureId);
|
|
31740
31740
|
(t4 == null ? void 0 : t4.texture) && (this.fillMaskSprite.texture = t4.texture, this.fillMaskSprite.scale.x = 0.5, this.fillMaskSprite.scale.y = 0.5);
|
|
31741
31741
|
const e4 = this.ctx.fillTexture.getTexture(this.fillBgId);
|
|
31742
|
-
e4.texture && (this.fillSprite.texture = e4.texture, this.fillSprite.mask = this.fillMaskSprite, this.fillSprite.addChild(this.fillMaskSprite), r3 ? this.fillSprite.position.y = h2 : this.fillSprite.position.x = u2, this.textureContainer.addChild(this.fillSprite));
|
|
31742
|
+
e4.texture && (this.fillSprite.texture = e4.texture, this.fillSprite.mask = this.fillMaskSprite, this.fillSprite.addChild(this.fillMaskSprite), r3 ? this.fillSprite.position.y = h2 > 0 ? h2 : 0 : this.fillSprite.position.x = u2, this.textureContainer.addChild(this.fillSprite));
|
|
31743
31743
|
}
|
|
31744
31744
|
if (this.strokeBgId && this.strokeTextureId) {
|
|
31745
31745
|
const t4 = this.ctx.fillTexture.getTexture(this.strokeTextureId);
|
|
31746
31746
|
(t4 == null ? void 0 : t4.texture) && (this.strokeMaskSprite.texture = t4.texture, this.strokeMaskSprite.scale.x = 0.5, this.strokeMaskSprite.scale.y = 0.5);
|
|
31747
31747
|
const e4 = this.ctx.fillTexture.getTexture(this.strokeBgId);
|
|
31748
|
-
(e4 == null ? void 0 : e4.texture) && (this.strokeSprite.texture = e4.texture, this.strokeSprite.mask = this.strokeMaskSprite, this.strokeSprite.addChild(this.strokeMaskSprite), r3 ? this.strokeSprite.position.y = h2 : this.strokeSprite.position.x = u2, this.textureContainer.addChild(this.strokeSprite));
|
|
31748
|
+
(e4 == null ? void 0 : e4.texture) && (this.strokeSprite.texture = e4.texture, this.strokeSprite.mask = this.strokeMaskSprite, this.strokeSprite.addChild(this.strokeMaskSprite), r3 ? this.strokeSprite.position.y = h2 > 0 ? h2 : 0 : this.strokeSprite.position.x = u2, this.textureContainer.addChild(this.strokeSprite));
|
|
31749
31749
|
}
|
|
31750
31750
|
if (this.underline && (this.underline.render(), this.underline.sprite && this.fillMaskSprite)) {
|
|
31751
31751
|
let e4 = null;
|
|
@@ -31754,7 +31754,7 @@ void main(void){
|
|
|
31754
31754
|
r4.texture = (t3 = e4 == null ? void 0 : e4.texture) !== null && t3 !== void 0 ? t3 : null, r4.mask = this.underline.sprite, r4.addChild(this.underline.sprite), this.textureContainer.addChild(r4);
|
|
31755
31755
|
}
|
|
31756
31756
|
const p2 = Hy.create({ width: r3 ? a2 : e3, height: r3 ? Math.max(d2, n2) : s3, resolution: 2 });
|
|
31757
|
-
KR.textureCacheSize += p2.width * p2.height * 2, this.ctx.renderer.render(this.textureContainer, { renderTexture: p2 }), this.cacheSprite.texture = p2, this.container.addChild(this.cacheSprite), this.container.name = c2;
|
|
31757
|
+
KR.textureCacheSize += p2.width * p2.height * 2, this.ctx.renderer.render(this.textureContainer, { renderTexture: p2 }), this.cacheSprite.texture = p2, this.container.addChild(this.cacheSprite), r3 && h2 < 0 && (this.cacheSprite.position.y = h2), this.container.addChild(this.cacheSprite), this.container.name = c2;
|
|
31758
31758
|
}
|
|
31759
31759
|
destroy() {
|
|
31760
31760
|
this.cacheSprite.texture.destroy(true), this.cacheSprite.destroy({ texture: true, baseTexture: true }), this.textureContainer.destroy({ texture: true }), this.container.destroy({ children: true, texture: true });
|
|
@@ -33975,20 +33975,18 @@ void main(void){
|
|
|
33975
33975
|
const { task: e3 } = this.stageStates[t3];
|
|
33976
33976
|
e3.addMTask(() => VR(this, void 0, void 0, function* () {
|
|
33977
33977
|
const n2 = this.stageJsons[t3], i2 = this.stageCtxs[t3];
|
|
33978
|
-
|
|
33979
|
-
const r3 = yield i2.graphicsTexture.hasLocalCache();
|
|
33980
|
-
if (console.log("2"), r3)
|
|
33978
|
+
if (yield i2.graphicsTexture.hasLocalCache())
|
|
33981
33979
|
return;
|
|
33982
|
-
const
|
|
33983
|
-
this.collectChildren(n2,
|
|
33984
|
-
const
|
|
33985
|
-
for (let t4 = 0; t4 <
|
|
33986
|
-
const e4 =
|
|
33987
|
-
|
|
33980
|
+
const r3 = [];
|
|
33981
|
+
this.collectChildren(n2, r3);
|
|
33982
|
+
const o3 = Math.ceil(r3.length / 10), s3 = [];
|
|
33983
|
+
for (let t4 = 0; t4 < r3.length; t4 += o3) {
|
|
33984
|
+
const e4 = r3.slice(t4, t4 + o3);
|
|
33985
|
+
s3.push(() => (e4.forEach((t5) => {
|
|
33988
33986
|
(XR(t5) || qR(t5)) && NR(t5, i2, this.objPoolGroup);
|
|
33989
33987
|
}), Promise.resolve()));
|
|
33990
33988
|
}
|
|
33991
|
-
e3.addSubMTask(
|
|
33989
|
+
e3.addSubMTask(s3);
|
|
33992
33990
|
}));
|
|
33993
33991
|
}
|
|
33994
33992
|
createFillTexture(t3) {
|
|
@@ -35845,7 +35843,7 @@ void main(void){
|
|
|
35845
35843
|
}
|
|
35846
35844
|
var aC = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, lC = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: Object.create(null), interactiveSeqState: Object.create(null) }, uC = "";
|
|
35847
35845
|
try {
|
|
35848
|
-
uC = "0.1.
|
|
35846
|
+
uC = "0.1.53";
|
|
35849
35847
|
} catch (t3) {
|
|
35850
35848
|
uC = "dev";
|
|
35851
35849
|
}
|
|
@@ -36118,7 +36116,6 @@ void main(void){
|
|
|
36118
36116
|
if (e4 === void 0 && (e4 = true), !this.player)
|
|
36119
36117
|
return Promise.resolve();
|
|
36120
36118
|
if (this.needCreateNewPlayer() && (this.iosResetCache = [], KR.textureCacheSize = 0, this.iosNewPlayer = this.initPlayer(this.config), this.iosNewPlayer.setResourceData(this.__slideState.taskId, this.__slideState.url)), this.iosNewPlayer) {
|
|
36121
|
-
console.log("[slide] clear webgl context");
|
|
36122
36119
|
var r3 = this.player.getSnapshot();
|
|
36123
36120
|
this.cacheImage.src = r3, this.frame.appendChild(this.cacheImage), this.player.destroy(), this.player = this.iosNewPlayer, this.iosNewPlayer = void 0, this.needClearCacheImage = true, ((n2 = this == null ? void 0 : this.player) === null || n2 === void 0 ? void 0 : n2.view) && (this.player.view.style.visibility = "hidden", this.frame.appendChild(this.player.view));
|
|
36124
36121
|
}
|
|
@@ -38232,7 +38229,7 @@ class SlidePreviewer {
|
|
|
38232
38229
|
return `${this.namespace}-${className}`;
|
|
38233
38230
|
}
|
|
38234
38231
|
}
|
|
38235
|
-
const version = "0.0.
|
|
38232
|
+
const version = "0.0.50";
|
|
38236
38233
|
const SlideApp = {
|
|
38237
38234
|
kind: "Slide",
|
|
38238
38235
|
setup(context) {
|