Please enable JavaScript.
Coggle requires JavaScript to display documents.
WebGL :fire: - Coggle Diagram
THREE JS
Scene & Core
-
Scene
fog: Adds distance-based atmosphere (e.g., Fog, FogExp2).
background: Can be set to a color, texture, or CubeTexture (Skybox).
-
Cameras ( THREE.Camera )
Perspective Camera ( PerspectiveCamera ): Standard, realistic view (objects appear smaller the farther they are).
-
-
-
Orthographic Camera (OrthographicCamera): Used for 2D, technical, or isometric views (objects maintain size regardless of distance).
Lights (THREE.Light)
Ambient Light (AmbientLight): Illuminates all objects in the scene equally (no shadows, low performance cost).
Directional Light (DirectionalLight): Simulates distant light sources like the sun (casts parallel shadows).
Point Light (PointLight): A light that radiates from a single point in all directions (like a light bulb).
-
Hemisphere Light (HemisphereLight): Used for natural, outdoor lighting (sky color and ground color).
-
-
Textures (THREE.Texture)
Texture Types
Texture: General image map (e.g., Base Color/Albedo).
-
-
-
Ecosystem
React Three Fiber (R3F)
useFrame: The R3F hook for the render loop. Knowing how to use it for mutations (mesh.current.rotation.y += 0.01) versus state updates (avoiding them) is critical for performance.
useLoader / Suspense: The standard, performant way to load assets (textures, GLB models) asynchronously while showing a fallback loader.
useThree: The hook to access the underlying Three.js state (e.g., the renderer, scene, camera), which is often necessary for advanced control or custom effects.
-
-