Skip to content

Commit 0abf0d5

Browse files
Fix UI bugs and improve code structure (#5008)
* Added the ability to run and combine multiple animations simultaneously, upgraded to threejs r171, and updated packages to the latest version. * fix build warnings and errors and replace rollup-plugin-polyfill with swc * fix fidelity-tests chrome error * fix chrome install error on fidelity-tests * fix fidelity-tests error on Fix dependencies step * add no-sandbox args to puppeteer.launch * cleanup github workflow * add example for appendAnimation, improve modelviewer.dev styles, improve appendAnimation method, format codes with clang-format style and fix other requested changes in #4979 pull request * Fix all requested changes in #4979 PR, improve the flexibility of appendAnimation function, improve modelviewer.dev styles and revert dependencies version * improve detachAnimation flexibility * update dependencies to latest version * fix #4960 issue * Fix animation skipping when updating with appendAnimation method and improve general performance * Upgrade to three.js r172 and update dependencies and fix peer dependency error when installing in postprocessing * add Cineon, Reinhard, Linear, none tone mapping options and update documention * revert peetDependencies change * fix package-lock error * fix repetitions and pingpong update bug * add time option to appendAnimation function * fix editor "js-beautify" invalid src * update dependencies * improve editor and modelviewer.dev styles, add mobile responsive to editor, improve modelviewer.dev hamburger menu * update dependencies * add ar-usdz-max-texture-size (related #4984 issue) * try fix deploy error, upgrade to three.js r173 and update all dependencies, fix ar-usdz-docs.json "max-texture-size" attribute defualt value * update documention threejs version * fix mobile responsive bugs and improve snippet viewer code structure * upgrade to threejs r174 and update all dependencies * add terser to modelviewer.dev * fix build error and update all dependencies * try to fix test error * fix test error and update dependencies
1 parent c61dd14 commit 0abf0d5

File tree

13 files changed

+580
-544
lines changed

13 files changed

+580
-544
lines changed

package-lock.json

Lines changed: 521 additions & 497 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,18 @@
3939
},
4040
"homepage": "https://github.com/google/model-viewer#readme",
4141
"devDependencies": {
42-
"@typescript-eslint/eslint-plugin": "^8.24.1",
43-
"@typescript-eslint/parser": "^8.24.1",
42+
"@typescript-eslint/eslint-plugin": "^8.26.1",
43+
"@typescript-eslint/parser": "^8.26.1",
4444
"clang-format": "^1.8.0",
45-
"eslint": "^9.20.1",
45+
"eslint": "^9.22.0",
4646
"eslint-config-google": "^0.14.0",
4747
"eslint-plugin-mocha": "^10.5.0",
48-
"eslint-plugin-wc": "^2.2.0",
48+
"eslint-plugin-wc": "^2.2.1",
4949
"http-server": "^14.1.1",
5050
"husky": "^9.1.7",
51-
"typescript": "5.7.3"
51+
"typescript": "5.8.2"
52+
},
53+
"dependencies": {
54+
"puppeteer": "^24.4.0"
5255
}
53-
}
56+
}

