cheryglsljs 1.1.13 → 1.1.14
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/package.json
CHANGED
@@ -6,7 +6,7 @@ import *as THREE from 'three';
|
|
6
6
|
|
7
7
|
export function ImageTransition1(
|
8
8
|
container,
|
9
|
-
{ speed = 0.02, strength = 0.02, radius = 0.02, hover = false,noise=0.4 } = {}
|
9
|
+
{ speed = 0.02, strength = 0.02, radius = 0.02, hover = false,noise=0.4,p=0.0 } = {}
|
10
10
|
) {
|
11
11
|
let image = Array.from(container.querySelectorAll("img"));
|
12
12
|
if (!image.length) {
|
@@ -43,7 +43,7 @@ export function ImageTransition1(
|
|
43
43
|
// Set camera to frame a 2x2 unit square
|
44
44
|
waveassets.camera.fov =
|
45
45
|
2 * Math.atan(container.clientHeight / 2 / 600) * (180 / Math.PI);
|
46
|
-
waveassets.camera.position.z = 2.8;
|
46
|
+
waveassets.camera.position.z = 2.8 +p;
|
47
47
|
|
48
48
|
let mesh;
|
49
49
|
|
@@ -5,7 +5,7 @@ import vertexShader from './Vertexshader.glsl.js';
|
|
5
5
|
import gsap from 'gsap';
|
6
6
|
import *as THREE from 'three';
|
7
7
|
|
8
|
-
const CherryWave = ({ container, image, speed = 0.05, strength = 0.02, hover = false,light }) => {
|
8
|
+
const CherryWave = ({ container, image, speed = 0.05, strength = 0.02, hover = false,light,p=0.0 }) => {
|
9
9
|
if (!image) {
|
10
10
|
console.log("No image provided");
|
11
11
|
return;
|
@@ -27,7 +27,7 @@ const CherryWave = ({ container, image, speed = 0.05, strength = 0.02, hover = f
|
|
27
27
|
|
28
28
|
// Set camera to frame a 2x2 unit square
|
29
29
|
waveassets.camera.fov = 2 * Math.atan(container.clientHeight / 2 / 600) * (180 / Math.PI);
|
30
|
-
waveassets.camera.position.z = 2.8;
|
30
|
+
waveassets.camera.position.z = 2.8 +p;
|
31
31
|
|
32
32
|
let mesh;
|
33
33
|
|