@threepipe/plugin-svg-renderer 0.3.0 → 0.4.0-r172.1

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this plugin will be documented in this file.
4
4
 
5
5
  [//]: # (The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).)
6
6
 
7
+ ## [0.4.0-r172.1] - 2026-12-05
8
+
9
+ Was 0.3.0-r172.1 (not published), which sorts below the released 0.3.0.
10
+
11
+ Release candidate of the three.js r172 upgrade lane, under the npm dist-tag `three-r172`, for threepipe 0.8.0-r172.1: the changes listed under [Unreleased] below.
12
+
7
13
  ## [Unreleased]
8
14
 
9
15
  ## [0.3.0] - 2026-12-01
@@ -1,5 +1,5 @@
1
1
  Name: three-modded
2
- Version: 0.168.10008
2
+ Version: 0.172.10001-rc.2
3
3
  License: MIT
4
4
  Private: false
5
5
  Description: JavaScript 3D library
@@ -34,7 +34,7 @@ THE SOFTWARE.
34
34
  ---
35
35
 
36
36
  Name: ts-browser-helpers
37
- Version: 0.23.0
37
+ Version: 0.24.0
38
38
  License: MIT
39
39
  Private: false
40
40
  Description: A collection of utility classes, functions and decorators for javascript/typescript projects, for use in the browser.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @threepipe/plugin-svg-renderer v0.3.0
3
+ * @threepipe/plugin-svg-renderer v0.4.0-r172.1
4
4
  * Copyright 2022-2026 repalash <palash@shaders.app>
5
5
  * GPLV3 License
6
6
  * See ./dependencies.txt for any bundled third-party dependencies and licenses.
@@ -714,7 +714,7 @@
714
714
  // ../../node_modules/ts-browser-helpers/dist/bundle.esm.js
715
715
  /**
716
716
  * @license
717
- * ts-browser-helpers v0.23.0
717
+ * ts-browser-helpers v0.24.0
718
718
  * Copyright 2022-2026 repalash <palash@shaders.app>
719
719
  * MIT License
720
720
  * See ./dependencies.txt for bundled third-party dependencies and licenses.
@@ -733,22 +733,22 @@
733
733
  * See the License for the specific language governing permissions and
734
734
  * limitations under the License.
735
735
  */
736
- var y$5 = class y {
737
- constructor(e = y.DECAY_MILLISECONDS) {
736
+ var k$1 = class k {
737
+ constructor(e = k.DECAY_MILLISECONDS) {
738
738
  this.velocity = 0, this.naturalFrequency = 0, this.setDecayTime(e);
739
739
  }
740
740
  setDecayTime(e) {
741
- this.naturalFrequency = 1 / Math.max(y.MIN_DECAY_MILLISECONDS, e);
741
+ this.naturalFrequency = 1 / Math.max(k.MIN_DECAY_MILLISECONDS, e);
742
742
  }
743
743
  update(e, t, n, r) {
744
744
  const o = 2e-4 * this.naturalFrequency;
745
745
  if (e == null || r === 0 || e === t && this.velocity === 0) return t;
746
746
  if (n < 0) return e;
747
- const s = e - t, a = this.velocity + this.naturalFrequency * s, l = s + n * a, d = Math.exp(-this.naturalFrequency * n), c = (a - this.naturalFrequency * l) * d, f = -this.naturalFrequency * (c + a * d);
748
- return Math.abs(c) < o * Math.abs(r) && f * s >= 0 ? (this.velocity = 0, t) : (this.velocity = c, t + l * d);
747
+ const s = e - t, a = this.velocity + this.naturalFrequency * s, l = s + n * a, d = Math.exp(-this.naturalFrequency * n), c = (a - this.naturalFrequency * l) * d, u = -this.naturalFrequency * (c + a * d);
748
+ return Math.abs(c) < o * Math.abs(r) && u * s >= 0 ? (this.velocity = 0, t) : (this.velocity = c, t + l * d);
749
749
  }
750
750
  };
751
- y$5.SETTLING_TIME = 1e4, y$5.MIN_DECAY_MILLISECONDS = .001, y$5.DECAY_MILLISECONDS = 50;
751
+ k$1.SETTLING_TIME = 1e4, k$1.MIN_DECAY_MILLISECONDS = .001, k$1.DECAY_MILLISECONDS = 50;
752
752
  function re(i, e) {
753
753
  let t;
754
754
  do
@@ -776,24 +776,24 @@
776
776
  var O = {
777
777
  priority: 1 / 0,
778
778
  type: "Object",
779
- serialize: (i, e) => R(i, ([t, n]) => [t, m$1.Serialize(n, e, !1)]),
780
- deserialize: (i, e, t) => Object.assign(e || {}, R(i, ([n, r]) => [n, m$1.Deserialize(r, e == null ? void 0 : e[n], t, !1)])),
779
+ serialize: (i, e) => R(i, ([t, n]) => [t, x$4.Serialize(n, e, !1)]),
780
+ deserialize: (i, e, t) => Object.assign(e || {}, R(i, ([n, r]) => [n, x$4.Deserialize(r, e == null ? void 0 : e[n], t, !1)])),
781
781
  isType: (i) => (i.constructor || Object) === Object
782
782
  };
783
- var u = class u {
783
+ var f = class f {
784
784
  static GetSerializer(e) {
785
- return u.Serializers.find((t) => t.isType(e));
785
+ return f.Serializers.find((t) => t.isType(e));
786
786
  }
787
787
  static RegisterSerializer(...e) {
788
788
  for (const t of e) {
789
- const n = t.priority ?? 1e10, r = se(u.Serializers, (o) => o.priority !== void 0 && o.priority < n);
790
- r >= 0 ? u.Serializers.splice(r + 1, 0, t) : u.Serializers.push(t);
789
+ const n = t.priority ?? 1e10, r = se(f.Serializers, (o) => o.priority !== void 0 && o.priority < n);
790
+ r >= 0 ? f.Serializers.splice(r + 1, 0, t) : f.Serializers.push(t);
791
791
  }
792
792
  }
793
793
  static UnregisterSerializer(...e) {
794
794
  for (const t of e) {
795
- const n = u.Serializers.indexOf(t);
796
- n >= 0 && u.Serializers.splice(n, 1);
795
+ const n = f.Serializers.indexOf(t);
796
+ n >= 0 && f.Serializers.splice(n, 1);
797
797
  }
798
798
  }
799
799
  /**
@@ -805,7 +805,7 @@
805
805
  static Serialize(e, t, n = !1) {
806
806
  if (typeof e == "function") return;
807
807
  if (!n) {
808
- const s = u.GetSerializer(e);
808
+ const s = f.GetSerializer(e);
809
809
  if (s) return s.serialize(e, t);
810
810
  if (typeof e.toJSON == "function") {
811
811
  const a = e.toJSON(t, !0);
@@ -815,8 +815,8 @@
815
815
  let r = e.constructor ?? Object;
816
816
  const o = {};
817
817
  for (; r && r !== Object;) {
818
- const s = u.TypeMap.get(r) ?? [];
819
- for (const [a, l] of s) o[a] = u.Serialize(e[l], t, !1);
818
+ const s = f.TypeMap.get(r) ?? [];
819
+ for (const [a, l] of s) o[a] = f.Serialize(e[l], t, !1);
820
820
  r = Object.getPrototypeOf(r);
821
821
  }
822
822
  return e.serializableClassId && (o.serializableClassId = e.serializableClassId), o;
@@ -851,14 +851,14 @@
851
851
  }
852
852
  if (e && typeof e == "object") {
853
853
  const s = (a) => {
854
- const l = u.SerializableClasses.get(a);
854
+ const l = f.SerializableClasses.get(a);
855
855
  l && (l.DataInConstructor ? t = new l(e) : t = new l());
856
856
  };
857
857
  e.serializableClassId && (!t || t.serializableClassId !== e.serializableClassId) && s(e.serializableClassId), e.type && (!t || t.type !== e.type) && s(e.type), !Array.isArray(t) && Array.isArray(e) ? t = [] : typeof t != "object" && (e.constructor || Object) === Object && (t = {});
858
858
  }
859
859
  if (typeof t == "function") return console.error("Serialization: Cannot deserialize into a function", t, e), t;
860
860
  if (!r) {
861
- const s = u.GetSerializer(e);
861
+ const s = f.GetSerializer(e);
862
862
  if (s && s !== O) return s.deserialize(e, t, n);
863
863
  }
864
864
  if (!e || t === void 0 || t === null || typeof t != "object") return e;
@@ -866,9 +866,9 @@
866
866
  let o = t.constructor ?? Object;
867
867
  if (o === Object) return O.deserialize(e, t, n);
868
868
  for (; o && o !== Object;) {
869
- const s = u.TypeMap.get(o) ?? [];
869
+ const s = f.TypeMap.get(o) ?? [];
870
870
  for (const [a, l] of s) {
871
- const d = t[l], c = u.Deserialize(e[a], d, n, !1);
871
+ const d = t[l], c = f.Deserialize(e[a], d, n, !1);
872
872
  c !== d && P(t, l, c, !0);
873
873
  }
874
874
  o = Object.getPrototypeOf(o);
@@ -876,17 +876,17 @@
876
876
  return t;
877
877
  }
878
878
  };
879
- u.TypeMap = /* @__PURE__ */ new WeakMap(), u.SerializableClasses = /* @__PURE__ */ new Map(), u.Serializers = [
879
+ f.TypeMap = /* @__PURE__ */ new WeakMap(), f.SerializableClasses = /* @__PURE__ */ new Map(), f.Serializers = [
880
880
  {
881
881
  priority: 0,
882
882
  type: "Array",
883
883
  isType: (e) => Array.isArray(e),
884
- serialize: (e, t) => e.map((n) => u.Serialize(n, t, !1)),
884
+ serialize: (e, t) => e.map((n) => f.Serialize(n, t, !1)),
885
885
  deserialize: (e, t, n) => {
886
886
  const r = e.length;
887
887
  Array.isArray(t) || (t = []);
888
888
  for (let o = 0; o < r; o++) {
889
- const s = e[o], a = t.length > o ? u.Deserialize(s, t[o], n, !1) : u.Deserialize(s, void 0, n, !1);
889
+ const s = e[o], a = t.length > o ? f.Deserialize(s, t[o], n, !1) : f.Deserialize(s, void 0, n, !1);
890
890
  t.length <= o ? t.push(a) : t[o] = a;
891
891
  }
892
892
  return t;
@@ -915,13 +915,13 @@
915
915
  },
916
916
  O
917
917
  ];
918
- var m$1 = u;
919
- var k$1 = class k {
918
+ var x$4 = f;
919
+ var _ = class _ {
920
920
  static callFunction(e, t, n = []) {
921
921
  if (!t) return e(...n);
922
922
  if (e.name && t[e.name] === e) return e.call(t, ...n);
923
- k.methodMap.has(t) || k.methodMap.set(t, /* @__PURE__ */ new WeakMap());
924
- const r = k.methodMap.get(t);
923
+ _.methodMap.has(t) || _.methodMap.set(t, /* @__PURE__ */ new WeakMap());
924
+ const r = _.methodMap.get(t);
925
925
  if (!r.has(e)) {
926
926
  let o = t;
927
927
  for (; o;) {
@@ -934,8 +934,8 @@
934
934
  return r.get(e) ? e.call(t, ...n) : e(...n);
935
935
  }
936
936
  };
937
- k$1.methodMap = /* @__PURE__ */ new WeakMap();
938
- var D$1 = k$1;
937
+ _.methodMap = /* @__PURE__ */ new WeakMap();
938
+ var T = _;
939
939
  function I(i, e = "param") {
940
940
  if (!i) throw new Error("onChange: fnKey is undefined, make sure the function exists or provide a string");
941
941
  return (t, n, r) => {
@@ -959,7 +959,7 @@
959
959
  oldValue: a,
960
960
  target: this
961
961
  }] : [];
962
- typeof i == "string" ? (d = this[i]) == null || d.call(this, ...l) : typeof i == "function" && D$1.callFunction(i, this, l);
962
+ typeof i == "string" ? (d = this[i]) == null || d.call(this, ...l) : typeof i == "function" && T.callFunction(i, this, l);
963
963
  }
964
964
  };
965
965
  if (r) return U(r, "value") && delete r.value, U(r, "writable") && delete r.writable, U(r, "initializer") && delete r.initializer, Object.assign(r, o);
@@ -4317,7 +4317,7 @@
4317
4317
  if (intersections.length > 0) {
4318
4318
  const intersection = intersections[0];
4319
4319
  const faceIndex = intersection.faceIndex;
4320
- if (faceIndex !== void 0) {
4320
+ if (faceIndex !== void 0 && faceIndex !== null) {
4321
4321
  const intersectionMesh = intersection.object;
4322
4322
  polygon.mesh = svgMeshesMap.get(intersectionMesh);
4323
4323
  if (polygon.mesh) {