gl-draw 0.15.0-beta.3 → 0.15.0-beta.5
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/dist/core/MList/MList.d.ts +0 -1
- package/dist/index.js +3 -3
- package/dist/index.module.js +136 -127
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -26,23 +26,23 @@ var se = (h, e, t) => new Promise((s, i) => {
|
|
|
26
26
|
}, n = (l) => l.done ? s(l.value) : Promise.resolve(l.value).then(r, o);
|
|
27
27
|
n((t = t.apply(h, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import { WebGLRenderer as Ut, Vector2 as B, Vector3 as I, PerspectiveCamera as zt, Matrix4 as W, Scene as nt, AxesHelper as De, CameraHelper as kt, PointLightHelper as Ft, DirectionalLightHelper as Nt, SpotLightHelper as Ht, HemisphereLightHelper as It, Box3 as at, Box3Helper as Ue, MathUtils as jt, Vector4 as Bt, Quaternion as lt, Spherical as Vt, Sphere as Yt, Raycaster as ht, REVISION as Zt, Object3D as Wt, UniformsUtils as Gt, RawShaderMaterial as Kt, ShaderMaterial as Xt, MeshBasicMaterial as $t, PointsMaterial as ct, SpriteMaterial as dt, Layers as qt, WebGLRenderTarget as Qt, HalfFloatType as Jt, Loader as pt, Texture as fe, VideoTexture as mt, FileLoader as Se, LoadingManager as es, DataTexture as ts, Mesh as ss
|
|
30
|
-
import { Timer as
|
|
29
|
+
import { WebGLRenderer as Ut, Vector2 as B, Vector3 as I, PerspectiveCamera as zt, Matrix4 as W, Scene as nt, AxesHelper as De, CameraHelper as kt, PointLightHelper as Ft, DirectionalLightHelper as Nt, SpotLightHelper as Ht, HemisphereLightHelper as It, Box3 as at, Box3Helper as Ue, MathUtils as jt, Vector4 as Bt, Quaternion as lt, Spherical as Vt, Sphere as Yt, Raycaster as ht, REVISION as Zt, Object3D as Wt, UniformsUtils as Gt, RawShaderMaterial as Kt, ShaderMaterial as Xt, MeshBasicMaterial as $t, PointsMaterial as ct, SpriteMaterial as dt, Layers as qt, WebGLRenderTarget as Qt, HalfFloatType as Jt, Loader as pt, Texture as fe, VideoTexture as mt, FileLoader as Se, LoadingManager as es, DataTexture as ts, Mesh as ss } from "three";
|
|
30
|
+
import { Timer as is } from "three/examples/jsm/misc/Timer";
|
|
31
31
|
import * as Ce from "@tweenjs/tween.js";
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import { C as
|
|
35
|
-
import { R as Pe, M as ut, B as
|
|
36
|
-
import { RectAreaLightHelper as
|
|
37
|
-
import { ViewHelper as
|
|
38
|
-
import { TransformControls as
|
|
32
|
+
import rs from "deepmerge";
|
|
33
|
+
import os from "stats-gl";
|
|
34
|
+
import { C as ns, c as as, i as ls } from "./isPlainObject.module.js";
|
|
35
|
+
import { R as Pe, M as ut, B as hs, G as ze } from "./index.module2.js";
|
|
36
|
+
import { RectAreaLightHelper as cs } from "three/examples/jsm/helpers/RectAreaLightHelper";
|
|
37
|
+
import { ViewHelper as ds } from "three/examples/jsm/helpers/ViewHelper";
|
|
38
|
+
import { TransformControls as ps } from "three/examples/jsm/controls/TransformControls";
|
|
39
39
|
import { EffectComposer as ke } from "three/examples/jsm/postprocessing/EffectComposer";
|
|
40
|
-
import { RenderPass as
|
|
41
|
-
import { SSAOPass as
|
|
40
|
+
import { RenderPass as ms } from "three/examples/jsm/postprocessing/RenderPass";
|
|
41
|
+
import { SSAOPass as us } from "three/examples/jsm/postprocessing/SSAOPass";
|
|
42
42
|
import { FullScreenQuad as Fe } from "three/examples/jsm/postprocessing/Pass";
|
|
43
|
-
import { OutputPass as
|
|
44
|
-
import { ShaderPass as
|
|
45
|
-
import { UnrealBloomPass as
|
|
43
|
+
import { OutputPass as fs } from "three/examples/jsm/postprocessing/OutputPass";
|
|
44
|
+
import { ShaderPass as _s } from "three/examples/jsm/postprocessing/ShaderPass";
|
|
45
|
+
import { UnrealBloomPass as gs } from "three/examples/jsm/postprocessing/UnrealBloomPass";
|
|
46
46
|
import "three/examples/jsm/renderers/CSS2DRenderer";
|
|
47
47
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
48
48
|
import "d3-geo";
|
|
@@ -54,10 +54,10 @@ import "three/examples/jsm/lines/LineSegmentsGeometry";
|
|
|
54
54
|
import "three/examples/jsm/lines/LineMaterial";
|
|
55
55
|
import "three-bvh-csg";
|
|
56
56
|
import { GLTFLoader as Ne } from "three/examples/jsm/loaders/GLTFLoader";
|
|
57
|
-
import { DRACOLoader as
|
|
58
|
-
import { EXRLoader as
|
|
59
|
-
import { LottieLoader as
|
|
60
|
-
import { makePromiseCreator as
|
|
57
|
+
import { DRACOLoader as vs } from "three/examples/jsm/loaders/DRACOLoader";
|
|
58
|
+
import { EXRLoader as ys } from "three/examples/jsm/loaders/EXRLoader";
|
|
59
|
+
import { LottieLoader as Cs } from "three/examples/jsm/loaders/LottieLoader";
|
|
60
|
+
import { makePromiseCreator as Es, generateUUID as He } from "esus-lite";
|
|
61
61
|
const M = {
|
|
62
62
|
LEFT: 1,
|
|
63
63
|
RIGHT: 2,
|
|
@@ -148,7 +148,7 @@ function Ee(h, e) {
|
|
|
148
148
|
function Oe(h, e) {
|
|
149
149
|
return j(h) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
|
150
150
|
}
|
|
151
|
-
class
|
|
151
|
+
class Os {
|
|
152
152
|
constructor() {
|
|
153
153
|
this._listeners = {};
|
|
154
154
|
}
|
|
@@ -212,9 +212,9 @@ class Ts {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
const ce = 1 / 8,
|
|
215
|
+
const ce = 1 / 8, Ts = /Mac/.test(navigator.platform);
|
|
216
216
|
let T, Ve, de, Te, D, w, L, X, ne, F, N, Z, Ye, Ze, z, ae, $, We, be, Ge, we, xe, pe;
|
|
217
|
-
class J extends
|
|
217
|
+
class J extends Os {
|
|
218
218
|
static install(e) {
|
|
219
219
|
T = e.THREE, Ve = Object.freeze(new T.Vector3(0, 0, 0)), de = Object.freeze(new T.Vector3(0, 1, 0)), Te = Object.freeze(new T.Vector3(0, 0, 1)), D = new T.Vector2(), w = new T.Vector3(), L = new T.Vector3(), X = new T.Vector3(), ne = new T.Vector3(), F = new T.Vector3(), N = new T.Vector3(), Z = new T.Vector3(), Ye = new T.Vector3(), Ze = new T.Vector3(), z = new T.Spherical(), ae = new T.Spherical(), $ = new T.Box3(), We = new T.Box3(), be = new T.Sphere(), Ge = new T.Quaternion(), we = new T.Quaternion(), xe = new T.Matrix4(), pe = new T.Raycaster();
|
|
220
220
|
}
|
|
@@ -392,7 +392,7 @@ class J extends Ts {
|
|
|
392
392
|
const O = performance.now();
|
|
393
393
|
d - O < 1e3 && this._getClientRect(this._elementRect), d = O;
|
|
394
394
|
}
|
|
395
|
-
const g =
|
|
395
|
+
const g = Ts ? -1 : -3, C = a.deltaMode === 1 || a.ctrlKey ? a.deltaY / g : a.deltaY / (g * 10), y = this.dollyToCursor ? (a.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, b = this.dollyToCursor ? (a.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
396
396
|
switch (this.mouseButtons.wheel) {
|
|
397
397
|
case c.ROTATE: {
|
|
398
398
|
this._rotateInternal(a.deltaX, a.deltaY), this._isUserControllingRotate = !0;
|
|
@@ -1716,7 +1716,7 @@ Q && typeof Q.ownKeys == "function" ? ue = Q.ownKeys : Object.getOwnPropertySymb
|
|
|
1716
1716
|
} : ue = function(e) {
|
|
1717
1717
|
return Object.getOwnPropertyNames(e);
|
|
1718
1718
|
};
|
|
1719
|
-
function
|
|
1719
|
+
function bs(h) {
|
|
1720
1720
|
console && console.warn && console.warn(h);
|
|
1721
1721
|
}
|
|
1722
1722
|
var _t = Number.isNaN || function(e) {
|
|
@@ -1726,7 +1726,7 @@ function S() {
|
|
|
1726
1726
|
S.init.call(this);
|
|
1727
1727
|
}
|
|
1728
1728
|
Ae.exports = S;
|
|
1729
|
-
Ae.exports.once =
|
|
1729
|
+
Ae.exports.once = Ps;
|
|
1730
1730
|
S.EventEmitter = S;
|
|
1731
1731
|
S.prototype._events = void 0;
|
|
1732
1732
|
S.prototype._eventsCount = 0;
|
|
@@ -1796,7 +1796,7 @@ function vt(h, e, t, s) {
|
|
|
1796
1796
|
else if (typeof o == "function" ? o = r[e] = s ? [t, o] : [o, t] : s ? o.unshift(t) : o.push(t), i = gt(h), i > 0 && o.length > i && !o.warned) {
|
|
1797
1797
|
o.warned = !0;
|
|
1798
1798
|
var n = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
1799
|
-
n.name = "MaxListenersExceededWarning", n.emitter = h, n.type = e, n.count = o.length,
|
|
1799
|
+
n.name = "MaxListenersExceededWarning", n.emitter = h, n.type = e, n.count = o.length, bs(n);
|
|
1800
1800
|
}
|
|
1801
1801
|
return h;
|
|
1802
1802
|
}
|
|
@@ -1807,12 +1807,12 @@ S.prototype.on = S.prototype.addListener;
|
|
|
1807
1807
|
S.prototype.prependListener = function(e, t) {
|
|
1808
1808
|
return vt(this, e, t, !0);
|
|
1809
1809
|
};
|
|
1810
|
-
function
|
|
1810
|
+
function ws() {
|
|
1811
1811
|
if (!this.fired)
|
|
1812
1812
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
1813
1813
|
}
|
|
1814
1814
|
function yt(h, e, t) {
|
|
1815
|
-
var s = { fired: !1, wrapFn: void 0, target: h, type: e, listener: t }, i =
|
|
1815
|
+
var s = { fired: !1, wrapFn: void 0, target: h, type: e, listener: t }, i = ws.bind(s);
|
|
1816
1816
|
return i.listener = t, s.wrapFn = i, i;
|
|
1817
1817
|
}
|
|
1818
1818
|
S.prototype.once = function(e, t) {
|
|
@@ -1837,7 +1837,7 @@ S.prototype.removeListener = function(e, t) {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
if (r < 0)
|
|
1839
1839
|
return this;
|
|
1840
|
-
r === 0 ? s.shift() :
|
|
1840
|
+
r === 0 ? s.shift() : xs(s, r), s.length === 1 && (i[e] = s[0]), i.removeListener !== void 0 && this.emit("removeListener", e, n || t);
|
|
1841
1841
|
}
|
|
1842
1842
|
return this;
|
|
1843
1843
|
};
|
|
@@ -1866,7 +1866,7 @@ function Ct(h, e, t) {
|
|
|
1866
1866
|
if (s === void 0)
|
|
1867
1867
|
return [];
|
|
1868
1868
|
var i = s[e];
|
|
1869
|
-
return i === void 0 ? [] : typeof i == "function" ? t ? [i.listener || i] : [i] : t ?
|
|
1869
|
+
return i === void 0 ? [] : typeof i == "function" ? t ? [i.listener || i] : [i] : t ? Ls(i) : Ot(i, i.length);
|
|
1870
1870
|
}
|
|
1871
1871
|
S.prototype.listeners = function(e) {
|
|
1872
1872
|
return Ct(this, e, !0);
|
|
@@ -1897,17 +1897,17 @@ function Ot(h, e) {
|
|
|
1897
1897
|
t[s] = h[s];
|
|
1898
1898
|
return t;
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1900
|
+
function xs(h, e) {
|
|
1901
1901
|
for (; e + 1 < h.length; e++)
|
|
1902
1902
|
h[e] = h[e + 1];
|
|
1903
1903
|
h.pop();
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function Ls(h) {
|
|
1906
1906
|
for (var e = new Array(h.length), t = 0; t < e.length; ++t)
|
|
1907
1907
|
e[t] = h[t].listener || h[t];
|
|
1908
1908
|
return e;
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function Ps(h, e) {
|
|
1911
1911
|
return new Promise(function(t, s) {
|
|
1912
1912
|
function i(o) {
|
|
1913
1913
|
h.removeListener(e, r), s(o);
|
|
@@ -1915,10 +1915,10 @@ function Ss(h, e) {
|
|
|
1915
1915
|
function r() {
|
|
1916
1916
|
typeof h.removeListener == "function" && h.removeListener("error", i), t([].slice.call(arguments));
|
|
1917
1917
|
}
|
|
1918
|
-
Tt(h, e, r, { once: !0 }), e !== "error" &&
|
|
1918
|
+
Tt(h, e, r, { once: !0 }), e !== "error" && Ss(h, i, { once: !0 });
|
|
1919
1919
|
});
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1921
|
+
function Ss(h, e, t) {
|
|
1922
1922
|
typeof h.on == "function" && Tt(h, "error", e, t);
|
|
1923
1923
|
}
|
|
1924
1924
|
function Tt(h, e, t, s) {
|
|
@@ -1932,19 +1932,19 @@ function Tt(h, e, t, s) {
|
|
|
1932
1932
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof h);
|
|
1933
1933
|
}
|
|
1934
1934
|
var ve = Ae.exports;
|
|
1935
|
-
const
|
|
1935
|
+
const As = {
|
|
1936
1936
|
antialias: !1,
|
|
1937
1937
|
devicePixelRatio: window.devicePixelRatio,
|
|
1938
1938
|
powerPreference: "high-performance",
|
|
1939
1939
|
toneMappingExposure: 1,
|
|
1940
1940
|
alpha: !1,
|
|
1941
|
-
outputColorSpace:
|
|
1941
|
+
outputColorSpace: ns.sRGB,
|
|
1942
1942
|
logarithmicDepthBuffer: !1,
|
|
1943
1943
|
preserveDrawingBuffer: !1,
|
|
1944
1944
|
stencil: !1,
|
|
1945
1945
|
depth: !1
|
|
1946
1946
|
};
|
|
1947
|
-
class
|
|
1947
|
+
class Ms {
|
|
1948
1948
|
constructor(e) {
|
|
1949
1949
|
this.options = e;
|
|
1950
1950
|
const { width: t, height: s, rendererParams: i } = e, {
|
|
@@ -1997,11 +1997,11 @@ class Rs {
|
|
|
1997
1997
|
this.setSize(1, 1), (e = this.renderer) == null || e.clear(), (t = this.renderer) == null || t.dispose();
|
|
1998
1998
|
}
|
|
1999
1999
|
}
|
|
2000
|
-
const
|
|
2000
|
+
const Rs = {
|
|
2001
2001
|
antialias: !0,
|
|
2002
2002
|
devicePixelRatio: window.devicePixelRatio
|
|
2003
2003
|
};
|
|
2004
|
-
class
|
|
2004
|
+
class Ds {
|
|
2005
2005
|
constructor(e) {
|
|
2006
2006
|
this.options = e;
|
|
2007
2007
|
const { width: t, height: s, rendererParams: i, renderer: r } = e, { devicePixelRatio: o, antialias: n } = i, l = new r({
|
|
@@ -2020,7 +2020,7 @@ class Us {
|
|
|
2020
2020
|
this.setSize(1, 1), (e = this.renderer) == null || e.clear(), (t = this.renderer) == null || t.dispose();
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
2023
|
-
let
|
|
2023
|
+
let Us = class {
|
|
2024
2024
|
constructor() {
|
|
2025
2025
|
this.mask = 1;
|
|
2026
2026
|
}
|
|
@@ -2051,7 +2051,7 @@ class ee {
|
|
|
2051
2051
|
this.event = new ve.EventEmitter(), this.controllerMap = /* @__PURE__ */ new Map(), this.activeIndex = -1, this.activeControllerSet = /* @__PURE__ */ new Set();
|
|
2052
2052
|
}
|
|
2053
2053
|
addController(e, t) {
|
|
2054
|
-
const s = new
|
|
2054
|
+
const s = new Us();
|
|
2055
2055
|
return s.disableAll(), t !== void 0 && s.set(t), this.controllerMap.set(e, s), t === this.activeIndex && this.activeControllerSet.add(e), e;
|
|
2056
2056
|
}
|
|
2057
2057
|
removePage(e, t) {
|
|
@@ -2085,7 +2085,7 @@ const bt = {
|
|
|
2085
2085
|
far: 1e3,
|
|
2086
2086
|
up: new I(0, 1, 0)
|
|
2087
2087
|
};
|
|
2088
|
-
class
|
|
2088
|
+
class zs extends ee {
|
|
2089
2089
|
constructor(e) {
|
|
2090
2090
|
super(), this.width = 0, this.height = 0, this.width = e.width, this.height = e.height;
|
|
2091
2091
|
}
|
|
@@ -2165,10 +2165,10 @@ class ks extends ee {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
}
|
|
2167
2167
|
}
|
|
2168
|
-
const
|
|
2168
|
+
const ks = {
|
|
2169
2169
|
background: null
|
|
2170
2170
|
};
|
|
2171
|
-
class
|
|
2171
|
+
class Fs extends ee {
|
|
2172
2172
|
get scene() {
|
|
2173
2173
|
return this.controller;
|
|
2174
2174
|
}
|
|
@@ -2191,7 +2191,7 @@ class Ns extends ee {
|
|
|
2191
2191
|
});
|
|
2192
2192
|
}
|
|
2193
2193
|
}
|
|
2194
|
-
class
|
|
2194
|
+
class Ns {
|
|
2195
2195
|
constructor(e) {
|
|
2196
2196
|
this.helpers = {}, this.options = e;
|
|
2197
2197
|
}
|
|
@@ -2212,7 +2212,7 @@ class Hs {
|
|
|
2212
2212
|
else if (e.isHemisphereLight)
|
|
2213
2213
|
i = new It(e, 10);
|
|
2214
2214
|
else if (e.isRectAreaLight)
|
|
2215
|
-
i = new
|
|
2215
|
+
i = new cs(e);
|
|
2216
2216
|
else {
|
|
2217
2217
|
const r = new at();
|
|
2218
2218
|
if (r.setFromObject(e, !0), r.isEmpty() === !1) {
|
|
@@ -2226,7 +2226,7 @@ class Hs {
|
|
|
2226
2226
|
}
|
|
2227
2227
|
}
|
|
2228
2228
|
addViewHelper() {
|
|
2229
|
-
const { cameraController: e, container: t } = this.options, s = new
|
|
2229
|
+
const { cameraController: e, container: t } = this.options, s = new ds(e.camera, t);
|
|
2230
2230
|
t.addEventListener("pointerdown", (i) => {
|
|
2231
2231
|
i.preventDefault(), s.handleClick(i);
|
|
2232
2232
|
}), this.viewHelper = s;
|
|
@@ -2276,7 +2276,7 @@ class Hs {
|
|
|
2276
2276
|
this.helpers = {}, (e = this.viewHelper) == null || e.dispose();
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
|
-
class
|
|
2279
|
+
class Hs extends ee {
|
|
2280
2280
|
constructor(e) {
|
|
2281
2281
|
super(), this.autoRotateSpeed = 0, this.options = e;
|
|
2282
2282
|
const t = {
|
|
@@ -2323,10 +2323,10 @@ class Is extends ee {
|
|
|
2323
2323
|
super.update(e, t), this.autoRotateSpeed && this.cameraControls && (this.cameraControls.azimuthAngle += this.autoRotateSpeed * e * jt.DEG2RAD);
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
2326
|
-
class
|
|
2326
|
+
class Is {
|
|
2327
2327
|
constructor(e) {
|
|
2328
2328
|
this.event = new ve.EventEmitter();
|
|
2329
|
-
const { renderer: t, scene: s, camera: i } = e, r = new
|
|
2329
|
+
const { renderer: t, scene: s, camera: i } = e, r = new ps(
|
|
2330
2330
|
i,
|
|
2331
2331
|
t.domElement
|
|
2332
2332
|
);
|
|
@@ -2392,8 +2392,8 @@ class js {
|
|
|
2392
2392
|
this.event.removeAllListeners(), (e = this.controls) == null || e.dispose();
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
|
-
const $e = new I(),
|
|
2396
|
-
class
|
|
2395
|
+
const $e = new I(), js = new lt(), qe = new I(), H = new W(), Bs = new W();
|
|
2396
|
+
class Vs {
|
|
2397
2397
|
/**
|
|
2398
2398
|
* Constructs a new CSS3D renderer.
|
|
2399
2399
|
*
|
|
@@ -2451,7 +2451,7 @@ class Ys {
|
|
|
2451
2451
|
if (b.style.display = y === !0 ? "" : "none", y === !0) {
|
|
2452
2452
|
f.onBeforeRender(t, a, g);
|
|
2453
2453
|
let O;
|
|
2454
|
-
f.isCSS3DSprite ? (H.copy(g.matrixWorldInverse), H.transpose(), f.rotation2D !== 0 && H.multiply(
|
|
2454
|
+
f.isCSS3DSprite ? (H.copy(g.matrixWorldInverse), H.transpose(), f.rotation2D !== 0 && H.multiply(Bs.makeRotationZ(f.rotation2D)), f.matrixWorld.decompose($e, js, qe), H.setPosition($e), H.scale(qe), H.elements[3] = 0, H.elements[7] = 0, H.elements[11] = 0, H.elements[15] = 1, O = v(H)) : O = v(f.matrixWorld);
|
|
2455
2455
|
const x = n.objects.get(f);
|
|
2456
2456
|
if (x === void 0 || x.style !== O) {
|
|
2457
2457
|
b.style.transform = O;
|
|
@@ -2467,7 +2467,7 @@ class Ys {
|
|
|
2467
2467
|
}
|
|
2468
2468
|
}
|
|
2469
2469
|
const q = new I(), Qe = new W(), Je = new W(), et = new I(), tt = new I();
|
|
2470
|
-
class
|
|
2470
|
+
class Ys {
|
|
2471
2471
|
/**
|
|
2472
2472
|
* Constructs a new CSS2D renderer.
|
|
2473
2473
|
*
|
|
@@ -2535,12 +2535,12 @@ class Zs {
|
|
|
2535
2535
|
const st = {
|
|
2536
2536
|
zIndex: "auto"
|
|
2537
2537
|
};
|
|
2538
|
-
class
|
|
2538
|
+
class Zs {
|
|
2539
2539
|
constructor(e) {
|
|
2540
2540
|
this.container = e;
|
|
2541
2541
|
}
|
|
2542
2542
|
addRenderer(e, t) {
|
|
2543
|
-
const s = t.container || this.container, i = s.offsetWidth, r = s.offsetHeight, o = e === "css2d" ? new
|
|
2543
|
+
const s = t.container || this.container, i = s.offsetWidth, r = s.offsetHeight, o = e === "css2d" ? new Ys() : new Vs();
|
|
2544
2544
|
o.domElement.style.position = "absolute", o.domElement.style.top = "0", o.domElement.style.pointerEvents = "none", o.domElement.style.zIndex = t.zIndex, o.setSize(i, r), s.appendChild(o.domElement), e === "css2d" ? this.css2Drenderer = o : e === "css3d" && (this.css3Drenderer = o);
|
|
2545
2545
|
}
|
|
2546
2546
|
setSize(e, t) {
|
|
@@ -2556,7 +2556,7 @@ class Ws {
|
|
|
2556
2556
|
(e = this.css2Drenderer) == null || e.domElement.remove(), (t = this.css3Drenderer) == null || t.domElement.remove(), this.css2Drenderer = void 0, this.css3Drenderer = void 0;
|
|
2557
2557
|
}
|
|
2558
2558
|
}
|
|
2559
|
-
const
|
|
2559
|
+
const Ws = {
|
|
2560
2560
|
name: "OutputShader",
|
|
2561
2561
|
uniforms: {
|
|
2562
2562
|
tDiffuse: { value: null },
|
|
@@ -2650,10 +2650,10 @@ const Gs = {
|
|
|
2650
2650
|
}`
|
|
2651
2651
|
)
|
|
2652
2652
|
};
|
|
2653
|
-
class
|
|
2653
|
+
class Gs extends fs {
|
|
2654
2654
|
constructor() {
|
|
2655
2655
|
super();
|
|
2656
|
-
const e =
|
|
2656
|
+
const e = Ws;
|
|
2657
2657
|
this.uniforms = Gt.clone(e.uniforms), this.material = new Kt({
|
|
2658
2658
|
name: e.name,
|
|
2659
2659
|
uniforms: this.uniforms,
|
|
@@ -2662,8 +2662,8 @@ class Ks extends _s {
|
|
|
2662
2662
|
}), this.fsQuad ? this.fsQuad = new Fe(this.material) : this._fsQuad && (this._fsQuad = new Fe(this.material));
|
|
2663
2663
|
}
|
|
2664
2664
|
}
|
|
2665
|
-
const
|
|
2666
|
-
const e = new
|
|
2665
|
+
const Ks = (h) => {
|
|
2666
|
+
const e = new _s(
|
|
2667
2667
|
new Xt({
|
|
2668
2668
|
uniforms: {
|
|
2669
2669
|
baseTexture: { value: null },
|
|
@@ -2698,36 +2698,36 @@ const Xs = (h) => {
|
|
|
2698
2698
|
"baseTexture"
|
|
2699
2699
|
);
|
|
2700
2700
|
return e.needsSwap = !0, e;
|
|
2701
|
-
}, Le = 1, me = !1,
|
|
2701
|
+
}, Le = 1, me = !1, Xs = new $t({ color: "black" }), $s = new ct({
|
|
2702
2702
|
color: "black",
|
|
2703
2703
|
sizeAttenuation: !1
|
|
2704
|
-
}),
|
|
2704
|
+
}), qs = new ct({
|
|
2705
2705
|
color: "black",
|
|
2706
2706
|
sizeAttenuation: !0
|
|
2707
|
-
}),
|
|
2707
|
+
}), Qs = new dt({
|
|
2708
2708
|
color: "black",
|
|
2709
2709
|
sizeAttenuation: !0
|
|
2710
|
-
}),
|
|
2710
|
+
}), Js = new dt({
|
|
2711
2711
|
color: "black",
|
|
2712
2712
|
sizeAttenuation: !1
|
|
2713
|
-
}),
|
|
2713
|
+
}), ei = new ut({
|
|
2714
2714
|
color: "black",
|
|
2715
2715
|
sizeAttenuation: 0,
|
|
2716
2716
|
lineWidth: 0
|
|
2717
|
-
}),
|
|
2717
|
+
}), ti = {
|
|
2718
2718
|
kernelRadius: 8,
|
|
2719
2719
|
minDistance: 5e-3,
|
|
2720
2720
|
maxDistance: 0.1
|
|
2721
|
-
},
|
|
2721
|
+
}, si = {
|
|
2722
2722
|
threshold: 0,
|
|
2723
2723
|
strength: 0.4,
|
|
2724
2724
|
radius: 0.1,
|
|
2725
2725
|
bloomAlphaType: 0
|
|
2726
|
-
},
|
|
2726
|
+
}, ii = {
|
|
2727
2727
|
multisampling: 4,
|
|
2728
2728
|
premultiplieAlpha: !1
|
|
2729
2729
|
};
|
|
2730
|
-
class
|
|
2730
|
+
class ri {
|
|
2731
2731
|
constructor(e) {
|
|
2732
2732
|
this.bloomComposerActive = !1, this.active = !0, this.bloomSelection = /* @__PURE__ */ new Set(), this.bloomLayer = new qt(), this.bloomMaterials = {}, this.bloomVisible = {}, this.bloomComposerRenderIng = !1, this.pipViewportState = null, this.options = e;
|
|
2733
2733
|
const {
|
|
@@ -2746,7 +2746,7 @@ class oi {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
), p = new ke(o, _), E = this.getSize();
|
|
2748
2748
|
p.setSize(E.width, E.height);
|
|
2749
|
-
const v = new
|
|
2749
|
+
const v = new ms(
|
|
2750
2750
|
s.scene,
|
|
2751
2751
|
i.camera
|
|
2752
2752
|
);
|
|
@@ -2763,18 +2763,18 @@ class oi {
|
|
|
2763
2763
|
this.renderPass.scene = e, this.ssaoPass && (this.ssaoPass.scene = e), this.scene = e;
|
|
2764
2764
|
}
|
|
2765
2765
|
addOutputPass() {
|
|
2766
|
-
const { premultiplieAlpha: e } = this.options.composerParams, t = new
|
|
2766
|
+
const { premultiplieAlpha: e } = this.options.composerParams, t = new Gs();
|
|
2767
2767
|
this.outputPass = t, this.setPremultiplieAlpha(e), this.finalComposer.addPass(t);
|
|
2768
2768
|
}
|
|
2769
2769
|
setPremultiplieAlpha(e) {
|
|
2770
2770
|
this.outputPass && (this.outputPass.uniforms.premultiplieAlpha.value = e ? 1 : 0);
|
|
2771
2771
|
}
|
|
2772
2772
|
addSSAOPass(e) {
|
|
2773
|
-
const { scene: t, camera: s, renderer: i } = this, r = i.getSize(new B()), o = r.width, n = r.height, l = new
|
|
2773
|
+
const { scene: t, camera: s, renderer: i } = this, r = i.getSize(new B()), o = r.width, n = r.height, l = new us(t, s, o, n);
|
|
2774
2774
|
l.kernelRadius = e.kernelRadius, l.minDistance = e.minDistance, l.maxDistance = e.maxDistance, this.ssaoPass = l, this.finalComposer.addPass(l);
|
|
2775
2775
|
}
|
|
2776
2776
|
addBloomPass(e) {
|
|
2777
|
-
const { renderer: t } = this, { threshold: s, strength: i, radius: r, bloomAlphaType: o } = e, n = new
|
|
2777
|
+
const { renderer: t } = this, { threshold: s, strength: i, radius: r, bloomAlphaType: o } = e, n = new gs(
|
|
2778
2778
|
new B(window.innerWidth, window.innerHeight),
|
|
2779
2779
|
i,
|
|
2780
2780
|
r,
|
|
@@ -2783,7 +2783,7 @@ class oi {
|
|
|
2783
2783
|
this.bloomPass = n;
|
|
2784
2784
|
const l = new ke(t);
|
|
2785
2785
|
l.renderToScreen = !1, l.addPass(this.renderPass), l.addPass(n), this.bloomComposer = l;
|
|
2786
|
-
const d =
|
|
2786
|
+
const d = Ks(l);
|
|
2787
2787
|
d.uniforms.bloomAlphaType.value = o, this.bloomComposer = l, this.finalComposer.addPass(d), this.mixPass = d, this.bloomLayer.set(Le);
|
|
2788
2788
|
}
|
|
2789
2789
|
setBloomSelection(e, t) {
|
|
@@ -2818,7 +2818,7 @@ class oi {
|
|
|
2818
2818
|
s.traverse((i) => {
|
|
2819
2819
|
var l;
|
|
2820
2820
|
const r = i, o = i, n = i;
|
|
2821
|
-
(l = r.material) != null && l.isShadowMaterial ? e.push(r) : r.material && this.bloomLayer.test(r.layers) === !1 && (this.bloomMaterials[r.uuid] = r.material, o.isSprite ? o.material.sizeAttenuation ? o.material =
|
|
2821
|
+
(l = r.material) != null && l.isShadowMaterial ? e.push(r) : r.material && this.bloomLayer.test(r.layers) === !1 && (this.bloomMaterials[r.uuid] = r.material, o.isSprite ? o.material.sizeAttenuation ? o.material = Qs : o.material = Js : r.material instanceof ut ? r.material = ei : n.isPoints ? n.material.sizeAttenuation ? n.material = qs : n.material = $s : r.material = Xs);
|
|
2822
2822
|
});
|
|
2823
2823
|
}), e.forEach((s) => {
|
|
2824
2824
|
this.bloomVisible[s.uuid] = s.visible, s.visible = !1;
|
|
@@ -2895,7 +2895,7 @@ class it extends pt {
|
|
|
2895
2895
|
), r;
|
|
2896
2896
|
}
|
|
2897
2897
|
}
|
|
2898
|
-
class
|
|
2898
|
+
class oi extends pt {
|
|
2899
2899
|
constructor(e) {
|
|
2900
2900
|
super(e);
|
|
2901
2901
|
}
|
|
@@ -2916,7 +2916,7 @@ class ni extends pt {
|
|
|
2916
2916
|
);
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
|
-
const
|
|
2919
|
+
const ni = {
|
|
2920
2920
|
images: ["png", "jpg", "jpeg", "ico", "webp", "avif"],
|
|
2921
2921
|
media: ["mp4", "webm", "ogg"],
|
|
2922
2922
|
gltf: ["gltf", "glb"],
|
|
@@ -2925,7 +2925,7 @@ const ai = {
|
|
|
2925
2925
|
exr: ["exr"],
|
|
2926
2926
|
lottie: ["lottie.json"]
|
|
2927
2927
|
};
|
|
2928
|
-
class
|
|
2928
|
+
class ai {
|
|
2929
2929
|
constructor(e) {
|
|
2930
2930
|
this.loadObj = [], this.delLoadArr = [], this.assets = /* @__PURE__ */ new Map(), this.event = new ve.EventEmitter(), this.options = U({
|
|
2931
2931
|
simpleTexture4deleted: !1,
|
|
@@ -2968,7 +2968,7 @@ class li {
|
|
|
2968
2968
|
if (e.endsWith("json.gzip"))
|
|
2969
2969
|
return "gzipJson";
|
|
2970
2970
|
} else return;
|
|
2971
|
-
for (const [i, r] of Object.entries(
|
|
2971
|
+
for (const [i, r] of Object.entries(ni))
|
|
2972
2972
|
if (r.includes(t))
|
|
2973
2973
|
return i;
|
|
2974
2974
|
}
|
|
@@ -2978,17 +2978,17 @@ class li {
|
|
|
2978
2978
|
if (e === "media")
|
|
2979
2979
|
return this.videoTextureLoader || (this.videoTextureLoader = new it(this.loadingManager), this.videoTextureLoader.setOptions({ type: "video" }), this.options.prefix && this.videoTextureLoader.setPath(this.options.prefix)), this.videoTextureLoader;
|
|
2980
2980
|
if (e === "gltf" && (t != null && t.dracoPath))
|
|
2981
|
-
return this.dracoGltfLoader || (this.dracoGltfLoader = new Ne(this.loadingManager), this.dracoLoader = new
|
|
2981
|
+
return this.dracoGltfLoader || (this.dracoGltfLoader = new Ne(this.loadingManager), this.dracoLoader = new vs(), this.dracoLoader.setDecoderPath(t == null ? void 0 : t.dracoPath), this.dracoGltfLoader.setDRACOLoader(this.dracoLoader), this.options.prefix && this.dracoGltfLoader.setPath(this.options.prefix)), this.dracoGltfLoader;
|
|
2982
2982
|
if (e === "gltf")
|
|
2983
2983
|
return this.gltfLoader || (this.gltfLoader = new Ne(this.loadingManager), this.options.prefix && this.gltfLoader.setPath(this.options.prefix)), this.gltfLoader;
|
|
2984
2984
|
if (e === "lottie")
|
|
2985
|
-
return this.lottieLoader || (this.lottieLoader = new
|
|
2985
|
+
return this.lottieLoader || (this.lottieLoader = new Cs(this.loadingManager), this.options.prefix && this.lottieLoader.setPath(this.options.prefix)), this.lottieLoader;
|
|
2986
2986
|
if (e === "gzipJson")
|
|
2987
|
-
return this.gzipJsonLoader || (this.gzipJsonLoader = new
|
|
2987
|
+
return this.gzipJsonLoader || (this.gzipJsonLoader = new oi(this.loadingManager), this.options.prefix && this.gzipJsonLoader.setPath(this.options.prefix)), this.gzipJsonLoader;
|
|
2988
2988
|
if (e === "json")
|
|
2989
2989
|
return this.jsonLoader || (this.jsonLoader = new Se(this.loadingManager), this.jsonLoader.setResponseType("json"), this.options.prefix && this.jsonLoader.setPath(this.options.prefix)), this.jsonLoader;
|
|
2990
2990
|
if (e === "exr")
|
|
2991
|
-
return this.exrLoader || (this.exrLoader = new
|
|
2991
|
+
return this.exrLoader || (this.exrLoader = new ys(this.loadingManager), this.options.prefix && this.exrLoader.setPath(this.options.prefix)), this.exrLoader;
|
|
2992
2992
|
}
|
|
2993
2993
|
add(e, t) {
|
|
2994
2994
|
typeof e == "string" && (e = [e]), e.forEach((s) => {
|
|
@@ -3024,7 +3024,7 @@ class li {
|
|
|
3024
3024
|
const s = (n = t == null ? void 0 : t.type) != null ? n : this.getAssetType(e);
|
|
3025
3025
|
if (!s)
|
|
3026
3026
|
return;
|
|
3027
|
-
const i = (t == null ? void 0 : t.cache) !== !1, r =
|
|
3027
|
+
const i = (t == null ? void 0 : t.cache) !== !1, r = Es();
|
|
3028
3028
|
if (i) {
|
|
3029
3029
|
if (this.assets.has(e))
|
|
3030
3030
|
return this.assets.get(e);
|
|
@@ -3034,7 +3034,7 @@ class li {
|
|
|
3034
3034
|
try {
|
|
3035
3035
|
const d = yield o.loadAsync(e);
|
|
3036
3036
|
if (this.assets.set(e, d), r.resolve(d), s === "images" || s === "media" || s === "exr" || s === "lottie") {
|
|
3037
|
-
(t == null ? void 0 : t.colorCorrection) !== !1 &&
|
|
3037
|
+
(t == null ? void 0 : t.colorCorrection) !== !1 && as({ texture: d });
|
|
3038
3038
|
const _ = (l = t == null ? void 0 : t.anisotropy) != null ? l : this.options.anisotropy;
|
|
3039
3039
|
d.anisotropy = _;
|
|
3040
3040
|
}
|
|
@@ -3078,10 +3078,10 @@ class li {
|
|
|
3078
3078
|
this.assets.clear(), (e = this.dracoLoader) == null || e.dispose(), this.event.removeAllListeners(), this.delLoadArr.length = 0, this.loadObj.length = 0;
|
|
3079
3079
|
}
|
|
3080
3080
|
}
|
|
3081
|
-
const
|
|
3081
|
+
const li = {
|
|
3082
3082
|
prefix: ""
|
|
3083
3083
|
};
|
|
3084
|
-
class
|
|
3084
|
+
class hi extends ee {
|
|
3085
3085
|
get loader() {
|
|
3086
3086
|
return this.controller;
|
|
3087
3087
|
}
|
|
@@ -3089,7 +3089,7 @@ class ci extends ee {
|
|
|
3089
3089
|
super(), this.options = e;
|
|
3090
3090
|
}
|
|
3091
3091
|
addLoader(e, t) {
|
|
3092
|
-
const { loaderParams: s } = this.options, i = new
|
|
3092
|
+
const { loaderParams: s } = this.options, i = new ai(te(U({}, s), {
|
|
3093
3093
|
scene: e
|
|
3094
3094
|
}));
|
|
3095
3095
|
return this.addController(i, t);
|
|
@@ -3100,7 +3100,7 @@ class ci extends ee {
|
|
|
3100
3100
|
});
|
|
3101
3101
|
}
|
|
3102
3102
|
}
|
|
3103
|
-
class
|
|
3103
|
+
class ci extends hs {
|
|
3104
3104
|
constructor(e) {
|
|
3105
3105
|
super(), this.options = U({}, e);
|
|
3106
3106
|
}
|
|
@@ -3117,7 +3117,7 @@ function rt(h) {
|
|
|
3117
3117
|
}));
|
|
3118
3118
|
};
|
|
3119
3119
|
}
|
|
3120
|
-
class
|
|
3120
|
+
class di {
|
|
3121
3121
|
constructor(e) {
|
|
3122
3122
|
var t;
|
|
3123
3123
|
this.enabled = !0, this.pickFunctionsMap = /* @__PURE__ */ new Map(), this.pickNodeFunctionsMap = /* @__PURE__ */ new Map(), this.pickFunctionsMapIndex = -1, this.pickNodeFunctionsMapIndex = -1, this.activeObjects = /* @__PURE__ */ new Set(), this.prevActiveObjects = /* @__PURE__ */ new Set(), this.objCallbackMap = /* @__PURE__ */ new Map(), this.pickListener = {
|
|
@@ -3310,9 +3310,9 @@ class pi {
|
|
|
3310
3310
|
this.pickFunctionsMap.clear(), this.pickNodeFunctionsMap.clear(), this.activeObjects.clear(), this.prevActiveObjects.clear(), this.objCallbackMap.clear();
|
|
3311
3311
|
}
|
|
3312
3312
|
}
|
|
3313
|
-
class
|
|
3313
|
+
class pi extends di {
|
|
3314
3314
|
constructor(e, t) {
|
|
3315
|
-
super(e), this.objMap = /* @__PURE__ */ new Map(), this.objects = /* @__PURE__ */ new Map(), this.objectsPm = /* @__PURE__ */ new Map(), this.objectNamesToFactories = /* @__PURE__ */ new Map(), this.scene = new
|
|
3315
|
+
super(e), this.objMap = /* @__PURE__ */ new Map(), this.objects = /* @__PURE__ */ new Map(), this.objectsPm = /* @__PURE__ */ new Map(), this.objectNamesToFactories = /* @__PURE__ */ new Map(), this.scene = new ci({
|
|
3316
3316
|
scene: t.scene
|
|
3317
3317
|
}), this.mList = t.mList, this.scene.create(), this.scene.lead = this, this.scene.pencil = e, this.scene.mList = this.mList, this.scene.key = "Scene", this.scene.object3d.name = "场景", this.group = new ze(), this.group.create(), this.group.lead = this, this.group.pencil = e, this.group.mList = this.mList, this.group.key = "@Group", this.group.object3d.name = "物体组", this.prefabGroup = new ze(), this.prefabGroup.create(), this.prefabGroup.lead = this, this.prefabGroup.pencil = e, this.prefabGroup.mList = this.mList, this.prefabGroup.key = "@PrefabGroup", this.prefabGroup.object3d.name = "预制组", this.scene.add(this.group.object3d, this.prefabGroup.object3d), this.objects.set("@Scene", this.scene), this.objects.set("@Group", this.group), this.objects.set("@PrefabGroup", this.prefabGroup), this.objMap.set(this.scene.object3d, this.scene), this.objMap.set(this.group.object3d, this.group), this.objMap.set(this.prefabGroup.object3d, this.prefabGroup);
|
|
3318
3318
|
}
|
|
@@ -3423,7 +3423,7 @@ class mi extends pi {
|
|
|
3423
3423
|
}), this.objects.clear(), this.objectsPm.clear(), this.objMap.clear(), this.objectNamesToFactories.clear();
|
|
3424
3424
|
}
|
|
3425
3425
|
}
|
|
3426
|
-
class
|
|
3426
|
+
class mi extends ee {
|
|
3427
3427
|
get lead() {
|
|
3428
3428
|
return this.controller;
|
|
3429
3429
|
}
|
|
@@ -3431,7 +3431,7 @@ class ui extends ee {
|
|
|
3431
3431
|
super(), this.options = e;
|
|
3432
3432
|
}
|
|
3433
3433
|
addLead(e, t, s) {
|
|
3434
|
-
const { pencil: i } = this.options, r = new
|
|
3434
|
+
const { pencil: i } = this.options, r = new pi(i, {
|
|
3435
3435
|
scene: e,
|
|
3436
3436
|
mList: t
|
|
3437
3437
|
});
|
|
@@ -3453,12 +3453,21 @@ class ui extends ee {
|
|
|
3453
3453
|
});
|
|
3454
3454
|
}
|
|
3455
3455
|
}
|
|
3456
|
-
class
|
|
3456
|
+
class ui {
|
|
3457
3457
|
constructor(e) {
|
|
3458
|
-
this.materials = /* @__PURE__ */ new Map(), this.materialBaseObjectMap = /* @__PURE__ */ new Map(), this.
|
|
3458
|
+
this.materials = /* @__PURE__ */ new Map(), this.materialBaseObjectMap = /* @__PURE__ */ new Map(), this.pencil = e;
|
|
3459
3459
|
}
|
|
3460
3460
|
add(e, t) {
|
|
3461
|
-
|
|
3461
|
+
const s = {
|
|
3462
|
+
key: e,
|
|
3463
|
+
userData: {
|
|
3464
|
+
preList: !0
|
|
3465
|
+
},
|
|
3466
|
+
object3d: {
|
|
3467
|
+
material: t
|
|
3468
|
+
}
|
|
3469
|
+
};
|
|
3470
|
+
this.proxyBaseObject(s), this.addBaseObjectMap(s), this.emitObject3dChange();
|
|
3462
3471
|
}
|
|
3463
3472
|
get(e) {
|
|
3464
3473
|
const t = this.materials.get(e);
|
|
@@ -3543,10 +3552,10 @@ class fi {
|
|
|
3543
3552
|
}
|
|
3544
3553
|
addBaseObjectMap(e) {
|
|
3545
3554
|
const t = e.object3d;
|
|
3546
|
-
t.material && (Array.isArray(t.material) ? t.material : [t.material]).forEach((i) => {
|
|
3555
|
+
t.material && ((Array.isArray(t.material) ? t.material : [t.material]).forEach((i) => {
|
|
3547
3556
|
const r = this.materialBaseObjectMap.get(i);
|
|
3548
3557
|
r ? r.add(e) : this.materialBaseObjectMap.set(i, /* @__PURE__ */ new Set([e]));
|
|
3549
|
-
});
|
|
3558
|
+
}), e.userData.preList && this.materials.set(e.key, t.material));
|
|
3550
3559
|
}
|
|
3551
3560
|
rmBaseObjectMap(e, t) {
|
|
3552
3561
|
this.materialBaseObjectMap.forEach((s, i) => {
|
|
@@ -3567,10 +3576,10 @@ class fi {
|
|
|
3567
3576
|
}
|
|
3568
3577
|
dispose() {
|
|
3569
3578
|
const e = new Pe();
|
|
3570
|
-
e.track([...this.materials.values()]), e.dispose(), this.
|
|
3579
|
+
e.track([...this.materials.values()]), e.dispose(), this.materials.clear(), this.materialBaseObjectMap.clear();
|
|
3571
3580
|
}
|
|
3572
3581
|
}
|
|
3573
|
-
class
|
|
3582
|
+
class fi extends ee {
|
|
3574
3583
|
get mList() {
|
|
3575
3584
|
return this.controller;
|
|
3576
3585
|
}
|
|
@@ -3578,7 +3587,7 @@ class _i extends ee {
|
|
|
3578
3587
|
super(), this.options = e;
|
|
3579
3588
|
}
|
|
3580
3589
|
addMList(e, t) {
|
|
3581
|
-
const { pencil: s } = this.options, i = new
|
|
3590
|
+
const { pencil: s } = this.options, i = new ui(s);
|
|
3582
3591
|
return this.addController(i, t);
|
|
3583
3592
|
}
|
|
3584
3593
|
removePage(e) {
|
|
@@ -3590,8 +3599,8 @@ class _i extends ee {
|
|
|
3590
3599
|
const _e = class _e {
|
|
3591
3600
|
constructor(e) {
|
|
3592
3601
|
var r, o;
|
|
3593
|
-
this.raycaster = new ht(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new I(), this._cameraTarget = new I(), this.event = new ve.EventEmitter(), this.timer = new
|
|
3594
|
-
isMergeableObject:
|
|
3602
|
+
this.raycaster = new ht(), this.maxBackufferArea = 5760 * 5760, this.installPlugins = /* @__PURE__ */ new Map(), this._cameraPositon = new I(), this._cameraTarget = new I(), this.event = new ve.EventEmitter(), this.timer = new is(), this.userData = {}, this.pageActiveIndex = 0, this.pageCountIndex = 0, this.userSetDprCache = 1, this.event.setMaxListeners(1 / 0), (o = (r = this.timer).connect) == null || o.call(r, document), this.options = rs(_e.options, e, {
|
|
3603
|
+
isMergeableObject: ls
|
|
3595
3604
|
}), this.userSetDprCache = this.options.renderer.devicePixelRatio;
|
|
3596
3605
|
const {
|
|
3597
3606
|
container: t,
|
|
@@ -3599,7 +3608,7 @@ const _e = class _e {
|
|
|
3599
3608
|
transformControls: i
|
|
3600
3609
|
} = this.options;
|
|
3601
3610
|
if (this.init(), this.options.WebGPUTHREE || this.initComposer(), this.initCSSRenderer(), i && this.initTransformControls(), s) {
|
|
3602
|
-
const n = new
|
|
3611
|
+
const n = new os({
|
|
3603
3612
|
horizontal: !1
|
|
3604
3613
|
});
|
|
3605
3614
|
n.dom.style.position = "absolute", n.init(this.renderer), t.appendChild(n.dom), this.stats = n;
|
|
@@ -3676,31 +3685,31 @@ const _e = class _e {
|
|
|
3676
3685
|
renderer: r,
|
|
3677
3686
|
controls: o,
|
|
3678
3687
|
loader: n
|
|
3679
|
-
} = this.options, { width: l, height: d } = this.getSize(), _ = t ? new
|
|
3688
|
+
} = this.options, { width: l, height: d } = this.getSize(), _ = t ? new Ds({
|
|
3680
3689
|
width: l,
|
|
3681
3690
|
height: d,
|
|
3682
3691
|
renderer: t.WebGPURenderer,
|
|
3683
|
-
rendererParams:
|
|
3684
|
-
}) : new
|
|
3692
|
+
rendererParams: Rs
|
|
3693
|
+
}) : new Ms({
|
|
3685
3694
|
width: l,
|
|
3686
3695
|
height: d,
|
|
3687
3696
|
rendererParams: te(U({}, r), {
|
|
3688
3697
|
antialias: !1
|
|
3689
3698
|
})
|
|
3690
|
-
}), p = new
|
|
3699
|
+
}), p = new zs({
|
|
3691
3700
|
width: l,
|
|
3692
3701
|
height: d
|
|
3693
|
-
}), E = new
|
|
3702
|
+
}), E = new Fs({}), v = new Hs({
|
|
3694
3703
|
controlsParams: {
|
|
3695
3704
|
domElement: (g = o == null ? void 0 : o.domElement) != null ? g : _.renderer.domElement
|
|
3696
3705
|
}
|
|
3697
|
-
}), m = new
|
|
3706
|
+
}), m = new hi({
|
|
3698
3707
|
loaderParams: U({
|
|
3699
3708
|
anisotropy: _.renderer.capabilities.getMaxAnisotropy()
|
|
3700
3709
|
}, n)
|
|
3701
|
-
}), u = new
|
|
3710
|
+
}), u = new fi({
|
|
3702
3711
|
pencil: this
|
|
3703
|
-
}), f = new
|
|
3712
|
+
}), f = new mi({
|
|
3704
3713
|
pencil: this
|
|
3705
3714
|
});
|
|
3706
3715
|
this.sceneController = E, this.cameraController = p, this.controlsController = v, this.rendererController = _, this.loaderController = m, this.mListController = u, this.leadController = f;
|
|
@@ -3709,7 +3718,7 @@ const _e = class _e {
|
|
|
3709
3718
|
cameraOptions: this.options.camera
|
|
3710
3719
|
});
|
|
3711
3720
|
if (this.showPage(a), s) {
|
|
3712
|
-
const C = new
|
|
3721
|
+
const C = new Ns({
|
|
3713
3722
|
container: e,
|
|
3714
3723
|
sceneController: E,
|
|
3715
3724
|
cameraController: p
|
|
@@ -3725,7 +3734,7 @@ const _e = class _e {
|
|
|
3725
3734
|
ssao: s,
|
|
3726
3735
|
ssaoParams: i,
|
|
3727
3736
|
composer: r
|
|
3728
|
-
} = this.options, o = new
|
|
3737
|
+
} = this.options, o = new ri({
|
|
3729
3738
|
rendererController: this.rendererController,
|
|
3730
3739
|
sceneController: this.sceneController,
|
|
3731
3740
|
cameraController: this.cameraController,
|
|
@@ -3742,12 +3751,12 @@ const _e = class _e {
|
|
|
3742
3751
|
css3DRendererParams: r
|
|
3743
3752
|
} = this.options;
|
|
3744
3753
|
if (t || s) {
|
|
3745
|
-
const o = new
|
|
3754
|
+
const o = new Zs(e);
|
|
3746
3755
|
t && o.addRenderer("css2d", i), s && o.addRenderer("css3d", r), this.cssRendererController = o;
|
|
3747
3756
|
}
|
|
3748
3757
|
}
|
|
3749
3758
|
initTransformControls() {
|
|
3750
|
-
const e = new
|
|
3759
|
+
const e = new Is({
|
|
3751
3760
|
camera: this.camera,
|
|
3752
3761
|
renderer: this.renderer,
|
|
3753
3762
|
scene: this.scene
|
|
@@ -3887,26 +3896,26 @@ _e.options = {
|
|
|
3887
3896
|
viewHelper: me,
|
|
3888
3897
|
controls: !0,
|
|
3889
3898
|
transformControls: me,
|
|
3890
|
-
renderer:
|
|
3891
|
-
composer:
|
|
3892
|
-
scene:
|
|
3899
|
+
renderer: As,
|
|
3900
|
+
composer: ii,
|
|
3901
|
+
scene: ks,
|
|
3893
3902
|
camera: bt,
|
|
3894
3903
|
bloom: !1,
|
|
3895
|
-
bloomParams:
|
|
3904
|
+
bloomParams: si,
|
|
3896
3905
|
ssao: !1,
|
|
3897
|
-
loader:
|
|
3898
|
-
ssaoParams:
|
|
3906
|
+
loader: li,
|
|
3907
|
+
ssaoParams: ti,
|
|
3899
3908
|
css2DRenderer: !1,
|
|
3900
3909
|
css2DRendererParams: U({}, st),
|
|
3901
3910
|
css3DRenderer: !1,
|
|
3902
3911
|
css3DRendererParams: U({}, st)
|
|
3903
3912
|
};
|
|
3904
3913
|
let ot = _e;
|
|
3905
|
-
const
|
|
3914
|
+
const $i = J.ACTION;
|
|
3906
3915
|
export {
|
|
3907
|
-
|
|
3916
|
+
hs as BaseObject,
|
|
3908
3917
|
ot as Pencil,
|
|
3909
3918
|
Pe as ResourceTracker,
|
|
3910
|
-
|
|
3919
|
+
$i as cameraControlsAction,
|
|
3911
3920
|
ot as default
|
|
3912
3921
|
};
|