delta
This commit is contained in:
parent
7f0bb90fad
commit
03e704f2f5
31
app.js
31
app.js
@ -247,9 +247,12 @@ class MinoMaterial extends THREE.MeshBasicMaterial {
|
|||||||
|
|
||||||
constructor(color) {
|
constructor(color) {
|
||||||
super({
|
super({
|
||||||
|
side: THREE.DoubleSide,
|
||||||
color: color,
|
color: color,
|
||||||
reflectivity: 0.95,
|
reflectivity: 0.95,
|
||||||
envMap: minoRenderTarget.texture
|
envMap: minoRenderTarget.texture,
|
||||||
|
transparent: true,
|
||||||
|
opacity: 0.8
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -819,14 +822,14 @@ const fps = new FPS.default();
|
|||||||
if (showFPS) document.body.appendChild(fps.dom);
|
if (showFPS) document.body.appendChild(fps.dom);
|
||||||
|
|
||||||
|
|
||||||
const GLOBAL_ROTATION = 0.0025
|
const GLOBAL_ROTATION = 0.15625
|
||||||
|
|
||||||
const darkTextureRotation = 0.0006
|
const darkTextureRotation = 0.0375
|
||||||
const darkMoveForward = -0.0007
|
const darkMoveForward = -0.04375
|
||||||
const darkOpacity = 0.2
|
const darkOpacity = 0.2
|
||||||
|
|
||||||
const colorFullTextureRotation = 0.0006
|
const colorFullTextureRotation = 0.0375
|
||||||
const colorFullMoveForward = -0.0012
|
const colorFullMoveForward = -0.075
|
||||||
const colorFullOpacity = 0.2
|
const colorFullOpacity = 0.2
|
||||||
|
|
||||||
const commonCylinderGeometry = new THREE.CylinderGeometry(25, 25, 500, 12, 1, true)
|
const commonCylinderGeometry = new THREE.CylinderGeometry(25, 25, 500, 12, 1, true)
|
||||||
@ -939,18 +942,18 @@ let clock = new THREE.Clock()
|
|||||||
|
|
||||||
function animate() {
|
function animate() {
|
||||||
|
|
||||||
darkCylinder.rotation.y += GLOBAL_ROTATION
|
const delta = clock.getDelta()
|
||||||
darkCylinderTexture.offset.y -= darkMoveForward
|
|
||||||
darkCylinderTexture.offset.x -= darkTextureRotation
|
|
||||||
|
|
||||||
colorFullCylinder.rotation.y += GLOBAL_ROTATION
|
darkCylinder.rotation.y += GLOBAL_ROTATION * delta
|
||||||
colorFullCylinderTexture.offset.y -= colorFullMoveForward
|
darkCylinderTexture.offset.y -= darkMoveForward * delta
|
||||||
colorFullCylinderTexture.offset.x -= colorFullTextureRotation
|
darkCylinderTexture.offset.x -= darkTextureRotation * delta
|
||||||
|
|
||||||
|
colorFullCylinder.rotation.y += GLOBAL_ROTATION * delta
|
||||||
|
colorFullCylinderTexture.offset.y -= colorFullMoveForward * delta
|
||||||
|
colorFullCylinderTexture.offset.x -= colorFullTextureRotation * delta
|
||||||
|
|
||||||
controls.update()
|
controls.update()
|
||||||
|
|
||||||
const delta = clock.getDelta()
|
|
||||||
|
|
||||||
matrix.updateUnlockedMinoes(delta)
|
matrix.updateUnlockedMinoes(delta)
|
||||||
if (mixer) mixer.update(delta)
|
if (mixer) mixer.update(delta)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user