yuliang 6 months ago
parent
commit
b1876f4463
  1. 6
      src/modules/cl2/Cl23dObject.ts
  2. 6
      src/modules/clx/Clx3dObject.ts

6
src/modules/cl2/Cl23dObject.ts

@ -353,7 +353,7 @@ export default class Cl23dObject extends THREE.Object3D {
const ptrPillar = this.getObjectByName('ptrPillar') const ptrPillar = this.getObjectByName('ptrPillar')
const pz = ptrPillar.position.z const pz = ptrPillar.position.z
return new Promise(resolve => { return new Promise(resolve => {
const bh = 0.22 + 0.075 const bh = 0.22
const children = ptrFork.children const children = ptrFork.children
gsap.to(ptrFork.position, { gsap.to(ptrFork.position, {
@ -370,10 +370,10 @@ export default class Cl23dObject extends THREE.Object3D {
const child = children[i] const child = children[i]
child.position.y = bh - a.y child.position.y = bh - a.y
} }
} else if (a.y < 0.11 ) { } else if (a.y < 0 ) {
for (let i = 0; i < children.length; i++) { for (let i = 0; i < children.length; i++) {
const child = children[i] const child = children[i]
child.position.y = 0.11 - a.y child.position.y = 0 - a.y
} }
} }
} }

6
src/modules/clx/Clx3dObject.ts

@ -630,7 +630,7 @@ export default class Clx3dObject extends THREE.Object3D {
}) })
return new Promise(resolve => { return new Promise(resolve => {
const bh = 0.22 + 0.075 const bh = 0.22
const children = clxFork.children const children = clxFork.children
gsap.to(clxFork.position, { gsap.to(clxFork.position, {
@ -648,10 +648,10 @@ export default class Clx3dObject extends THREE.Object3D {
const child = children[i] const child = children[i]
child.position.y = bh - a.y child.position.y = bh - a.y
} }
} else if (a.y < 0.11 ) { } else if (a.y < 0 ) {
for (let i = 0; i < children.length; i++) { for (let i = 0; i < children.length; i++) {
const child = children[i] const child = children[i]
child.position.y = 0.11 - a.y child.position.y = 0 - a.y
} }
} }
} }

Loading…
Cancel
Save