{"_id":"@amazon/lib-3d-scene-viewer","_rev":"5-b02fb10f18d73fb48b7b3c5cfd7b54a8","name":"@amazon/lib-3d-scene-viewer","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@amazon/lib-3d-scene-viewer","version":"1.0.0","author":{"name":"Amazon"},"license":"Apache-2.0","_id":"@amazon/lib-3d-scene-viewer@1.0.0","maintainers":[{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"}],"homepage":"https://github.com/amzn/lib-3d-scene-viewer#readme","bugs":{"url":"https://github.com/amzn/lib-3d-scene-viewer/issues"},"dist":{"shasum":"dc491e91b9758df1e3a96298b1d0d610e18544e5","tarball":"https://registry.npmjs.org/@amazon/lib-3d-scene-viewer/-/lib-3d-scene-viewer-1.0.0.tgz","fileCount":112,"integrity":"sha512-llIhE+ujOhdm27eJyMqTkLOAQJyQnH1pFbE4c+Jy5Ptf0UwYJpxnFDOWryhBzX9isd/rPZc6eTK7httmoEfwVQ==","signatures":[{"sig":"MEUCIAWHK5WPiT8iGhNAzBLHbSWLflekR1LahyZw0XoLEmE9AiEA2TVUPFBe04dX4G+tXeID37POwncJpnXVAsjXAABWjkw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5147507},"types":"./index.d.ts","engines":{"npm":">=10.0.0","node":">=18.0.0"},"gitHead":"5203b8bc4cf751a87ce84c2a41bb78ca9d5c069a","scripts":{"docs":"typedoc src/index.ts","lint":"eslint '**/*.{ts,tsx}' --quiet","test":"NODE_OPTIONS=--experimental-vm-modules npx jest --verbose","build":"rimraf dist && npm run lint && tsc -b tsconfig.json && npm run copy-files","clean":"rimraf node_modules dist coverage docs","format":"eslint '**/*.{ts,tsx}' --fix","server":"webpack serve","pack:dist":"npm run build && npm run test && npm run docs && cd dist && npm pack && cd ..","copy-files":"cpy public/* package.json LICENSE README.md THIRD_PARTY_LICENSES dist","publish:dist":"node ./scripts/publish.js","update-bjs-ver":"node ./scripts/updateBabylonjsVersion.js"},"_npmUser":{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"},"repository":{"url":"git+https://github.com/amzn/lib-3d-scene-viewer.git","type":"git"},"_npmVersion":"10.7.0","description":"This package provides preset configurations for quickly setting up a 3D scene viewer.","directories":{},"_nodeVersion":"18.20.4","dependencies":{"convex-hull":"1.0.3","deepmerge-ts":"4.3.0","@babylonjs/gui":"7.34.2","@babylonjs/core":"7.34.2","@babylonjs/loaders":"7.34.2","@babylonjs/materials":"7.34.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","nock":"^13.5.5","eslint":"^8.57.1","rimraf":"^4.4.1","cpy-cli":"^5.0.0","ts-jest":"^29.2.5","typedoc":"^0.26.8","webpack":"^5.94.0","prettier":"3.3.3","ts-loader":"^9.5.1","css-loader":"^7.1.2","typescript":"~5.5.0","@types/jest":"^29.5.13","draco3dgltf":"1.5.7","file-loader":"^6.2.0","webpack-cli":"^5.1.4","style-loader":"^4.0.0","jest-canvas-mock":"^2.5.2","webpack-dev-server":"^4.15.2","html-webpack-plugin":"^5.6.0","@babylonjs/inspector":"7.34.2","eslint-plugin-import":"^2.30.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","jest-environment-jsdom":"^29.7.0","webpack-bundle-analyzer":"^4.10.2","@typescript-eslint/parser":"^8.7.0","eslint-plugin-import-path":"^0.0.2","compression-webpack-plugin":"^11.1.0","@typescript-eslint/eslint-plugin":"^8.7.0","eslint-import-resolver-typescript":"^3.6.3"},"peerDependencies":{"@babylonjs/gui":"^7.34.2","@babylonjs/core":"^7.34.2","@babylonjs/loaders":"^7.34.2","@babylonjs/materials":"^7.34.2"},"_npmOperationalInternal":{"tmp":"tmp/lib-3d-scene-viewer_1.0.0_1734477118408_0.290008516868965","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@amazon/lib-3d-scene-viewer","version":"1.0.1","keywords":["3d","webgl","webgl2","javascript","canvas","amazon"],"author":{"name":"Amazon"},"license":"Apache-2.0","_id":"@amazon/lib-3d-scene-viewer@1.0.1","maintainers":[{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"}],"homepage":"https://github.com/amzn/lib-3d-scene-viewer#readme","bugs":{"url":"https://github.com/amzn/lib-3d-scene-viewer/issues"},"dist":{"shasum":"9c35e8962e696400f140c5133e4a2b0711f9cd12","tarball":"https://registry.npmjs.org/@amazon/lib-3d-scene-viewer/-/lib-3d-scene-viewer-1.0.1.tgz","fileCount":112,"integrity":"sha512-O3d9C+HfXdQHH5FktJpNGB10NUjA7gEbN7YYhL08vNXeVaDEABgxMXMVPUA5dH0U4mrswV/pOwzrIL5nUJjLyQ==","signatures":[{"sig":"MEUCIFnx03XdByD75CtWJG8jjxFfTQiuQSku2CSamIIlvBPMAiEA0YP+ZhbetuijLFCPwXtHJg5LbL1nFvxQ9VqzmqBN5fw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5148119},"types":"./index.d.ts","engines":{"npm":">=10.0.0","node":">=18.0.0"},"gitHead":"59cfa1c98ff802e727a3c76f117ebf03650aba29","scripts":{"docs":"typedoc","lint":"eslint '**/*.{ts,tsx}' --quiet","test":"NODE_OPTIONS=--experimental-vm-modules npx jest --verbose","build":"rimraf dist && npm run lint && tsc -b tsconfig.json && npm run copy-files","clean":"rimraf node_modules dist coverage docs","format":"eslint '**/*.{ts,tsx}' --fix","server":"webpack serve","pack:dist":"npm run build && npm run test && npm run docs && cd dist && npm pack && cd ..","copy-files":"cpy public/* package.json LICENSE README.md THIRD_PARTY_LICENSES dist","publish:dist":"node ./scripts/publish.js","update-bjs-ver":"node ./scripts/updateBabylonjsVersion.js"},"_npmUser":{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"},"repository":{"url":"git+https://github.com/amzn/lib-3d-scene-viewer.git","type":"git"},"_npmVersion":"10.8.2","description":"This package provides preset configurations for quickly setting up a 3D scene viewer.","directories":{},"_nodeVersion":"20.18.1","dependencies":{"convex-hull":"1.0.3","deepmerge-ts":"4.3.0","@babylonjs/gui":"7.34.2","@babylonjs/core":"7.34.2","@babylonjs/loaders":"7.34.2","@babylonjs/materials":"7.34.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","nock":"^13.5.5","eslint":"^8.57.1","rimraf":"^4.4.1","cpy-cli":"^5.0.0","ts-jest":"^29.2.5","typedoc":"^0.26.8","webpack":"^5.94.0","prettier":"3.3.3","ts-loader":"^9.5.1","css-loader":"^7.1.2","typescript":"~5.5.0","@types/jest":"^29.5.13","draco3dgltf":"1.5.7","file-loader":"^6.2.0","webpack-cli":"^5.1.4","style-loader":"^4.0.0","jest-canvas-mock":"^2.5.2","webpack-dev-server":"^4.15.2","html-webpack-plugin":"^5.6.0","@babylonjs/inspector":"7.34.2","eslint-plugin-import":"^2.30.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","jest-environment-jsdom":"^29.7.0","webpack-bundle-analyzer":"^4.10.2","@typescript-eslint/parser":"^8.7.0","eslint-plugin-import-path":"^0.0.2","compression-webpack-plugin":"^11.1.0","@typescript-eslint/eslint-plugin":"^8.7.0","eslint-import-resolver-typescript":"^3.6.3"},"peerDependencies":{"@babylonjs/gui":"^7.34.2","@babylonjs/core":"^7.34.2","@babylonjs/loaders":"^7.34.2","@babylonjs/materials":"^7.34.2"},"_npmOperationalInternal":{"tmp":"tmp/lib-3d-scene-viewer_1.0.1_1734983869462_0.19540417990684955","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@amazon/lib-3d-scene-viewer","version":"1.1.0","keywords":["3d","webgl","webgl2","javascript","canvas","amazon"],"author":{"name":"Amazon"},"license":"Apache-2.0","_id":"@amazon/lib-3d-scene-viewer@1.1.0","maintainers":[{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"}],"homepage":"https://github.com/amzn/lib-3d-scene-viewer#readme","bugs":{"url":"https://github.com/amzn/lib-3d-scene-viewer/issues"},"dist":{"shasum":"2016739364ce43668b6761148eb499ed1df0f784","tarball":"https://registry.npmjs.org/@amazon/lib-3d-scene-viewer/-/lib-3d-scene-viewer-1.1.0.tgz","fileCount":112,"integrity":"sha512-hRWn9+IlxO2a5O/nADWRPhrYgXoBPEYjTmGBBddb3ssfYPUe5/fp1RK7whr2EIOoEMC5zYPr8wj0czOitgne0Q==","signatures":[{"sig":"MEUCIQDVZoVyWLYvm14b3uCRtgS3AEHTwhxVbS3cQphAkhsvXQIgEKugIKXa9Tjunb23wX52fhzHp8hy7LWI9+lp37hfcSM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5147598},"types":"./index.d.ts","engines":{"npm":">=10.0.0","node":">=18.0.0"},"gitHead":"5edfa55d6a32532dfd74b4208e2a07a73228d6fd","scripts":{"docs":"typedoc","lint":"eslint '**/*.{ts,tsx}' --quiet","test":"NODE_OPTIONS=--experimental-vm-modules npx jest --verbose","build":"rimraf dist && npm run lint && tsc -b tsconfig.json && npm run copy-files","clean":"rimraf node_modules dist coverage docs","format":"eslint '**/*.{ts,tsx}' --fix","server":"webpack serve","prepare":"husky","pack:dist":"npm run build && npm run test && npm run docs && cd dist && npm pack && cd ..","copy-files":"cpy public/* package.json LICENSE README.md THIRD_PARTY_LICENSES dist","publish:dist":"node ./scripts/publish.js","update-bjs-ver":"node ./scripts/updateBabylonjsVersion.js"},"_npmUser":{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"},"repository":{"url":"git+https://github.com/amzn/lib-3d-scene-viewer.git","type":"git"},"_npmVersion":"10.8.2","description":"This package provides preset configurations for quickly setting up a 3D scene viewer.","directories":{},"_nodeVersion":"20.18.3","dependencies":{"convex-hull":"1.0.3","deepmerge-ts":"4.3.0","@babylonjs/gui":"7.49.0","@babylonjs/core":"7.49.0","@babylonjs/loaders":"7.49.0","@babylonjs/materials":"7.49.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","nock":"^13.5.5","husky":"^9.1.7","eslint":"^8.57.1","rimraf":"^4.4.1","cpy-cli":"^5.0.0","ts-jest":"^29.2.5","typedoc":"^0.26.8","webpack":"^5.94.0","prettier":"3.3.3","ts-loader":"^9.5.1","css-loader":"^7.1.2","typescript":"~5.5.0","@types/jest":"^29.5.13","draco3dgltf":"1.5.7","file-loader":"^6.2.0","webpack-cli":"^5.1.4","style-loader":"^4.0.0","@commitlint/cli":"^19.7.1","jest-canvas-mock":"^2.5.2","webpack-dev-server":"^4.15.2","html-webpack-plugin":"^5.6.0","@babylonjs/inspector":"7.49.0","eslint-plugin-import":"^2.30.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","jest-environment-jsdom":"^29.7.0","webpack-bundle-analyzer":"^4.10.2","@typescript-eslint/parser":"^8.7.0","eslint-plugin-import-path":"^0.0.2","compression-webpack-plugin":"^11.1.0","@commitlint/config-conventional":"^19.7.1","@typescript-eslint/eslint-plugin":"^8.7.0","eslint-import-resolver-typescript":"^3.6.3"},"peerDependencies":{"@babylonjs/gui":"^7.49.0","@babylonjs/core":"^7.49.0","@babylonjs/loaders":"^7.49.0","@babylonjs/materials":"^7.49.0"},"_npmOperationalInternal":{"tmp":"tmp/lib-3d-scene-viewer_1.1.0_1741047313466_0.565444994757258","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@amazon/lib-3d-scene-viewer","version":"1.1.1","keywords":["3d","webgl","webgl2","javascript","canvas","amazon"],"author":{"name":"Amazon"},"license":"Apache-2.0","_id":"@amazon/lib-3d-scene-viewer@1.1.1","maintainers":[{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"}],"homepage":"https://github.com/amzn/lib-3d-scene-viewer#readme","bugs":{"url":"https://github.com/amzn/lib-3d-scene-viewer/issues"},"dist":{"shasum":"fa70c1a10f52756a58fa7da2a05d00569e1b6910","tarball":"https://registry.npmjs.org/@amazon/lib-3d-scene-viewer/-/lib-3d-scene-viewer-1.1.1.tgz","fileCount":112,"integrity":"sha512-IEYdwMpjFlPjjybWoUkiX5c5fQMip/ZJBupjvlwMggs97mA/I7zfLJ7+7xMqqc59mBpmyKvR0uDB0mjomUjl/A==","signatures":[{"sig":"MEQCIEbwiYmxOgGlVctjUPnETiesXkXNkNF9vflPZqHVVlSdAiAyxw8DYoCJNujVLt0RraqTYUys8ZJrbmKAvGEXTKHm4A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5147869},"types":"./index.d.ts","engines":{"npm":">=10.0.0","node":">=18.0.0"},"gitHead":"fbcc6f677524bac1d5886786bd3e3ffeb6eb367e","scripts":{"docs":"typedoc","lint":"eslint '**/*.{ts,tsx}' --quiet","test":"NODE_OPTIONS=--experimental-vm-modules npx jest --verbose","build":"rimraf dist && npm run lint && tsc -b tsconfig.json && npm run copy-files","clean":"rimraf node_modules dist coverage docs","format":"eslint '**/*.{ts,tsx}' --fix","server":"webpack serve","prepare":"husky","webpack":"webpack --env production","pack:dist":"npm run build && npm run test && npm run docs && cd dist && npm pack && cd ..","copy-files":"cpy public/* package.json LICENSE README.md THIRD_PARTY_LICENSES dist","publish:dist":"node ./scripts/publish.js","update-bjs-ver":"node ./scripts/updateBabylonjsVersion.js"},"_npmUser":{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"},"repository":{"url":"git+https://github.com/amzn/lib-3d-scene-viewer.git","type":"git"},"_npmVersion":"10.8.2","description":"This package provides preset configurations for quickly setting up a 3D scene viewer.","directories":{},"_nodeVersion":"20.18.3","dependencies":{"convex-hull":"1.0.3","deepmerge-ts":"4.3.0","@babylonjs/gui":"7.49.0","@babylonjs/core":"7.49.0","@babylonjs/loaders":"7.49.0","@babylonjs/materials":"7.49.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","nock":"^13.5.5","husky":"^9.1.7","eslint":"^8.57.1","rimraf":"^4.4.1","cpy-cli":"^5.0.0","ts-jest":"^29.2.5","typedoc":"^0.26.8","webpack":"^5.94.0","prettier":"3.3.3","ts-loader":"^9.5.1","css-loader":"^7.1.2","typescript":"~5.5.0","@types/jest":"^29.5.13","draco3dgltf":"1.5.7","file-loader":"^6.2.0","webpack-cli":"^5.1.4","style-loader":"^4.0.0","@commitlint/cli":"^19.7.1","jest-canvas-mock":"^2.5.2","webpack-dev-server":"^4.15.2","copy-webpack-plugin":"^13.0.0","html-webpack-plugin":"^5.6.0","@babylonjs/inspector":"7.49.0","eslint-plugin-import":"^2.30.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","jest-environment-jsdom":"^29.7.0","@typescript-eslint/parser":"^8.7.0","eslint-plugin-import-path":"^0.0.2","@commitlint/config-conventional":"^19.7.1","@typescript-eslint/eslint-plugin":"^8.7.0","eslint-import-resolver-typescript":"^3.6.3"},"peerDependencies":{"@babylonjs/gui":">= 7.49.0 < 8","@babylonjs/core":">= 7.49.0 < 8","@babylonjs/loaders":">= 7.49.0 < 8","@babylonjs/materials":">= 7.49.0 < 8"},"_npmOperationalInternal":{"tmp":"tmp/lib-3d-scene-viewer_1.1.1_1741292737255_0.4195510816687016","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@amazon/lib-3d-scene-viewer","version":"1.1.2","description":"This package provides preset configurations for quickly setting up a 3D scene viewer.","scripts":{"build":"rimraf dist && npm run lint && tsc -b tsconfig.json && npm run copy-files","clean":"rimraf node_modules dist coverage docs","copy-files":"cpy public/* package.json LICENSE README.md THIRD_PARTY_LICENSES dist","docs":"typedoc","format":"eslint '**/*.{ts,tsx}' --fix","lint":"eslint '**/*.{ts,tsx}' --quiet","pack:dist":"npm run build && npm run test && npm run docs && cd dist && npm pack && cd ..","prepare":"husky","publish:dist":"node ./scripts/publish.js","server":"webpack serve","test":"NODE_OPTIONS=--experimental-vm-modules npx jest --verbose","update-bjs-ver":"node ./scripts/updateBabylonjsVersion.js","webpack":"webpack --env production"},"author":{"name":"Amazon"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/amzn/lib-3d-scene-viewer.git"},"keywords":["3d","webgl","webgl2","javascript","canvas","amazon"],"engines":{"npm":">=10.0.0","node":">=18.0.0"},"devDependencies":{"@babylonjs/inspector":"7.49.0","@commitlint/cli":"^19.7.1","@commitlint/config-conventional":"^19.7.1","@types/jest":"^29.5.13","@typescript-eslint/eslint-plugin":"^8.7.0","@typescript-eslint/parser":"^8.7.0","copy-webpack-plugin":"^13.0.0","cpy-cli":"^5.0.0","css-loader":"^7.1.2","draco3dgltf":"1.5.7","eslint":"^8.57.1","eslint-config-prettier":"^9.1.0","eslint-import-resolver-typescript":"^3.6.3","eslint-plugin-import":"^2.30.0","eslint-plugin-import-path":"^0.0.2","eslint-plugin-prettier":"^5.2.1","file-loader":"^6.2.0","html-webpack-plugin":"^5.6.0","husky":"^9.1.7","jest":"^29.7.0","jest-canvas-mock":"^2.5.2","jest-environment-jsdom":"^29.7.0","nock":"^13.5.5","prettier":"3.3.3","rimraf":"^4.4.1","style-loader":"^4.0.0","ts-jest":"^29.2.5","ts-loader":"^9.5.1","typedoc":"^0.26.8","typescript":"~5.5.0","webpack":"^5.94.0","webpack-cli":"^5.1.4","webpack-dev-server":"^4.15.2"},"dependencies":{"@babylonjs/core":"7.49.0","@babylonjs/gui":"7.49.0","@babylonjs/loaders":"7.49.0","@babylonjs/materials":"7.49.0","convex-hull":"1.0.3","deepmerge-ts":"4.3.0"},"peerDependencies":{"@babylonjs/core":">= 7.49.0 < 8","@babylonjs/gui":">= 7.49.0 < 8","@babylonjs/loaders":">= 7.49.0 < 8","@babylonjs/materials":">= 7.49.0 < 8"},"_id":"@amazon/lib-3d-scene-viewer@1.1.2","gitHead":"c99bf667b19049146fcd38591cbc289e8085124e","types":"./index.d.ts","bugs":{"url":"https://github.com/amzn/lib-3d-scene-viewer/issues"},"homepage":"https://github.com/amzn/lib-3d-scene-viewer#readme","_nodeVersion":"20.18.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-nsJYlYBNl02SqC4jgTpfnN5HCPn2ImK6mCjlCIaV4T1GJXJB6oJJ2tiW1o0mu0fgeJ7s5BLJhE7ix3IFtYib6Q==","shasum":"a1712c8fc551c3f0f8dd2fa7d4069fbdd445b025","tarball":"https://registry.npmjs.org/@amazon/lib-3d-scene-viewer/-/lib-3d-scene-viewer-1.1.2.tgz","fileCount":112,"unpackedSize":5149571,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDaMxXvI6fTZul2KTpXi1ncpSOQ/vZM1rr4Q229/eb5+AIhAIt/sjnbKALlTsQuGLwTDd7emT5/7Yk3UyD0U8z6E1kn"}]},"_npmUser":{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"},"directories":{},"maintainers":[{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lib-3d-scene-viewer_1.1.2_1741639745652_0.8391296670057673"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-17T23:11:58.296Z","modified":"2025-03-10T20:49:06.139Z","1.0.0":"2024-12-17T23:11:58.762Z","1.0.1":"2024-12-23T19:57:49.724Z","1.1.0":"2025-03-04T00:15:13.770Z","1.1.1":"2025-03-06T20:25:37.527Z","1.1.2":"2025-03-10T20:49:05.922Z"},"bugs":{"url":"https://github.com/amzn/lib-3d-scene-viewer/issues"},"author":{"name":"Amazon"},"license":"Apache-2.0","homepage":"https://github.com/amzn/lib-3d-scene-viewer#readme","keywords":["3d","webgl","webgl2","javascript","canvas","amazon"],"repository":{"type":"git","url":"git+https://github.com/amzn/lib-3d-scene-viewer.git"},"description":"This package provides preset configurations for quickly setting up a 3D scene viewer.","maintainers":[{"name":"amzn_woodshop","email":"woodshop-team@amazon.com"}],"readme":"# lib-3d-scene-viewer\n\n![NPM Version](https://img.shields.io/npm/v/%40amazon%2Flib-3d-scene-viewer?color=green)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n**lib-3d-scene-viewer** is a package based on [Babylon.js](https://www.babylonjs.com/).\nIt provides preset configurations for quickly setting up a 3D scene viewer, \nwhich offers a 3D environment similar to the \"View in 3D\" CX on Amazon Product Detail Pages.\n\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Resource](#resource)\n  - [Config](#config)\n- [Sandbox](#sandbox)\n- [Documentation](#documentation)\n- [Development](#development)\n- [Contributing](#contributing)\n- [License](#license)\n\n\n## Getting Started\n\n### Installation\n\nThe package can be installed from [npm](https://npmjs.org/):\n\n```shell\nnpm install @amazon/lib-3d-scene-viewer\n```\n\n\n### Usage\n\n[Take a look at an example](src/dev/v3dViewer.ts)\n\n```ts\nimport { Config } from '@amazon/lib-3d-scene-viewer/config/config';\nimport { Model } from '@amazon/lib-3d-scene-viewer/model/model';\nimport { Scene } from '@babylonjs/core/scene';\nimport { V3D_CONFIG } from '@amazon/lib-3d-scene-viewer/config/preset/v3dConfig';\nimport { V3DScene } from '@amazon/lib-3d-scene-viewer/scene/v3dScene';\n\n(async function () {\n    /////////////////////////////////////////\n    // Step 0: create a canvas DOM element //\n    /////////////////////////////////////////\n    \n    const canvas = document.createElement('canvas');\n    document.body.appendChild(canvas);\n\n    ////////////////////////////////////////////\n    // Step 1: create an instance of V3DScene //\n    ////////////////////////////////////////////\n    \n    // V3D_CONFIG is a preset config\n    const v3dScene = new V3DScene(canvas, V3D_CONFIG, {\n        // Override file paths if needed\n        lightingConfig: {\n            DirectionalBlur: {\n                type: 'env',\n                filePath: 'public/ibl/Directional_colorVariationOnTopBlur100_512.env',\n            },\n        },\n        basisTranscoder: {\n            urlConfig: {\n                jsModuleUrl: 'public/js/basis/basis_transcoder.js',\n                wasmModuleUrl: 'public/js/basis/basis_transcoder.wasm',\n            },\n        },\n        ktx2Decoder: {\n            urlConfig: {\n                jsDecoderModule: 'public/js/ktx2/babylon.ktx2Decoder.js',\n                jsMSCTranscoder: 'public/js/ktx2/msc_basis_transcoder.js',\n                wasmMSCTranscoder: 'public/js/ktx2/msc_basis_transcoder.wasm',\n                wasmUASTCToASTC: 'public/js/ktx2/uastc_astc.wasm',\n                wasmUASTCToBC7: 'public/js/ktx2/uastc_bc7.wasm',\n                wasmUASTCToR8_UNORM: null,\n                wasmUASTCToRG8_UNORM: null,\n                wasmUASTCToRGBA_SRGB: 'public/js/ktx2/uastc_rgba8_srgb_v2.wasm',\n                wasmUASTCToRGBA_UNORM: 'public/js/ktx2/uastc_rgba8_unorm_v2.wasm',\n                wasmZSTDDecoder: 'public/js/ktx2/zstddec.wasm',\n            },\n        },\n        dracoCompression: {\n            decoders: {\n                wasmBinaryUrl: 'public/js/draco/draco_decoder_gltf.wasm',\n                wasmUrl: 'public/js/draco/draco_decoder_gltf_nodejs.js',\n                fallbackUrl: 'public/js/draco/draco_decoder_gltf.js',\n            },\n        },\n        meshoptCompression: {\n            decoder: {\n                url: 'public/js/meshopt/meshopt_decoder.js',\n            },\n        },\n        enableDragAndDrop: true,\n    });\n\n    /////////////////////////////////////////////////////////////////////\n    // Step 2: register any observers using V3DScene.observableManager //\n    /////////////////////////////////////////////////////////////////////\n    \n    v3dScene.observableManager.onConfigChangedObservable.add((config: Config) => {\n        console.log('Updated config:', config);\n    });\n\n    v3dScene.observableManager.onModelLoadedObservable.add((model) => {\n        model.showShadowOnGroundDepthMap();\n        model.moveCenterToTargetCoordinate();\n\n        const radius = 2 * Math.max(...model.getOverallBoundingBoxDimensions().asArray());\n        v3dScene.updateConfig({\n            cameraConfig: {\n                ArcRotateCamera: {\n                    type: 'arcRotateCamera',\n                    radius: radius,\n                    lowerRadiusLimit: radius * 0.05,\n                    upperRadiusLimit: radius * 5,\n                    minZ: radius * 0.02,\n                    maxZ: radius * 40,\n                },\n            },\n        });\n    });\n    \n    //////////////////////////////////\n    // Step 3: call init() function //\n    //////////////////////////////////\n    \n    await v3dScene.init();\n\n    /////////////////////////////////\n    // Step 4: load glTF/glb model //\n    /////////////////////////////////\n    \n    const model: Model = await v3dScene.loadGltf('public/model/mannequin.glb', true);\n    console.log('Bounding box dimensions:', model.getOverallBoundingBoxDimensions());\n\n    //////////////////////////////////////////////////////////////////////////////////////////////////\n    // Step 5 (Optional): call updateConfig() to update scene setup and/or handle user interactions //\n    //////////////////////////////////////////////////////////////////////////////////////////////////\n    \n    await v3dScene.updateConfig({\n        sceneConfig: {\n            useLoadingUI: true,\n        },\n    });\n\n    // Access BabylonJS scene object\n    const babylonScene: Scene = v3dScene.scene;\n    console.log('Active Cameras:', babylonScene.activeCameras);\n\n    // Toggle BabylonJS debug layer\n    document.addEventListener('keydown', async (event) => {\n        const key = event.key;\n        // Pressing '?' should show/hide the debug layer\n        if (key === '?') {\n            // Needed for BabylonJS debug layer\n            import('@babylonjs/inspector').then(() => {\n                v3dScene.toggleDebugMode();\n            });\n        }\n    });\n})();\n```\n\n\n### Resource\n\nThis package provides a few resources including IBL files, decoder/transcoder files, and 3D models.\nThese resources can be found in [public](public) folder or `@amazon/lib-3d-scene-viewer/public` via npm.\n\n\n### Config\n\nThis packages uses [Config](src/config/config.ts) to set up engine, scene, camera, lighting, decoder files, etc.\n\nThe full config parameters and default values can be found in [Config](src/config/config.ts).\n\nIt also provides preset config files in [preset](src/config/preset) folder \nor `@amazon/lib-3d-scene-viewer/config/preset`.\n\n\n## Sandbox\n\nTry loading GLB/GLTF models into the [Sandbox](https://amzn.github.io/lib-3d-scene-viewer/v3dViewer.html).\n\n\n## Documentation\n\n- [API Docs](https://amzn.github.io/lib-3d-scene-viewer/docs/index.html)\n\n\n## Development\n\nWhen developing the project, first install \n[git](https://git-scm.com), \n[Node.js](https://nodejs.org) \nand [npm](https://www.npmjs.com/).\n\nThen, follow the steps to set up the development environment:\n\n```shell\ngit clone git@github.com:amzn/lib-3d-scene-viewer.git\ncd lib-3d-scene-viewer\nnpm install\n```\n\nThe following scripts are available:\n\n| Command                  | Description                                                                                 |\n|--------------------------|---------------------------------------------------------------------------------------------|\n| `npm install`            | Install dependencies                                                                        |\n| `npm run build`          | Run the build step for all sub-projects                                                     |\n| `npm run clean`          | Remove all built artifacts                                                                  |\n| `npm run docs`           | Create API documentation                                                                    |\n| `npm run lint`           | Run ESLint                                                                                  |\n| `npm run pack:dist`      | Build the project and create an npm tarball under `dist` folder                             |\n| `npm run publish:dist`   | Publish the npm tarball                                                                     |\n| `npm run server`         | Run a web server and open a new browser tab pointed to [src/dev/index.ts](src/dev/index.ts) |\n| `npm run test`           | Run tests                                                                                   |\n| `npm run update-bjs-ver` | Update BabylonJS dependencies to a specific version                                         |\n| `npm run webpack`        | Generate static web resources for sandbox and API docs                                      |\n\n\n## Contributing\n\nFor more information take a look at [CONTRIBUTING.md](CONTRIBUTING.md).\n\n\n## License\n\nThis library is licensed under the [Apache 2.0](LICENSE) License. \n","readmeFilename":"README.md"}