easy-three-utils 0.0.33 → 0.0.331

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-three-utils",
3
- "version": "0.0.33",
3
+ "version": "0.0.331",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -29,7 +29,9 @@ const threeLoaders: IThreeLoaders = {
29
29
  TextureLoader: null
30
30
  }
31
31
 
32
- const useLoader = (decoderPath: string) => {
32
+ const useLoader = (config: {
33
+ decoderPath: string
34
+ }) => {
33
35
  const useTextureLoader = (url: string, callback?: (texture: THREE.Texture) => void) => {
34
36
  threeLoaders.TextureLoader = new THREE.TextureLoader()
35
37
  const texture = threeLoaders.TextureLoader.load(url, (texture) => {
@@ -68,7 +70,7 @@ const useLoader = (decoderPath: string) => {
68
70
 
69
71
  const setGLTFLoader = () => {
70
72
  threeLoaders.DRACOLoader = new DRACOLoader()
71
- threeLoaders.DRACOLoader.setDecoderPath(decoderPath)
73
+ threeLoaders.DRACOLoader.setDecoderPath(config.decoderPath)
72
74
  threeLoaders.DRACOLoader.preload()
73
75
 
74
76
  threeLoaders.GLTFLoader = new GLTFLoader()