aptechka 0.1.3 → 0.1.6
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/lib/Animated-CJcYqJzq.js +130 -0
- package/lib/Animated-DyZuTEQE.cjs +1 -0
- package/lib/Damped-AHRBHNEQ.cjs +1 -0
- package/lib/Damped-Csj-9_gH.js +36 -0
- package/lib/Derived-Bc88XJ8J.js +27 -0
- package/lib/Derived-SjPdLJiZ.cjs +1 -0
- package/lib/ElementConstructor-9f-12v7T.cjs +1 -0
- package/lib/ElementConstructor-CoKM2CTK.js +228 -0
- package/lib/{SourceManager-vXInLlh_.js → SourceManager-BoP9RAJr.js} +26 -26
- package/lib/SourceManager-CI6NfLzW.cjs +1 -0
- package/lib/Store-D0_rDIsE.cjs +1 -0
- package/lib/Store-JOKrNVEr.js +152 -0
- package/lib/Viewport-COsaberc.cjs +1 -0
- package/lib/Viewport-CXY5xcGJ.js +129 -0
- package/lib/WheelControls-CX9WUbBC.js +83 -0
- package/lib/WheelControls-CfDeGCOU.cjs +1 -0
- package/lib/abstract-elements/AbstractButtonElement.d.ts +5 -0
- package/lib/abstract-elements/index.cjs +1 -0
- package/lib/abstract-elements/index.d.ts +1 -0
- package/lib/abstract-elements/index.js +27 -0
- package/lib/accordion/AccordionElement.d.ts +24 -1
- package/lib/accordion/index.cjs +1 -0
- package/lib/accordion/index.js +166 -0
- package/lib/animation/Animated.d.ts +9 -12
- package/lib/animation/Tweened.d.ts +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +1 -1
- package/lib/animation/index.js +11 -17
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +8 -4
- package/lib/attribute/index.js +44 -35
- package/lib/canvas/index.cjs +1 -0
- package/lib/{canvas-2d → canvas}/index.d.ts +4 -3
- package/lib/canvas/index.js +97 -0
- package/lib/connector/index.cjs +1 -0
- package/lib/connector/index.d.ts +15 -0
- package/lib/connector/index.js +54 -0
- package/lib/controls/WheelControls.d.ts +3 -2
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +23 -27
- package/lib/createStylesheet-BON7aJYs.js +10 -0
- package/lib/createStylesheet-uicRVW05.cjs +1 -0
- package/lib/createTheme-BMH9cRrS.js +15 -0
- package/lib/createTheme-COo8IzPG.cjs +1 -0
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.d.ts +3 -1
- package/lib/custom-element/index.js +19 -9
- package/lib/device/Viewport.d.ts +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -121
- package/lib/element-constructor/ElementConstructor.d.ts +15 -17
- package/lib/element-constructor/createStylesheet.d.ts +2 -0
- package/lib/element-constructor/createTheme.d.ts +12 -0
- package/lib/element-constructor/htmlTags.d.ts +115 -113
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.d.ts +2 -1
- package/lib/element-constructor/index.js +387 -1136
- package/lib/element-constructor/svgTags.d.ts +63 -63
- package/lib/element-resizer/index.cjs +1 -0
- package/lib/element-resizer/index.d.ts +9 -0
- package/lib/element-resizer/index.js +64 -0
- package/lib/en3/attachments/En3SourceManager.d.ts +2 -2
- package/lib/en3/index.cjs +7 -7
- package/lib/en3/index.js +252 -242
- package/lib/en3/objects/En3Clip.d.ts +2 -2
- package/lib/events-CoqmkUxo.js +11 -0
- package/lib/events-D68xg4dy.cjs +1 -0
- package/lib/file-EevnUtRj.cjs +1 -0
- package/lib/file-lxi_oXJf.js +13 -0
- package/lib/htmlTags-BCNUG7oK.js +683 -0
- package/lib/htmlTags-BSQys9wH.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +13 -20
- package/lib/index-DgtdcBEI.js +310 -0
- package/lib/index-i_Ki9M-w.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.d.ts +2 -1
- package/lib/intersector/index.js +33 -22
- package/lib/jsx/ComponentElement.d.ts +17 -0
- package/lib/jsx/h.d.ts +8 -0
- package/lib/jsx/hooks.d.ts +25 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +4 -0
- package/lib/jsx/index.js +116 -0
- package/lib/jsx/render.d.ts +2 -0
- package/lib/jsx/type.d.ts +186 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +3 -4
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +1 -0
- package/lib/layout-box/index.js +113 -99
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +1 -1
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +17 -20
- package/lib/modal/ModalElement.d.ts +12 -0
- package/lib/modal/index.cjs +1 -0
- package/lib/modal/index.d.ts +1 -0
- package/lib/modal/index.js +144 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +1 -1
- package/lib/number-Bo5RdrA1.js +23 -0
- package/lib/number-yVpzMdbQ.cjs +1 -0
- package/lib/popover/PopoverButtonElement.d.ts +14 -0
- package/lib/popover/PopoverElement.d.ts +19 -0
- package/lib/popover/index.cjs +1 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +122 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +5 -3
- package/lib/scroll/index.cjs +1 -71
- package/lib/scroll/index.js +349 -314
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +1 -1
- package/lib/scroll-entries/index.js +4 -2
- package/lib/select/SelectElement.d.ts +25 -0
- package/lib/select/SelectHeadElement.d.ts +12 -0
- package/lib/select/SelectOptionElement.d.ts +13 -0
- package/lib/select/SelectUserElement.d.ts +7 -0
- package/lib/select/index.cjs +1 -0
- package/lib/select/index.d.ts +4 -0
- package/lib/select/index.js +7 -0
- package/lib/source/SourceClass.d.ts +1 -1
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +13 -18
- package/lib/store/CumulativeResource.d.ts +2 -2
- package/lib/store/Resource.d.ts +1 -1
- package/lib/store/Store.d.ts +55 -9
- package/lib/store/StoreRegistry.d.ts +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -1
- package/lib/store/index.js +105 -66
- package/lib/string-BrDhnNUL.js +39 -0
- package/lib/string-DzUwFYSS.cjs +1 -0
- package/lib/studio/StudioElement.d.ts +3 -0
- package/lib/studio/index.cjs +10 -0
- package/lib/studio/index.js +1004 -0
- package/lib/studio/studioStorage.d.ts +14 -0
- package/lib/studio/tweaker/TweakerBooleanManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerColorManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerFieldElement.d.ts +21 -0
- package/lib/studio/tweaker/TweakerFolderElement.d.ts +22 -0
- package/lib/studio/tweaker/TweakerLinkManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerNumberManagerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerRangeManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerSelectManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStoreManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStringManagerElement.d.ts +12 -0
- package/lib/studio/tweaker/tweakerManagerConstructors.d.ts +5 -0
- package/lib/style-At6aDoqG.cjs +1 -0
- package/lib/style-j2TwriJ_.js +10 -0
- package/lib/theme/index.cjs +1 -0
- package/lib/theme/index.d.ts +90 -0
- package/lib/theme/index.js +34 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +1 -1
- package/lib/utils/events.d.ts +6 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +8 -7
- package/lib/utils/index.js +95 -105
- package/lib/utils/number.d.ts +2 -3
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/style.d.ts +2 -0
- package/lib/utils/ts-utility.d.ts +2 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +13 -20
- package/lib/window-resizer/index.cjs +1 -0
- package/lib/window-resizer/index.d.ts +9 -0
- package/lib/window-resizer/index.js +46 -0
- package/package.json +91 -28
- package/lib/Damped-DdPj4Sho.cjs +0 -1
- package/lib/Damped-H3PuZwKV.js +0 -152
- package/lib/SourceManager-tmQlXkSD.cjs +0 -1
- package/lib/Store-qq7IjRLE.js +0 -136
- package/lib/Store-txkR3wXU.cjs +0 -1
- package/lib/WheelControls-9ZQKSYYq.js +0 -83
- package/lib/WheelControls-TYhGU6oA.cjs +0 -1
- package/lib/canvas-2d/index.cjs +0 -5
- package/lib/canvas-2d/index.js +0 -90
- package/lib/element-constructor/specialObjects.d.ts +0 -2
- package/lib/measurer/CumulativeOffsetLeft.d.ts +0 -4
- package/lib/measurer/CumulativeOffsetTop.d.ts +0 -4
- package/lib/measurer/Meaurer.d.ts +0 -8
- package/lib/measurer/index.cjs +0 -1
- package/lib/measurer/index.d.ts +0 -3
- package/lib/measurer/index.js +0 -48
- package/lib/number-2bR0KBcX.cjs +0 -1
- package/lib/number-bCHB2GAD.js +0 -31
- package/lib/resizer/index.cjs +0 -1
- package/lib/resizer/index.d.ts +0 -10
- package/lib/resizer/index.js +0 -45
- package/lib/string-GmxZA5Nq.js +0 -31
- package/lib/string-WmNOGq16.cjs +0 -1
- package/lib/utils/dev.d.ts +0 -3
- /package/lib/{attributes-w0u-KiIb.js → attributes-69we3byR.js} +0 -0
- /package/lib/{attributes-_2U65GDl.cjs → attributes-Bf2svn4j.cjs} +0 -0
- /package/lib/{browser-S4eq8AeN.js → browser-0zX67oeU.js} +0 -0
- /package/lib/{browser-QbF6EW-w.cjs → browser-CpzFX2xg.cjs} +0 -0
- /package/lib/{dom-bHEwc_xV.js → dom-BY7JhTx5.js} +0 -0
- /package/lib/{dom-QhWsdQS2.cjs → dom-qY2LdCVL.cjs} +0 -0
- /package/lib/{easings-uF-tgahf.js → easings-BKi40vHz.js} +0 -0
- /package/lib/{easings-_wFs9ZWc.cjs → easings-DsS5-Kqc.cjs} +0 -0
- /package/lib/{function-zwSFehNd.js → function-C10DGppn.js} +0 -0
- /package/lib/{function-QP7IreXR.cjs → function-MthRj-GJ.cjs} +0 -0
- /package/lib/{layout-rZzbsLPd.cjs → layout-8ryRAMGJ.cjs} +0 -0
- /package/lib/{layout-5SJlcXTY.js → layout-HoBT_Da2.js} +0 -0
- /package/lib/{math-_a3IpKOc.js → math-BOBiC4TN.js} +0 -0
- /package/lib/{math-FNUBmQPK.cjs → math-GDWEqu7y.cjs} +0 -0
package/lib/en3/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var xe = (a, A, e) => A in a ? hs(a, A, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
for (var e of ct(A))
|
|
10
10
|
fs.call(A, e) && xe(a, e, A[e]);
|
|
11
11
|
return a;
|
|
12
|
-
},
|
|
12
|
+
}, Me = (a, A) => ls(a, ds(A));
|
|
13
13
|
var Qt = (a, A, e) => (xe(a, typeof A != "symbol" ? A + "" : A, e), e), ke = (a, A, e) => {
|
|
14
14
|
if (!A.has(a))
|
|
15
15
|
throw TypeError("Cannot " + e);
|
|
@@ -20,7 +20,7 @@ var g = (a, A, e) => (ke(a, A, "read from private field"), e ? e.call(a) : A.get
|
|
|
20
20
|
A instanceof WeakSet ? A.add(a) : A.set(a, e);
|
|
21
21
|
}, G = (a, A, e, s) => (ke(a, A, "write to private field"), s ? s.call(a, e) : A.set(a, e), e);
|
|
22
22
|
var QA = (a, A, e) => (ke(a, A, "access private method"), e);
|
|
23
|
-
var
|
|
23
|
+
var PA = (a, A, e) => new Promise((s, t) => {
|
|
24
24
|
var i = (B) => {
|
|
25
25
|
try {
|
|
26
26
|
o(e.next(B));
|
|
@@ -37,22 +37,16 @@ var Me = (a, A, e) => new Promise((s, t) => {
|
|
|
37
37
|
o((e = e.apply(a, A)).next());
|
|
38
38
|
});
|
|
39
39
|
import { Ladder as ht } from "../ladder/index.js";
|
|
40
|
-
import { LayoutBox as
|
|
41
|
-
import { RESIZE_ORDER as
|
|
42
|
-
import {
|
|
43
|
-
import { ticker as
|
|
44
|
-
import { Mesh as
|
|
40
|
+
import { LayoutBox as bt } from "../layout-box/index.js";
|
|
41
|
+
import { RESIZE_ORDER as Kt, TICK_ORDER as Bt } from "../order/index.js";
|
|
42
|
+
import { windowResizer as kA } from "../window-resizer/index.js";
|
|
43
|
+
import { ticker as bA } from "../ticker/index.js";
|
|
44
|
+
import { Mesh as Ge, REVISION as Ds, OrthographicCamera as ze, PerspectiveCamera as $e, Scene as Fs, WebGLRenderer as Gs, TrianglesDrawMode as Rs, TriangleFanDrawMode as At, TriangleStripDrawMode as Ot, Loader as rt, LoaderUtils as VA, FileLoader as FA, Color as EA, LinearSRGBColorSpace as O, SpotLight as ps, PointLight as ms, DirectionalLight as Ms, MeshBasicMaterial as XA, SRGBColorSpace as $, MeshPhysicalMaterial as AA, Vector2 as Ct, Matrix4 as KA, Vector3 as b, Quaternion as at, InstancedMesh as ws, InstancedBufferAttribute as Ss, Object3D as It, TextureLoader as _t, ImageBitmapLoader as Ls, BufferAttribute as jA, InterleavedBuffer as ys, InterleavedBufferAttribute as Js, LinearFilter as He, LinearMipmapLinearFilter as gt, RepeatWrapping as et, PointsMaterial as Hs, Material as be, LineBasicMaterial as Ts, MeshStandardMaterial as Pt, DoubleSide as Us, PropertyBinding as Ns, BufferGeometry as Yt, SkinnedMesh as xs, LineSegments as ks, Line as bs, LineLoop as Ks, Points as Os, Group as ZA, MathUtils as _s, Skeleton as Ps, AnimationClip as Ys, Bone as qs, InterpolateLinear as qt, ColorManagement as lt, NearestFilter as Xs, NearestMipmapNearestFilter as vs, LinearMipmapNearestFilter as Ws, NearestMipmapLinearFilter as Vs, ClampToEdgeWrapping as js, MirroredRepeatWrapping as Zs, InterpolateDiscrete as zs, FrontSide as $s, Texture as dt, VectorKeyframeTrack as ut, NumberKeyframeTrack as ft, QuaternionKeyframeTrack as Dt, Box3 as Ai, Sphere as ei, Interpolant as ti, CompressedCubeTexture as si, UnsignedByteType as K, CompressedArrayTexture as ii, CompressedTexture as Xt, RGBAFormat as RA, RGBA_ASTC_4x4_Format as ni, RGBA_BPTC_Format as oi, RGBA_ETC2_EAC_Format as Bi, RGBA_PVRTC_4BPPV1_Format as ri, RGBA_S3TC_DXT5_Format as Ci, RGB_ETC1_Format as ai, RGB_ETC2_Format as Ii, RGB_PVRTC_4BPPV1_Format as gi, RGB_S3TC_DXT1_Format as Ei, FloatType as ye, HalfFloatType as Je, DataTexture as ci, Data3DTexture as Qi, DisplayP3ColorSpace as hi, LinearDisplayP3ColorSpace as li, NoColorSpace as Ft, RGFormat as vA, RedFormat as WA, RGBA_ASTC_6x6_Format as Gt, Plane as we, PlaneHelper as Se, PlaneGeometry as di, VideoTexture as ui, Raycaster as fi } from "three";
|
|
45
45
|
import { intersector as Rt } from "../intersector/index.js";
|
|
46
|
-
import { g as Di } from "../dom-
|
|
47
|
-
import { loading as
|
|
48
|
-
import { S as Fi } from "../SourceManager-
|
|
49
|
-
import { S as pt } from "../Store-
|
|
50
|
-
import "../browser-S4eq8AeN.js";
|
|
51
|
-
import "../css-unit-parser/index.js";
|
|
52
|
-
import "../scroll-entries/index.js";
|
|
53
|
-
import "../layout-5SJlcXTY.js";
|
|
54
|
-
import "../notifier/index.js";
|
|
55
|
-
import "../function-zwSFehNd.js";
|
|
46
|
+
import { g as Di } from "../dom-BY7JhTx5.js";
|
|
47
|
+
import { loading as Ke } from "../loading/index.js";
|
|
48
|
+
import { S as Fi } from "../SourceManager-BoP9RAJr.js";
|
|
49
|
+
import { S as pt } from "../Store-JOKrNVEr.js";
|
|
56
50
|
function vt(a) {
|
|
57
51
|
const A = (e) => {
|
|
58
52
|
e.dispose();
|
|
@@ -62,7 +56,7 @@ function vt(a) {
|
|
|
62
56
|
}
|
|
63
57
|
};
|
|
64
58
|
a.traverse((e) => {
|
|
65
|
-
if (e instanceof
|
|
59
|
+
if (e instanceof Ge) {
|
|
66
60
|
if (e.geometry.dispose(), !Array.isArray(e.material) && e.material.isMaterial)
|
|
67
61
|
A(e.material);
|
|
68
62
|
else if (Array.isArray(e.material))
|
|
@@ -71,18 +65,18 @@ function vt(a) {
|
|
|
71
65
|
}
|
|
72
66
|
});
|
|
73
67
|
}
|
|
74
|
-
var Te, nA,
|
|
68
|
+
var Te, nA, U, Y, mA, oA, x, MA, wA, Z, q, SA, zA, $A, dA, Ue, Wt, Ae, tt, ee, te;
|
|
75
69
|
class Gi {
|
|
76
70
|
constructor() {
|
|
77
71
|
u(this, Ue);
|
|
78
|
-
u(this,
|
|
72
|
+
u(this, Ae);
|
|
79
73
|
u(this, Te, `https://unpkg.com/three@0.${Ds}.x`);
|
|
80
74
|
u(this, nA, null);
|
|
81
|
-
u(this,
|
|
75
|
+
u(this, U, null);
|
|
82
76
|
u(this, Y, null);
|
|
83
77
|
u(this, mA, null);
|
|
84
78
|
u(this, oA, []);
|
|
85
|
-
u(this,
|
|
79
|
+
u(this, x, new ht({
|
|
86
80
|
x: 0,
|
|
87
81
|
y: 0,
|
|
88
82
|
z: 0
|
|
@@ -96,14 +90,14 @@ class Gi {
|
|
|
96
90
|
u(this, Z, 0);
|
|
97
91
|
u(this, q, 0);
|
|
98
92
|
u(this, SA, 0);
|
|
99
|
-
u(this,
|
|
100
|
-
u(this,
|
|
93
|
+
u(this, zA, 2);
|
|
94
|
+
u(this, $A, !0);
|
|
101
95
|
u(this, dA, !1);
|
|
102
|
-
u(this,
|
|
96
|
+
u(this, ee, () => {
|
|
103
97
|
var A;
|
|
104
|
-
G(this, Z, g(this, nA).clientWidth), G(this, q, g(this, nA).clientHeight), G(this, SA, Math.min(g(this,
|
|
98
|
+
G(this, Z, g(this, nA).clientWidth), G(this, q, g(this, nA).clientHeight), G(this, SA, Math.min(g(this, zA), devicePixelRatio || 1)), g(this, U).setPixelRatio(g(this, SA)), g(this, U).setSize(g(this, Z), g(this, q)), QA(this, Ae, tt).call(this), (A = this.onResize) == null || A.call(this);
|
|
105
99
|
});
|
|
106
|
-
u(this,
|
|
100
|
+
u(this, te, () => {
|
|
107
101
|
QA(this, Ue, Wt).call(this), this.render(g(this, mA), g(this, Y));
|
|
108
102
|
});
|
|
109
103
|
}
|
|
@@ -114,7 +108,7 @@ class Gi {
|
|
|
114
108
|
return g(this, nA);
|
|
115
109
|
}
|
|
116
110
|
get webglRenderer() {
|
|
117
|
-
return g(this,
|
|
111
|
+
return g(this, U);
|
|
118
112
|
}
|
|
119
113
|
get camera() {
|
|
120
114
|
return g(this, Y);
|
|
@@ -126,7 +120,7 @@ class Gi {
|
|
|
126
120
|
return g(this, oA);
|
|
127
121
|
}
|
|
128
122
|
get cameraPosition() {
|
|
129
|
-
return g(this,
|
|
123
|
+
return g(this, x);
|
|
130
124
|
}
|
|
131
125
|
get cameraRotation() {
|
|
132
126
|
return g(this, MA);
|
|
@@ -141,15 +135,15 @@ class Gi {
|
|
|
141
135
|
return g(this, SA);
|
|
142
136
|
}
|
|
143
137
|
get cameraDistance() {
|
|
144
|
-
return g(this,
|
|
138
|
+
return g(this, x).getStepValue("_initial").z;
|
|
145
139
|
}
|
|
146
140
|
set cameraDistance(A) {
|
|
147
|
-
g(this,
|
|
141
|
+
g(this, x).setStep("_initial", "+", {
|
|
148
142
|
z: A
|
|
149
|
-
}), g(this,
|
|
143
|
+
}), g(this, x).calculate(), QA(this, Ae, tt).call(this);
|
|
150
144
|
}
|
|
151
145
|
attachToHTMLElement(A, e, s) {
|
|
152
|
-
const t = new
|
|
146
|
+
const t = new bt(A, Me(tA({}, s), {
|
|
153
147
|
containerElement: this.containerElement,
|
|
154
148
|
cartesian: !0
|
|
155
149
|
}));
|
|
@@ -170,35 +164,39 @@ class Gi {
|
|
|
170
164
|
console.warn("[en3.setup]: You are trying to setup en3 again.");
|
|
171
165
|
return;
|
|
172
166
|
}
|
|
173
|
-
G(this, nA, (A == null ? void 0 : A.containerElement) || document.body), G(this, Y, (A == null ? void 0 : A.cameraType) === "orthographic" ? new ze() : new $e()), g(this,
|
|
167
|
+
G(this, nA, (A == null ? void 0 : A.containerElement) || document.body), G(this, Y, (A == null ? void 0 : A.cameraType) === "orthographic" ? new ze() : new $e()), g(this, x).bind(g(this, Y).position), g(this, MA).bind(g(this, Y).rotation), g(this, x).setStep("_initial", "+", {
|
|
174
168
|
z: (A == null ? void 0 : A.cameraDistance) || 1e3
|
|
175
|
-
}), g(this,
|
|
169
|
+
}), g(this, x).calculate(), g(this, Y).near = (A == null ? void 0 : A.cameraNear) || 1, g(this, Y).far = (A == null ? void 0 : A.cameraFar) || 11e3, G(this, wA, (A == null ? void 0 : A.cameraFov) || "auto"), G(this, mA, new Fs()), G(this, zA, (A == null ? void 0 : A.maxPixelRatio) || 2), G(this, $A, (A == null ? void 0 : A.cameraAutoUpdate) !== !1), G(this, U, new Gs(A == null ? void 0 : A.webGLRendererParameters)), g(this, U).domElement.style.cssText = `
|
|
176
170
|
position: fixed;
|
|
177
171
|
left: 0;
|
|
178
172
|
top: 0;
|
|
179
173
|
width: 100%;
|
|
180
174
|
height: 100%;
|
|
181
175
|
z-index: -1;
|
|
182
|
-
`, g(this, nA).prepend(g(this,
|
|
176
|
+
`, g(this, nA).prepend(g(this, U).domElement), G(this, dA, !0), kA.subscribe(g(this, ee), Kt.EN3), bA.subscribe(g(this, te), { order: Bt.EN3 });
|
|
183
177
|
}
|
|
184
178
|
destroy() {
|
|
185
179
|
if (!g(this, dA)) {
|
|
186
|
-
console.warn(
|
|
180
|
+
console.warn(
|
|
181
|
+
"[en3.setup]: You are trying to destory en3 but it has not been initialized."
|
|
182
|
+
);
|
|
187
183
|
return;
|
|
188
184
|
}
|
|
189
185
|
g(this, oA).forEach((A) => {
|
|
190
186
|
A.userData.box.destroy();
|
|
191
|
-
}), kA.unsubscribe(g(this,
|
|
187
|
+
}), kA.unsubscribe(g(this, ee)), bA.unsubscribe(g(this, te)), this.scene.clear(), vt(this.scene), g(this, U).dispose(), g(this, U).domElement.remove(), G(this, U, null), G(this, dA, !1);
|
|
192
188
|
}
|
|
193
189
|
render(A, e) {
|
|
194
|
-
g(this,
|
|
190
|
+
g(this, U).render(A, e);
|
|
195
191
|
}
|
|
196
192
|
}
|
|
197
|
-
Te = new WeakMap(), nA = new WeakMap(),
|
|
198
|
-
g(this,
|
|
199
|
-
},
|
|
200
|
-
this.camera instanceof $e ? (this.camera.aspect = g(this, Z) / g(this, q), this.camera.fov = g(this, wA) === "auto" ? 2 * Math.atan(
|
|
201
|
-
|
|
193
|
+
Te = new WeakMap(), nA = new WeakMap(), U = new WeakMap(), Y = new WeakMap(), mA = new WeakMap(), oA = new WeakMap(), x = new WeakMap(), MA = new WeakMap(), wA = new WeakMap(), Z = new WeakMap(), q = new WeakMap(), SA = new WeakMap(), zA = new WeakMap(), $A = new WeakMap(), dA = new WeakMap(), Ue = new WeakSet(), Wt = function() {
|
|
194
|
+
g(this, $A) && (g(this, x).calculate(), g(this, MA).calculate());
|
|
195
|
+
}, Ae = new WeakSet(), tt = function() {
|
|
196
|
+
this.camera instanceof $e ? (this.camera.aspect = g(this, Z) / g(this, q), this.camera.fov = g(this, wA) === "auto" ? 2 * Math.atan(
|
|
197
|
+
g(this, q) / 2 / g(this, x).getStepValue("_initial").z
|
|
198
|
+
) * (180 / Math.PI) : g(this, wA)) : this.camera instanceof ze && (this.camera.left = g(this, Z) / -2, this.camera.right = g(this, Z) / 2, this.camera.top = g(this, q) / 2, this.camera.bottom = g(this, q) / -2), this.camera.updateProjectionMatrix();
|
|
199
|
+
}, ee = new WeakMap(), te = new WeakMap();
|
|
202
200
|
const w = new Gi();
|
|
203
201
|
class Ri {
|
|
204
202
|
add(A, e) {
|
|
@@ -209,7 +207,7 @@ class Ri {
|
|
|
209
207
|
return Rt.subscribe(t, s);
|
|
210
208
|
}
|
|
211
209
|
}
|
|
212
|
-
const
|
|
210
|
+
const Pn = new Ri();
|
|
213
211
|
function mt(a, A) {
|
|
214
212
|
if (A === Rs)
|
|
215
213
|
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), a;
|
|
@@ -241,10 +239,10 @@ class pi extends rt {
|
|
|
241
239
|
constructor(A) {
|
|
242
240
|
super(A), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(e) {
|
|
243
241
|
return new Li(e);
|
|
244
|
-
}), this.register(function(e) {
|
|
245
|
-
return new Ki(e);
|
|
246
242
|
}), this.register(function(e) {
|
|
247
243
|
return new bi(e);
|
|
244
|
+
}), this.register(function(e) {
|
|
245
|
+
return new Ki(e);
|
|
248
246
|
}), this.register(function(e) {
|
|
249
247
|
return new Oi(e);
|
|
250
248
|
}), this.register(function(e) {
|
|
@@ -279,10 +277,10 @@ class pi extends rt {
|
|
|
279
277
|
if (this.resourcePath !== "")
|
|
280
278
|
n = this.resourcePath;
|
|
281
279
|
else if (this.path !== "") {
|
|
282
|
-
const C =
|
|
283
|
-
n =
|
|
280
|
+
const C = VA.extractUrlBase(A);
|
|
281
|
+
n = VA.resolveURL(C, this.path);
|
|
284
282
|
} else
|
|
285
|
-
n =
|
|
283
|
+
n = VA.extractUrlBase(A);
|
|
286
284
|
this.manager.itemStart(A);
|
|
287
285
|
const o = function(C) {
|
|
288
286
|
t ? t(C) : console.error(C), i.manager.itemError(A), i.manager.itemEnd(A);
|
|
@@ -473,7 +471,7 @@ class wi {
|
|
|
473
471
|
this.name = R.KHR_MATERIALS_UNLIT;
|
|
474
472
|
}
|
|
475
473
|
getMaterialType() {
|
|
476
|
-
return
|
|
474
|
+
return XA;
|
|
477
475
|
}
|
|
478
476
|
extendParams(A, e, s) {
|
|
479
477
|
const t = [];
|
|
@@ -659,7 +657,7 @@ class ki {
|
|
|
659
657
|
return n.anisotropyStrength !== void 0 && (e.anisotropy = n.anisotropyStrength), n.anisotropyRotation !== void 0 && (e.anisotropyRotation = n.anisotropyRotation), n.anisotropyTexture !== void 0 && i.push(s.assignTexture(e, "anisotropyMap", n.anisotropyTexture)), Promise.all(i);
|
|
660
658
|
}
|
|
661
659
|
}
|
|
662
|
-
class
|
|
660
|
+
class bi {
|
|
663
661
|
constructor(A) {
|
|
664
662
|
this.parser = A, this.name = R.KHR_TEXTURE_BASISU;
|
|
665
663
|
}
|
|
@@ -676,7 +674,7 @@ class Ki {
|
|
|
676
674
|
return e.loadTextureImage(A, i.source, n);
|
|
677
675
|
}
|
|
678
676
|
}
|
|
679
|
-
class
|
|
677
|
+
class Ki {
|
|
680
678
|
constructor(A) {
|
|
681
679
|
this.parser = A, this.name = R.EXT_TEXTURE_WEBP, this.isSupported = null;
|
|
682
680
|
}
|
|
@@ -774,7 +772,7 @@ class Pi {
|
|
|
774
772
|
return null;
|
|
775
773
|
const t = e.meshes[s.mesh];
|
|
776
774
|
for (const C of t.primitives)
|
|
777
|
-
if (C.mode !==
|
|
775
|
+
if (C.mode !== N.TRIANGLES && C.mode !== N.TRIANGLE_STRIP && C.mode !== N.TRIANGLE_FAN && C.mode !== void 0)
|
|
778
776
|
return null;
|
|
779
777
|
const n = s.extensions[this.name].attributes, o = [], B = {};
|
|
780
778
|
for (const C in n)
|
|
@@ -782,7 +780,7 @@ class Pi {
|
|
|
782
780
|
return o.length < 1 ? null : (o.push(this.parser.createNodeMesh(A)), Promise.all(o).then((C) => {
|
|
783
781
|
const I = C.pop(), r = I.isGroup ? I.children : [I], c = C[0].count, Q = [];
|
|
784
782
|
for (const l of r) {
|
|
785
|
-
const h = new
|
|
783
|
+
const h = new KA(), E = new b(), d = new at(), f = new b(1, 1, 1), D = new ws(l.geometry, l.material, c);
|
|
786
784
|
for (let F = 0; F < c; F++)
|
|
787
785
|
B.TRANSLATION && E.fromBufferAttribute(B.TRANSLATION, F), B.ROTATION && d.fromBufferAttribute(B.ROTATION, F), B.SCALE && f.fromBufferAttribute(B.SCALE, F), D.setMatrixAt(F, h.compose(E, d, f));
|
|
788
786
|
for (const F in B)
|
|
@@ -797,11 +795,11 @@ class Pi {
|
|
|
797
795
|
}));
|
|
798
796
|
}
|
|
799
797
|
}
|
|
800
|
-
const Vt = "glTF",
|
|
798
|
+
const Vt = "glTF", YA = 12, Mt = { JSON: 1313821514, BIN: 5130562 };
|
|
801
799
|
class Yi {
|
|
802
800
|
constructor(A) {
|
|
803
801
|
this.name = R.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
804
|
-
const e = new DataView(A, 0,
|
|
802
|
+
const e = new DataView(A, 0, YA), s = new TextDecoder();
|
|
805
803
|
if (this.header = {
|
|
806
804
|
magic: s.decode(new Uint8Array(A.slice(0, 4))),
|
|
807
805
|
version: e.getUint32(4, !0),
|
|
@@ -810,17 +808,17 @@ class Yi {
|
|
|
810
808
|
throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
|
|
811
809
|
if (this.header.version < 2)
|
|
812
810
|
throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
|
|
813
|
-
const t = this.header.length -
|
|
811
|
+
const t = this.header.length - YA, i = new DataView(A, YA);
|
|
814
812
|
let n = 0;
|
|
815
813
|
for (; n < t; ) {
|
|
816
814
|
const o = i.getUint32(n, !0);
|
|
817
815
|
n += 4;
|
|
818
816
|
const B = i.getUint32(n, !0);
|
|
819
817
|
if (n += 4, B === Mt.JSON) {
|
|
820
|
-
const C = new Uint8Array(A,
|
|
818
|
+
const C = new Uint8Array(A, YA + n, o);
|
|
821
819
|
this.content = s.decode(C);
|
|
822
820
|
} else if (B === Mt.BIN) {
|
|
823
|
-
const C =
|
|
821
|
+
const C = YA + n;
|
|
824
822
|
this.body = A.slice(C, C + o);
|
|
825
823
|
}
|
|
826
824
|
n += o;
|
|
@@ -900,7 +898,7 @@ class Vi extends jt {
|
|
|
900
898
|
return Wi.fromArray(i).normalize().toArray(i), i;
|
|
901
899
|
}
|
|
902
900
|
}
|
|
903
|
-
const
|
|
901
|
+
const N = {
|
|
904
902
|
FLOAT: 5126,
|
|
905
903
|
//FLOAT_MAT2: 35674,
|
|
906
904
|
FLOAT_MAT3: 35675,
|
|
@@ -1071,7 +1069,7 @@ function it(a) {
|
|
|
1071
1069
|
function en(a) {
|
|
1072
1070
|
return a.search(/\.jpe?g($|\?)/i) > 0 || a.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : a.search(/\.webp($|\?)/i) > 0 || a.search(/^data\:image\/webp/) === 0 ? "image/webp" : "image/png";
|
|
1073
1071
|
}
|
|
1074
|
-
const tn = new
|
|
1072
|
+
const tn = new KA();
|
|
1075
1073
|
class sn {
|
|
1076
1074
|
constructor(A = {}, e = {}) {
|
|
1077
1075
|
this.json = A, this.extensions = {}, this.plugins = {}, this.options = e, this.cache = new mi(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
|
|
@@ -1267,7 +1265,7 @@ class sn {
|
|
|
1267
1265
|
return Promise.resolve(this.extensions[R.KHR_BINARY_GLTF].body);
|
|
1268
1266
|
const t = this.options;
|
|
1269
1267
|
return new Promise(function(i, n) {
|
|
1270
|
-
s.load(
|
|
1268
|
+
s.load(VA.resolveURL(e.uri, t.path), i, void 0, function() {
|
|
1271
1269
|
n(new Error('THREE.GLTFLoader: Failed to load buffer "' + e.uri + '".'));
|
|
1272
1270
|
});
|
|
1273
1271
|
});
|
|
@@ -1293,7 +1291,7 @@ class sn {
|
|
|
1293
1291
|
const e = this, s = this.json, t = this.json.accessors[A];
|
|
1294
1292
|
if (t.bufferView === void 0 && t.sparse === void 0) {
|
|
1295
1293
|
const n = Oe[t.type], o = pA[t.componentType], B = t.normalized === !0, C = new o(t.count * n);
|
|
1296
|
-
return Promise.resolve(new
|
|
1294
|
+
return Promise.resolve(new jA(C, n, B));
|
|
1297
1295
|
}
|
|
1298
1296
|
const i = [];
|
|
1299
1297
|
return t.bufferView !== void 0 ? i.push(this.getDependency("bufferView", t.bufferView)) : i.push(null), t.sparse !== void 0 && (i.push(this.getDependency("bufferView", t.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", t.sparse.values.bufferView))), Promise.all(i).then(function(n) {
|
|
@@ -1304,10 +1302,10 @@ class sn {
|
|
|
1304
1302
|
let D = e.cache.get(f);
|
|
1305
1303
|
D || (h = new C(o, d * Q, t.count * Q / I), D = new ys(h, Q / I), e.cache.add(f, D)), E = new Js(D, B, c % Q / I, l);
|
|
1306
1304
|
} else
|
|
1307
|
-
o === null ? h = new C(t.count * B) : h = new C(o, c, t.count * B), E = new
|
|
1305
|
+
o === null ? h = new C(t.count * B) : h = new C(o, c, t.count * B), E = new jA(h, B, l);
|
|
1308
1306
|
if (t.sparse !== void 0) {
|
|
1309
1307
|
const d = Oe.SCALAR, f = pA[t.sparse.indices.componentType], D = t.sparse.indices.byteOffset || 0, F = t.sparse.values.byteOffset || 0, p = new f(n[1], D, t.sparse.count * d), m = new C(n[2], F, t.sparse.count * B);
|
|
1310
|
-
o !== null && (E = new
|
|
1308
|
+
o !== null && (E = new jA(E.array.slice(), E.itemSize, E.normalized));
|
|
1311
1309
|
for (let M = 0, _ = p.length; M < _; M++) {
|
|
1312
1310
|
const y = p[M];
|
|
1313
1311
|
if (E.setX(y, m[M * B]), B >= 2 && E.setY(y, m[M * B + 1]), B >= 3 && E.setZ(y, m[M * B + 2]), B >= 4 && E.setW(y, m[M * B + 3]), B >= 5)
|
|
@@ -1364,7 +1362,7 @@ class sn {
|
|
|
1364
1362
|
e.isImageBitmapLoader === !0 && (l = function(h) {
|
|
1365
1363
|
const E = new dt(h);
|
|
1366
1364
|
E.needsUpdate = !0, c(E);
|
|
1367
|
-
}), e.load(
|
|
1365
|
+
}), e.load(VA.resolveURL(r, i.path), l, void 0, Q);
|
|
1368
1366
|
});
|
|
1369
1367
|
}).then(function(r) {
|
|
1370
1368
|
return C === !0 && o.revokeObjectURL(B), r.userData.mimeType = n.mimeType || en(n.uri), r;
|
|
@@ -1410,11 +1408,11 @@ class sn {
|
|
|
1410
1408
|
if (A.isPoints) {
|
|
1411
1409
|
const o = "PointsMaterial:" + s.uuid;
|
|
1412
1410
|
let B = this.cache.get(o);
|
|
1413
|
-
B || (B = new Hs(),
|
|
1411
|
+
B || (B = new Hs(), be.prototype.copy.call(B, s), B.color.copy(s.color), B.map = s.map, B.sizeAttenuation = !1, this.cache.add(o, B)), s = B;
|
|
1414
1412
|
} else if (A.isLine) {
|
|
1415
1413
|
const o = "LineBasicMaterial:" + s.uuid;
|
|
1416
1414
|
let B = this.cache.get(o);
|
|
1417
|
-
B || (B = new Ts(),
|
|
1415
|
+
B || (B = new Ts(), be.prototype.copy.call(B, s), B.color.copy(s.color), B.map = s.map, this.cache.add(o, B)), s = B;
|
|
1418
1416
|
}
|
|
1419
1417
|
if (t || i || n) {
|
|
1420
1418
|
let o = "ClonedMaterial:" + s.uuid + ":";
|
|
@@ -1453,15 +1451,15 @@ class sn {
|
|
|
1453
1451
|
}
|
|
1454
1452
|
i.doubleSided === !0 && (o.side = Us);
|
|
1455
1453
|
const I = i.alphaMode || _e.OPAQUE;
|
|
1456
|
-
if (I === _e.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, I === _e.MASK && (o.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && n !==
|
|
1454
|
+
if (I === _e.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, I === _e.MASK && (o.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && n !== XA && (C.push(e.assignTexture(o, "normalMap", i.normalTexture)), o.normalScale = new Ct(1, 1), i.normalTexture.scale !== void 0)) {
|
|
1457
1455
|
const r = i.normalTexture.scale;
|
|
1458
1456
|
o.normalScale.set(r, r);
|
|
1459
1457
|
}
|
|
1460
|
-
if (i.occlusionTexture !== void 0 && n !==
|
|
1458
|
+
if (i.occlusionTexture !== void 0 && n !== XA && (C.push(e.assignTexture(o, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (o.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && n !== XA) {
|
|
1461
1459
|
const r = i.emissiveFactor;
|
|
1462
1460
|
o.emissive = new EA().setRGB(r[0], r[1], r[2], O);
|
|
1463
1461
|
}
|
|
1464
|
-
return i.emissiveTexture !== void 0 && n !==
|
|
1462
|
+
return i.emissiveTexture !== void 0 && n !== XA && C.push(e.assignTexture(o, "emissiveMap", i.emissiveTexture, $)), Promise.all(C).then(function() {
|
|
1465
1463
|
const r = new n(o);
|
|
1466
1464
|
return i.name && (r.name = i.name), iA(r, i), e.associations.set(r, { materials: A }), i.extensions && hA(t, r, i), r;
|
|
1467
1465
|
});
|
|
@@ -1515,15 +1513,15 @@ class sn {
|
|
|
1515
1513
|
const h = I[Q], E = n[Q];
|
|
1516
1514
|
let d;
|
|
1517
1515
|
const f = C[Q];
|
|
1518
|
-
if (E.mode ===
|
|
1519
|
-
d = i.isSkinnedMesh === !0 ? new xs(h, f) : new
|
|
1520
|
-
else if (E.mode ===
|
|
1516
|
+
if (E.mode === N.TRIANGLES || E.mode === N.TRIANGLE_STRIP || E.mode === N.TRIANGLE_FAN || E.mode === void 0)
|
|
1517
|
+
d = i.isSkinnedMesh === !0 ? new xs(h, f) : new Ge(h, f), d.isSkinnedMesh === !0 && d.normalizeSkinWeights(), E.mode === N.TRIANGLE_STRIP ? d.geometry = mt(d.geometry, Ot) : E.mode === N.TRIANGLE_FAN && (d.geometry = mt(d.geometry, At));
|
|
1518
|
+
else if (E.mode === N.LINES)
|
|
1521
1519
|
d = new ks(h, f);
|
|
1522
|
-
else if (E.mode ===
|
|
1523
|
-
d = new Ks(h, f);
|
|
1524
|
-
else if (E.mode === x.LINE_LOOP)
|
|
1520
|
+
else if (E.mode === N.LINE_STRIP)
|
|
1525
1521
|
d = new bs(h, f);
|
|
1526
|
-
else if (E.mode ===
|
|
1522
|
+
else if (E.mode === N.LINE_LOOP)
|
|
1523
|
+
d = new Ks(h, f);
|
|
1524
|
+
else if (E.mode === N.POINTS)
|
|
1527
1525
|
d = new Os(h, f);
|
|
1528
1526
|
else
|
|
1529
1527
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + E.mode);
|
|
@@ -1536,7 +1534,7 @@ class sn {
|
|
|
1536
1534
|
});
|
|
1537
1535
|
if (r.length === 1)
|
|
1538
1536
|
return i.extensions && hA(t, r[0], i), r[0];
|
|
1539
|
-
const c = new
|
|
1537
|
+
const c = new ZA();
|
|
1540
1538
|
i.extensions && hA(t, c, i), e.associations.set(c, { meshes: A });
|
|
1541
1539
|
for (let Q = 0, l = r.length; Q < l; Q++)
|
|
1542
1540
|
c.add(r[Q]);
|
|
@@ -1572,7 +1570,7 @@ class sn {
|
|
|
1572
1570
|
const r = n[C];
|
|
1573
1571
|
if (r) {
|
|
1574
1572
|
o.push(r);
|
|
1575
|
-
const c = new
|
|
1573
|
+
const c = new KA();
|
|
1576
1574
|
i !== null && c.fromArray(i.array, C * 16), B.push(c);
|
|
1577
1575
|
} else
|
|
1578
1576
|
console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', e.joints[C]);
|
|
@@ -1664,11 +1662,11 @@ class sn {
|
|
|
1664
1662
|
o.push(C);
|
|
1665
1663
|
}), this.nodeCache[A] = Promise.all(o).then(function(C) {
|
|
1666
1664
|
let I;
|
|
1667
|
-
if (i.isBone === !0 ? I = new qs() : C.length > 1 ? I = new
|
|
1665
|
+
if (i.isBone === !0 ? I = new qs() : C.length > 1 ? I = new ZA() : C.length === 1 ? I = C[0] : I = new It(), I !== C[0])
|
|
1668
1666
|
for (let r = 0, c = C.length; r < c; r++)
|
|
1669
1667
|
I.add(C[r]);
|
|
1670
1668
|
if (i.name && (I.userData.name = i.name, I.name = n), iA(I, i), i.extensions && hA(s, I, i), i.matrix !== void 0) {
|
|
1671
|
-
const r = new
|
|
1669
|
+
const r = new KA();
|
|
1672
1670
|
r.fromArray(i.matrix), I.applyMatrix4(r);
|
|
1673
1671
|
} else
|
|
1674
1672
|
i.translation !== void 0 && I.position.fromArray(i.translation), i.rotation !== void 0 && I.quaternion.fromArray(i.rotation), i.scale !== void 0 && I.scale.fromArray(i.scale);
|
|
@@ -1681,7 +1679,7 @@ class sn {
|
|
|
1681
1679
|
* @return {Promise<Group>}
|
|
1682
1680
|
*/
|
|
1683
1681
|
loadScene(A) {
|
|
1684
|
-
const e = this.extensions, s = this.json.scenes[A], t = this, i = new
|
|
1682
|
+
const e = this.extensions, s = this.json.scenes[A], t = this, i = new ZA();
|
|
1685
1683
|
s.name && (i.name = t.createUniqueName(s.name)), iA(i, s), s.extensions && hA(e, i, s);
|
|
1686
1684
|
const n = s.nodes || [], o = [];
|
|
1687
1685
|
for (let B = 0, C = n.length; B < C; B++)
|
|
@@ -1692,7 +1690,7 @@ class sn {
|
|
|
1692
1690
|
const C = (I) => {
|
|
1693
1691
|
const r = /* @__PURE__ */ new Map();
|
|
1694
1692
|
for (const [c, Q] of t.associations)
|
|
1695
|
-
(c instanceof
|
|
1693
|
+
(c instanceof be || c instanceof dt) && r.set(c, Q);
|
|
1696
1694
|
return I.traverse((c) => {
|
|
1697
1695
|
const Q = t.associations.get(c);
|
|
1698
1696
|
Q != null && r.set(c, Q);
|
|
@@ -1766,8 +1764,8 @@ function nn(a, A, e) {
|
|
|
1766
1764
|
const o = e.json.accessors[s.POSITION], B = o.min, C = o.max;
|
|
1767
1765
|
if (B !== void 0 && C !== void 0) {
|
|
1768
1766
|
if (t.set(
|
|
1769
|
-
new
|
|
1770
|
-
new
|
|
1767
|
+
new b(B[0], B[1], B[2]),
|
|
1768
|
+
new b(C[0], C[1], C[2])
|
|
1771
1769
|
), o.normalized) {
|
|
1772
1770
|
const I = it(pA[o.componentType]);
|
|
1773
1771
|
t.min.multiplyScalar(I), t.max.multiplyScalar(I);
|
|
@@ -1780,7 +1778,7 @@ function nn(a, A, e) {
|
|
|
1780
1778
|
return;
|
|
1781
1779
|
const i = A.targets;
|
|
1782
1780
|
if (i !== void 0) {
|
|
1783
|
-
const o = new
|
|
1781
|
+
const o = new b(), B = new b();
|
|
1784
1782
|
for (let C = 0, I = i.length; C < I; C++) {
|
|
1785
1783
|
const r = i[C];
|
|
1786
1784
|
if (r.POSITION !== void 0) {
|
|
@@ -1890,9 +1888,9 @@ class on extends rt {
|
|
|
1890
1888
|
}
|
|
1891
1889
|
_createGeometry(A) {
|
|
1892
1890
|
const e = new Yt();
|
|
1893
|
-
A.index && e.setIndex(new
|
|
1891
|
+
A.index && e.setIndex(new jA(A.index.array, 1));
|
|
1894
1892
|
for (let s = 0; s < A.attributes.length; s++) {
|
|
1895
|
-
const t = A.attributes[s], i = t.name, n = t.array, o = t.itemSize, B = new
|
|
1893
|
+
const t = A.attributes[s], i = t.name, n = t.array, o = t.itemSize, B = new jA(n, o);
|
|
1896
1894
|
i === "color" && (this._assignVertexColorSpace(B, t.vertexColorSpace), B.normalized = !(n instanceof Float32Array)), e.setAttribute(i, B);
|
|
1897
1895
|
}
|
|
1898
1896
|
return e;
|
|
@@ -2105,7 +2103,7 @@ class Qn {
|
|
|
2105
2103
|
this.vkFormat = 0, this.typeSize = 1, this.pixelWidth = 0, this.pixelHeight = 0, this.pixelDepth = 0, this.layerCount = 0, this.faceCount = 1, this.supercompressionScheme = 0, this.levels = [], this.dataFormatDescriptor = [{ vendorId: 0, descriptorType: 0, descriptorBlockSize: 0, versionNumber: 2, colorModel: 0, colorPrimaries: 1, transferFunction: 2, flags: 0, texelBlockDimension: [0, 0, 0, 0], bytesPlane: [0, 0, 0, 0, 0, 0, 0, 0], samples: [] }], this.keyValue = {}, this.globalData = null;
|
|
2106
2104
|
}
|
|
2107
2105
|
}
|
|
2108
|
-
class
|
|
2106
|
+
class qA {
|
|
2109
2107
|
constructor(A, e, s, t) {
|
|
2110
2108
|
this._dataView = new DataView(A.buffer, A.byteOffset + e, s), this._littleEndian = t, this._offset = 0;
|
|
2111
2109
|
}
|
|
@@ -2148,31 +2146,31 @@ function hn(a) {
|
|
|
2148
2146
|
const A = new Uint8Array(a.buffer, a.byteOffset, L.length);
|
|
2149
2147
|
if (A[0] !== L[0] || A[1] !== L[1] || A[2] !== L[2] || A[3] !== L[3] || A[4] !== L[4] || A[5] !== L[5] || A[6] !== L[6] || A[7] !== L[7] || A[8] !== L[8] || A[9] !== L[9] || A[10] !== L[10] || A[11] !== L[11])
|
|
2150
2148
|
throw new Error("Missing KTX 2.0 identifier.");
|
|
2151
|
-
const e = new Qn(), s = 17 * Uint32Array.BYTES_PER_ELEMENT, t = new
|
|
2149
|
+
const e = new Qn(), s = 17 * Uint32Array.BYTES_PER_ELEMENT, t = new qA(a, L.length, s, !0);
|
|
2152
2150
|
e.vkFormat = t._nextUint32(), e.typeSize = t._nextUint32(), e.pixelWidth = t._nextUint32(), e.pixelHeight = t._nextUint32(), e.pixelDepth = t._nextUint32(), e.layerCount = t._nextUint32(), e.faceCount = t._nextUint32();
|
|
2153
2151
|
const i = t._nextUint32();
|
|
2154
2152
|
e.supercompressionScheme = t._nextUint32();
|
|
2155
|
-
const n = t._nextUint32(), o = t._nextUint32(), B = t._nextUint32(), C = t._nextUint32(), I = t._nextUint64(), r = t._nextUint64(), c = new
|
|
2153
|
+
const n = t._nextUint32(), o = t._nextUint32(), B = t._nextUint32(), C = t._nextUint32(), I = t._nextUint64(), r = t._nextUint64(), c = new qA(a, L.length + s, 3 * i * 8, !0);
|
|
2156
2154
|
for (let S = 0; S < i; S++)
|
|
2157
2155
|
e.levels.push({ levelData: new Uint8Array(a.buffer, a.byteOffset + c._nextUint64(), c._nextUint64()), uncompressedByteLength: c._nextUint64() });
|
|
2158
|
-
const Q = new
|
|
2156
|
+
const Q = new qA(a, n, o, !0), l = { vendorId: Q._skip(4)._nextUint16(), descriptorType: Q._nextUint16(), versionNumber: Q._nextUint16(), descriptorBlockSize: Q._nextUint16(), colorModel: Q._nextUint8(), colorPrimaries: Q._nextUint8(), transferFunction: Q._nextUint8(), flags: Q._nextUint8(), texelBlockDimension: [Q._nextUint8(), Q._nextUint8(), Q._nextUint8(), Q._nextUint8()], bytesPlane: [Q._nextUint8(), Q._nextUint8(), Q._nextUint8(), Q._nextUint8(), Q._nextUint8(), Q._nextUint8(), Q._nextUint8(), Q._nextUint8()], samples: [] }, h = (l.descriptorBlockSize / 4 - 6) / 4;
|
|
2159
2157
|
for (let S = 0; S < h; S++) {
|
|
2160
|
-
const
|
|
2161
|
-
64 &
|
|
2158
|
+
const H = { bitOffset: Q._nextUint16(), bitLength: Q._nextUint8(), channelType: Q._nextUint8(), samplePosition: [Q._nextUint8(), Q._nextUint8(), Q._nextUint8(), Q._nextUint8()], sampleLower: -1 / 0, sampleUpper: 1 / 0 };
|
|
2159
|
+
64 & H.channelType ? (H.sampleLower = Q._nextInt32(), H.sampleUpper = Q._nextInt32()) : (H.sampleLower = Q._nextUint32(), H.sampleUpper = Q._nextUint32()), l.samples[S] = H;
|
|
2162
2160
|
}
|
|
2163
2161
|
e.dataFormatDescriptor.length = 0, e.dataFormatDescriptor.push(l);
|
|
2164
|
-
const E = new
|
|
2162
|
+
const E = new qA(a, B, C, !0);
|
|
2165
2163
|
for (; E._offset < C; ) {
|
|
2166
|
-
const S = E._nextUint32(),
|
|
2164
|
+
const S = E._nextUint32(), H = E._scan(S), _A = Ht(H), V = E._scan(S - H.byteLength);
|
|
2167
2165
|
e.keyValue[_A] = _A.match(/^ktx/i) ? Ht(V) : V, E._offset % 4 && E._skip(4 - E._offset % 4);
|
|
2168
2166
|
}
|
|
2169
2167
|
if (r <= 0)
|
|
2170
2168
|
return e;
|
|
2171
|
-
const d = new
|
|
2169
|
+
const d = new qA(a, I, r, !0), f = d._nextUint16(), D = d._nextUint16(), F = d._nextUint32(), p = d._nextUint32(), m = d._nextUint32(), M = d._nextUint32(), _ = [];
|
|
2172
2170
|
for (let S = 0; S < i; S++)
|
|
2173
2171
|
_.push({ imageFlags: d._nextUint32(), rgbSliceByteOffset: d._nextUint32(), rgbSliceByteLength: d._nextUint32(), alphaSliceByteOffset: d._nextUint32(), alphaSliceByteLength: d._nextUint32() });
|
|
2174
|
-
const y = I + d._offset, W = y + F, OA = W + p,
|
|
2175
|
-
return e.globalData = { endpointCount: f, selectorCount: D, imageDescs: _, endpointsData: cA, selectorsData:
|
|
2172
|
+
const y = I + d._offset, W = y + F, OA = W + p, Re = OA + m, cA = new Uint8Array(a.buffer, a.byteOffset + y, F), pe = new Uint8Array(a.buffer, a.byteOffset + W, p), eA = new Uint8Array(a.buffer, a.byteOffset + OA, m), me = new Uint8Array(a.buffer, a.byteOffset + Re, M);
|
|
2173
|
+
return e.globalData = { endpointCount: f, selectorCount: D, imageDescs: _, endpointsData: cA, selectorsData: pe, tablesData: eA, extendedData: me }, e;
|
|
2176
2174
|
}
|
|
2177
2175
|
let qe, j, nt;
|
|
2178
2176
|
const Xe = { env: { emscripten_notify_memory_growth: function(a) {
|
|
@@ -2208,14 +2206,26 @@ class v extends rt {
|
|
|
2208
2206
|
setWorkerLimit(A) {
|
|
2209
2207
|
return this.workerPool.setWorkerLimit(A), this;
|
|
2210
2208
|
}
|
|
2209
|
+
detectSupportAsync(A) {
|
|
2210
|
+
return PA(this, null, function* () {
|
|
2211
|
+
return this.workerConfig = {
|
|
2212
|
+
astcSupported: yield A.hasFeatureAsync("texture-compression-astc"),
|
|
2213
|
+
etc1Supported: yield A.hasFeatureAsync("texture-compression-etc1"),
|
|
2214
|
+
etc2Supported: yield A.hasFeatureAsync("texture-compression-etc2"),
|
|
2215
|
+
dxtSupported: yield A.hasFeatureAsync("texture-compression-bc"),
|
|
2216
|
+
bptcSupported: yield A.hasFeatureAsync("texture-compression-bptc"),
|
|
2217
|
+
pvrtcSupported: yield A.hasFeatureAsync("texture-compression-pvrtc")
|
|
2218
|
+
}, this;
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2211
2221
|
detectSupport(A) {
|
|
2212
2222
|
return A.isWebGPURenderer === !0 ? this.workerConfig = {
|
|
2213
2223
|
astcSupported: A.hasFeature("texture-compression-astc"),
|
|
2214
|
-
etc1Supported:
|
|
2224
|
+
etc1Supported: A.hasFeature("texture-compression-etc1"),
|
|
2215
2225
|
etc2Supported: A.hasFeature("texture-compression-etc2"),
|
|
2216
2226
|
dxtSupported: A.hasFeature("texture-compression-bc"),
|
|
2217
|
-
bptcSupported:
|
|
2218
|
-
pvrtcSupported:
|
|
2227
|
+
bptcSupported: A.hasFeature("texture-compression-bptc"),
|
|
2228
|
+
pvrtcSupported: A.hasFeature("texture-compression-pvrtc")
|
|
2219
2229
|
} : (this.workerConfig = {
|
|
2220
2230
|
astcSupported: A.extensions.has("WEBGL_compressed_texture_astc"),
|
|
2221
2231
|
etc1Supported: A.extensions.has("WEBGL_compressed_texture_etc1"),
|
|
@@ -2270,10 +2280,10 @@ class v extends rt {
|
|
|
2270
2280
|
return Promise.reject(B);
|
|
2271
2281
|
let I;
|
|
2272
2282
|
if (e.faceCount === 6)
|
|
2273
|
-
I = new si(s, n,
|
|
2283
|
+
I = new si(s, n, K);
|
|
2274
2284
|
else {
|
|
2275
2285
|
const r = s[0].mipmaps;
|
|
2276
|
-
I = e.layerCount > 1 ? new ii(r, t, i, e.layerCount, n,
|
|
2286
|
+
I = e.layerCount > 1 ? new ii(r, t, i, e.layerCount, n, K) : new Xt(r, t, i, n, K);
|
|
2277
2287
|
}
|
|
2278
2288
|
return I.minFilter = s[0].mipmaps.length === 1 ? He : gt, I.magFilter = He, I.generateMipmaps = !1, I.needsUpdate = !0, I.colorSpace = Is(e), I.premultiplyAlpha = !!(C & an), I;
|
|
2279
2289
|
}
|
|
@@ -2283,7 +2293,7 @@ class v extends rt {
|
|
|
2283
2293
|
* @return {Promise<CompressedTexture|CompressedArrayTexture|DataTexture|Data3DTexture>}
|
|
2284
2294
|
*/
|
|
2285
2295
|
_createTexture(s) {
|
|
2286
|
-
return
|
|
2296
|
+
return PA(this, arguments, function* (A, e = {}) {
|
|
2287
2297
|
const t = hn(new Uint8Array(A));
|
|
2288
2298
|
if (t.vkFormat !== cn)
|
|
2289
2299
|
return un(t);
|
|
@@ -2370,26 +2380,26 @@ v.BasisWorker = function() {
|
|
|
2370
2380
|
throw E(), new Error("THREE.KTX2Loader: Invalid texture");
|
|
2371
2381
|
if (!h.startTranscoding())
|
|
2372
2382
|
throw E(), new Error("THREE.KTX2Loader: .startTranscoding failed");
|
|
2373
|
-
const OA = [],
|
|
2383
|
+
const OA = [], Re = [];
|
|
2374
2384
|
for (let cA = 0; cA < m; cA++) {
|
|
2375
|
-
const
|
|
2385
|
+
const pe = [];
|
|
2376
2386
|
for (let eA = 0; eA < p; eA++) {
|
|
2377
|
-
const
|
|
2378
|
-
let S,
|
|
2387
|
+
const me = [];
|
|
2388
|
+
let S, H;
|
|
2379
2389
|
for (let V = 0; V < F; V++) {
|
|
2380
2390
|
const GA = h.getImageLevelInfo(eA, V, cA);
|
|
2381
|
-
cA === 0 && eA === 0 && V === 0 && (GA.origWidth % 4 !== 0 || GA.origHeight % 4 !== 0) && console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."), p > 1 ? (S = GA.origWidth,
|
|
2391
|
+
cA === 0 && eA === 0 && V === 0 && (GA.origWidth % 4 !== 0 || GA.origHeight % 4 !== 0) && console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."), p > 1 ? (S = GA.origWidth, H = GA.origHeight) : (S = GA.width, H = GA.height);
|
|
2382
2392
|
const Et = new Uint8Array(h.getImageTranscodedSizeInBytes(eA, V, 0, y));
|
|
2383
2393
|
if (!h.transcodeImage(Et, eA, V, cA, y, 0, -1, -1))
|
|
2384
2394
|
throw E(), new Error("THREE.KTX2Loader: .transcodeImage failed.");
|
|
2385
|
-
|
|
2395
|
+
me.push(Et);
|
|
2386
2396
|
}
|
|
2387
|
-
const _A = Q(
|
|
2388
|
-
|
|
2397
|
+
const _A = Q(me);
|
|
2398
|
+
pe.push({ data: _A, width: S, height: H }), Re.push(_A.buffer);
|
|
2389
2399
|
}
|
|
2390
|
-
OA.push({ mipmaps:
|
|
2400
|
+
OA.push({ mipmaps: pe, width: f, height: D, format: W });
|
|
2391
2401
|
}
|
|
2392
|
-
return E(), { faces: OA, buffers:
|
|
2402
|
+
return E(), { faces: OA, buffers: Re, width: f, height: D, hasAlpha: M, format: W, dfdFlags: _ };
|
|
2393
2403
|
}
|
|
2394
2404
|
const B = [
|
|
2395
2405
|
{
|
|
@@ -2481,44 +2491,44 @@ v.BasisWorker = function() {
|
|
|
2481
2491
|
return E;
|
|
2482
2492
|
}
|
|
2483
2493
|
};
|
|
2484
|
-
const dn = /* @__PURE__ */ new Set([RA,
|
|
2494
|
+
const dn = /* @__PURE__ */ new Set([RA, vA, WA]), je = {
|
|
2485
2495
|
[rs]: RA,
|
|
2486
2496
|
[ns]: RA,
|
|
2487
2497
|
[es]: RA,
|
|
2488
2498
|
[ts]: RA,
|
|
2489
|
-
[Bs]:
|
|
2490
|
-
[is]:
|
|
2491
|
-
[$t]:
|
|
2492
|
-
[As]:
|
|
2493
|
-
[os]:
|
|
2494
|
-
[ss]:
|
|
2495
|
-
[zt]:
|
|
2496
|
-
[Zt]:
|
|
2499
|
+
[Bs]: vA,
|
|
2500
|
+
[is]: vA,
|
|
2501
|
+
[$t]: vA,
|
|
2502
|
+
[As]: vA,
|
|
2503
|
+
[os]: WA,
|
|
2504
|
+
[ss]: WA,
|
|
2505
|
+
[zt]: WA,
|
|
2506
|
+
[Zt]: WA,
|
|
2497
2507
|
[as]: Gt,
|
|
2498
2508
|
[Cs]: Gt
|
|
2499
2509
|
}, Ze = {
|
|
2500
2510
|
[rs]: ye,
|
|
2501
2511
|
[ns]: Je,
|
|
2502
|
-
[es]:
|
|
2503
|
-
[ts]:
|
|
2512
|
+
[es]: K,
|
|
2513
|
+
[ts]: K,
|
|
2504
2514
|
[Bs]: ye,
|
|
2505
2515
|
[is]: Je,
|
|
2506
|
-
[$t]:
|
|
2507
|
-
[As]:
|
|
2516
|
+
[$t]: K,
|
|
2517
|
+
[As]: K,
|
|
2508
2518
|
[os]: ye,
|
|
2509
2519
|
[ss]: Je,
|
|
2510
|
-
[zt]:
|
|
2511
|
-
[Zt]:
|
|
2512
|
-
[as]:
|
|
2513
|
-
[Cs]:
|
|
2520
|
+
[zt]: K,
|
|
2521
|
+
[Zt]: K,
|
|
2522
|
+
[as]: K,
|
|
2523
|
+
[Cs]: K
|
|
2514
2524
|
};
|
|
2515
2525
|
function un(a) {
|
|
2516
|
-
return
|
|
2526
|
+
return PA(this, null, function* () {
|
|
2517
2527
|
const { vkFormat: A } = a;
|
|
2518
2528
|
if (je[A] === void 0)
|
|
2519
2529
|
throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");
|
|
2520
2530
|
let e;
|
|
2521
|
-
a.supercompressionScheme === yt && (Ve || (Ve = new Promise((i) =>
|
|
2531
|
+
a.supercompressionScheme === yt && (Ve || (Ve = new Promise((i) => PA(this, null, function* () {
|
|
2522
2532
|
const n = new ln();
|
|
2523
2533
|
yield n.init(), i(n);
|
|
2524
2534
|
}))), e = yield Ve);
|
|
@@ -2761,93 +2771,93 @@ const fn = () => {
|
|
|
2761
2771
|
}
|
|
2762
2772
|
}, Le;
|
|
2763
2773
|
};
|
|
2764
|
-
var LA,
|
|
2774
|
+
var LA, se, ie, ne;
|
|
2765
2775
|
class Dn {
|
|
2766
2776
|
constructor() {
|
|
2767
2777
|
u(this, LA, new pi());
|
|
2768
|
-
u(this,
|
|
2778
|
+
u(this, se, new on().setDecoderPath(
|
|
2769
2779
|
`${w.CDNVersion}/examples/jsm/libs/draco/gltf/`
|
|
2770
2780
|
));
|
|
2771
|
-
u(this,
|
|
2781
|
+
u(this, ie, new v().setTranscoderPath(
|
|
2772
2782
|
`${w.CDNVersion}/examples/jsm/libs/basis/`
|
|
2773
2783
|
));
|
|
2774
|
-
u(this,
|
|
2775
|
-
g(this, LA).setCrossOrigin("anonymous").setDRACOLoader(g(this,
|
|
2784
|
+
u(this, ne, !1);
|
|
2785
|
+
g(this, LA).setCrossOrigin("anonymous").setDRACOLoader(g(this, se)).setMeshoptDecoder(fn);
|
|
2776
2786
|
}
|
|
2777
2787
|
get gltfLoader() {
|
|
2778
2788
|
return g(this, LA);
|
|
2779
2789
|
}
|
|
2780
2790
|
get dracoLoader() {
|
|
2781
|
-
return g(this,
|
|
2791
|
+
return g(this, se);
|
|
2782
2792
|
}
|
|
2783
2793
|
get ktx2Loader() {
|
|
2784
|
-
return g(this,
|
|
2794
|
+
return g(this, ie);
|
|
2785
2795
|
}
|
|
2786
2796
|
load(...A) {
|
|
2787
|
-
g(this,
|
|
2797
|
+
g(this, ne) || (g(this, LA).setKTX2Loader(g(this, ie).detectSupport(w.webglRenderer)), G(this, ne, !0)), this.gltfLoader.load(...A);
|
|
2788
2798
|
}
|
|
2789
2799
|
}
|
|
2790
|
-
LA = new WeakMap(),
|
|
2800
|
+
LA = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), ne = new WeakMap();
|
|
2791
2801
|
const Fn = new Dn();
|
|
2792
|
-
var
|
|
2793
|
-
class
|
|
2794
|
-
constructor(A) {
|
|
2795
|
-
u(this,
|
|
2802
|
+
var k, z, oe;
|
|
2803
|
+
class Yn {
|
|
2804
|
+
constructor(A, e = 1) {
|
|
2805
|
+
u(this, k, null);
|
|
2796
2806
|
u(this, z, []);
|
|
2797
|
-
u(this,
|
|
2798
|
-
const A = g(this,
|
|
2799
|
-
g(this, z)[0].constant = g(this,
|
|
2807
|
+
u(this, oe, () => {
|
|
2808
|
+
const A = g(this, k).position.x, e = g(this, k).position.y;
|
|
2809
|
+
g(this, z)[0].constant = g(this, k).scale.y / 2 + e * -1, g(this, z)[1].constant = g(this, k).scale.y / 2 + e, g(this, z)[2].constant = g(this, k).scale.x / 2 + A, g(this, z)[3].constant = g(this, k).scale.x / 2 + A * -1;
|
|
2800
2810
|
});
|
|
2801
|
-
G(this,
|
|
2802
|
-
new we(new
|
|
2803
|
-
new we(new
|
|
2804
|
-
new we(new
|
|
2805
|
-
new we(new
|
|
2806
|
-
]),
|
|
2811
|
+
G(this, k, new bt(A, { cartesian: !1 })), G(this, z, [
|
|
2812
|
+
new we(new b(0, -1 * e, 0)),
|
|
2813
|
+
new we(new b(0, 1 * e, 0)),
|
|
2814
|
+
new we(new b(-1 * e, 0, 0)),
|
|
2815
|
+
new we(new b(1 * e, 0, 0))
|
|
2816
|
+
]), bA.subscribe(g(this, oe), { order: Bt.LAYOUT_BOX });
|
|
2807
2817
|
}
|
|
2808
2818
|
get planes() {
|
|
2809
2819
|
return g(this, z);
|
|
2810
2820
|
}
|
|
2811
2821
|
get layoutBox() {
|
|
2812
|
-
return g(this,
|
|
2822
|
+
return g(this, k);
|
|
2813
2823
|
}
|
|
2814
2824
|
destroy() {
|
|
2815
|
-
|
|
2825
|
+
bA.unsubscribe(g(this, oe)), g(this, k).destroy();
|
|
2816
2826
|
}
|
|
2817
2827
|
}
|
|
2818
|
-
|
|
2819
|
-
class
|
|
2828
|
+
k = new WeakMap(), z = new WeakMap(), oe = new WeakMap();
|
|
2829
|
+
class qn extends ZA {
|
|
2820
2830
|
constructor(A, e = 500) {
|
|
2821
2831
|
super(), this.add(new Se(A.planes[0], e, 16711680)), this.add(new Se(A.planes[1], e, 16711680)), this.add(new Se(A.planes[2], e, 16711680)), this.add(new Se(A.planes[3], e, 16711680));
|
|
2822
2832
|
}
|
|
2823
2833
|
}
|
|
2824
|
-
var yA, uA, JA,
|
|
2834
|
+
var yA, uA, JA, Be, re, BA, HA, Ce;
|
|
2825
2835
|
class gs extends Fi {
|
|
2826
2836
|
constructor(e) {
|
|
2827
2837
|
super(e);
|
|
2828
2838
|
u(this, yA, new pt(null));
|
|
2829
2839
|
u(this, uA, new pt(void 0));
|
|
2830
2840
|
u(this, JA, void 0);
|
|
2831
|
-
u(this, oe, void 0);
|
|
2832
2841
|
u(this, Be, void 0);
|
|
2842
|
+
u(this, re, void 0);
|
|
2833
2843
|
u(this, BA, void 0);
|
|
2834
2844
|
u(this, HA, !1);
|
|
2835
|
-
u(this,
|
|
2845
|
+
u(this, Ce, () => {
|
|
2836
2846
|
if (!(g(this, BA) && !g(this, HA)) && (this.current !== this.previous && (g(this, yA).current = null), this.current)) {
|
|
2837
|
-
const e = g(this,
|
|
2838
|
-
g(this, BA) ||
|
|
2847
|
+
const e = g(this, re) ? this.current.url : this.current.name + this.current.extension;
|
|
2848
|
+
g(this, BA) || Ke.setTotal(e, 1), g(this, uA).current = "start", g(this, Be).load(
|
|
2839
2849
|
e,
|
|
2840
2850
|
(s) => {
|
|
2841
|
-
g(this, yA).current = s, g(this, uA).current = "complete", g(this, BA) ||
|
|
2851
|
+
g(this, yA).current = s, g(this, uA).current = "complete", g(this, BA) || Ke.setLoaded(e, 1);
|
|
2842
2852
|
},
|
|
2843
2853
|
void 0,
|
|
2844
2854
|
() => {
|
|
2845
|
-
g(this, BA) || (g(this, uA).current = "error",
|
|
2855
|
+
g(this, BA) || (g(this, uA).current = "error", Ke.setError(e, e));
|
|
2846
2856
|
}
|
|
2847
2857
|
);
|
|
2848
2858
|
}
|
|
2849
2859
|
});
|
|
2850
|
-
G(this, JA, e.consumer), G(this,
|
|
2860
|
+
G(this, JA, e.consumer), G(this, Be, e.loader), G(this, re, e.keepSourceParameters || !1), G(this, BA, e.lazy || !1), this.subscribe(g(this, Ce)), g(this, JA).addEventListener("added", () => {
|
|
2851
2861
|
this.connect();
|
|
2852
2862
|
}), g(this, JA).addEventListener("removed", () => {
|
|
2853
2863
|
this.disconnect();
|
|
@@ -2869,12 +2879,12 @@ class gs extends Fi {
|
|
|
2869
2879
|
* Calling this method will start loading the resource.
|
|
2870
2880
|
*/
|
|
2871
2881
|
lazyLoad() {
|
|
2872
|
-
g(this, HA) || (G(this, HA, !0), g(this,
|
|
2882
|
+
g(this, HA) || (G(this, HA, !0), g(this, Ce).call(this));
|
|
2873
2883
|
}
|
|
2874
2884
|
}
|
|
2875
|
-
yA = new WeakMap(), uA = new WeakMap(), JA = new WeakMap(),
|
|
2885
|
+
yA = new WeakMap(), uA = new WeakMap(), JA = new WeakMap(), Be = new WeakMap(), re = new WeakMap(), BA = new WeakMap(), HA = new WeakMap(), Ce = new WeakMap();
|
|
2876
2886
|
var TA;
|
|
2877
|
-
class
|
|
2887
|
+
class Xn extends ZA {
|
|
2878
2888
|
constructor(e) {
|
|
2879
2889
|
super();
|
|
2880
2890
|
u(this, TA, void 0);
|
|
@@ -2898,7 +2908,7 @@ function Es(a, A, e) {
|
|
|
2898
2908
|
s / t > i ? (n = 1, o = t / s * i) : (o = 1, n = s / t / i), a.matrix.setUvTransform(B, C, n, o, I, r, c);
|
|
2899
2909
|
}
|
|
2900
2910
|
var rA, UA, fA;
|
|
2901
|
-
class cs extends
|
|
2911
|
+
class cs extends Ge {
|
|
2902
2912
|
constructor(e) {
|
|
2903
2913
|
super(
|
|
2904
2914
|
new di(
|
|
@@ -2939,9 +2949,9 @@ class cs extends Fe {
|
|
|
2939
2949
|
}
|
|
2940
2950
|
rA = new WeakMap(), UA = new WeakMap(), fA = new WeakMap();
|
|
2941
2951
|
const Gn = new _t();
|
|
2942
|
-
class
|
|
2952
|
+
class vn extends cs {
|
|
2943
2953
|
constructor(A) {
|
|
2944
|
-
super(
|
|
2954
|
+
super(Me(tA({}, A), {
|
|
2945
2955
|
loader: Gn
|
|
2946
2956
|
}));
|
|
2947
2957
|
}
|
|
@@ -2956,19 +2966,19 @@ class Rn {
|
|
|
2956
2966
|
};
|
|
2957
2967
|
}
|
|
2958
2968
|
}
|
|
2959
|
-
var
|
|
2960
|
-
class
|
|
2969
|
+
var ae, Ie, ge;
|
|
2970
|
+
class Wn extends cs {
|
|
2961
2971
|
constructor(e) {
|
|
2962
|
-
super(
|
|
2972
|
+
super(Me(tA({}, e), {
|
|
2963
2973
|
loader: new Rn()
|
|
2964
2974
|
}));
|
|
2965
|
-
u(this, Ce, void 0);
|
|
2966
2975
|
u(this, ae, void 0);
|
|
2967
2976
|
u(this, Ie, void 0);
|
|
2968
|
-
|
|
2977
|
+
u(this, ge, void 0);
|
|
2978
|
+
G(this, ae, e.autoplay || !1), G(this, Ie, e.muted || !1), G(this, ge, e.loop || !1), this.sourceManager.data.subscribe((s) => {
|
|
2969
2979
|
if (s.current) {
|
|
2970
2980
|
const t = s.current.image;
|
|
2971
|
-
g(this,
|
|
2981
|
+
g(this, Ie) && (t.muted = !0), g(this, ge) && (t.loop = !0), g(this, ae) && t.play();
|
|
2972
2982
|
}
|
|
2973
2983
|
});
|
|
2974
2984
|
}
|
|
@@ -2984,18 +2994,18 @@ class Ao extends cs {
|
|
|
2984
2994
|
);
|
|
2985
2995
|
}
|
|
2986
2996
|
}
|
|
2987
|
-
|
|
2988
|
-
function
|
|
2997
|
+
ae = new WeakMap(), Ie = new WeakMap(), ge = new WeakMap();
|
|
2998
|
+
function Vn(a, A) {
|
|
2989
2999
|
a.traverse((e) => {
|
|
2990
|
-
e instanceof
|
|
3000
|
+
e instanceof Ge && A(e);
|
|
2991
3001
|
});
|
|
2992
3002
|
}
|
|
2993
|
-
function
|
|
3003
|
+
function jn(a, A) {
|
|
2994
3004
|
a.traverse((e) => {
|
|
2995
|
-
e instanceof
|
|
3005
|
+
e instanceof Ge && e.material && (Array.isArray(e.material) ? e.material : [e.material]).forEach(A);
|
|
2996
3006
|
});
|
|
2997
3007
|
}
|
|
2998
|
-
const Ut = new
|
|
3008
|
+
const Ut = new b(), pn = new at(), Nt = new b();
|
|
2999
3009
|
class mn extends It {
|
|
3000
3010
|
constructor(A = document.createElement("div")) {
|
|
3001
3011
|
super(), this.isCSS3DObject = !0, this.element = A, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.element.style.userSelect = "none", this.element.setAttribute("draggable", !1), this.addEventListener("removed", function() {
|
|
@@ -3008,7 +3018,7 @@ class mn extends It {
|
|
|
3008
3018
|
return super.copy(A, e), this.element = A.element.cloneNode(!0), this;
|
|
3009
3019
|
}
|
|
3010
3020
|
}
|
|
3011
|
-
const P = new
|
|
3021
|
+
const P = new KA(), Mn = new KA();
|
|
3012
3022
|
class wn {
|
|
3013
3023
|
constructor(A = {}) {
|
|
3014
3024
|
const e = this;
|
|
@@ -3068,18 +3078,18 @@ class wn {
|
|
|
3068
3078
|
}
|
|
3069
3079
|
}
|
|
3070
3080
|
}
|
|
3071
|
-
var X, Ne, Qs,
|
|
3072
|
-
const
|
|
3081
|
+
var X, Ne, Qs, Ee, ce;
|
|
3082
|
+
const T = class T extends mn {
|
|
3073
3083
|
static destroy() {
|
|
3074
|
-
kA.unsubscribe(g(this,
|
|
3084
|
+
kA.unsubscribe(g(this, ce)), bA.unsubscribe(g(this, Ee)), G(this, X, null);
|
|
3075
3085
|
}
|
|
3076
3086
|
constructor(A) {
|
|
3077
3087
|
var e;
|
|
3078
|
-
super(A.element), g(
|
|
3088
|
+
super(A.element), g(T, X) || QA(e = T, Ne, Qs).call(e);
|
|
3079
3089
|
}
|
|
3080
3090
|
};
|
|
3081
3091
|
X = new WeakMap(), Ne = new WeakSet(), Qs = function() {
|
|
3082
|
-
G(
|
|
3092
|
+
G(T, X, new wn()), g(T, X).domElement.style.cssText = `
|
|
3083
3093
|
position: fixed;
|
|
3084
3094
|
left: 0;
|
|
3085
3095
|
top: 0;
|
|
@@ -3088,35 +3098,35 @@ X = new WeakMap(), Ne = new WeakSet(), Qs = function() {
|
|
|
3088
3098
|
z-index: 1;
|
|
3089
3099
|
pointer-events: none;
|
|
3090
3100
|
overflow: hidden;
|
|
3091
|
-
`, w.containerElement.prepend(g(
|
|
3092
|
-
},
|
|
3093
|
-
g(
|
|
3094
|
-
}), u(
|
|
3095
|
-
g(
|
|
3101
|
+
`, w.containerElement.prepend(g(T, X).domElement), kA.subscribe(g(this, ce), Kt.EN3 + 1), bA.subscribe(g(this, Ee), { order: Bt.EN3 + 1 });
|
|
3102
|
+
}, Ee = new WeakMap(), ce = new WeakMap(), u(T, Ne), u(T, X, null), u(T, Ee, () => {
|
|
3103
|
+
g(T, X).render(w.scene, w.camera);
|
|
3104
|
+
}), u(T, ce, () => {
|
|
3105
|
+
g(T, X).setSize(w.width, w.height);
|
|
3096
3106
|
});
|
|
3097
|
-
let xt =
|
|
3098
|
-
var NA,
|
|
3107
|
+
let xt = T;
|
|
3108
|
+
var NA, Qe, he, CA, le;
|
|
3099
3109
|
class Sn {
|
|
3100
3110
|
constructor(A) {
|
|
3101
3111
|
u(this, NA, void 0);
|
|
3102
|
-
u(this, ce, void 0);
|
|
3103
3112
|
u(this, Qe, void 0);
|
|
3104
|
-
u(this, CA, void 0);
|
|
3105
3113
|
u(this, he, void 0);
|
|
3114
|
+
u(this, CA, void 0);
|
|
3115
|
+
u(this, le, void 0);
|
|
3106
3116
|
Qt(this, "intersection");
|
|
3107
|
-
G(this, NA, A.targetName || void 0), G(this,
|
|
3117
|
+
G(this, NA, A.targetName || void 0), G(this, Qe, A.eventDispatcher || A.object3D), G(this, he, A.propagation || !1), G(this, CA, A.object3D), G(this, le, g(this, NA) ? () => g(this, CA).getObjectByName(g(this, NA)) || g(this, CA) : () => g(this, CA));
|
|
3108
3118
|
}
|
|
3109
3119
|
get object3D() {
|
|
3110
3120
|
return g(this, CA);
|
|
3111
3121
|
}
|
|
3112
3122
|
get eventDispatcher() {
|
|
3113
|
-
return g(this,
|
|
3123
|
+
return g(this, Qe);
|
|
3114
3124
|
}
|
|
3115
3125
|
get propagation() {
|
|
3116
|
-
return g(this,
|
|
3126
|
+
return g(this, he);
|
|
3117
3127
|
}
|
|
3118
3128
|
get target() {
|
|
3119
|
-
return g(this,
|
|
3129
|
+
return g(this, le).call(this);
|
|
3120
3130
|
}
|
|
3121
3131
|
dispatch(A, e) {
|
|
3122
3132
|
this.eventDispatcher.dispatchEvent(tA({
|
|
@@ -3125,49 +3135,49 @@ class Sn {
|
|
|
3125
3135
|
}, this.intersection));
|
|
3126
3136
|
}
|
|
3127
3137
|
}
|
|
3128
|
-
NA = new WeakMap(),
|
|
3129
|
-
var DA, aA,
|
|
3138
|
+
NA = new WeakMap(), Qe = new WeakMap(), he = new WeakMap(), CA = new WeakMap(), le = new WeakMap();
|
|
3139
|
+
var DA, aA, J, xA, de, ue, fe, De;
|
|
3130
3140
|
const lA = class lA {
|
|
3131
3141
|
constructor() {
|
|
3132
3142
|
u(this, aA, []);
|
|
3133
|
-
u(this,
|
|
3143
|
+
u(this, J, []);
|
|
3134
3144
|
u(this, xA, new Ct());
|
|
3135
|
-
u(this,
|
|
3136
|
-
u(this, de, (A) => {
|
|
3137
|
-
for (let e = 0; e < g(this, H).length; e++)
|
|
3138
|
-
g(this, H)[e].dispatch("en3-pointerdown", A);
|
|
3139
|
-
});
|
|
3145
|
+
u(this, de, new fi());
|
|
3140
3146
|
u(this, ue, (A) => {
|
|
3141
|
-
for (let e = 0; e < g(this,
|
|
3142
|
-
g(this,
|
|
3147
|
+
for (let e = 0; e < g(this, J).length; e++)
|
|
3148
|
+
g(this, J)[e].dispatch("en3-pointerdown", A);
|
|
3143
3149
|
});
|
|
3144
3150
|
u(this, fe, (A) => {
|
|
3145
|
-
|
|
3151
|
+
for (let e = 0; e < g(this, J).length; e++)
|
|
3152
|
+
g(this, J)[e].dispatch("en3-pointerup", A);
|
|
3153
|
+
});
|
|
3154
|
+
u(this, De, (A) => {
|
|
3155
|
+
g(this, xA).x = A.clientX / w.width * 2 - 1, g(this, xA).y = -(A.clientY / w.height) * 2 + 1, w.camera && g(this, de).setFromCamera(g(this, xA), w.camera);
|
|
3146
3156
|
const e = [];
|
|
3147
3157
|
for (const o of g(this, aA)) {
|
|
3148
|
-
const B = g(this,
|
|
3158
|
+
const B = g(this, de).intersectObject(o.target);
|
|
3149
3159
|
B.length && (o.intersection = B[0], e.push(o));
|
|
3150
3160
|
}
|
|
3151
3161
|
let s = !1;
|
|
3152
|
-
const t = g(this,
|
|
3162
|
+
const t = g(this, J).filter(
|
|
3153
3163
|
(o) => !e.find((B) => B.object3D.uuid === o.object3D.uuid)
|
|
3154
3164
|
), i = e.sort((o, B) => B.object3D.position.z - o.object3D.position.z).filter((o) => s ? !1 : (s = !o.propagation, !0)), n = i.filter(
|
|
3155
|
-
(o) => !g(this,
|
|
3165
|
+
(o) => !g(this, J).find((B) => B.object3D.uuid === o.object3D.uuid)
|
|
3156
3166
|
);
|
|
3157
3167
|
for (let o = 0; o < t.length; o++)
|
|
3158
3168
|
t[o].dispatch("en3-pointerleave", A);
|
|
3159
3169
|
for (let o = 0; o < n.length; o++)
|
|
3160
3170
|
n[o].dispatch("en3-pointerenter", A);
|
|
3161
|
-
G(this,
|
|
3162
|
-
for (let o = 0; o < g(this,
|
|
3163
|
-
g(this,
|
|
3171
|
+
G(this, J, i);
|
|
3172
|
+
for (let o = 0; o < g(this, J).length; o++)
|
|
3173
|
+
g(this, J)[o].dispatch("en3-pointermove", A);
|
|
3164
3174
|
});
|
|
3165
3175
|
if (g(lA, DA))
|
|
3166
3176
|
return g(lA, DA);
|
|
3167
|
-
G(lA, DA, this), w.containerElement.addEventListener("pointerdown", g(this,
|
|
3177
|
+
G(lA, DA, this), w.containerElement.addEventListener("pointerdown", g(this, ue)), w.containerElement.addEventListener("pointerup", g(this, fe)), w.containerElement.addEventListener("pointermove", g(this, De));
|
|
3168
3178
|
}
|
|
3169
3179
|
destroy() {
|
|
3170
|
-
w.containerElement.removeEventListener("pointerdown", g(this,
|
|
3180
|
+
w.containerElement.removeEventListener("pointerdown", g(this, ue)), w.containerElement.removeEventListener("pointerup", g(this, fe)), w.containerElement.removeEventListener("pointermove", g(this, De)), G(lA, DA, void 0);
|
|
3171
3181
|
}
|
|
3172
3182
|
add(A, e) {
|
|
3173
3183
|
if (g(this, aA).find((t) => t.object3D.uuid === A.uuid))
|
|
@@ -3178,15 +3188,15 @@ const lA = class lA {
|
|
|
3178
3188
|
g(this, aA).push(s);
|
|
3179
3189
|
}
|
|
3180
3190
|
remove(A) {
|
|
3181
|
-
G(this, aA, g(this, aA).filter((e) => e.object3D.uuid !== A.uuid)), G(this,
|
|
3191
|
+
G(this, aA, g(this, aA).filter((e) => e.object3D.uuid !== A.uuid)), G(this, J, g(this, J).filter((e) => e.object3D.uuid !== A.uuid));
|
|
3182
3192
|
}
|
|
3183
3193
|
};
|
|
3184
|
-
DA = new WeakMap(), aA = new WeakMap(),
|
|
3194
|
+
DA = new WeakMap(), aA = new WeakMap(), J = new WeakMap(), xA = new WeakMap(), de = new WeakMap(), ue = new WeakMap(), fe = new WeakMap(), De = new WeakMap(), u(lA, DA, void 0);
|
|
3185
3195
|
let kt = lA;
|
|
3186
|
-
var IA, gA,
|
|
3187
|
-
class
|
|
3196
|
+
var IA, gA, Fe, ot;
|
|
3197
|
+
class Zn {
|
|
3188
3198
|
constructor(A) {
|
|
3189
|
-
u(this,
|
|
3199
|
+
u(this, Fe);
|
|
3190
3200
|
u(this, IA, void 0);
|
|
3191
3201
|
u(this, gA, void 0);
|
|
3192
3202
|
G(this, IA, A.material), G(this, gA, A.uniforms || {}), g(this, IA).userData.uniforms = g(this, gA);
|
|
@@ -3205,7 +3215,7 @@ class so {
|
|
|
3205
3215
|
`), A.fragmentDeclarations && (t.fragmentShader = `
|
|
3206
3216
|
${A.fragmentDeclarations}
|
|
3207
3217
|
${t.fragmentShader}
|
|
3208
|
-
`), QA(this,
|
|
3218
|
+
`), QA(this, Fe, ot).call(this, t, "vertex", A), QA(this, Fe, ot).call(this, t, "fragment", A), e = (i = A.onReady) == null ? void 0 : i.call(A, this), A.log && (console.log("VERTEX SHADER: ", t.vertexShader), console.log("FRAGMENT SHADER: ", t.fragmentShader));
|
|
3209
3219
|
};
|
|
3210
3220
|
}
|
|
3211
3221
|
get material() {
|
|
@@ -3215,7 +3225,7 @@ class so {
|
|
|
3215
3225
|
return g(this, gA);
|
|
3216
3226
|
}
|
|
3217
3227
|
}
|
|
3218
|
-
IA = new WeakMap(), gA = new WeakMap(),
|
|
3228
|
+
IA = new WeakMap(), gA = new WeakMap(), Fe = new WeakSet(), ot = function(A, e, s) {
|
|
3219
3229
|
const t = e === "vertex" ? "vertexChunk" : "fragmentChunk", i = e === "vertex" ? "vertexShader" : "fragmentShader";
|
|
3220
3230
|
s[t] && (s[t].replace ? A[i] = A[i].replace(
|
|
3221
3231
|
`#include <${s[t].replace}>`,
|
|
@@ -3229,21 +3239,21 @@ IA = new WeakMap(), gA = new WeakMap(), De = new WeakSet(), ot = function(A, e,
|
|
|
3229
3239
|
)));
|
|
3230
3240
|
};
|
|
3231
3241
|
export {
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3242
|
+
Yn as En3Clip,
|
|
3243
|
+
qn as En3ClipHelpers,
|
|
3244
|
+
Xn as En3GLTF,
|
|
3235
3245
|
xt as En3HTML,
|
|
3236
|
-
|
|
3246
|
+
vn as En3Image,
|
|
3237
3247
|
cs as En3ImageLike,
|
|
3238
|
-
|
|
3248
|
+
Zn as En3ModifiedMaterial,
|
|
3239
3249
|
kt as En3Raycaster,
|
|
3240
3250
|
gs as En3SourceManager,
|
|
3241
|
-
|
|
3251
|
+
Wn as En3Video,
|
|
3242
3252
|
Es as coverTexture,
|
|
3243
3253
|
vt as dispose,
|
|
3244
3254
|
w as en3,
|
|
3245
3255
|
Fn as en3GLTFLoader,
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3256
|
+
Pn as en3LazyLoader,
|
|
3257
|
+
jn as traverseMaterials,
|
|
3258
|
+
Vn as traverseMeshes
|
|
3249
3259
|
};
|