three-base 2.0.94 → 2.0.96
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/InstancedMeshBase.js +0 -3
- package/MeshBase.js +0 -3
- package/package.json +1 -1
- package/threeLoader.js +6 -3
package/InstancedMeshBase.js
CHANGED
package/MeshBase.js
CHANGED
package/package.json
CHANGED
package/threeLoader.js
CHANGED
|
@@ -22,10 +22,10 @@ import dracoWasmWrapperJS from "./lib/draco/draco_wasm_wrapper.js?url";
|
|
|
22
22
|
import dracoDecoderJS from "./lib/draco/draco_decoder.js?url";
|
|
23
23
|
//@ts-ignore
|
|
24
24
|
import axios from "axios";
|
|
25
|
+
import { isArray, isEmpty, isNull, isString, isUndefined } from "lodash";
|
|
26
|
+
import { generateUUID } from "three/src/math/MathUtils";
|
|
25
27
|
import dracoDecoderWASM from "./lib/draco/draco_decoder.wasm?url";
|
|
26
28
|
import threeUtils from "./threeUtils";
|
|
27
|
-
import { generateUUID } from "three/src/math/MathUtils";
|
|
28
|
-
import { isEmpty, isString } from "lodash";
|
|
29
29
|
// 加载器
|
|
30
30
|
class ThreeLoader extends EventDispatcher {
|
|
31
31
|
constructor() {
|
|
@@ -181,7 +181,10 @@ class ThreeLoader extends EventDispatcher {
|
|
|
181
181
|
}
|
|
182
182
|
/** 加载模型支持glb,gltf,fbx,stl,obj,usdz,dae,zip */
|
|
183
183
|
async loadModel(url, filename = "") {
|
|
184
|
-
if (
|
|
184
|
+
if ((isString(url) || isArray(url)) &&
|
|
185
|
+
isEmpty(url) &&
|
|
186
|
+
isUndefined(url) &&
|
|
187
|
+
isNull(url)) {
|
|
185
188
|
throw new Error(`loadModel:无效的参数 url=${url}`);
|
|
186
189
|
}
|
|
187
190
|
// 本次需要销毁的bloburl,加载完成后就去销毁本次的文件
|