view3d-core 1.0.6 → 1.0.8

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.
@@ -1447,7 +1447,7 @@ function bn(e4) {
1447
1447
  }
1448
1448
  });
1449
1449
  }
1450
- const vn = { dracoPath: "/draco/", useDraco: true, autoBuildBVH: true, optimizeTextures: true };
1450
+ const vn = { dracoPath: "/draco/gltf/", useDraco: true, autoBuildBVH: true, optimizeTextures: true };
1451
1451
  const _n = { enabled: true, outline: { enabled: true, edgeStrength: 4, edgeGlow: 0, edgeThickness: 2, pulsePeriod: 0, visibleEdgeColor: 16449071, hiddenEdgeColor: 16449071 }, bloom: { enabled: false, strength: 1.5, radius: 0.4, threshold: 0.85 }, ssao: { enabled: false, intensity: 0.01, scale: 100 }, ssr: { enabled: false, thickness: 0.018, infiniteThick: false, maxDistance: 0.01, opacity: 0.5 }, screenMask: { enabled: false } };
1452
1452
  const xn = { modes: ["选择", "根选择", "变换", "场景绘制", "点击信息"], defaultMode: "变换", isTransformChildren: false, enableKeyboard: false };
1453
1453
  function wn(e4, t2) {
@@ -3832,6 +3832,7 @@ exports.AnimationPlugin = class extends T {
3832
3832
  loadGLTF(e4) {
3833
3833
  const t2 = { progress: () => {
3834
3834
  }, complete: () => {
3835
+ }, error: () => {
3835
3836
  } };
3836
3837
  return this.events.emit("load:start", { url: e4, type: "GLTF" }), this.gltfLoader.load(e4, (n2) => {
3837
3838
  const o2 = n2.scene;
@@ -3839,13 +3840,15 @@ exports.AnimationPlugin = class extends T {
3839
3840
  }, (n2) => {
3840
3841
  const o2 = n2.loaded / n2.total;
3841
3842
  t2.progress(o2, n2), this.events.emit("load:progress", { url: e4, loaded: n2.loaded, total: n2.total, percent: o2 });
3842
- }, (t3) => {
3843
- this.events.emit("load:error", { url: e4, error: t3 });
3843
+ }, (n2) => {
3844
+ const o2 = n2;
3845
+ t2.error?.(o2), this.events.emit("load:error", { url: e4, error: o2 });
3844
3846
  }), t2;
3845
3847
  }
3846
3848
  loadFBX(e4) {
3847
3849
  const n2 = { progress: () => {
3848
3850
  }, complete: () => {
3851
+ }, error: () => {
3849
3852
  } };
3850
3853
  return this.events.emit("load:start", { url: e4, type: "FBX" }), this.fbxLoader.load(e4, (o2) => {
3851
3854
  o2.traverse((e5) => {
@@ -3860,12 +3863,14 @@ exports.AnimationPlugin = class extends T {
3860
3863
  const o2 = t2.loaded / t2.total;
3861
3864
  n2.progress(o2, t2), this.events.emit("load:progress", { url: e4, loaded: t2.loaded, total: t2.total, percent: o2 });
3862
3865
  }, (t2) => {
3863
- this.events.emit("load:error", { url: e4, error: t2 });
3866
+ const o2 = t2;
3867
+ n2.error?.(o2), this.events.emit("load:error", { url: e4, error: o2 });
3864
3868
  }), n2;
3865
3869
  }
3866
3870
  loadOBJ(e4) {
3867
3871
  const t2 = { progress: () => {
3868
3872
  }, complete: () => {
3873
+ }, error: () => {
3869
3874
  } };
3870
3875
  this.events.emit("load:start", { url: e4, type: "OBJ" });
3871
3876
  const n2 = e4.replace(".obj", ".mtl");
@@ -3875,8 +3880,9 @@ exports.AnimationPlugin = class extends T {
3875
3880
  }, (n4) => {
3876
3881
  const o2 = n4.loaded / n4.total;
3877
3882
  t2.progress(o2, n4), this.events.emit("load:progress", { url: e4, loaded: n4.loaded, total: n4.total, percent: o2 });
3878
- }, (t3) => {
3879
- this.events.emit("load:error", { url: e4, error: t3 });
3883
+ }, (n4) => {
3884
+ const o2 = n4;
3885
+ t2.error?.(o2), this.events.emit("load:error", { url: e4, error: o2 });
3880
3886
  });
3881
3887
  }, void 0, () => {
3882
3888
  this.objLoader.load(e4, (n3) => {
@@ -3884,8 +3890,9 @@ exports.AnimationPlugin = class extends T {
3884
3890
  }, (e5) => {
3885
3891
  const n3 = e5.loaded / e5.total;
3886
3892
  t2.progress(n3, e5);
3887
- }, (t3) => {
3888
- this.events.emit("load:error", { url: e4, error: t3 });
3893
+ }, (n3) => {
3894
+ const o2 = n3;
3895
+ t2.error?.(o2), this.events.emit("load:error", { url: e4, error: o2 });
3889
3896
  });
3890
3897
  }), t2;
3891
3898
  }
@@ -4635,4 +4642,4 @@ ${n2.fragFunc || ""}`), e5.fragmentShader = e5.fragmentShader.replace("vec4 diff
4635
4642
  const o2 = Ro((n2 - e4) / (t2 - e4), 0, 1);
4636
4643
  return o2 * o2 * (3 - 2 * o2);
4637
4644
  };
4638
- //# sourceMappingURL=SerializationPlugin-BWtbt0zG.cjs.map
4645
+ //# sourceMappingURL=SerializationPlugin-BX2Wea4W.cjs.map