@canvas3/nuxt 0.1.8 → 0.1.10
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
|
@@ -481,12 +481,13 @@ class Canvas3Class {
|
|
|
481
481
|
this.mouse.movementY
|
|
482
482
|
);
|
|
483
483
|
}
|
|
484
|
-
if (this.composer)
|
|
485
|
-
this.composer.render();
|
|
486
484
|
for (const [_key, callback] of this.animations.entries()) {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
485
|
+
callback?.();
|
|
486
|
+
}
|
|
487
|
+
if (this.composer) {
|
|
488
|
+
this.composer.render();
|
|
489
|
+
} else if (this.renderer && this.camera) {
|
|
490
|
+
this.renderer.render(this.scene, this.camera);
|
|
490
491
|
}
|
|
491
492
|
try {
|
|
492
493
|
requestAnimationFrame(this.render.bind(this));
|
|
@@ -12,7 +12,7 @@ export declare const Canvas3: {
|
|
|
12
12
|
setMeshPositionsUpdate: (state: boolean) => void;
|
|
13
13
|
scrollToTop: (delay?: number) => void;
|
|
14
14
|
getScrollSpeed: () => number | null;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
getCamera: () => import("three").PerspectiveCamera | null;
|
|
16
|
+
getRenderer: () => import("three").WebGLRenderer | null;
|
|
17
|
+
getScene: () => import("three").Scene;
|
|
18
18
|
};
|
|
@@ -18,7 +18,7 @@ export const Canvas3 = {
|
|
|
18
18
|
getScrollSpeed: () => {
|
|
19
19
|
return mainClass.scroll?.speed ?? null;
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
getCamera: () => mainClass.camera,
|
|
22
|
+
getRenderer: () => mainClass.renderer,
|
|
23
|
+
getScene: () => mainClass.scene
|
|
24
24
|
};
|