sceneos
v1.0.0
Published
SceneOS — 3D Web, WebGPU, and React Three Fiber Skills Suite
Maintainers
Readme
SceneOS
The 3D web graphics engine for AI coding assistants.
Built directly from official documentation and modern standards, SceneOS provides your AI assistant with the rules, 42 reference guides, and code blueprints needed to build high-performance 3D web applications with Three.js, WebGPU, and React Three Fiber.
Why SceneOS
When generating 3D code, AI models frequently make common mistakes:
- State setters in frame loops: Calling
setStateinsideuseFrame, dropping framerates to 10 FPS. - Unclamped display scale: Omitting
<Canvas dpr={[1, 2]}>, causing mobile devices to overheat. - First-frame freeze: Compiling shaders on first interaction instead of warming up with
<Preload all />. - Mismatched model scale: Loading raw 3D models with arbitrary sizes and off-center origin points.
- Deprecated methods: Using obsolete pre-r152 APIs like
sRGBEncodingandGeometry.
SceneOS fixes this by giving your agent a straightforward 5-step workflow, 42 topic guides, and working code blueprints based on Three.js r160+ and React Three Fiber standards.
Installation
Install SceneOS into your AI assistant with one command:
npx sceneos installOr install for a specific assistant:
npx sceneos install cursor
npx sceneos install claude
npx sceneos install antigravity
npx sceneos install codex
npx sceneos install windsurfRules Enforced
| Anti-Pattern | Standard AI Tendency | SceneOS Standard |
| :--- | :--- | :--- |
| State updates in frame loop | Calls setState in useFrame | Mutates ref properties directly (ref.current.rotation.y += delta) |
| Unclamped canvas DPR | Leaves DPR default | Sets dpr={[1, 2]} on <Canvas> to protect mobile performance |
| Initial render freeze | Lazy shader compilation | Adds <Preload all /> inside <Suspense> to compile upfront |
| Broken model scale/origin | Renders raw GLB directly | Wraps models in <Resize> and <Center bottom> |
| Skinned mesh shadow bug | Shadows disappear when animating | Sets child.frustumCulled = false on skinned meshes |
| Deprecated color methods | Uses sRGBEncoding | Uses THREE.SRGBColorSpace and AgXToneMapping |
Scan your project for 3D issues anytime:
npx sceneos audit src/Reference Modules (42 Guides)
React Three Fiber and Drei
vite-r3f-project-setup— Vite, React, TypeScript, and GLSL project setupr3f-fundamentals— Canvas setup,useFrame,useThree, and pointer eventsr3f-gltf-scene-composition— Multi-model assembly, bounding box scaling, and bone socketsr3f-theatrejs-cinematic-studio— Visual timeline editor and keyframing with Theatre.jsr3f-debug-gizmos-stats— Transform controls, gizmos, and performance statsr3f-ui-controls-leva— GUI parameter sliders and color pickers with Levar3f-responsive-viewports-bounds— Screen auto-framing and mobile portrait FOV mathr3f-prerender-loading-pipeline— Shader pre-compilation and loading screensr3f-drei-ecosystem— Camera controls, environment lighting, 3D text, and model loadersdrei-staging-environment— Studio lighting presets, stage backdrops, and contact shadowsr3f-physics-rapier— Rapier WASM physics, rigid bodies, colliders, and character movementr3f-postprocessing— Bloom, depth of field, ambient occlusion, and vignetter3f-state-zustand— High-performance game loops decoupled from React stater3f-math-animation-maath— Smooth damping utilities and random generatorsr3f-mobile-optimization— Battery saving, scratch vectors, and tab visibility pausesr3f-multi-view-portals— Rendering multiple 3D views on one canvasr3f-hooks-lifecycle— Frame priorities, render passes, and offscreen portalsr3f-events-interaction— Pointer events, click handling, and BVH raycastingr3f-shaders-extend— Custom shaders withextendandshaderMaterialr3f-audio-reactive— Web Audio API analysis and shader uniform inputsr3f-webxr-spatial— VR and AR support with@react-three/xr
Vanilla Three.js and WebGPU
threejs-core— Scene setup, renderer, and GPU memory cleanupthreejs-debug-gui-tweakpane-lilgui— Live in-browser controls withlil-guiandTweakpanethreejs-batched-mesh— Rendering many geometries in a single draw call withBatchedMeshthreejs-webgpu-tsl— WebGPU renderer, node materials, and compute shadersthreejs-lighting-hdr-pipeline— AgX tone mapping, 3-point lighting, and HDR mapsthreejs-lighting-shadows— Shadow camera setup, soft shadow maps, and bias fixesthreejs-materials-shaders— Physical materials (glass, clearcoat) and shader extensionsthreejs-geometries— Custom buffer geometries and instanced renderingthreejs-loaders-assets— Loading GLTF, Draco, KTX2, and tracking progressthreejs-animation— Animation mixer, cross-fading, skeletal meshes, and morphsthreejs-cinematic-camera-rigs— Camera path tours and 3rd-person follow rigsthreejs-pro-shaders-fx— Fresnel rim lighting, noise dissolve effects, and toon shadingthreejs-procedural-geometry-csg— Boolean cuts, unions, and tube extrusionthreejs-render-pipeline-rtt— Render targets, mirrors, and security camerasthreejs-transparency-sorting— Depth buffer fixes and transparency orderthreejs-skinned-shadows-morphs— Fixing skinned character shadows and facial shapesthreejs-time-dilation-slowmotion— Bullet-time slow motion and animation scrubbingthreejs-advanced-textures— Video playback, canvas textures, and triplanar projectionthreejs-webgl-context-recovery— Handling WebGL context loss and mobile sleep/wakethreejs-interaction— Raycaster object selection and orbit controlsblender-to-threejs-pipeline— Texture packing, normal map fixes, and export settings
Asset Tools
Located in skills/scripts/:
# Compress GLB with Draco and WebP
node skills/scripts/optimize-model.js model.glb model-compressed.glb
# Generate React component from GLB
node skills/scripts/generate-gltf-component.js model.glb src/components/Model.tsx
# Setup Draco WASM decoders
node skills/scripts/setup-draco-decoders.js
# Check estimated GPU VRAM usage
node skills/scripts/vram-calculator.jsLicense
Apache License 2.0
