Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

feat(viewport): configure transform handle size

yhh53b7573d60c7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53757e0ab..bfaa67309 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,10 @@ published separately; it ships inside the editor.
- **Page-free text glyph caches stay bounded.** Missing and oversized glyphs, whitespace metrics and measurement-only entries use a 4096-entry least-recently-used cache. Historical fonts and sizes retire without touching live drawable pages or cached layout coordinates; recently used measurements remain cached and retired entries rasterize again on demand.
+### Added
+
+- **Transform handle size is configurable.** Editor settings scale move/scale handles, rotation rings and hit areas together from 0.5 to 2, with the legacy size as default. The preference persists across sessions; active handle drags keep their captured size and sensitivity until release or cancellation.
+
## [0.85.0] - 2026-10-15
### Added
diff --git a/desktop b/desktop
index a11cbafca..6e4ffe629 160000
--- a/desktop
+++ b/desktop
@@ -1 +1 @@
-Subproject commit a11cbafcaa23cad0868874203ab3ac00fb832c82
+Subproject commit 6e4ffe6295dbeffbfd6d76b132ace682bd478c92
diff --git a/docs/astro/src/content/docs/editor/viewport.mdx b/docs/astro/src/content/docs/editor/viewport.mdx
index 182c19041..2f4582e4c 100644
--- a/docs/astro/src/content/docs/editor/viewport.mdx
+++ b/docs/astro/src/content/docs/editor/viewport.mdx
@@ -37,6 +37,11 @@ selection changes recompute the target; leaving the canvas clears it. Navigation
paint, picking and contributed tools keep their own pointer routing. Hover alone
does not change transforms or begin an undo transaction.
+**Settings → Viewport → Gizmos → Transform handle size** scales the transform
+arrows, center plane, rotation rings and hit areas together from 0.5 to 2 (default
+1). The preference persists across editor sessions. Changing it during a handle
+drag takes effect after release; the current drag retains its size and sensitivity.
+
Dragging a handle transforms the whole selection as one, about a shared pivot, and
each drag is a single undo step. **Alt-drag** a selection to duplicate it and drag the
copies. Nudge the selection with the **arrow keys** (one grid step; hold **Shift** for
diff --git a/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx b/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx
index 6b0bdd0c2..95712a20d 100644
--- a/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx
+++ b/docs/astro/src/content/docs/zh-cn/editor/viewport.mdx
@@ -33,6 +33,10 @@ description: "视口导航、变换 gizmo、对齐与分布、显示开关、Sce
缩放方向。相机或选择变化会重新判断,离开画布即清除。导航、绘制、拾取和
贡献工具保留自己的指针路由;仅悬停不会修改变换或开启撤销事务。
+在**设置 → 视口 → Gizmo → 变换手柄尺寸**中,可同步缩放箭头、中心平面、
+旋转环和命中范围,范围为 0.5–2,默认 1,并在重启编辑器后保留。
+拖动手柄期间修改尺寸会在松开后生效;当前拖拽保持原有尺寸与操作灵敏度。
+
拖动手柄会把整个选择当作一体、绕共享轴心变换,每次拖动是一步撤销。**Alt 拖动**选择可复制它并
拖动副本。用**方向键**微移选择(一格;按 **Shift** 为 ×10)。
diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjs
index 27e4a9365..bbe006ad2 100644
--- a/tools/releaseNotes.mjs
+++ b/tools/releaseNotes.mjs
@@ -30,6 +30,8 @@ export const NOTES_FLOOR = 'v0.65.0';
export const NOTED = {
'perf(text): bound page-free glyph caches':
{ note: 'Page-free text glyph caches stay bounded.' },
+ 'feat(viewport): configure transform handle size':
+ { note: 'Transform handle size is configurable.' },
'feat(viewport): highlight transform handles under the pointer':
{ note: "Transform handles preview the pointer's target before a drag." },
'fix(checks): report non-TypeScript example failures':
diff --git a/tools/verify-gizmo-hover.mjs b/tools/verify-gizmo-hover.mjs
index 2f6ae8d06..f3b1a1f39 100644
--- a/tools/verify-gizmo-hover.mjs
+++ b/tools/verify-gizmo-hover.mjs
@@ -8,16 +8,16 @@ fs.writeFileSync(path.join(project,'project.esproject'),JSON.stringify({formatVe
fs.writeFileSync(path.join(project,'assets/scenes/main.esscene'),JSON.stringify({version:'1.0',name:'Main',entities:[{id:1,name:'Subject',parent:null,children:[],visible:true,components:[{type:'Transform',data:{position:{x:0,y:0,z:0}}},{type:'Sprite',data:{size:{x:60,y:60},color:{r:1,g:0,b:1,a:1}}}]}]}));
fs.writeFileSync(path.join(project,'src/main.ts'),'export {};');fs.writeFileSync(path.join(project,'src/components.ts'),'export {};');
const records=[];
-const read="(() => { const s=document.querySelector('.viewport__stage'); return {hover:s?.dataset.gizmoHover,cursor:s?.style.cursor,scene:JSON.stringify(window.__estellaEditor.surface.serializeScene())}; })()";
+const read="(() => { const s=document.querySelector('.viewport__stage'); return {hover:s?.dataset.gizmoHover,cursor:s?.style.cursor,size:JSON.parse(localStorage.getItem('estella.settings') || '{}')['viewport.gizmoSize'],scene:JSON.stringify(window.__estellaEditor.surface.serializeScene())}; })()";
try{
- for(const c of [{mode:'move',x:30,y:0,id:'move.x',cursor:'move'},{mode:'scale',x:30,y:0,id:'scale.x',cursor:'ew-resize'},{mode:'rotate',x:42,y:0,id:'rotate.z',cursor:'grab'}]){
+ for(const size of [0.5,1,2]) for(const c of [{mode:'move',x:50,y:0,id:'move.x',cursor:'move'},{mode:'scale',x:58,y:0,id:'scale.x',cursor:'ew-resize'},{mode:'rotate',x:42,y:0,id:'rotate.z',cursor:'grab'}]){
const run=runElectron(['.'],{via:'npx',encoding:'utf8',cwd:path.join(root,'desktop'),timeout:180000,env:{
- ESTELLA_SHOT:path.join(out,c.mode+'.png'),ESTELLA_SHOT_PROJECT:project,ESTELLA_SHOT_SCENE:'assets/scenes/main.esscene',
- ESTELLA_SHOT_EVAL:`(async () => {const e=window.__estellaEditor;e.runCommand('mode.scene');e.runCommand('view.resetOrbit');e.surface.setGizmoDisplay({show:true,selectedOnly:true,iconSize:16,types:{}});e.surface.select(1);e.frame([1]);await new Promise(resolve=>setTimeout(resolve,750));e.runCommand('tool.${c.mode}');return true;})()`,
- ESTELLA_SHOT_EDITOR_DRAG:JSON.stringify({selector:'.viewport__stage canvas',ox:c.x,oy:c.y,steps:1,hoverOnly:true,read})}});
+ ESTELLA_SHOT:path.join(out,c.mode+'-'+size+'.png'),ESTELLA_SHOT_PROJECT:project,ESTELLA_SHOT_SCENE:'assets/scenes/main.esscene',
+ ESTELLA_SHOT_EVAL:`(async () => {const e=window.__estellaEditor;const wait=ms=>new Promise(resolve=>setTimeout(resolve,ms));const find=async selector=>{for(let i=0;i<50;i++){const node=document.querySelector(selector);if(node)return node;await wait(100);}throw Error('Missing settings control: '+selector);};e.runCommand('settings.open');const search=await find('.set-search input');Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value').set.call(search,'viewport.gizmoSize');search.dispatchEvent(new Event('input',{bubbles:true}));await wait(200);if(document.querySelectorAll('.set-content .set-row').length!==1)throw Error('Size search must identify one setting');const value=await find('.set-num');value.focus();value.value='${size}';value.blur();await wait(100);if(JSON.parse(localStorage.getItem('estella.settings')||'{}')['viewport.gizmoSize']!==${size})throw Error('Size preference was not saved');document.querySelector('.set-win').dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await wait(300);e.runCommand('mode.scene');e.runCommand('view.resetOrbit');e.surface.setGizmoDisplay({show:true,selectedOnly:true,iconSize:16,types:{}});e.surface.select(1);e.frame([1]);await wait(750);e.runCommand('tool.${c.mode}');return true;})()`,
+ ESTELLA_SHOT_EDITOR_DRAG:JSON.stringify({selector:'.viewport__stage canvas',ox:c.x*size,oy:c.y*size,steps:1,hoverOnly:true,read})}});
assert.equal(run.status,0,run.stderr);const line=run.stdout.split('\n').find(line=>line.startsWith('[editorDrag] '));assert(line,'Missing trusted hover observation');
- const result=JSON.parse(line.slice('[editorDrag] '.length));assert.equal(result.after.hover,c.id);assert.equal(result.after.cursor,c.cursor);assert.equal(result.after.scene,result.before.scene,'Hover edited the scene');
- assert(fs.existsSync(path.join(out,c.mode+'.png')),'Missing editor screenshot');records.push({mode:c.mode,...result});
+ const result=JSON.parse(line.slice('[editorDrag] '.length));assert.equal(result.after.hover,c.id);assert.equal(result.after.cursor,c.cursor);assert.equal(result.after.size,size);assert.equal(result.after.scene,result.before.scene,'Hover edited the scene');
+ assert(fs.existsSync(path.join(out,c.mode+'-'+size+'.png')),'Missing editor screenshot');records.push({mode:c.mode,size,...result});
}
fs.writeFileSync(path.join(out,'checks.json'),JSON.stringify({status:'checks-passed',mode:'CI-editor-trusted-hover',records},null,2));
console.log('Gizmo hover CI: move/scale/rotate preselection and cursors pass; scene unchanged');