Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 15.5 — Particles and Instanced Effects
3D Web · Example 2 of 2

200 sparks, three ways

Positions come from a seeded generator, so the numbers never change. Triangles for the instanced version: 200 quads × 2.

Sparks, dust and light beams are many small soft shapes. Draw them as one Points object or one InstancedMesh (one draw call), blend them additively, and stop them from writing depth, or they hide each other.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 4 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Make 500 seeded dust specks as one Points object that hide nothing.

02

Say why additive blending is a good fit for the headlight beam but not for fog.

Explain it without notes

01

Why can a near particle hide a far one even though the near one is almost transparent?

02

When do you pick Points, InstancedMesh and Sprite?

200 sparks, three ways
Press Run to see the page.
idle

Console

Nothing logged yet.

Expected console output

200 separate meshes            draw calls: 200 | triangles: 400 | points: 0
one Points object              draw calls:   1 | triangles:   0 | points: 200
one InstancedMesh              draw calls:   1 | triangles: 400 | points: 0