diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml index 0f8dfc7ff9..d4bba6aae1 100644 --- a/.github/workflows/deploy-documentation.yml +++ b/.github/workflows/deploy-documentation.yml @@ -11,24 +11,11 @@ jobs: timeout-minutes: 60 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: '16.x' - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Cache npm packages - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- - - name: NPM install run: npm ci diff --git a/.github/workflows/fidelity-tests.yml b/.github/workflows/fidelity-tests.yml index 675b174a51..10aae0d14a 100644 --- a/.github/workflows/fidelity-tests.yml +++ b/.github/workflows/fidelity-tests.yml @@ -8,24 +8,11 @@ jobs: timeout-minutes: 60 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: '16.x' - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Cache npm packages - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- - - name: NPM install run: npm ci diff --git a/.github/workflows/unit-tests-third-party.yml b/.github/workflows/unit-tests-third-party.yml index f1efecf0bf..4bf7c2473d 100644 --- a/.github/workflows/unit-tests-third-party.yml +++ b/.github/workflows/unit-tests-third-party.yml @@ -10,24 +10,11 @@ jobs: if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: '16.x' - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Cache npm packages - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- - - name: NPM install run: npm ci diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index ef404ba4e9..54b90732e4 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -12,24 +12,11 @@ jobs: timeout-minutes: 60 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: '16.x' - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Cache npm packages - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- - - name: NPM install run: npm ci diff --git a/package-lock.json b/package-lock.json index 835da85441..9bdce3a582 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "http-server": "^14.1.1", "husky": "^7.0.1", "lerna": "^5.6.2", - "typescript": "4.3.5" + "typescript": "4.8.4" }, "engines": { "node": ">=12.0.0" @@ -8303,9 +8303,9 @@ } }, "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -15136,9 +15136,9 @@ } }, "typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 42e5f0c437..5720534c96 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,6 @@ "http-server": "^14.1.1", "husky": "^7.0.1", "lerna": "^5.6.2", - "typescript": "4.3.5" + "typescript": "4.8.4" } } \ No newline at end of file diff --git a/packages/model-viewer/package-lock.json b/packages/model-viewer/package-lock.json index b2121df956..4363ed6196 100644 --- a/packages/model-viewer/package-lock.json +++ b/packages/model-viewer/package-lock.json @@ -39,7 +39,7 @@ "rollup-plugin-dts": "^4.2.2", "rollup-plugin-polyfill": "^3.0.0", "rollup-plugin-terser": "^7.0.2", - "typescript": "4.3.5" + "typescript": "4.8.4" }, "engines": { "node": ">=6.0.0" @@ -3520,9 +3520,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.277", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.277.tgz", - "integrity": "sha512-Ej4VyUfGdVY5D2J5WHAVNqrEFBKgeNcX7p/bBQU4x/VKwvnyEvGd62NEkIK3lykLEe9Cg4MCcoWAa+u97o0u/A==", + "version": "1.4.278", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.278.tgz", + "integrity": "sha512-i+0+t/UVCqp9khP+hswZQbG31LnsYWGwyI9zhqZkyPok7k57W0UhMaxODMp3TeoNFhyUtB5OI4ppO/OSD9gaYg==", "dev": true }, "node_modules/emoji-regex": { @@ -7795,9 +7795,9 @@ } }, "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -11048,9 +11048,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.277", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.277.tgz", - "integrity": "sha512-Ej4VyUfGdVY5D2J5WHAVNqrEFBKgeNcX7p/bBQU4x/VKwvnyEvGd62NEkIK3lykLEe9Cg4MCcoWAa+u97o0u/A==", + "version": "1.4.278", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.278.tgz", + "integrity": "sha512-i+0+t/UVCqp9khP+hswZQbG31LnsYWGwyI9zhqZkyPok7k57W0UhMaxODMp3TeoNFhyUtB5OI4ppO/OSD9gaYg==", "dev": true }, "emoji-regex": { @@ -14410,9 +14410,9 @@ } }, "typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true }, "typical": { diff --git a/packages/model-viewer/package.json b/packages/model-viewer/package.json index 5ea0fd491a..6ea381761d 100644 --- a/packages/model-viewer/package.json +++ b/packages/model-viewer/package.json @@ -103,7 +103,7 @@ "rollup-plugin-dts": "^4.2.2", "rollup-plugin-polyfill": "^3.0.0", "rollup-plugin-terser": "^7.0.2", - "typescript": "4.3.5" + "typescript": "4.8.4" }, "publishConfig": { "access": "public" diff --git a/packages/model-viewer/src/features/scene-graph/material.ts b/packages/model-viewer/src/features/scene-graph/material.ts index 16b470efe7..b2546c54a7 100644 --- a/packages/model-viewer/src/features/scene-graph/material.ts +++ b/packages/model-viewer/src/features/scene-graph/material.ts @@ -47,10 +47,10 @@ const $modelVariants = Symbol('modelVariants'); * Material facade implementation for Three.js materials */ export class Material extends ThreeDOMElement implements MaterialInterface { - private[$pbrMetallicRoughness]: PBRMetallicRoughness; - private[$normalTexture]: TextureInfo; - private[$occlusionTexture]: TextureInfo; - private[$emissiveTexture]: TextureInfo; + private[$pbrMetallicRoughness]!: PBRMetallicRoughness; + private[$normalTexture]!: TextureInfo; + private[$occlusionTexture]!: TextureInfo; + private[$emissiveTexture]!: TextureInfo; private[$lazyLoadGLTFInfo]?: LazyLoader; private[$gltfIndex]: number; private[$isActive]: boolean; diff --git a/packages/model-viewer/src/utilities/debug.ts b/packages/model-viewer/src/utilities/debug.ts index 9dc3e093ba..b18330850e 100644 --- a/packages/model-viewer/src/utilities/debug.ts +++ b/packages/model-viewer/src/utilities/debug.ts @@ -34,6 +34,9 @@ export const saveTarget = (target: WebGLRenderTarget, filename: string) => { ctx.putImageData(img, 0, 0); output.toBlob(function(blob) { + if (blob == null) { + return; + } const url = URL.createObjectURL(blob); const a = document.createElement('a'); diff --git a/packages/modelviewer.dev/package-lock.json b/packages/modelviewer.dev/package-lock.json index 351f61bcd0..02b2b05ca6 100644 --- a/packages/modelviewer.dev/package-lock.json +++ b/packages/modelviewer.dev/package-lock.json @@ -21,7 +21,7 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "rollup": "^2.77.2", - "typescript": "4.3.5" + "typescript": "4.8.4" }, "engines": { "node": ">=6.0.0" @@ -503,9 +503,9 @@ } }, "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -914,9 +914,9 @@ "dev": true }, "typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true }, "web-animations-js": { diff --git a/packages/modelviewer.dev/package.json b/packages/modelviewer.dev/package.json index 01f10a0920..5a83ecf550 100644 --- a/packages/modelviewer.dev/package.json +++ b/packages/modelviewer.dev/package.json @@ -35,6 +35,6 @@ "rollup": "^2.77.2", "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", - "typescript": "4.3.5" + "typescript": "4.8.4" } } \ No newline at end of file diff --git a/packages/render-fidelity-tools/package-lock.json b/packages/render-fidelity-tools/package-lock.json index f2b2b3f422..2380d6d9b1 100644 --- a/packages/render-fidelity-tools/package-lock.json +++ b/packages/render-fidelity-tools/package-lock.json @@ -10,8 +10,8 @@ "license": "Apache-2.0", "dependencies": { "@actions/core": "^1.2.4", - "@babylonjs/core": "*5.0.0-alpha.31", - "@babylonjs/loaders": "*5.0.0-alpha.31", + "@babylonjs/core": "^5.27.1", + "@babylonjs/loaders": "^5.27.1", "@khronosgroup/gltf-viewer": "^1.0.9", "@polymer/paper-button": "^3.0.1", "@polymer/paper-radio-group": "^3.0.1", @@ -19,7 +19,7 @@ "@types/http-server": "^0.10.0", "@types/mkdirp": "^1.0.1", "@types/pngjs": "^3.4.0", - "@types/puppeteer": "^5.4.4", + "@types/puppeteer": "^5.4.6", "@types/rimraf": "^3.0.1", "filament": "1.12.2", "focus-visible": "^5.2.0", @@ -27,7 +27,7 @@ "lit": "^2.2.3", "mkdirp": "^1.0.4", "pngjs": "^6.0.0", - "puppeteer": "^10.1.0", + "puppeteer": "^18.2.1", "rimraf": "^3.0.2" }, "devDependencies": { @@ -37,7 +37,7 @@ "polymer-build": "^3.1.4", "rollup": "^2.77.2", "rollup-plugin-external-globals": "^0.6.1", - "typescript": "4.3.5" + "typescript": "4.8.4" }, "engines": { "node": ">=12.0.0" @@ -1067,27 +1067,17 @@ } }, "node_modules/@babylonjs/core": { - "version": "5.0.0-alpha.31", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-5.0.0-alpha.31.tgz", - "integrity": "sha512-prFB667Xo8qPJh4NowbbfkAzeFr8oSJt0O9ycd06hN6wxZhmfewCLeOdTO8O4DO91z8/vgYZaVjabr11zqIuWA==", - "dependencies": { - "tslib": "^2.1.0" - }, - "engines": { - "node": "*" - } + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-5.27.1.tgz", + "integrity": "sha512-Snk+ipzpDLJ2Xa0zi3SP83uRq3MhnYpxNhhE5oNIFgqn0vXyvg99mZdOWS+VCvXzjLEy++pff3egm7kMR/YsVg==" }, "node_modules/@babylonjs/loaders": { - "version": "5.0.0-alpha.31", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-5.0.0-alpha.31.tgz", - "integrity": "sha512-aH0IFEzgIwk4nBdy8Vn6N550vKNVIERIw5BsUK4aPtxtLFeGEMmJ4tO/reBg2+hhY56P55U1CVryl5AaTZkNYQ==", - "dependencies": { - "@babylonjs/core": "5.0.0-alpha.31", - "babylonjs-gltf2interface": "5.0.0-alpha.31", - "tslib": "^2.1.0" - }, - "engines": { - "node": "*" + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-5.27.1.tgz", + "integrity": "sha512-oCuHS6OMiodNnfR6JxmB+mBStyJxLOMFwh0jfxbNX5C6iwq/IVsmurshPrHR4xEhVPsWzSaI5J3AZO1O+ZAN8Q==", + "peerDependencies": { + "@babylonjs/core": "^5.22.0", + "babylonjs-gltf2interface": "^5.22.0" } }, "node_modules/@colors/colors": { @@ -2406,12 +2396,10 @@ } }, "node_modules/babylonjs-gltf2interface": { - "version": "5.0.0-alpha.31", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-5.0.0-alpha.31.tgz", - "integrity": "sha512-iU0aM6pZ0jXgWzHlCR5So70MFk3au6WuX8Vz5drBF/jgGT1gyiPxc4V1w/pN3FV3XK+MqsoPObbzR4lMJwI8VA==", - "engines": { - "node": "*" - } + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-5.27.1.tgz", + "integrity": "sha512-SMIMCsGtGlRwN91iGPleWvmBJrzPk+cpunDwxIVFFT/xWh4yYnA0BeDmFaAHRY6t60pE2P8nZQnsitF+TgwwDA==", + "peer": true }, "node_modules/balanced-match": { "version": "1.0.2", @@ -3070,6 +3058,14 @@ "node": ">=0.10.0" } }, + "node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dependencies": { + "node-fetch": "2.6.7" + } + }, "node_modules/cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -3202,9 +3198,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.901419", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.901419.tgz", - "integrity": "sha512-4INMPwNm9XRpBukhNbF7OB6fNTTCaI8pzy/fXg0xQzAy5h3zL1P8xT3QazgKqBrb/hAYwIBizqDBZ7GtJE74QQ==" + "version": "0.0.1045489", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz", + "integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==" }, "node_modules/doctrine": { "version": "2.1.0", @@ -3281,9 +3277,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.277", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.277.tgz", - "integrity": "sha512-Ej4VyUfGdVY5D2J5WHAVNqrEFBKgeNcX7p/bBQU4x/VKwvnyEvGd62NEkIK3lykLEe9Cg4MCcoWAa+u97o0u/A==", + "version": "1.4.278", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.278.tgz", + "integrity": "sha512-i+0+t/UVCqp9khP+hswZQbG31LnsYWGwyI9zhqZkyPok7k57W0UhMaxODMp3TeoNFhyUtB5OI4ppO/OSD9gaYg==", "dev": true }, "node_modules/emitter-component": { @@ -3557,15 +3553,16 @@ } }, "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", + "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/first-chunk-stream": { @@ -4097,9 +4094,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dependencies": { "agent-base": "6", "debug": "4" @@ -4629,17 +4626,6 @@ "node": ">=0.10.0" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -4945,6 +4931,11 @@ "node": ">=10" } }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4981,11 +4972,41 @@ } }, "node_modules/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, "engines": { "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, "node_modules/node-releases": { @@ -5140,39 +5161,6 @@ "node": ">=4" } }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, "node_modules/package-json": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", @@ -5272,11 +5260,15 @@ "dev": true }, "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "dev": true, + "dependencies": { + "pinkie-promise": "^2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/path-is-absolute": { @@ -5390,17 +5382,6 @@ "node": ">=0.10.0" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/plylog": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/plylog/-/plylog-1.1.0.tgz", @@ -5797,9 +5778,9 @@ "dev": true }, "node_modules/progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", - "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "engines": { "node": ">=0.4.0" } @@ -5834,43 +5815,38 @@ } }, "node_modules/puppeteer": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-10.4.0.tgz", - "integrity": "sha512-2cP8mBoqnu5gzAVpbZ0fRaobBWZM8GEUF4I1F6WbgHrKV/rz7SX8PG2wMymZgD0wo0UBlg2FBPNxlF/xlqW6+w==", - "deprecated": "Version no longer supported. Upgrade to @latest", + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-18.2.1.tgz", + "integrity": "sha512-7+UhmYa7wxPh2oMRwA++k8UGVDxh3YdWFB52r9C3tM81T6BU7cuusUSxImz0GEYSOYUKk/YzIhkQ6+vc0gHbxQ==", "hasInstallScript": true, "dependencies": { - "debug": "4.3.1", - "devtools-protocol": "0.0.901419", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.0", - "node-fetch": "2.6.1", - "pkg-dir": "4.2.0", - "progress": "2.0.1", + "https-proxy-agent": "5.0.1", + "progress": "2.0.3", "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", - "tar-fs": "2.0.0", - "unbzip2-stream": "1.3.3", - "ws": "7.4.6" + "puppeteer-core": "18.2.1" }, "engines": { - "node": ">=10.18.1" + "node": ">=14.1.0" } }, - "node_modules/puppeteer/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "node_modules/puppeteer-core": { + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-18.2.1.tgz", + "integrity": "sha512-MRtTAZfQTluz3U2oU/X2VqVWPcR1+94nbA2V6ZrSZRVEwLqZ8eclZ551qGFQD/vD2PYqHJwWOW/fpC721uznVw==", "dependencies": { - "ms": "2.1.2" + "cross-fetch": "3.1.5", + "debug": "4.3.4", + "devtools-protocol": "0.0.1045489", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.1", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.9.0" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=14.1.0" } }, "node_modules/qs": { @@ -5961,31 +5937,6 @@ "node": ">=0.10.0" } }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "dependencies": { - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -6672,25 +6623,14 @@ "dev": true }, "node_modules/tar-fs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.0.tgz", - "integrity": "sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dependencies": { "chownr": "^1.1.1", - "mkdirp": "^0.5.1", + "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", - "tar-stream": "^2.0.0" - } - }, - "node_modules/tar-fs/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "tar-stream": "^2.1.4" } }, "node_modules/tar-stream": { @@ -6863,11 +6803,6 @@ "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", "dev": true }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -6877,9 +6812,9 @@ } }, "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -6940,9 +6875,9 @@ "dev": true }, "node_modules/unbzip2-stream": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", - "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" @@ -7493,11 +7428,11 @@ } }, "node_modules/ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", + "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", @@ -8276,22 +8211,15 @@ } }, "@babylonjs/core": { - "version": "5.0.0-alpha.31", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-5.0.0-alpha.31.tgz", - "integrity": "sha512-prFB667Xo8qPJh4NowbbfkAzeFr8oSJt0O9ycd06hN6wxZhmfewCLeOdTO8O4DO91z8/vgYZaVjabr11zqIuWA==", - "requires": { - "tslib": "^2.1.0" - } + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-5.27.1.tgz", + "integrity": "sha512-Snk+ipzpDLJ2Xa0zi3SP83uRq3MhnYpxNhhE5oNIFgqn0vXyvg99mZdOWS+VCvXzjLEy++pff3egm7kMR/YsVg==" }, "@babylonjs/loaders": { - "version": "5.0.0-alpha.31", - "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-5.0.0-alpha.31.tgz", - "integrity": "sha512-aH0IFEzgIwk4nBdy8Vn6N550vKNVIERIw5BsUK4aPtxtLFeGEMmJ4tO/reBg2+hhY56P55U1CVryl5AaTZkNYQ==", - "requires": { - "@babylonjs/core": "5.0.0-alpha.31", - "babylonjs-gltf2interface": "5.0.0-alpha.31", - "tslib": "^2.1.0" - } + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/@babylonjs/loaders/-/loaders-5.27.1.tgz", + "integrity": "sha512-oCuHS6OMiodNnfR6JxmB+mBStyJxLOMFwh0jfxbNX5C6iwq/IVsmurshPrHR4xEhVPsWzSaI5J3AZO1O+ZAN8Q==", + "requires": {} }, "@colors/colors": { "version": "1.5.0", @@ -9513,9 +9441,10 @@ "dev": true }, "babylonjs-gltf2interface": { - "version": "5.0.0-alpha.31", - "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-5.0.0-alpha.31.tgz", - "integrity": "sha512-iU0aM6pZ0jXgWzHlCR5So70MFk3au6WuX8Vz5drBF/jgGT1gyiPxc4V1w/pN3FV3XK+MqsoPObbzR4lMJwI8VA==" + "version": "5.27.1", + "resolved": "https://registry.npmjs.org/babylonjs-gltf2interface/-/babylonjs-gltf2interface-5.27.1.tgz", + "integrity": "sha512-SMIMCsGtGlRwN91iGPleWvmBJrzPk+cpunDwxIVFFT/xWh4yYnA0BeDmFaAHRY6t60pE2P8nZQnsitF+TgwwDA==", + "peer": true }, "balanced-match": { "version": "1.0.2", @@ -10023,6 +9952,14 @@ "capture-stack-trace": "^1.0.0" } }, + "cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "requires": { + "node-fetch": "2.6.7" + } + }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -10114,9 +10051,9 @@ } }, "devtools-protocol": { - "version": "0.0.901419", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.901419.tgz", - "integrity": "sha512-4INMPwNm9XRpBukhNbF7OB6fNTTCaI8pzy/fXg0xQzAy5h3zL1P8xT3QazgKqBrb/hAYwIBizqDBZ7GtJE74QQ==" + "version": "0.0.1045489", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz", + "integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==" }, "doctrine": { "version": "2.1.0", @@ -10184,9 +10121,9 @@ } }, "electron-to-chromium": { - "version": "1.4.277", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.277.tgz", - "integrity": "sha512-Ej4VyUfGdVY5D2J5WHAVNqrEFBKgeNcX7p/bBQU4x/VKwvnyEvGd62NEkIK3lykLEe9Cg4MCcoWAa+u97o0u/A==", + "version": "1.4.278", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.278.tgz", + "integrity": "sha512-i+0+t/UVCqp9khP+hswZQbG31LnsYWGwyI9zhqZkyPok7k57W0UhMaxODMp3TeoNFhyUtB5OI4ppO/OSD9gaYg==", "dev": true }, "emitter-component": { @@ -10414,12 +10351,13 @@ } }, "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", + "dev": true, "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "first-chunk-stream": { @@ -10836,9 +10774,9 @@ } }, "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "requires": { "agent-base": "6", "debug": "4" @@ -11237,14 +11175,6 @@ "strip-bom": "^2.0.0" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -11503,6 +11433,11 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -11539,9 +11474,33 @@ } }, "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + }, + "dependencies": { + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + } + } }, "node-releases": { "version": "2.0.6", @@ -11664,27 +11623,6 @@ "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", "dev": true }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, "package-json": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", @@ -11770,9 +11708,13 @@ "dev": true }, "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } }, "path-is-absolute": { "version": "1.0.1", @@ -11863,14 +11805,6 @@ "pinkie": "^2.0.0" } }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "requires": { - "find-up": "^4.0.0" - } - }, "plylog": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/plylog/-/plylog-1.1.0.tgz", @@ -12214,9 +12148,9 @@ "dev": true }, "progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", - "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" }, "proxy-from-env": { "version": "1.1.0", @@ -12245,32 +12179,31 @@ "dev": true }, "puppeteer": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-10.4.0.tgz", - "integrity": "sha512-2cP8mBoqnu5gzAVpbZ0fRaobBWZM8GEUF4I1F6WbgHrKV/rz7SX8PG2wMymZgD0wo0UBlg2FBPNxlF/xlqW6+w==", + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-18.2.1.tgz", + "integrity": "sha512-7+UhmYa7wxPh2oMRwA++k8UGVDxh3YdWFB52r9C3tM81T6BU7cuusUSxImz0GEYSOYUKk/YzIhkQ6+vc0gHbxQ==", "requires": { - "debug": "4.3.1", - "devtools-protocol": "0.0.901419", + "https-proxy-agent": "5.0.1", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "puppeteer-core": "18.2.1" + } + }, + "puppeteer-core": { + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-18.2.1.tgz", + "integrity": "sha512-MRtTAZfQTluz3U2oU/X2VqVWPcR1+94nbA2V6ZrSZRVEwLqZ8eclZ551qGFQD/vD2PYqHJwWOW/fpC721uznVw==", + "requires": { + "cross-fetch": "3.1.5", + "debug": "4.3.4", + "devtools-protocol": "0.0.1045489", "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.0", - "node-fetch": "2.6.1", - "pkg-dir": "4.2.0", - "progress": "2.0.1", + "https-proxy-agent": "5.0.1", "proxy-from-env": "1.1.0", "rimraf": "3.0.2", - "tar-fs": "2.0.0", - "unbzip2-stream": "1.3.3", - "ws": "7.4.6" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "requires": { - "ms": "2.1.2" - } - } + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.9.0" } }, "qs": { @@ -12337,27 +12270,6 @@ "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - } } }, "readable-stream": { @@ -12916,24 +12828,14 @@ } }, "tar-fs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.0.tgz", - "integrity": "sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "requires": { "chownr": "^1.1.1", - "mkdirp": "^0.5.1", + "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", - "tar-stream": "^2.0.0" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "requires": { - "minimist": "^1.2.6" - } - } + "tar-stream": "^2.1.4" } }, "tar-stream": { @@ -13078,20 +12980,15 @@ "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", "dev": true }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, "typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true }, "typical": { @@ -13125,9 +13022,9 @@ } }, "unbzip2-stream": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", - "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "requires": { "buffer": "^5.2.1", "through": "^2.3.8" @@ -13589,9 +13486,9 @@ } }, "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", + "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", "requires": {} }, "xdg-basedir": { diff --git a/packages/render-fidelity-tools/package.json b/packages/render-fidelity-tools/package.json index 667774e6d9..d5ade69d92 100644 --- a/packages/render-fidelity-tools/package.json +++ b/packages/render-fidelity-tools/package.json @@ -23,8 +23,8 @@ }, "dependencies": { "@actions/core": "^1.2.4", - "@babylonjs/core": "*5.0.0-alpha.31", - "@babylonjs/loaders": "*5.0.0-alpha.31", + "@babylonjs/core": "^5.27.1", + "@babylonjs/loaders": "^5.27.1", "@google/model-viewer": "^2.0.2", "@khronosgroup/gltf-viewer": "^1.0.9", "@polymer/paper-button": "^3.0.1", @@ -33,7 +33,7 @@ "@types/http-server": "^0.10.0", "@types/mkdirp": "^1.0.1", "@types/pngjs": "^3.4.0", - "@types/puppeteer": "^5.4.4", + "@types/puppeteer": "^5.4.6", "@types/rimraf": "^3.0.1", "filament": "1.12.2", "focus-visible": "^5.2.0", @@ -41,7 +41,7 @@ "lit": "^2.2.3", "mkdirp": "^1.0.4", "pngjs": "^6.0.0", - "puppeteer": "^10.1.0", + "puppeteer": "^18.2.1", "rimraf": "^3.0.2" }, "devDependencies": { @@ -51,6 +51,6 @@ "polymer-build": "^3.1.4", "rollup": "^2.77.2", "rollup-plugin-external-globals": "^0.6.1", - "typescript": "4.3.5" + "typescript": "4.8.4" } } \ No newline at end of file diff --git a/packages/render-fidelity-tools/src/components/renderers/babylon-viewer.ts b/packages/render-fidelity-tools/src/components/renderers/babylon-viewer.ts index c829bf6399..56cf0385b6 100644 --- a/packages/render-fidelity-tools/src/components/renderers/babylon-viewer.ts +++ b/packages/render-fidelity-tools/src/components/renderers/babylon-viewer.ts @@ -33,9 +33,9 @@ const $degToRadians = Symbol('degToRadians'); @customElement('babylon-viewer') export class BabylonViewer extends LitElement { @property({type: Object}) scenario: ScenarioConfig|null = null; - private[$canvas]: HTMLCanvasElement|null; - private[$engine]: Engine; - private[$scene]: Scene; + private[$canvas]: HTMLCanvasElement|null = null; + private[$engine]!: Engine; + private[$scene]!: Scene; updated(changedProperties: Map) { diff --git a/packages/render-fidelity-tools/src/components/renderers/filament-viewer.ts b/packages/render-fidelity-tools/src/components/renderers/filament-viewer.ts index 991be1e8ea..b86ec179aa 100644 --- a/packages/render-fidelity-tools/src/components/renderers/filament-viewer.ts +++ b/packages/render-fidelity-tools/src/components/renderers/filament-viewer.ts @@ -59,18 +59,18 @@ export class FilamentViewer extends LitElement { @property({type: Object}) scenario: ScenarioConfig|null = null; private[$rendering]: boolean = false; - private[$engine]: Engine; - private[$scene]: Scene; - private[$renderer]: Renderer; - private[$swapChain]: SwapChain; - private[$camera]: Camera; - private[$view]: View; - - private[$ibl]: IndirectLight|null; - private[$skybox]: Skybox|null; - private[$currentAsset]: gltfio$FilamentAsset|null; - private[$assetLoader]: gltfio$AssetLoader|null; - private[$directionalLight]: Entity|null; + private[$engine]!: Engine; + private[$scene]!: Scene; + private[$renderer]!: Renderer; + private[$swapChain]!: SwapChain; + private[$camera]!: Camera; + private[$view]!: View; + + private[$ibl]: IndirectLight|null = null; + private[$skybox]: Skybox|null = null; + private[$currentAsset]: gltfio$FilamentAsset|null = null; + private[$assetLoader]: gltfio$AssetLoader|null = null; + private[$directionalLight]: Entity|null = null; private[$canvas]: HTMLCanvasElement|null = null; private[$boundingBox]: Aabb = {min: [0, 0, 0], max: [0, 0, 0]}; diff --git a/packages/render-fidelity-tools/src/components/renderers/gltf-sample-viewer.ts b/packages/render-fidelity-tools/src/components/renderers/gltf-sample-viewer.ts index e5a21cc2aa..b3e5398f24 100644 --- a/packages/render-fidelity-tools/src/components/renderers/gltf-sample-viewer.ts +++ b/packages/render-fidelity-tools/src/components/renderers/gltf-sample-viewer.ts @@ -17,7 +17,7 @@ const $degToRadians = Symbol('degToRadians'); @customElement('gltf-sample-viewer') export class GltfSampleViewer extends LitElement { @property({type: Object}) scenario: ScenarioConfig|null = null; - private[$canvas]: HTMLCanvasElement|null; + private[$canvas]: HTMLCanvasElement|null = null; private[$view]: GltfView; private[$state]: GltfState; private[$resourceLoader]: ResourceLoader; diff --git a/packages/render-fidelity-tools/src/components/renderers/rhodonite-viewer.ts b/packages/render-fidelity-tools/src/components/renderers/rhodonite-viewer.ts index 85974dbd6c..5c0cbc5475 100644 --- a/packages/render-fidelity-tools/src/components/renderers/rhodonite-viewer.ts +++ b/packages/render-fidelity-tools/src/components/renderers/rhodonite-viewer.ts @@ -1,8 +1,9 @@ import {css, customElement, html, LitElement, property} from 'lit-element'; -import {ScenarioConfig} from '../../common.js'; + // @ts-ignore import Rn from '../../../node_modules/rhodonite/dist/esm/index.mjs'; +import {ScenarioConfig} from '../../common.js'; const $isRhodoniteInitDone = Symbol('isRhodoniteInitDone'); const $updateSize = Symbol('updateSize'); @@ -12,11 +13,11 @@ const $canvas = Symbol('canvas'); @customElement('rhodonite-viewer') export class RhodoniteViewer extends LitElement { @property({type: Object}) scenario: ScenarioConfig|null = null; - private[$canvas]: HTMLCanvasElement|null; + private[$canvas]: HTMLCanvasElement|null = null; private[$isRhodoniteInitDone] = false; static get styles() { - return css` + return css` :host { display: block; } @@ -40,32 +41,59 @@ export class RhodoniteViewer extends LitElement { // Rhodonite Initialization await this.initRhodonite(); - const iblRotation = + 180; + const iblRotation = +180; // Update Size this[$updateSize](); // create Frame and Expressions const frame = new Rn.Frame(); - + // create FrameBuffers - const { framebufferTargetOfGammaMsaa, framebufferTargetOfGammaResolve, framebufferTargetOfGammaResolveForReference } = createRenderTargets(scenario.dimensions.width, scenario.dimensions.height); - + const { + framebufferTargetOfGammaMsaa, + framebufferTargetOfGammaResolve, + framebufferTargetOfGammaResolveForReference + } = + createRenderTargets( + scenario.dimensions.width, scenario.dimensions.height); + // Load glTF Expression - const { cameraComponent, cameraEntity, mainRenderPass, modelTransparentExpression } = await loadGltf(frame, scenario, framebufferTargetOfGammaMsaa, framebufferTargetOfGammaResolve, framebufferTargetOfGammaResolveForReference); - + const { + cameraComponent, + cameraEntity, + mainRenderPass, + modelTransparentExpression + } = + await loadGltf( + frame, + scenario, + framebufferTargetOfGammaMsaa, + framebufferTargetOfGammaResolve, + framebufferTargetOfGammaResolveForReference); + // setup IBL const prefilterObj = await setupIBL(scenario, iblRotation); - + if (Rn.Is.exist(prefilterObj)) { - setupBackgroundEnvCubeExpression(frame, prefilterObj, framebufferTargetOfGammaMsaa, mainRenderPass, scenario, iblRotation); + setupBackgroundEnvCubeExpression( + frame, + prefilterObj, + framebufferTargetOfGammaMsaa, + mainRenderPass, + scenario, + iblRotation); } - + // MSAA Resolve Expression - setupMsaaResolveExpression(frame, framebufferTargetOfGammaMsaa, framebufferTargetOfGammaResolve, framebufferTargetOfGammaResolveForReference); + setupMsaaResolveExpression( + frame, + framebufferTargetOfGammaMsaa, + framebufferTargetOfGammaResolve, + framebufferTargetOfGammaResolveForReference); frame.addExpression(modelTransparentExpression); - + // Post GammaCorrection Expression setupGammaExpression(frame, framebufferTargetOfGammaResolve); @@ -83,7 +111,6 @@ export class RhodoniteViewer extends LitElement { approach: Rn.ProcessApproach.UniformWebGL2, canvas: this[$canvas] as HTMLCanvasElement, }); - this[$isRhodoniteInitDone] === true; } Rn.MeshRendererComponent.isDepthMaskTrueForTransparencies = true; } @@ -96,9 +123,9 @@ export class RhodoniteViewer extends LitElement { } draw(); this.dispatchEvent( - // This notifies the framework that the model is visible and the - // screenshot can be taken - new CustomEvent('model-visibility', { detail: { visible: true } })); + // This notifies the framework that the model is visible and the + // screenshot can be taken + new CustomEvent('model-visibility', {detail: {visible: true}})); }); } @@ -132,13 +159,19 @@ async function setupIBL(scenario: ScenarioConfig, rotation: number) { return undefined; } -function setupCamera(mainRenderPass: any, scenario: ScenarioConfig, cameraEntity: any, cameraComponent: any) { - const sceneTopLevelGraphComponents = mainRenderPass.sceneTopLevelGraphComponents as Rn.SceneGraphComponent[]; - const rootGroup = sceneTopLevelGraphComponents![0].entity as Rn.ISceneGraphEntity; +function setupCamera( + mainRenderPass: any, + scenario: ScenarioConfig, + cameraEntity: any, + cameraComponent: any) { + const sceneTopLevelGraphComponents = + mainRenderPass.sceneTopLevelGraphComponents as Rn.SceneGraphComponent[]; + const rootGroup = + sceneTopLevelGraphComponents![0].entity as Rn.ISceneGraphEntity; const aabb = rootGroup.getSceneGraph().calcWorldAABB(); Rn.MeshRendererComponent.isViewFrustumCullingEnabled = false; - const { target, orbit } = scenario!; + const {target, orbit} = scenario!; const center = [target.x, target.y, target.z]; @@ -172,28 +205,32 @@ function setupCamera(mainRenderPass: any, scenario: ScenarioConfig, cameraEntity cameraComponent.zFarInner = far; } -async function loadGltf(frame: Rn.Frame, scenario: ScenarioConfig, framebufferTargetOfGammaMsaa: Rn.FrameBuffer, framebufferTargetOfGammaResolve: Rn.FrameBuffer, framebufferTargetOfGammaResolveForReference: Rn.FrameBuffer) { - const initialExpression = setupInitialExpression(framebufferTargetOfGammaMsaa); +async function loadGltf( + frame: Rn.Frame, + scenario: ScenarioConfig, + framebufferTargetOfGammaMsaa: Rn.FrameBuffer, + framebufferTargetOfGammaResolve: Rn.FrameBuffer, + framebufferTargetOfGammaResolveForReference: Rn.FrameBuffer) { + const initialExpression = + setupInitialExpression(framebufferTargetOfGammaMsaa); frame.addExpression(initialExpression); // camera const cameraEntity = Rn.EntityHelper.createCameraEntity(); const cameraComponent = cameraEntity.getCamera(); cameraComponent.fovyInner = scenario.verticalFoV; - cameraComponent.aspectInner = scenario.dimensions.width / scenario.dimensions.height; + cameraComponent.aspectInner = + scenario.dimensions.width / scenario.dimensions.height; // gltf - const modelOpaqueExpression = await Rn.GltfImporter.import( - scenario.model, - { - cameraComponent: cameraComponent, - defaultMaterialHelperArgumentArray: [ - { - makeOutputSrgb: false, - }, - ], - } - ); + const modelOpaqueExpression = await Rn.GltfImporter.import(scenario.model, { + cameraComponent: cameraComponent, + defaultMaterialHelperArgumentArray: [ + { + makeOutputSrgb: false, + }, + ], + }); const modelOpaquePass = modelOpaqueExpression.renderPasses[0]; modelOpaquePass.tryToSetUniqueName('modelOpaque', true); modelOpaquePass.cameraComponent = cameraComponent; @@ -213,7 +250,8 @@ async function loadGltf(frame: Rn.Frame, scenario: ScenarioConfig, framebufferTa renderPassMainTranslucent.toRenderTransparentPrimitives = true; renderPassMainTranslucent.toClearDepthBuffer = false; renderPassMainTranslucent.setFramebuffer(framebufferTargetOfGammaMsaa); - renderPassMainTranslucent.setResolveFramebuffer(framebufferTargetOfGammaResolve); + renderPassMainTranslucent.setResolveFramebuffer( + framebufferTargetOfGammaResolve); for (const entity of renderPassMainTranslucent.entities) { const meshComponent = entity.tryToGetMesh(); if (Rn.Is.exist(meshComponent)) { @@ -221,37 +259,44 @@ async function loadGltf(frame: Rn.Frame, scenario: ScenarioConfig, framebufferTa if (Rn.Is.exist(mesh)) { for (const primitive of mesh.primitives) { primitive.material.setTextureParameter( - Rn.ShaderSemantics.BackBufferTexture, framebufferTargetOfGammaResolveForReference.getColorAttachedRenderTargetTexture(0)); + Rn.ShaderSemantics.BackBufferTexture, + framebufferTargetOfGammaResolveForReference + .getColorAttachedRenderTargetTexture(0)); } } } } frame.addExpression(modelOpaqueExpression); - - return { cameraComponent, cameraEntity, mainRenderPass: modelOpaquePass, modelTransparentExpression }; + + return { + cameraComponent, + cameraEntity, + mainRenderPass: modelOpaquePass, + modelTransparentExpression + }; } -function setupGammaExpression(frame: Rn.Frame, gammaTargetFramebuffer: Rn.FrameBuffer) { +function setupGammaExpression( + frame: Rn.Frame, gammaTargetFramebuffer: Rn.FrameBuffer) { const expressionGammaEffect = new Rn.Expression(); // gamma correction (and super sampling) const postEffectCameraEntity = createPostEffectCameraEntity(); const postEffectCameraComponent = postEffectCameraEntity.getCamera(); - const gammaCorrectionMaterial = Rn.MaterialHelper.createGammaCorrectionMaterial(); - // gammaCorrectionMaterial.setParameter(Rn.ShaderSemantics.EnableLinearToSrgb, Rn.Scalar.fromCopyNumber(0)); + const gammaCorrectionMaterial = + Rn.MaterialHelper.createGammaCorrectionMaterial(); + // gammaCorrectionMaterial.setParameter(Rn.ShaderSemantics.EnableLinearToSrgb, + // Rn.Scalar.fromCopyNumber(0)); const gammaCorrectionRenderPass = createPostEffectRenderPass( - gammaCorrectionMaterial, - postEffectCameraComponent - ); + gammaCorrectionMaterial, postEffectCameraComponent); setTextureParameterForMeshComponents( - gammaCorrectionRenderPass.meshComponents!, - Rn.ShaderSemantics.BaseColorTexture, - gammaTargetFramebuffer.getColorAttachedRenderTargetTexture(0) - ); - + gammaCorrectionRenderPass.meshComponents!, + Rn.ShaderSemantics.BaseColorTexture, + gammaTargetFramebuffer.getColorAttachedRenderTargetTexture(0)); + expressionGammaEffect.addRenderPasses([gammaCorrectionRenderPass]); frame.addExpression(expressionGammaEffect); @@ -261,19 +306,26 @@ function setupInitialExpression(framebufferTargetOfGammaMsaa: Rn.FrameBuffer) { const expression = new Rn.Expression(); expression.tryToSetUniqueName('Initial', true); const initialRenderPass = new Rn.RenderPass(); - initialRenderPass.clearColor = Rn.Vector4.fromCopyArray4([0.0, 0.0, 0.0, 0.0]); + initialRenderPass.clearColor = + Rn.Vector4.fromCopyArray4([0.0, 0.0, 0.0, 0.0]); initialRenderPass.toClearColorBuffer = false; initialRenderPass.toClearDepthBuffer = true; const initialRenderPassForFrameBuffer = new Rn.RenderPass(); - initialRenderPassForFrameBuffer.clearColor = Rn.Vector4.fromCopyArray4([0.0, 0.0, 0.0, 0.0]); + initialRenderPassForFrameBuffer.clearColor = + Rn.Vector4.fromCopyArray4([0.0, 0.0, 0.0, 0.0]); initialRenderPassForFrameBuffer.toClearColorBuffer = true; initialRenderPassForFrameBuffer.toClearDepthBuffer = true; initialRenderPassForFrameBuffer.setFramebuffer(framebufferTargetOfGammaMsaa) - expression.addRenderPasses([initialRenderPass, initialRenderPassForFrameBuffer]); + expression.addRenderPasses( + [initialRenderPass, initialRenderPassForFrameBuffer]); return expression; } -function setupMsaaResolveExpression(frame: Rn.Frame, framebufferTargetOfGammaMsaa: Rn.FrameBuffer, framebufferTargetOfGammaResolve: Rn.FrameBuffer, framebufferTargetOfGammaResolveForReference: Rn.FrameBuffer) { +function setupMsaaResolveExpression( + frame: Rn.Frame, + framebufferTargetOfGammaMsaa: Rn.FrameBuffer, + framebufferTargetOfGammaResolve: Rn.FrameBuffer, + framebufferTargetOfGammaResolveForReference: Rn.FrameBuffer) { const expressionForResolve = new Rn.Expression() expressionForResolve.tryToSetUniqueName('Resolve', true) const renderPassForResolve = new Rn.RenderPass() @@ -282,7 +334,8 @@ function setupMsaaResolveExpression(frame: Rn.Frame, framebufferTargetOfGammaMsa renderPassForResolve.toClearDepthBuffer = false renderPassForResolve.setFramebuffer(framebufferTargetOfGammaMsaa) renderPassForResolve.setResolveFramebuffer(framebufferTargetOfGammaResolve) - renderPassForResolve.setResolveFramebuffer2(framebufferTargetOfGammaResolveForReference) + renderPassForResolve.setResolveFramebuffer2( + framebufferTargetOfGammaResolveForReference) // getRnAppModel().setResolveExpression(expressionForResolve.objectUID) frame.addExpression(expressionForResolve); @@ -292,31 +345,42 @@ function setupMsaaResolveExpression(frame: Rn.Frame, framebufferTargetOfGammaMsa function createRenderTargets(canvasWidth: number, canvasHeight: number) { // MSAA depth - const framebufferTargetOfGammaMsaa = Rn.RenderableHelper.createTexturesForRenderTarget(canvasWidth, canvasHeight, 0, { - isMSAA: true, - sampleCountMSAA: 4, - }); - framebufferTargetOfGammaMsaa.tryToSetUniqueName('FramebufferTargetOfGammaMsaa', true); + const framebufferTargetOfGammaMsaa = + Rn.RenderableHelper.createTexturesForRenderTarget( + canvasWidth, canvasHeight, 0, { + isMSAA: true, + sampleCountMSAA: 4, + }); + framebufferTargetOfGammaMsaa.tryToSetUniqueName( + 'FramebufferTargetOfGammaMsaa', true); // Resolve Color 1 - const framebufferTargetOfGammaResolve = Rn.RenderableHelper.createTexturesForRenderTarget(canvasWidth, canvasHeight, 1, { - createDepthBuffer: true, - }); - framebufferTargetOfGammaResolve.tryToSetUniqueName('FramebufferTargetOfGammaResolve', true); + const framebufferTargetOfGammaResolve = + Rn.RenderableHelper.createTexturesForRenderTarget( + canvasWidth, canvasHeight, 1, { + createDepthBuffer: true, + }); + framebufferTargetOfGammaResolve.tryToSetUniqueName( + 'FramebufferTargetOfGammaResolve', true); // Resolve Color 2 - const framebufferTargetOfGammaResolveForReference = Rn.RenderableHelper.createTexturesForRenderTarget(canvasWidth, canvasHeight, 1, { - createDepthBuffer: false, - minFilter: Rn.TextureParameter.LinearMipmapLinear - }); - framebufferTargetOfGammaResolveForReference.tryToSetUniqueName('FramebufferTargetOfGammaResolveForReference', true); - return { framebufferTargetOfGammaMsaa, framebufferTargetOfGammaResolve, framebufferTargetOfGammaResolveForReference }; + const framebufferTargetOfGammaResolveForReference = + Rn.RenderableHelper.createTexturesForRenderTarget( + canvasWidth, canvasHeight, 1, { + createDepthBuffer: false, + minFilter: Rn.TextureParameter.LinearMipmapLinear + }); + framebufferTargetOfGammaResolveForReference.tryToSetUniqueName( + 'FramebufferTargetOfGammaResolveForReference', true); + return { + framebufferTargetOfGammaMsaa, + framebufferTargetOfGammaResolve, + framebufferTargetOfGammaResolveForReference + }; } function createPostEffectRenderPass( - material: Rn.Material, - cameraComponent: Rn.CameraComponent -) { + material: Rn.Material, cameraComponent: Rn.CameraComponent) { const boardPrimitive = new Rn.Plane(); boardPrimitive.generate({ width: 1, @@ -337,7 +401,9 @@ function createPostEffectRenderPass( 0.0, ]); boardEntity.getTransform().translate = Rn.Vector3.fromCopyArray([ - 0.0, 0.0, -0.5, + 0.0, + 0.0, + -0.5, ]); const boardMeshComponent = boardEntity.getMesh(); boardMeshComponent.setMesh(boardMesh); @@ -360,13 +426,13 @@ function createPostEffectCameraEntity() { } function setTextureParameterForMeshComponents( - meshComponents: Rn.MeshComponent[], - shaderSemantic: Rn.ShaderSemanticsEnum, - value: any -) { + meshComponents: Rn.MeshComponent[], + shaderSemantic: Rn.ShaderSemanticsEnum, + value: any) { for (let i = 0; i < meshComponents.length; i++) { const mesh = meshComponents[i].mesh; - if (!mesh) continue; + if (!mesh) + continue; const primitiveNumber = mesh.getPrimitiveNumber(); for (let j = 0; j < primitiveNumber; j++) { @@ -381,25 +447,27 @@ let glPrefiltering: WebGLRenderingContext; function initPrefilteringWasm() { return new Promise(resolve => { - if (initPrefilteringWasmPromise != null) { - // already initialized - initPrefilteringWasmPromise.then(() => { - resolve(); - }); - } - - const uri = 'https://storage.googleapis.com/emadurandal-3d-public.appspot.com/rhodonite/vendor/ibl_prefiltering_wasm_bg.wasm' - - initPrefilteringWasmPromise = wasm_bindgen(uri).then(() => { - const canvas = document.createElement('canvas') as HTMLCanvasElement - glPrefiltering = canvas.getContext('webgl') as WebGLRenderingContext - const {init_webgl_extensions} = wasm_bindgen - init_webgl_extensions(glPrefiltering) - - resolve(); - }) as Promise - - }) as Promise; + if (initPrefilteringWasmPromise != null) { + // already initialized + initPrefilteringWasmPromise.then(() => { + resolve(); + }); + } + + const uri = + 'https://storage.googleapis.com/emadurandal-3d-public.appspot.com/rhodonite/vendor/ibl_prefiltering_wasm_bg.wasm' + + initPrefilteringWasmPromise = wasm_bindgen(uri).then(() => { + const canvas = + document.createElement('canvas') as HTMLCanvasElement + glPrefiltering = + canvas.getContext('webgl') as WebGLRenderingContext + const {init_webgl_extensions} = wasm_bindgen + init_webgl_extensions(glPrefiltering) + + resolve(); + }) as Promise + }) as Promise; } async function prefilterFromUri(hdrFileUri: string) { @@ -413,7 +481,14 @@ async function prefilterFromUri(hdrFileUri: string) { const pmremCubeMapMipCount = 8 const brdfLutSize = 512 const sample_count = 1024; - const prefilter = new CubeMapPrefilter(glPrefiltering, cubeMapSize, irradianceCubeMapSize, pmremCubeMapSize, pmremCubeMapMipCount, brdfLutSize, sample_count) + const prefilter = new CubeMapPrefilter( + glPrefiltering, + cubeMapSize, + irradianceCubeMapSize, + pmremCubeMapSize, + pmremCubeMapMipCount, + brdfLutSize, + sample_count) const hdrImageData = await request_binary(hdrFileUri) prefilter.load_hdr_image(glPrefiltering, hdrImageData) @@ -424,27 +499,24 @@ async function prefilterFromUri(hdrFileUri: string) { function setupPrefilteredIBLTexture(prefilter: any, rotation: number) { const specularCubeTexture = new Rn.CubeTexture() - const specularTextureTypedArrayImages = getSpecularCubeTextureTypedArrays(prefilter) + const specularTextureTypedArrayImages = + getSpecularCubeTextureTypedArrays(prefilter) specularCubeTexture.mipmapLevelNumber = specularTextureTypedArrayImages.length const specularTextureSize = getSpecularCubeTextureSize(prefilter, 0) specularCubeTexture.generateTextureFromTypedArrays( - specularTextureTypedArrayImages, - specularTextureSize, - specularTextureSize - ) + specularTextureTypedArrayImages, specularTextureSize, specularTextureSize) specularCubeTexture.hdriFormat = Rn.HdriFormat.RGBE_PNG const diffuseCubeTexture = new Rn.CubeTexture() - const diffuseTextureTypedArrayImages = getDiffuseCubeTextureTypedArrays(prefilter) + const diffuseTextureTypedArrayImages = + getDiffuseCubeTextureTypedArrays(prefilter) const diffuseTextureSize = getDiffuseCubeTextureSize(prefilter) diffuseCubeTexture.generateTextureFromTypedArrays( - diffuseTextureTypedArrayImages, - diffuseTextureSize, - diffuseTextureSize - ) + diffuseTextureTypedArrayImages, diffuseTextureSize, diffuseTextureSize) diffuseCubeTexture.hdriFormat = Rn.HdriFormat.RGBE_PNG; - attachIBLTextureToAllMeshComponents(diffuseCubeTexture, specularCubeTexture, rotation); + attachIBLTextureToAllMeshComponents( + diffuseCubeTexture, specularCubeTexture, rotation); return [diffuseCubeTexture, specularCubeTexture]; } @@ -454,32 +526,40 @@ function getSpecularCubeTextureTypedArrays(prefilter: any) { const mipCount = prefilter.pmrem_cubemap_mip_count(); for (let mipLevel = 0; mipLevel < mipCount; mipLevel++) { - specularTextureTypedArrays.push( - { - posX: prefilter.pmrem_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_X, mipLevel), - negX: prefilter.pmrem_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_X, mipLevel), - posY: prefilter.pmrem_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_Y, mipLevel), - negY: prefilter.pmrem_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_Y, mipLevel), - posZ: prefilter.pmrem_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_Z, mipLevel), - negZ: prefilter.pmrem_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_Z, mipLevel) - } - ); + specularTextureTypedArrays.push({ + posX: prefilter.pmrem_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_X, mipLevel), + negX: prefilter.pmrem_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_X, mipLevel), + posY: prefilter.pmrem_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_Y, mipLevel), + negY: prefilter.pmrem_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_Y, mipLevel), + posZ: prefilter.pmrem_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_Z, mipLevel), + negZ: prefilter.pmrem_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_Z, mipLevel) + }); } return specularTextureTypedArrays; } function getDiffuseCubeTextureTypedArrays(prefilter: any) { - return [ - { - posX: prefilter.irradiance_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_X), - negX: prefilter.irradiance_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_X), - posY: prefilter.irradiance_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_Y), - negY: prefilter.irradiance_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_Y), - posZ: prefilter.irradiance_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_Z), - negZ: prefilter.irradiance_cubemap_texture_to_arrybuffer(glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_Z) - } - ] + return [{ + posX: prefilter.irradiance_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_X), + negX: prefilter.irradiance_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_X), + posY: prefilter.irradiance_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_Y), + negY: prefilter.irradiance_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_Y), + posZ: prefilter.irradiance_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_POSITIVE_Z), + negZ: prefilter.irradiance_cubemap_texture_to_arrybuffer( + glPrefiltering, glPrefiltering.TEXTURE_CUBE_MAP_NEGATIVE_Z) + }] } export function getEnvCubeTextureSize(prefilter: any) { @@ -494,58 +574,75 @@ export function getSpecularCubeTextureSize(prefilter: any, mipLevel: number) { return prefilter.pmrem_cubemap_texture_size(mipLevel) } -function attachIBLTextureToAllMeshComponents(diffuseCubeTexture: Rn.CubeTexture, specularCubeTexture: Rn.CubeTexture, rotation: number) { - const meshRendererComponents = Rn.ComponentRepository.getComponentsWithType(Rn.MeshRendererComponent) as Rn.MeshRendererComponent[] +function attachIBLTextureToAllMeshComponents( + diffuseCubeTexture: Rn.CubeTexture, + specularCubeTexture: Rn.CubeTexture, + rotation: number) { + const meshRendererComponents = + Rn.ComponentRepository.getComponentsWithType(Rn.MeshRendererComponent) as + Rn.MeshRendererComponent[]; for (let i = 0; i < meshRendererComponents.length; i++) { const meshRendererComponent = meshRendererComponents[i]; meshRendererComponent.specularCubeMap = specularCubeTexture; meshRendererComponent.diffuseCubeMap = diffuseCubeTexture; meshRendererComponent.diffuseCubeMapContribution = 0.5; meshRendererComponent.specularCubeMapContribution = 0.5; - meshRendererComponent.rotationOfCubeMap = Rn.MathUtil.degreeToRadian(rotation) + meshRendererComponent.rotationOfCubeMap = + Rn.MathUtil.degreeToRadian(rotation) } - const meshComponents = Rn.ComponentRepository.getComponentsWithType(Rn.MeshComponent) as Rn.MeshComponent[] + const meshComponents = Rn.ComponentRepository.getComponentsWithType( + Rn.MeshComponent) as Rn.MeshComponent[]; for (let i = 0; i < meshComponents.length; i++) { const meshComponent = meshComponents[i]; const mesh = meshComponent.mesh; if (Rn.Is.exist(mesh)) { - for (let i=0; i void; } +interface ModelViewerStatic extends CustomElementConstructor { + minimumRenderScale: number; +} + export async function createPoster() { const modelViewer = getModelViewer(); - const ModelViewerElement = customElements.get('model-viewer'); + const ModelViewerElement = + customElements.get('model-viewer') as ModelViewerStatic; const oldMinScale = ModelViewerElement.minimumRenderScale; ModelViewerElement.minimumRenderScale = 1;