packages/model-viewer-effects/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,36 +73,36 @@
7373
],
7474
"dependencies": {
7575
"lit": "^3.2.1",
76-
"postprocessing": "^6.36.7"
76+
"postprocessing": "^6.37.1"
7777
},
7878
"peerDependencies": {
7979
"@google/model-viewer": "^4.0.0"
8080
},
8181
"devDependencies": {
8282
"@google/model-viewer": "^4.0.0",
83-
"@rollup/plugin-commonjs": "^28.0.2",
83+
"@rollup/plugin-commonjs": "^28.0.3",
8484
"@rollup/plugin-node-resolve": "^16.0.0",
8585
"@rollup/plugin-replace": "^6.0.2",
8686
"@types/mocha": "^10.0.10",
8787
"@types/pngjs": "^6.0.5",
88-
"@types/three": "^0.173.0",
88+
"@types/three": "^0.174.0",
8989
"@ungap/event-target": "^0.2.4",
9090
"@web/test-runner": "^0.20.0",
9191
"@web/test-runner-playwright": "^0.11.0",
9292
"chai": "^5.2.0",
9393
"@rollup/plugin-swc": "^0.4.0",
94-
"@swc/core": "^1.10.18",
94+
"@swc/core": "^1.11.8",
9595
"focus-visible": "^5.2.1",
9696
"http-server": "^14.1.1",
9797
"mocha": "^11.1.0",
9898
"npm-run-all": "^4.1.5",
99-
"rollup": "^4.34.8",
99+
"rollup": "^4.35.0",
100100
"rollup-plugin-cleanup": "^3.2.1",
101101
"rollup-plugin-dts": "^6.1.1",
102102
"rollup-plugin-polyfill": "^4.2.0",
103103
"@rollup/plugin-terser": "^0.4.4",
104-
"three": "^0.173.0",
105-
"typescript": "5.7.3"
104+
"three": "^0.174.0",
105+
"typescript": "5.8.2"
106106
},
107107
"publishConfig": {
108108
"access": "public"

packages/model-viewer/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,28 +90,28 @@
9090
"three": "^0.172.0"
9191
},
9292
"devDependencies": {
93-
"@rollup/plugin-commonjs": "^28.0.2",
93+
"@rollup/plugin-commonjs": "^28.0.3",
9494
"@rollup/plugin-node-resolve": "^16.0.0",
9595
"@rollup/plugin-replace": "^6.0.2",
9696
"@types/mocha": "^10.0.10",
9797
"@types/pngjs": "^6.0.5",
98-
"@types/three": "^0.173.0",
98+
"@types/three": "^0.174.0",
9999
"@ungap/event-target": "^0.2.4",
100100
"@web/test-runner": "^0.20.0",
101101
"@rollup/plugin-swc": "^0.4.0",
102-
"@swc/core": "^1.10.18",
102+
"@swc/core": "^1.11.8",
103103
"@web/test-runner-playwright": "^0.11.0",
104104
"chai": "^5.2.0",
105105
"http-server": "^14.1.1",
106106
"mocha": "^11.1.0",
107107
"npm-run-all": "^4.1.5",
108-
"rollup": "^4.34.8",
108+
"rollup": "^4.35.0",
109109
"rollup-plugin-cleanup": "^3.2.1",
110110
"rollup-plugin-dts": "^6.1.1",
111111
"rollup-plugin-polyfill": "^4.2.0",
112112
"@rollup/plugin-terser": "^0.4.4",
113-
"typescript": "5.7.3",
114-
"three": "^0.173.0"
113+
"typescript": "5.8.2",
114+
"three": "^0.174.0"
115115
},
116116
"publishConfig": {
117117
"access": "public"

packages/modelviewer.dev/data/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
{
137137
"name": "lottieLoaderLocation",
138138
"htmlName": "lottieLoaderLocation",
139-
"description": "This static, writable property sets <span class='attribute'>&lt;model-viewer&gt;</span>'s LottieLoader location URL. The default URL is <code>https://cdn.jsdelivr.net/npm/three@0.146.0/examples/jsm/loaders/LottieLoader.js</code>. It will also require the server to provide the lottie canvas module at <code>../libs/lottie_canvas.module.js</code>."
139+
"description": "This static, writable property sets <span class='attribute'>&lt;model-viewer&gt;</span>'s LottieLoader location URL. The default URL is <code>https://cdn.jsdelivr.net/npm/three@0.174.0/examples/jsm/loaders/LottieLoader.js</code>. It will also require the server to provide the lottie canvas module at <code>../libs/lottie_canvas.module.js</code>."
140140
},
141141
{
142142
"name": "minimumRenderScale",

packages/modelviewer.dev/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
"@types/prismjs": "^1.26.5",
3131
"focus-visible": "^5.2.1",
3232
"lit": "^3.2.1",
33-
"prismjs": "^1.29.0"
33+
"prismjs": "^1.30.0"
3434
},
3535
"devDependencies": {
36-
"rollup": "^4.34.8",
36+
"rollup": "^4.35.0",
3737
"@rollup/plugin-node-resolve": "^16.0.0",
3838
"@rollup/plugin-swc": "^0.4.0",
39-
"@swc/core": "^1.10.18",
39+
"@swc/core": "^1.11.8",
4040
"@rollup/plugin-replace": "^6.0.2",
41-
"typescript": "5.7.3"
41+
"typescript": "5.8.2"
4242
}
4343
}

