Skip to content

Commit

Permalink
slight intro animation timing tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
gnikoloff committed Dec 19, 2024
1 parent 0ed4738 commit faaee9b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
32 changes: 17 additions & 15 deletions src/app/Renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,21 +464,23 @@ export default class Renderer extends RenderingContext {
this.sunIntensity = sunIntensity
},
onComplete: () => {
new Tween({
durationMS: FIREWORK_PARTICLES_LOAD_ANIM_DURATION_MS,
delayMS: FIREWORK_PARTICLES_LOAD_ANIM_DELAY_MS,
easeName: FIREWORK_PARTICLES_LOAD_ANIM_EASE,
onUpdate: (t) => {
this.lightingManager.fireParticlesRevealFactor = t
},
onComplete: () => {
document.getElementById('logo').classList.toggle('faded')
this.mainCameraCtrl.revealTouchControls()
if (this.onIntroAnimComplete) {
this.onIntroAnimComplete()
}
},
}).start()
// ...
},
}).start()

new Tween({
durationMS: FIREWORK_PARTICLES_LOAD_ANIM_DURATION_MS,
delayMS: FIREWORK_PARTICLES_LOAD_ANIM_DELAY_MS,
easeName: FIREWORK_PARTICLES_LOAD_ANIM_EASE,
onUpdate: (t) => {
this.lightingManager.fireParticlesRevealFactor = t
},
onComplete: () => {
document.getElementById('logo').classList.toggle('faded')
this.mainCameraCtrl.revealTouchControls()
if (this.onIntroAnimComplete) {
this.onIntroAnimComplete()
}
},
}).start()

Expand Down
2 changes: 1 addition & 1 deletion src/app/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ export const MAIN_CAMERA_START_LOAD_START_POSITION = vec3.create(
export const MAIN_CAMERA_START_LOAD_END_POSITION = vec3.create(9.3, 3.4, -0.35)
export const MAIN_CAMERA_LOAD_ANIM_DURATION_MS = 1800
export const MAIN_CAMERA_LOAD_ANIM_EASE: EaseType = 'quad_Out'
export const FIREWORK_PARTICLES_LOAD_ANIM_DELAY_MS = 200
export const FIREWORK_PARTICLES_LOAD_ANIM_DELAY_MS = 1000
export const FIREWORK_PARTICLES_LOAD_ANIM_DURATION_MS = 500
export const FIREWORK_PARTICLES_LOAD_ANIM_EASE: EaseType = 'quad_Out'

0 comments on commit faaee9b

Please sign in to comment.