Skip to content

Commit

Permalink
Update path for map texture loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ctwhome committed Mar 14, 2024
1 parent 71b4b79 commit 967ae45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/routes/viewer/sceneSetup/createPlaneMesh.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as THREE from 'three';
import { get } from 'svelte/store'
import { scaleFactor } from '../stores/viewer.store';
import { base } from '$app/paths';
//
// Create and add plane mesh to the scene to hold the Map texture
//
export function createPlaneMesh(): THREE.Mesh {
const textureLoader = new THREE.TextureLoader();
const texture = textureLoader.load('/maps/nl_map 50m per pixel.webp');
const texture = textureLoader.load(`${base}/maps/nl_map 50m per pixel.webp`);
texture.colorSpace = THREE.SRGBColorSpace;

// Scale factor: 50 meters per pixel
Expand Down
2 changes: 1 addition & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config = {
fallback: '404.html'
}),
paths: {
base: process.argv.includes('dev') ? '' : process.env.BASE_PATH + '/zarrviz'
base: process.argv.includes('dev') ? '' : process.env.BASE_PATH
}
}
};
Expand Down

0 comments on commit 967ae45

Please sign in to comment.