File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export class NgtsMeshDistortMaterial {
38
38
inject ( DestroyRef ) . onDestroy ( ( ) => this . material . dispose ( ) ) ;
39
39
40
40
injectBeforeRender ( ( { clock } ) => {
41
- this . material . time = clock . getElapsedTime ( ) * this . speed ( ) ;
41
+ this . material . time = clock . elapsedTime * this . speed ( ) ;
42
42
} ) ;
43
43
}
44
44
}
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ export class NgtsMeshTransmissionMaterial {
185
185
this . side ( ) ,
186
186
] ;
187
187
188
- material . time = clock . getElapsedTime ( ) ;
188
+ material . time = clock . elapsedTime ;
189
189
// Render only if the buffer matches the built-in and no transmission sampler is set
190
190
// @ts -expect-error - we know material.buffer is not just undefined | null
191
191
if ( material . buffer === fboMain . texture && ! transmissionSampler ) {
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export class NgtsFloat {
68
68
69
69
const container = this . floatRef ( ) . nativeElement ;
70
70
71
- const offsetTime = offset + clock . getElapsedTime ( ) ;
71
+ const offsetTime = offset + clock . elapsedTime ;
72
72
container . rotation . x = ( Math . cos ( ( offsetTime / 4 ) * speed ) / 8 ) * rotationIntensity ;
73
73
container . rotation . y = ( Math . sin ( ( offsetTime / 4 ) * speed ) / 8 ) * rotationIntensity ;
74
74
container . rotation . z = ( Math . sin ( ( offsetTime / 4 ) * speed ) / 20 ) * rotationIntensity ;
You can’t perform that action at this time.
0 commit comments