diff --git a/editor/assets/primitives.fbx.meta b/editor/assets/primitives.fbx.meta index 478631f9f4..3c5f7e1f51 100644 --- a/editor/assets/primitives.fbx.meta +++ b/editor/assets/primitives.fbx.meta @@ -1,5 +1,5 @@ { - "ver": "2.0.14", + "ver": "2.1.3", "importer": "fbx", "imported": true, "uuid": "1263d74c-8167-4928-91a6-4e2672411f47", diff --git a/editor/inspector/assets/texture-cube.js b/editor/inspector/assets/texture-cube.js index f1b075e519..81e4354a47 100644 --- a/editor/inspector/assets/texture-cube.js +++ b/editor/inspector/assets/texture-cube.js @@ -129,9 +129,12 @@ const Elements = { } function observer() { - const { clientWidth, clientHeight } = panel.$.container; - const size = Math.round(Math.min((clientWidth - 40) / 4, (clientHeight - 40) / 3)); - panel.$.container.style.setProperty('--size', `${size}px`); + cancelAnimationFrame(panel.animationFrameId); + panel.animationFrameId = window.requestAnimationFrame(() => { + const { clientWidth, clientHeight } = panel.$.container; + const size = Math.round(Math.min((clientWidth - 40) / 4, (clientHeight - 40) / 3)); + panel.$.container.style.setProperty('--size', `${size}px`); + }); } panel.resizeObserver = new window.ResizeObserver(observer);