Three.js Demos A collection of Three.js Demos
Home Docs Tutorials

audio

  • Music Visualizer

basics

  • Rotating Cube
  • Three.js Sphere Texture Mapping
  • Wireframe Toggle
  • Three.js Torus Knot Geometry
  • Ambient + Directional Light
  • Grid + Axes Helpers
  • 3D Point Cloud Visualization
  • Axes + Orbit Controls
  • Plane Shadows
  • Normals Material
  • Instanced Grid
  • Box Wireframe
  • Materials Gallery
  • Primitives Wall

camera

  • Orbit Controls Playground
  • First-Person Camera
  • Dolly Zoom (Vertigo Effect)

lighting

  • Three.js Point Light Interactive Demo
  • Directional Shadow Visualizer
  • Spotlight Follow Cursor
  • Flickering Torch
  • Sunrise-to-Sunset
  • Multiple Light Blending
  • Disco Lights
  • Volumetric Light Shafts
  • Soft Shadows in Three.js
  • Neon Glow Text
  • Depth of Field Gallery

materials

  • Environment Map (HDRI)
  • Procedural Noise Texture

particles

  • Snowfall
  • Fireworks
  • Galaxy Generator

physics

  • Gravity Cubes
  • Bouncing Balls

postfx

  • Bloom Glow
  • Motion Blur
  • Depth of Field Focus
  • Glitch VFX Playground
  • Film Grain Studio

procedural

  • Random Terrain
  • Rain with Splashes
  • Fountain Emitter
  • Animated Texture Scroll
  • Starfield Warp

retro

  • Plasma 3D

science

  • Solar System

webgl techniques

  • Render Targets
Back to index

Demos

audio

  • Music Visualizer

basics

  • Rotating Cube
  • Three.js Sphere Texture Mapping
  • Wireframe Toggle
  • Three.js Torus Knot Geometry
  • Ambient + Directional Light
  • Grid + Axes Helpers
  • 3D Point Cloud Visualization
  • Axes + Orbit Controls
  • Plane Shadows
  • Normals Material
  • Instanced Grid
  • Box Wireframe
  • Materials Gallery
  • Primitives Wall

camera

  • Orbit Controls Playground
  • First-Person Camera
  • Dolly Zoom (Vertigo Effect)

lighting

  • Three.js Point Light Interactive Demo
  • Directional Shadow Visualizer
  • Spotlight Follow Cursor
  • Flickering Torch
  • Sunrise-to-Sunset
  • Multiple Light Blending
  • Disco Lights
  • Volumetric Light Shafts
  • Soft Shadows in Three.js
  • Neon Glow Text
  • Depth of Field Gallery

materials

  • Environment Map (HDRI)
  • Procedural Noise Texture

particles

  • Snowfall
  • Fireworks
  • Galaxy Generator

physics

  • Gravity Cubes
  • Bouncing Balls

postfx

  • Bloom Glow
  • Motion Blur
  • Depth of Field Focus
  • Glitch VFX Playground
  • Film Grain Studio

procedural

  • Random Terrain
  • Rain with Splashes
  • Fountain Emitter
  • Animated Texture Scroll
  • Starfield Warp

retro

  • Plasma 3D

science

  • Solar System

webgl techniques

  • Render Targets
Back to index

Starfield Warp

Infinite starfield moving towards the camera with wraparound.

What this code does

- Points distributed in a box fly towards the camera along -Z.
- When stars pass near the camera they wrap back to the far plane.
- Speed parameter scales per-star velocities for warp-like motion.

JavaScript (plain)

// Create starfield points and move them along -Z, wrapping when close
← Back

About

A curated collection of Three.js demos showcasing WebGL and 3D graphics — lighting, materials, geometry, and interactive examples to learn and explore Three.js.

Explore

  • All demos
  • Docs

Links

  • Three.js Docs
  • Three.js Examples
  • WebGL API (MDN)
© 2025 Three.js Demos