@canvas3/nuxt 0.1.23 → 0.1.24
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/module.json
CHANGED
|
@@ -12,6 +12,7 @@ import Scroll from "#canvas3-nuxt/utils/canvas3/scroll";
|
|
|
12
12
|
import { defaultCanvas3Options } from "#canvas3-nuxt/constants/default-canvas3-options";
|
|
13
13
|
import { studio783log } from "#canvas3-nuxt/constants/studio783Log";
|
|
14
14
|
const canvasInitiated = ref(false);
|
|
15
|
+
const ANIMATION_FALSE_STATE_DELAY = 0;
|
|
15
16
|
class Canvas3Class {
|
|
16
17
|
canvasInitiated = canvasInitiated;
|
|
17
18
|
mouseMoveInProgress = false;
|
|
@@ -375,7 +376,13 @@ class Canvas3Class {
|
|
|
375
376
|
this.meshPositionsUpdate = state;
|
|
376
377
|
}
|
|
377
378
|
setAnimationsToRender(state) {
|
|
378
|
-
|
|
379
|
+
if (state) {
|
|
380
|
+
this.animationsRender = state;
|
|
381
|
+
} else {
|
|
382
|
+
setTimeout(() => {
|
|
383
|
+
this.animationsRender = state;
|
|
384
|
+
}, ANIMATION_FALSE_STATE_DELAY);
|
|
385
|
+
}
|
|
379
386
|
}
|
|
380
387
|
setAnimationToRender(callBackName, state, animationId) {
|
|
381
388
|
const animationToUpdate = this.animations.get(callBackName);
|
|
@@ -385,7 +392,14 @@ class Canvas3Class {
|
|
|
385
392
|
} else {
|
|
386
393
|
animationToUpdate.animationIds.splice(animationToUpdate.animationIds.indexOf(animationId), 1);
|
|
387
394
|
}
|
|
388
|
-
|
|
395
|
+
const newState = animationToUpdate.animationIds.length > 0;
|
|
396
|
+
if (newState) {
|
|
397
|
+
animationToUpdate.render = newState;
|
|
398
|
+
} else {
|
|
399
|
+
setTimeout(() => {
|
|
400
|
+
animationToUpdate.render = newState;
|
|
401
|
+
}, ANIMATION_FALSE_STATE_DELAY);
|
|
402
|
+
}
|
|
389
403
|
}
|
|
390
404
|
externalAnimationsRender() {
|
|
391
405
|
for (const [_key, callbackOption] of this.animations.entries()) {
|