Skip to content

๐ŸŽจ v0.2.5 - Three.js Script Generator

Choose a tag to compare

@superdwayne superdwayne released this 05 Oct 15:59
· 28 commits to main since this release

New Feature: desktop_add_threejs_script Tool
Generate battle-tested Three.js scripts for 8th Wall Desktop AR experiences with a single command!
๐ŸŽฏ What's New
New MCP Tool: mcp_8thwall_desktop_add_threejs_script
Creates working Three.js scripts that:
โœ… Integrate properly with 8th Wall Desktop ECS v2
โœ… Handle XR8 pipeline initialization correctly
โœ… Work perfectly in AR mode on mobile devices
โœ… Include touch/click interaction support
โœ… Position objects optimally for AR viewing
โœ… Have comprehensive debugging logs
๐Ÿ“ฆ Installation
Download the bundle: mcp-8thwall-0.2.5-threejs.mcpb (6.3 MB)
Add to your MCP configuration in Cursor:
๐Ÿš€ Quick Start
๐ŸŽฎ Example: Interactive Color-Changing Sphere
Tested and working on actual mobile devices:
Large, glowing sphere positioned 5m ahead
Tap anywhere to cycle through colors
Smooth rotation animation
Proper 75ยฐ FOV for natural viewing
Touch event handling with debugging
โœจ Key Improvements
Correct XR8 Integration
Adds XR8.Threejs.pipelineModule() first
Uses Camera Pipeline Module pattern
Safe initialization in onUpdate callback
Proper Scene Access
Extracts scene/camera from xrScene() wrapper
Handles null checks and error cases
Names all objects to prevent crashes
AR Optimizations
Objects positioned 5 meters ahead (not too close!)
Eye-level placement (1.5m height)
75ยฐ camera FOV for natural view
Touch events with capture phase
๐Ÿ“š Documentation
Included guides:
THREEJS_SCRIPT_GUIDE.md - Complete usage guide
RELEASE-0.2.5.md - Detailed release notes
๐Ÿ› Bug Fixes
Fixed camera FOV settings for AR mode
Improved touch event handling reliability
Added comprehensive debug logging
Corrected event propagation handling
๐ŸŽ“ Lessons Learned
This tool was developed after extensive debugging:
XR8.Threejs.pipelineModule() must be added first
xrScene() returns a wrapper - extract scene/camera
Initialize in onUpdate, check every frame
Name all Three.js objects to prevent errors
AR positioning requires careful distance/height
๐Ÿ™ Tested On
โœ… iPhone AR mode
โœ… 8th Wall Desktop simulator
โœ… Touch interactions
โœ… Multiple objects in scene
โœ… Color changing with animations

Full Changelog: v0.2.4...v0.2.5