@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 +6 -0
- package/dist/dependencies.txt +2 -2
- package/dist/index.js +34 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -34
- package/dist/index.mjs.map +1 -1
- package/docs/classes/BasicSVGRenderer.html +6 -6
- package/docs/classes/BasicSVGRendererPlugin.html +35 -35
- package/docs/classes/DrawPass.html +5 -5
- package/docs/classes/FillPass.html +9 -9
- package/docs/classes/SVGDrawHandler.html +5 -5
- package/docs/classes/SVGDrawInfo.html +3 -3
- package/docs/classes/SVGMesh.html +25 -25
- package/docs/classes/SVGRenderInfo.html +5 -5
- package/docs/classes/SVGRenderer.html +8 -8
- package/docs/classes/ThreeSVGRendererPlugin.html +54 -54
- package/docs/classes/Viewmap.html +15 -15
- package/docs/classes/ViewmapBuildInfo.html +6 -6
- package/docs/interfaces/FillPassOptions.html +7 -7
- package/docs/interfaces/SVGDrawOptions.html +2 -2
- package/docs/interfaces/SVGMeshOptions.html +2 -2
- package/docs/interfaces/SVGTexture.html +3 -3
- package/docs/interfaces/ViewmapOptions.html +5 -5
- package/package.json +5 -2
- package/src/three-svg-renderer/core/viewmap/operations/assignPolygons.ts +1 -1
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
|
package/dist/dependencies.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Name: three-modded
|
|
2
|
-
Version: 0.
|
|
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.
|
|
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
|
+
* @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.
|
|
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
|
|
737
|
-
constructor(e =
|
|
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(
|
|
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,
|
|
748
|
-
return Math.abs(c) < o * Math.abs(r) &&
|
|
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
|
-
|
|
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,
|
|
780
|
-
deserialize: (i, e, t) => Object.assign(e || {}, R(i, ([n, r]) => [n,
|
|
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
|
|
783
|
+
var f = class f {
|
|
784
784
|
static GetSerializer(e) {
|
|
785
|
-
return
|
|
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(
|
|
790
|
-
r >= 0 ?
|
|
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 =
|
|
796
|
-
n >= 0 &&
|
|
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 =
|
|
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 =
|
|
819
|
-
for (const [a, l] of s) o[a] =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
869
|
+
const s = f.TypeMap.get(o) ?? [];
|
|
870
870
|
for (const [a, l] of s) {
|
|
871
|
-
const d = t[l], c =
|
|
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
|
-
|
|
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) =>
|
|
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 ?
|
|
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
|
|
919
|
-
var
|
|
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
|
-
|
|
924
|
-
const r =
|
|
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
|
-
|
|
938
|
-
var
|
|
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" &&
|
|
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) {
|