bilca commited on
Commit
6fa95b0
Β·
verified Β·
1 Parent(s): f148e5b

Update viewer.js

Browse files
Files changed (1) hide show
  1. viewer.js +5 -3
viewer.js CHANGED
@@ -104,7 +104,7 @@ export async function initializeViewer(config, instanceId) {
104
  }
105
 
106
  try {
107
- // ─── 6. Create a GraphicsDevice + AppBase ─────────────────────────────────
108
  const deviceType = "webgl2";
109
  const gfxOptions = {
110
  deviceTypes: [deviceType],
@@ -137,8 +137,10 @@ export async function initializeViewer(config, instanceId) {
137
  pc.GSplatHandler
138
  ];
139
 
140
- app = new pc.AppBase(canvas);
141
- app.init(createOptions);
 
 
142
  app.setCanvasFillMode(pc.FILLMODE_NONE);
143
  app.setCanvasResolution(pc.RESOLUTION_AUTO);
144
  app.scene.exposure = 0.5;
 
104
  }
105
 
106
  try {
107
+ // ─── 6. Create a GraphicsDevice + AppOptions ────────────────────────────────
108
  const deviceType = "webgl2";
109
  const gfxOptions = {
110
  deviceTypes: [deviceType],
 
137
  pc.GSplatHandler
138
  ];
139
 
140
+ // ─── REPLACED: use pc.Application (instead of deprecated / removed AppBase) ──
141
+ app = new pc.Application(canvas, createOptions);
142
+
143
+ // Configure application
144
  app.setCanvasFillMode(pc.FILLMODE_NONE);
145
  app.setCanvasResolution(pc.RESOLUTION_AUTO);
146
  app.scene.exposure = 0.5;