packages/modelviewer.dev/rollup.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import { nodeResolve as resolve } from '@rollup/plugin-node-resolve';
1717
import replace from '@rollup/plugin-replace';
18+
import terser from '@rollup/plugin-terser';
1819
import swc from '@rollup/plugin-swc';
1920

2021
const onwarn = (warning, warn) => {
@@ -24,7 +25,7 @@ const onwarn = (warning, warn) => {
2425
}
2526
};
2627

27-
const plugins = [resolve(), replace({ 'Reflect.decorate': 'undefined', preventAssignment: true }), swc()];
28+
const plugins = [resolve(), replace({ 'Reflect.decorate': 'undefined', preventAssignment: true }), swc(), terser()];
2829

2930
const watchFiles =
3031
['lib/**', '../model-viewer/lib/**', '../model-viewer-effects/lib/**'];

packages/modelviewer.dev/styles/examples.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ select {
102102
.tab {
103103
position: fixed;
104104
z-index: 999;
105-
top: 0.72rem;
105+
top: 0.2rem;
106106
left: 0.72rem;
107107
border-radius: 4px;
108108
width: 3rem;
@@ -542,6 +542,7 @@ pre,
542542
code {
543543
white-space: pre-wrap !important;
544544
font-family: var(--font-monospace);
545+
word-wrap: break-word;
545546
}
546547

547548

packages/render-fidelity-tools/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@
3333
"lit": "^3.2.1",
3434
"mkdirp": "^3.0.1",
3535
"pngjs": "^7.0.0",
36-
"puppeteer": "^24.2.1",
36+
"puppeteer": "^24.4.0",
3737
"rimraf": "^6.0.1",
3838
"yargs": "^17.7.2"
3939
},
4040
"devDependencies": {
41-
"@rollup/plugin-commonjs": "^28.0.2",
41+
"@rollup/plugin-commonjs": "^28.0.3",
4242
"@rollup/plugin-node-resolve": "^16.0.0",
4343
"@rollup/plugin-replace": "^6.0.2",
4444
"@types/yargs": "^17.0.33",
4545
"polymer-build": "^3.1.4",
46-
"rollup": "^4.34.8",
46+
"rollup": "^4.35.0",
4747
"rollup-plugin-external-globals": "^0.13.0",
48-
"typescript": "5.7.3"
48+
"typescript": "5.8.2"
4949
}
5050
}

packages/space-opera/editor/index.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<head>
2121
<meta charset="utf-8">
2222
<meta name="description" content="&lt;model-viewer&gt; editor">
23-
<meta name="viewport" content="width=device-width, initial-scale=1">
23+
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
2424
<meta property="og:title" content='﹤model-viewer﹥ Editor - Edit your asset files for 3D & AR' />
2525
<meta property="og:description"
2626
content="A tool to edit glTF and glb files ✏️, and configure them to use the ﹤model-viewer﹥ 3D & AR web component 🌐" />
@@ -30,8 +30,8 @@
3030
<script defer src="https://web3dsurvey.com/collector.js"></script>
3131
<!-- Web animations for paper-dropdown -->
3232
<script src="../../../node_modules/web-animations-js/web-animations-next-lite.min.js"></script>
33-
<script src="../node_modules/js-beautify/js/lib/beautify-html.js"></script>
34-
<script src="../node_modules/js-beautify/js/lib/beautify-css.js"></script>
33+
<script src="../../../node_modules/js-beautify/js/lib/beautify-html.js"></script>
34+
<script src="../../../node_modules/js-beautify/js/lib/beautify-css.js"></script>
3535
<script>
3636
// Necessary hack for Redux. See: https://github.com/reduxjs/redux/pull/2910
3737
window.process = {
@@ -60,6 +60,12 @@
6060
--number-input-background: #212121;
6161
}
6262

