Skip to content

Commit 4055ee5

Browse files
zjm-metameta-codesync[bot]
authored andcommitted
fix(examples): Fix depth occlusion doc site example page.
Summary: Fix depth occlusion doc site example page. Reviewed By: felixtrz Differential Revision: D95882346 fbshipit-source-id: f0fd8707f0e839c462d6443ccbd52de09263bbb8
1 parent f2d46ea commit 4055ee5

2 files changed

Lines changed: 7 additions & 21 deletions

File tree

examples/depth-occlusion/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ export class OcclusionDemoSystem extends createSystem({
165165

166166
const assets: AssetManifest = {
167167
robot: {
168-
url: '/gltf/robot/robot.gltf',
168+
url: './gltf/robot/robot.gltf',
169169
type: AssetType.GLTF,
170170
priority: 'critical',
171171
},
172172
plantSansevieria: {
173-
url: '/gltf/plantSansevieria/plantSansevieria.gltf',
173+
url: './gltf/plantSansevieria/plantSansevieria.gltf',
174174
type: AssetType.GLTF,
175175
priority: 'critical',
176176
},

examples/depth-occlusion/vite.config.ts

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { iwsdkDev } from '@iwsdk/vite-plugin-dev';
2-
import {
3-
discoverComponents,
4-
generateGLXF,
5-
} from '@iwsdk/vite-plugin-metaspatial';
2+
import { optimizeGLTF } from '@iwsdk/vite-plugin-gltf-optimizer';
63
import { compileUIKit } from '@iwsdk/vite-plugin-uikitml';
74
import { defineConfig } from 'vite';
85
import mkcert from 'vite-plugin-mkcert';
@@ -20,22 +17,11 @@ export default defineConfig({
2017
ai: { devUI: false, viewport: { width: 500, height: 500 } },
2118
verbose: true,
2219
}),
23-
discoverComponents({
24-
outputDir: 'metaspatial/components',
25-
include: /\.(js|ts|jsx|tsx)$/,
26-
exclude: /node_modules/,
27-
verbose: false,
28-
}),
29-
generateGLXF({
30-
...(process.env.META_SPATIAL_EDITOR_CLI_PATH && {
31-
metaSpatialCliPath: process.env.META_SPATIAL_EDITOR_CLI_PATH,
32-
}),
33-
metaSpatialDir: 'metaspatial',
34-
outputDir: 'public/glxf',
35-
verbose: false,
36-
enableWatcher: true,
37-
}),
20+
3821
compileUIKit({ sourceDir: 'ui', outputDir: 'public/ui', verbose: true }),
22+
optimizeGLTF({
23+
level: 'medium',
24+
}),
3925
],
4026
server: { host: '0.0.0.0', port: 8081, open: true },
4127
build: {

0 commit comments

Comments
 (0)