Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -104,7 +104,7 @@ export async function initializeViewer(config, instanceId) {
|
|
| 104 |
}
|
| 105 |
|
| 106 |
try {
|
| 107 |
-
// βββ 6. Create a GraphicsDevice +
|
| 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 |
-
|
| 141 |
-
app.
|
|
|
|
|
|
|
| 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;
|