Apply mechanical three.js fixes
three_fixApplies decision-free three.js upgrade fixes—API renames, addons imports, colorSpace, capped pixel ratio—as a dry run first, then one undoable write; re-run review after.
Instructions
Apply the review fixes that need no decision: renames with exactly the same meaning (BoxBufferGeometry -> BoxGeometry, THREE.Math -> MathUtils, applyMatrix -> applyMatrix4, three/examples/jsm -> three/addons, outputEncoding/encoding -> colorSpace, merged geometry utils) and a capped pixel ratio. Shows what it would change unless write is true; a write is one undoable step (three_undo). Run three_review afterwards; the rest needs a decision.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "three_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| only | No | rule ids to fix | |
| path | No | Project folder, or a file or folder in it (relative to the server's folder; default: the project). | |
| three | No | Path to a three package folder, when it is not in node_modules above the project. | |
| write | No | ||
| target | No | same as path (older name) | |
| rewrites | No | also apply the rewrites that change more than a name (render argument order, color.set(), the missing .js, TransformControls.getHelper()); the dry run lists them |