diff --git a/js/scene/objects/SceneObjects.js b/js/scene/objects/SceneObjects.js index df22b8a..6e41741 100644 --- a/js/scene/objects/SceneObjects.js +++ b/js/scene/objects/SceneObjects.js @@ -12,7 +12,7 @@ import { Lidar } from './sensors/Lidar.js'; class SceneObjects{ static loadFont(isBuilder, callback) { - const path = './'; + const path = window?.designerPath || './'; new FontLoader().load( path + 'fonts/helvetiker_regular.typeface.json', function ( response ) { SceneObjects.font = response; callback(); diff --git a/js/scene/objects/props/Dummy.js b/js/scene/objects/props/Dummy.js index 35ff7b5..e1e69c7 100644 --- a/js/scene/objects/props/Dummy.js +++ b/js/scene/objects/props/Dummy.js @@ -104,10 +104,10 @@ function loadModel(isBuilder, genre) }; - const path = './'; + const path = window?.designerPath || './'; new MTLLoader() - .setPath( 'models/'+ genre +'02/' ) + .setPath( path + 'models/'+ genre +'02/' ) .setRequestHeader({ "Content-Type" : "model/mtl"}) .load( genre +'02.mtl', function ( materials ) {