add EXAMPLE=folder-name support for tests & basic-host (#292)

* add EXAMPLE=folder-name support for tests & basic-host

* style: format e2e test files

* style: format threejs-server files
This commit is contained in:
Olivier Chafik 2026-01-19 20:16:37 +00:00 • committed by GitHub
commit 801e1b043a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 177 additions and 41 deletions

View file

@ -127,7 +127,11 @@ This is transparent to user code - just use `requestAnimationFrame` normally.
Supports alpha transparency for seamless host UI integration:
```javascript
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
const renderer = new THREE.WebGLRenderer({
canvas,
antialias: true,
alpha: true,
});
renderer.setClearColor(0x000000, 0); // Fully transparent
```

View file

@ -207,7 +207,9 @@ export default function ThreeJSApp({
const [error, setError] = useState<string | null>(null);
const canvasRef = useRef<HTMLCanvasElement>(null);
const containerRef = useRef<HTMLDivElement>(null);
const animControllerRef = useRef<ReturnType<typeof createAnimationController> | null>(null);
const animControllerRef = useRef<ReturnType<
typeof createAnimationController
> | null>(null);
const height = toolInputs?.height ?? toolInputsPartial?.height ?? 400;
const code = toolInputs?.code || DEFAULT_THREEJS_CODE;