From 24c7cecf83dbd4e45887304892a28cfab1295a52 Mon Sep 17 00:00:00 2001 From: Thowaah Date: Thu, 27 Jul 2023 16:43:10 +0200 Subject: [PATCH] Fix paths --- js/scene/objects/SceneObjects.js | 2 +- js/scene/objects/props/Dummy.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 ) {