Thebrowserlab
A 3D editor and creative coding environment that runs entirely in the browser. Built with React, Three.js, and TypeScript.
Install / Use
/learn @icurtis1/ThebrowserlabREADME
The Browser Lab
A 3D editor and creative coding environment that runs entirely in the browser. Built with React, Three.js, and TypeScript.
<img src="./public/media/demo.gif" alt="Demo" width="800" />Features
- Full 3D scene editor with transform controls (translate, rotate, scale)
- Physics simulation with Rapier
- Dynamic, static, and kinematic body types
- Realistic collision detection and response
- Configurable physics properties (mass, friction, restitution)
- Particle systems
- Particle systems
- Code editor for custom Three.js scripts
- Material and shader editor
- Timeline for animations
- Keyframe-based animation system
- Support for position, rotation, and scale keyframes
- Visual timeline editor with drag-and-drop keyframes
- Camera controls and preview
- Scene hierarchy management
- WebXR support
Getting Started
- Clone the repository
- Install dependencies
npm install - Start the development server
npm run dev
AI Features (Optional)
This version of the Browser Lab has AI features disabled by default. To enable AI features like chat assistance and image generation, you'll need to:
-
Set up a Supabase project and enable the Edge Functions.
-
Add the following entries as Edge Function secrets in your Supabase project. You can find this under the "Secrets" tab within the "Edge Functions" section:
OPENAI_API_KEYwith your OpenAI API keySTABILITY_API_KEYwith your Stability AI API key
-
Create the Edge Functions under the 'Functions' tab within the 'Edge Functions' section. This ensures users can access AI functionality securely, without exposing any API keys.
-
Update the
.envfile with your Supabase URL and anon key:VITE_SUPABASE_URL=your_supabase_url_here VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here
Features Requiring Supabase
The following features require a Supabase connection:
OpenAI
- AI Chat Assistant: Uses OpenAI to generate Three.js code based on your prompts
- Audio Transcription: Converts speech to text for chat commands <img src="./public/media/openai.gif" alt="Demo" width="800" />
StabilityAI
- AI Image Generation: Uses Stability AI to transform your viewport captures based on text prompts <img src="./public/media/stability.gif" alt="Demo" width="800" />
License
MIT
Related Skills
node-connect
352.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
