Skip to content

Commit 6995fb3

Browse files
authored
Merge pull request #143 from ospira/update-revade-example
chore: update revade example
2 parents 65e7bf6 + a9071a3 commit 6995fb3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

benches/apps/revade/src/app.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,10 @@ function ExplosionRenderer({ entity }: { entity: Entity }) {
221221

222222
useFrame((_, delta) => {
223223
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;
225227
const progress = current / duration;
226-
const velocities = entity.get(Explosion)!.velocities;
227228
const meshes = groupRef.current.children as THREE.Mesh[];
228229

229230
particles.forEach((_, i) => {

benches/apps/revade/src/systems/poll-input.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,5 @@ export const pollInput = ({ world }: { world: World }) => {
8282
input.y = 0;
8383
}
8484
},
85-
{ changeDetection: true }
8685
);
8786
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { type Entity, trait } from 'koota';
22

33
export const Avoidance = trait({
4-
neighbors: [] as Entity[],
4+
neighbors: () => [] as Entity[],
55
range: 1.5,
66
});

0 commit comments

Comments
 (0)