File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " planck " : patch
3
+ ---
4
+
5
+ Improve world.queueUpdate
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ export class World {
128
128
/** @internal */ m_positionIterations : number ;
129
129
/** @internal */ m_t : number ;
130
130
131
- /** @internal */ m_step_callback : ( ( world : World ) => unknown ) [ ] = [ ] ;
131
+ /** @internal */ m_step_callback : ( ( world : World ) => unknown ) [ ] ;
132
132
133
133
// TODO
134
134
/** @internal */ _listeners : {
@@ -186,6 +186,8 @@ export class World {
186
186
this . m_positionIterations = def . positionIterations ;
187
187
188
188
this . m_t = 0 ;
189
+
190
+ this . m_step_callback = [ ] ;
189
191
}
190
192
191
193
/** @internal */
@@ -861,7 +863,7 @@ export class World {
861
863
this . m_locked = false ;
862
864
863
865
let callback : ( world : World ) => unknown ;
864
- while ( callback = this . m_step_callback . pop ( ) ) {
866
+ while ( callback = this . m_step_callback . shift ( ) ) {
865
867
callback ( this ) ;
866
868
}
867
869
You can’t perform that action at this time.
0 commit comments