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:
parent
6c5aa52c95
commit
801e1b043a
2 changed files with 177 additions and 41 deletions
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue