Keep a three.js page running between calls
three_sessionStarts, lists, and stops persistent headless three.js pages so a slow or hard-to-reach scene loads once and stays available for inspection and interaction across calls.
Instructions
Start a headless page that stays open between tool calls (op start), so a scene that takes long to load or a state that is hard to reach is loaded once; three_page then looks at it and drives it. op status lists the open pages, op stop closes one. It stops by itself after 10 minutes without calls. Several pages can run side by side under different names (default main).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"op": "<op>"
},
"name": "three_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| name | No | name of the page (default main) | |
| root | No | folder to serve when the page needs files above its own folder | |
| wait | No | ms to let the scene run after load (default 1500) | |
| entry | No | ||
| width | No | ||
| height | No | ||
| target | No | Folder with the page (index.html), or the http(s) URL of a running dev server. | |
| webgpu | No |