Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated engine to v1.70.2 #292

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"eslint": "^8.56.0",
"fflate": "^0.8.2",
"handlebars": "^4.7.8",
"playcanvas": "^1.69.2",
"playcanvas": "^1.70.2",
"prop-types": "^15.8.1",
"qrious": "^4.0.2",
"react": "^18.2.0",
Expand Down
3 changes: 0 additions & 3 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ if (process.env.BUILD_TYPE === 'prod') {
// debug, profile, release
const BUILD_TYPE = process.env.BUILD_TYPE || 'release';
const ENGINE_DIR = process.env.ENGINE_PATH || 'node_modules/playcanvas';
const EXTRAS_DIR = path.resolve(ENGINE_DIR, 'build', 'playcanvas-extras.mjs');
const PCUI_DIR = path.resolve(process.env.PCUI_PATH || 'node_modules/@playcanvas/pcui', 'react');

const ENGINE_NAME = (BUILD_TYPE === 'debug') ? 'playcanvas.dbg.mjs' : 'playcanvas.mjs';
Expand Down Expand Up @@ -71,7 +70,6 @@ export default {
alias({
entries: {
'playcanvas': ENGINE_PATH,
'playcanvas-extras': EXTRAS_DIR,
'pcui': PCUI_DIR
}
}),
Expand All @@ -82,7 +80,6 @@ export default {
baseUrl: '.',
paths: {
'playcanvas': [ENGINE_DIR],
'playcanvas-extras': [EXTRAS_DIR],
'pcui': [PCUI_DIR]
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/debug-lines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class DebugLines {

// construct the mesh
const mesh = new Mesh(device);
mesh.vertexBuffer = new VertexBuffer(device, vertexFormat, 8192, BUFFER_DYNAMIC);
mesh.vertexBuffer = new VertexBuffer(device, vertexFormat, 8192, { usage: BUFFER_DYNAMIC });
mesh.primitive[0].type = PRIMITIVE_LINES;
mesh.primitive[0].base = 0;
mesh.primitive[0].indexed = false;
Expand Down Expand Up @@ -224,7 +224,7 @@ class DebugLines {
this.app.graphicsDevice,
oldVBuffer.getFormat(),
oldVBuffer.getNumVertices() * 2,
BUFFER_DYNAMIC,
{ usage: BUFFER_DYNAMIC },
kpal81xd marked this conversation as resolved.
Show resolved Hide resolved
arrayBuffer
);
this.vertexData = new Float32Array(arrayBuffer);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/popup-panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SetProperty, ObserverData } from '../../types';
import AnimationControls from './animation-controls';
import { CameraPanel, SkyboxPanel, LightPanel, DebugPanel, ViewPanel } from './panels';
// @ts-ignore no type defs included
import { UsdzExporter } from 'playcanvas-extras';
import { UsdzExporter } from 'playcanvas';
import { addEventListenerOnClickOnly } from '../../helpers';

const PopupPanelControls = (props: { observerData: ObserverData, setProperty: SetProperty }) => {
Expand Down
8 changes: 1 addition & 7 deletions src/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import {
MorphInstance,
MorphTarget,
Mouse,
MiniStats,
Quat,
RenderComponent,
RenderTarget,
Expand All @@ -59,10 +60,6 @@ import {
import { App } from './app';

import { Observer } from '@playcanvas/observer';
// @ts-ignore: library file import
import { MiniStats } from 'playcanvas-extras';
// @ts-ignore: library file import
// import * as VoxParser from 'playcanvas/scripts/parsers/vox-parser.js';
import { MeshoptDecoder } from '../lib/meshopt_decoder.module.js';
import { CreateDropHandler } from './drop-handler';
import { MorphTargetData, File, HierarchyNode } from './types';
Expand Down Expand Up @@ -195,9 +192,6 @@ class Viewer {
observer.set('camera.multisampleSupported', multisampleSupported);
observer.set('camera.multisample', multisampleSupported && observer.get('camera.multisample'));

// register vox support
// VoxParser.registerVoxParser(app);

// create the exporter
this.pngExporter = new PngExporter();

Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"noEmit": true,
"baseUrl": ".",
"paths": {
"pcui": ["node_modules/@playcanvas/pcui/react"],
"playcanvas-extras": ["node_modules/playcanvas/build/playcanvas-extras.mjs"]
"pcui": ["node_modules/@playcanvas/pcui/react"]
}
},
"include": ["**/*.ts", "**/*.tsx"],
Expand Down
Loading