We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7099f5 commit a9071a3Copy full SHA for a9071a3
benches/apps/revade/src/app.tsx
@@ -221,9 +221,10 @@ function ExplosionRenderer({ entity }: { entity: Entity }) {
221
222
useFrame((_, delta) => {
223
if (!groupRef.current) return;
224
- const { duration, current } = entity.get(Explosion)!;
+ const explosion = entity.get(Explosion);
225
+ if (!explosion) return;
226
+ const { duration, current, velocities } = explosion;
227
const progress = current / duration;
- const velocities = entity.get(Explosion)!.velocities;
228
const meshes = groupRef.current.children as THREE.Mesh[];
229
230
particles.forEach((_, i) => {
0 commit comments