Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disappearing asteroids and bullets #289

Merged
merged 2 commits into from
Jul 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@hmans/r3f-animate": "^0.0.5",
"@hmans/use-const": "^0.0.1",
"@react-three/drei": "^9.66.6",
"@react-three/fiber": "^8.13.0",
"@react-three/drei": "^9.78.1",
"@react-three/fiber": "^8.13.4",
"add": "^2.0.6",
"material-composer": "^0.2.6",
"material-composer-r3f": "^0.2.5",
Expand All @@ -25,7 +25,7 @@
"render-composer": "^0.2.8",
"shader-composer": "^0.4.9",
"shader-composer-toybox": "^0.1.3",
"three": "^0.152.2",
"three": "^0.154.0",
"three-stdlib": "^2.21.11",
"vfx-composer": "^0.4.0",
"vfx-composer-r3f": "^0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/entities/Asteroids.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const Asteroids = () => {
const rand = InstanceRNG()

return (
<InstancedParticles capacity={20000}>
<InstancedParticles capacity={20000} frustumCulled={false}>
<icosahedronGeometry />

<Composable.MeshStandardMaterial metalness={0.1} roughness={0.8}>
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/entities/Bullets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const players = ECS.world.with("isPlayer")
const bullets = ECS.world.with("isBullet")

export const Bullets = () => (
<InstancedParticles>
<InstancedParticles frustumCulled={false}>
<planeGeometry args={[0.15, 0.5]} />
<meshStandardMaterial color={new Color("orange").multiplyScalar(5)} />

Expand Down
Loading