@canvas3/nuxt 0.1.14 → 0.1.15
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
|
@@ -486,19 +486,21 @@ class Canvas3Class {
|
|
|
486
486
|
if (this.animateImageMesh) {
|
|
487
487
|
this.resizeImageStore();
|
|
488
488
|
}
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
material.uniforms.uTime
|
|
492
|
-
|
|
493
|
-
material.uniforms.uMouse
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
material.uniforms.uMouseMovement
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
489
|
+
if (this.materials.length > 0) {
|
|
490
|
+
for (const material of this.materials) {
|
|
491
|
+
if (material.uniforms.uTime)
|
|
492
|
+
material.uniforms.uTime.value = this.time;
|
|
493
|
+
if (material.uniforms.uMouse)
|
|
494
|
+
material.uniforms.uMouse.value.set(
|
|
495
|
+
this.mouse.x,
|
|
496
|
+
this.mouse.y
|
|
497
|
+
);
|
|
498
|
+
if (material.uniforms.uMouseMovement)
|
|
499
|
+
material.uniforms.uMouseMovement.value.set(
|
|
500
|
+
this.mouse.movementX,
|
|
501
|
+
this.mouse.movementY
|
|
502
|
+
);
|
|
503
|
+
}
|
|
502
504
|
}
|
|
503
505
|
for (const [_key, callback] of this.animations.entries()) {
|
|
504
506
|
callback?.();
|
|
@@ -13,6 +13,7 @@ export declare const Canvas3: {
|
|
|
13
13
|
setMeshPositionsUpdate: (state: boolean) => void;
|
|
14
14
|
scrollToTop: (delay?: number) => void;
|
|
15
15
|
scrollTo: (position: number, delay?: number) => void;
|
|
16
|
+
getScrollPosition: () => number | null;
|
|
16
17
|
getScrollSpeed: () => number | null;
|
|
17
18
|
getCamera: () => import("three").PerspectiveCamera | null;
|
|
18
19
|
getRenderer: () => import("three").WebGLRenderer | null;
|
|
@@ -17,6 +17,9 @@ export const Canvas3 = {
|
|
|
17
17
|
setMeshPositionsUpdate: mainClass.setMeshPositionsUpdate.bind(mainClass),
|
|
18
18
|
scrollToTop: mainClass.scrollToTop.bind(mainClass),
|
|
19
19
|
scrollTo: mainClass.scrollTo.bind(mainClass),
|
|
20
|
+
getScrollPosition: () => {
|
|
21
|
+
return mainClass.scroll?.scrollRendered ?? null;
|
|
22
|
+
},
|
|
20
23
|
getScrollSpeed: () => {
|
|
21
24
|
return mainClass.scroll?.speed ?? null;
|
|
22
25
|
},
|