Skip to content

Commit

Permalink
Update dependencies (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck authored Jun 27, 2024
1 parent 7c023b6 commit 6452fc8
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 80 deletions.
134 changes: 67 additions & 67 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "model-viewer",
"version": "4.12.0",
"version": "4.13.0",
"author": "PlayCanvas<[email protected]>",
"homepage": "https://playcanvas.com",
"description": "PlayCanvas glTF Viewer",
Expand Down Expand Up @@ -56,8 +56,8 @@
},
"devDependencies": {
"@playcanvas/eslint-config": "^1.7.1",
"@playcanvas/observer": "^1.4.0",
"@playcanvas/pcui": "^4.3.0",
"@playcanvas/observer": "^1.5.1",
"@playcanvas/pcui": "^4.4.0",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-image": "^3.0.3",
Expand All @@ -68,27 +68,27 @@
"@rollup/plugin-typescript": "^11.1.6",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"playcanvas": "^1.71.5",
"playcanvas": "^1.72.0",
"qrious": "^4.0.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-visibility-sensor": "^5.1.1",
"rollup": "^4.18.0",
"rollup-plugin-sass": "^1.12.22",
"rollup-plugin-sass": "^1.13.0",
"serve": "^14.2.3",
"tslib": "^2.6.3",
"typescript": "^5.4.5"
"typescript": "^5.5.2"
},
"scripts": {
"build": "rollup -c",
"watch": "rollup -c -w",
"serve": "serve dist",
"develop": "cross-env BUILD_TYPE=debug concurrently --kill-others \"npm run watch\" \"npm run serve\"",
"develop": "cross-env concurrently --kill-others \"npm run watch\" \"npm run serve\"",
"develop:local": "cross-env ENGINE_PATH=../engine npm run develop",
"build:local": "cross-env ENGINE_PATH=../engine npm run build",
"watch:local": "cross-env ENGINE_PATH=../engine npm run watch",
Expand Down
9 changes: 7 additions & 2 deletions src/debug-lines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,13 @@ class DebugLines {
overrideClear: true
});

app.scene.layers.pushTransparent(debugLayerBack);
app.scene.layers.pushTransparent(debugLayerFront);
const layers = app.scene.layers;
const worldLayer = layers.getLayerByName('World');
const idx = layers.getTransparentIndex(worldLayer);

layers.insert(debugLayerBack, idx);
layers.insert(debugLayerFront, idx + 1);

camera.camera.layers = camera.camera.layers.concat([debugLayerBack.id, debugLayerFront.id]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const observerData: ObserverData = {
};

const saveOptions = (observer: Observer, name: string) => {
const options = observer.json();
const options = observer.json() as any;
window.localStorage.setItem(`model-viewer-${name}`, JSON.stringify({
camera: options.camera,
skybox: options.skybox,
Expand Down
3 changes: 2 additions & 1 deletion src/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@ class Viewer {
texture.downloadAsync().then(() => {
this.pngExporter.export(
'model-viewer.png',
// @ts-ignore
new Uint32Array(texture.getSource().buffer.slice()),
texture.width,
texture.height
Expand Down Expand Up @@ -1920,7 +1921,7 @@ class Viewer {

// resolve the (possibly multisampled) render target
const rt = this.camera.camera.renderTarget;
if (!this.app.graphicsDevice.isWebGPU && rt._samples > 1) {
if (!this.app.graphicsDevice.isWebGPU && rt.samples > 1) {
rt.resolve();
}

Expand Down

0 comments on commit 6452fc8

Please sign in to comment.