3D engine that AI agents drive
JavaScript 3d3d-engineagentic-aiai-agentsblenderclaude-codegame-enginegaussian-splattinggltfjavascriptmcpmcp-servermodel-context-protocolpath-tracerpath-tracingpbrrenderingthreejs-alternativewebgl2webgpu
Keep the Object studio Auto orbit button visible at 1024x768 (#2254)
Nguyen Xuan An4e3fb843807d
diff --git a/changes/2254.md b/changes/2254.mdnew file mode 100644index 00000000..3cc338d6--- /dev/null+++ b/changes/2254.md@@ -0,0 +1 @@+- The Object studio Auto orbit button now sits in the bottom bar beside Measure performance, so it stays fully visible at 1024x768 and 1280x720 instead of being cut off by the settings panel (#2254).diff --git a/scripts/smoke-scenes.mjs b/scripts/smoke-scenes.mjsindex 02dca8dd..c505c13f 100644--- a/scripts/smoke-scenes.mjs+++ b/scripts/smoke-scenes.mjs@@ -20,7 +20,7 @@ try {const page = await browser.newPage({ viewport: { width: 1440, height: 900 }, reducedMotion: 'reduce' });const errors = [];page.on('pageerror', (error) => errors.push(error.message));- for (const size of [{ width: 1280, height: 800 }, { width: 1024, height: 700 }]) {+ for (const size of [{ width: 1280, height: 800 }, { width: 1024, height: 700 }, { width: 1024, height: 768 }, { width: 1280, height: 720 }]) {await page.setViewportSize(size);await page.goto('http://127.0.0.1:5179/object.html');await page.waitForSelector('#benchmark');@@ -48,6 +48,16 @@ try {return footerItems.filter((item) => item.width > 0 && item.left < panel.right && item.right > panel.left && item.top < panel.bottom && item.bottom > panel.top).length;});assert.equal(overlaps, 0, `Object studio footer overlaps the settings panel at ${size.width}x${size.height}.`);+ const autoOrbitProblems = await page.evaluate(() => {+ const orbit = document.querySelector('#rotate').getBoundingClientRect();+ const panel = document.querySelector('.controls').getBoundingClientRect();+ const problems = [];+ if (orbit.left < 0 || orbit.top < 0 || orbit.right > window.innerWidth || orbit.bottom > window.innerHeight) problems.push('sits outside the viewport');+ if (orbit.height < 32) problems.push('is under 32 px tall');+ if (orbit.left < panel.right && orbit.right > panel.left && orbit.top < panel.bottom && orbit.bottom > panel.top) problems.push('overlaps the settings panel');+ return problems;+ });+ assert.deepEqual(autoOrbitProblems, [], `Object studio Auto orbit button is not fully visible at ${size.width}x${size.height}.`);const lastRowReachable = await page.evaluate(() => {const panel = document.querySelector('.controls');panel.scrollTop = panel.scrollHeight;diff --git a/site/object.html b/site/object.htmlindex c6baa040..5cf93226 100644--- a/site/object.html+++ b/site/object.html@@ -43,7 +43,6 @@<label class="exposure-label" for="exposure">Exposure <output id="exposure-value">1.0</output></label><input id="exposure" type="range" min="0.5" max="1.8" step="0.1" value="1" /><div class="demo-presets" role="group" aria-label="Model composition"><button data-view="hero" aria-pressed="true">Hero</button><button data-view="face" aria-pressed="false">Face</button><button data-view="machine" aria-pressed="false">Machinery</button></div><label class="quality-label" for="look">Lighting<select id="look"><option value="studio">Soft studio</option><option value="warm">Warm key</option><option value="cool">Cool metal</option></select></label><div class="demo-presets"><button id="assembly-tour">Play assembly</button><button id="save-model">Save PNG</button></div><div class="view-actions">- <button id="rotate" aria-pressed="false">↻ Auto orbit</button><button id="inspect" aria-pressed="false">Surface normals</button></div><label class="quality-label" for="quality">Resolution@@ -53,6 +52,7 @@<footer><p class="hint">Drag to orbit <span>·</span> Scroll to zoom</p><div class="metrics" aria-label="Renderer statistics"><span id="parts">Loading geometry…</span><span id="calls"></span><span id="cpu"></span></div>+ <button id="rotate" aria-pressed="false">↻ Auto orbit</button><button id="benchmark">Measure performance ↗</button></footer><section id="benchmark-result" class="benchmark-result" hidden aria-label="Performance results">diff --git a/src/style.css b/src/style.cssindex 06b2170e..37eb153f 100644--- a/src/style.css+++ b/src/style.css@@ -110,7 +110,7 @@ h2 { font-weight: 500; font-size: 20px; margin: 0 0 15px; }.quality-label { display: none; }footer { inset: auto 20px 20px; display: grid; gap: 8px; }.metrics { margin: 0; font-size: 10px; justify-content: space-between; }- footer button { padding: 5px 0; text-align: left; font-size: 11px; background: transparent; }+ footer button { padding: 5px 0; min-height: 32px; text-align: left; font-size: 11px; background: transparent; }.notice { bottom: 360px; }.benchmark-result { left: 20px; bottom: 85px; max-width: calc(100% - 40px); }}