File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,10 @@ function ExplosionRenderer({ entity }: { entity: Entity }) {
221
221
222
222
useFrame ( ( _ , delta ) => {
223
223
if ( ! groupRef . current ) return ;
224
- const { duration, current } = entity . get ( Explosion ) ! ;
224
+ const explosion = entity . get ( Explosion ) ;
225
+ if ( ! explosion ) return ;
226
+ const { duration, current, velocities } = explosion ;
225
227
const progress = current / duration ;
226
- const velocities = entity . get ( Explosion ) ! . velocities ;
227
228
const meshes = groupRef . current . children as THREE . Mesh [ ] ;
228
229
229
230
particles . forEach ( ( _ , i ) => {
Original file line number Diff line number Diff line change @@ -82,6 +82,5 @@ export const pollInput = ({ world }: { world: World }) => {
82
82
input . y = 0 ;
83
83
}
84
84
} ,
85
- { changeDetection : true }
86
85
) ;
87
86
} ;
Original file line number Diff line number Diff line change 1
1
import { type Entity , trait } from 'koota' ;
2
2
3
3
export const Avoidance = trait ( {
4
- neighbors : [ ] as Entity [ ] ,
4
+ neighbors : ( ) => [ ] as Entity [ ] ,
5
5
range : 1.5 ,
6
6
} ) ;
You can’t perform that action at this time.
0 commit comments