Closed raycaster08 closed 10 months ago
if (path === "") return; const assetsPath = convertFileSrc(path); Potree.loadPointCloud(`${assetsPath}/potree/metadata.json`, name).then( (e: any) => { const { pointcloud } = e; pointcloud.material.activeAttributeName = "elevation"; pointcloud.material.gradient = Potree.Gradients.RAINBOW; pointcloud.material.intensityRange = [0, 255]; pointCloudRef.current = pointcloud; pointCloudMaterialRef.current = pointcloud.material; viewerRef.current.scene.addPointCloud(pointcloud); } );
console log: path and assetsPath
The loading of /potree/metadata.json has been successful so far.. but other files inside the method cannot be loaded proper
I don't understand whyhierarchy.bin and metadata.json cannot be loaded in the same directory
hierarchy.bin
metadata.json
I didn't experience this problem with macos
No response
Hopefully he will be able to load the files in the local file system correctly under windows
[✔] Environment - OS: Windows 10.0.19045 X64 ✔ WebView2: 119.0.2151.58 ✔ MSVC: Visual Studio Community 2022 ✔ rustc: 1.74.0 (79e9716c9 2023-11-13) ✔ cargo: 1.74.0 (ecb9851af 2023-10-18) ✔ rustup: 1.26.0 (5af9b9484 2023-04-05) ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default) - node: 18.18.2 - pnpm: 8.9.2 - npm: 9.8.1 [-] Packages - tauri [RUST]: 1.5.2 - tauri-build [RUST]: 1.5.0 - wry [RUST]: 0.24.4 - tao [RUST]: 0.16.5 - @tauri-apps/api [NPM]: 1.5.1 - @tauri-apps/cli [NPM]: 1.5.6 [-] App - build-type: bundle - CSP: default-src blob: data: filesystem: wss: https: tauri: 'unsafe-inline' asset: https://asset.localhost 'self'; script-src 'self' - distDir: ../dist - devPath: http://localhost:1420/ - framework: React - bundler: Vite
`tauri.config.json` "allowlist": { ... "protocol": { "all": true, "asset": true, "assetScope": ["**", "**/*"] }, ... }, "security": { "csp": "default-src blob: data: filesystem: wss: https: tauri: 'unsafe-inline' asset: https://asset.localhost 'self'; script-src 'self'" },
convertFileSrc works just fine on Windows for me, Please provide a minimal reproduction
convertFileSrc
Describe the bug
console log: path and assetsPath
The loading of /potree/metadata.json has been successful so far.. but other files inside the method cannot be loaded proper
I don't understand why
hierarchy.bin
andmetadata.json
cannot be loaded in the same directoryI didn't experience this problem with macos
Reproduction
No response
Expected behavior
Hopefully he will be able to load the files in the local file system correctly under windows
Platform and versions
Stack trace
Additional context
No response