Skip to content

Commit

Permalink
#459 fix: Set draco decoder path to local node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsobspinto committed Dec 20, 2022
1 parent 07f0c89 commit c222e10
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import particle from '../textures/particle.png';
import { hasVisualType, hasVisualValue } from "./util";
import { hasVisualValue } from "./util";
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
import { OBJLoader } from "./OBJLoader";
import { DRACOLoader } from "three/examples/jsm/loaders/DRACOLoader";
Expand Down Expand Up @@ -38,7 +38,7 @@ export default class MeshFactory {

setupLoaders (){
const dracoLoader = new DRACOLoader()
dracoLoader.setDecoderPath('https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/jsm/libs/draco/');
dracoLoader.setDecoderPath('../../../node_modules/three/examples/js/libs/draco/');

const manager = new this.THREE.LoadingManager();
manager.onProgress = function (item, loaded, total) {
Expand Down

0 comments on commit c222e10

Please sign in to comment.