63+
html, body {
64+
width: 100vw;
65+
height: 100lvh;
66+
overflow: hidden;
67+
}
68+
6369
.hamburger {
6470
position: absolute;
6571
z-index: 999;

packages/space-opera/editor/view/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<link rel="shortcut icon" type="image/png" href="../../../shared-assets/icons/favicon.png" />
2727
<!-- Web animations for paper-dropdown -->
2828
<script src="../../../../node_modules/web-animations-js/web-animations-next-lite.min.js"></script>
29-
<script src="../../node_modules/js-beautify/js/lib/beautify-html.js"></script>
30-
<script src="../../node_modules/js-beautify/js/lib/beautify-css.js"></script>
29+
<script src="../../../../node_modules/js-beautify/js/lib/beautify-html.js"></script>
30+
<script src="../../../../node_modules/js-beautify/js/lib/beautify-css.js"></script>
3131
<script>
3232
// Necessary hack for Redux. See: https://github.com/reduxjs/redux/pull/2910
3333
window.process = {

packages/space-opera/package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
"Chris George <[email protected]>"
3636
],
3737
"devDependencies": {
38+
"@gltf-transform/core": "^4.1.2",
39+
"@gltf-transform/extensions": "^4.1.2",
40+
"@gltf-transform/functions": "^4.1.2",
3841
"@google/model-viewer": "^4.0.0",
3942
"@material/mwc-button": "^0.27.0",
4043
"@material/mwc-checkbox": "^0.27.0",
@@ -49,32 +52,30 @@
4952
"@polymer/paper-item": "^3.0.1",
5053
"@polymer/paper-listbox": "^3.0.1",
5154
"@polymer/paper-slider": "^3.0.1",
52-
"@reduxjs/toolkit": "^2.5.1",
53-
"@rollup/plugin-commonjs": "^28.0.2",
55+
"@reduxjs/toolkit": "^2.6.1",
56+
"@rollup/plugin-commonjs": "^28.0.3",
5457
"@rollup/plugin-node-resolve": "^16.0.0",
58+
"@rollup/plugin-swc": "^0.4.0",
59+
"@swc/core": "^1.11.8",
60+
"@types/js-beautify": "^1.14.3",
5561
"@types/remote-redux-devtools": "^0.5.8",
56-
"@gltf-transform/core": "^4.1.1",
57-
"@gltf-transform/extensions": "^4.1.1",
58-
"@gltf-transform/functions": "^4.1.1",
5962
"@web/test-runner": "^0.20.0",
60-
"@rollup/plugin-swc": "^0.4.0",
61-
"@swc/core": "^1.10.18",
6263
"@web/test-runner-playwright": "^0.11.0",
6364
"chai": "^5.2.0",
6465
"gltf-validator": "^2.0.0-dev.3.10",
6566
"http-server": "^14.1.1",
66-
"js-beautify": "^1.15.3",
67+
"js-beautify": "^1.15.4",
6768
"jszip": "^3.10.1",
6869
"lit": "^3.2.1",
6970
"npm-run-all": "^4.1.5",
7071
"pwa-helpers": "^0.9.1",
7172
"qrious": "^4.0.2",
7273
"redux": "^5.0.1",
7374
"remote-redux-devtools": "^0.5.16",
74-
"rollup": "^4.34.8",
75+
"rollup": "^4.35.0",
7576
"simple-dropzone": "^0.8.3",
7677
"ts-closure-library": "^2022.502.5",
77-
"typescript": "5.7.3",
78+
"typescript": "5.8.2",
7879
"web-animations-js": "^2.3.2"
7980
}
80-
}
81+
}

packages/space-opera/src/components/shared/snippet_viewer/snippet_viewer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ declare global {
113113
interface HTMLElementTagNameMap {
114114
'snippet-viewer': SnippetViewer;
115115
}
116-
}
116+
}

0 commit comments

Comments
 (0)