aptechka 0.7.2 → 0.7.4
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/accordion/AccordionElement.d.ts +0 -3
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +60 -71
- package/lib/en3/core/En3Raycaster.d.ts +1 -0
- package/lib/en3/core/en3.d.ts +3 -0
- package/lib/en3/helpers/En3ComposerManager.d.ts +5 -0
- package/lib/en3/helpers/{En3Controls.d.ts → En3Helpers.d.ts} +1 -1
- package/lib/en3/helpers/En3Object3dManager.d.ts +2 -0
- package/lib/en3/helpers/En3ParametersManager.d.ts +16 -0
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.d.ts +1 -1
- package/lib/en3/helpers/index.js +1409 -670
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +1 -1
- package/lib/en3/loaders/index.cjs +1 -1
- package/lib/en3/loaders/index.js +1 -1
- package/lib/en3/utils/index.cjs +1 -1
- package/lib/en3/utils/index.js +15 -38
- package/lib/en3-CBBYE8rb.cjs +8 -0
- package/lib/en3-sDqjL5Mg.js +349 -0
- package/lib/events-BGwqaxVW.cjs +1 -0
- package/lib/{events-_C2CztxR.js → events-C_coq1Mk.js} +9 -0
- package/lib/{index-BAH_fO2N.js → index-CoOTQk9H.js} +40 -40
- package/lib/{index-D1LQUR-R.cjs → index-DVUk3T-y.cjs} +2 -2
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +2 -2
- package/lib/order/index.js +1 -1
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/store/Store.d.ts +1 -0
- package/lib/traverseMaterials-BtBXV88O.cjs +1 -0
- package/lib/traverseMaterials-M-N1989i.js +29 -0
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +331 -313
- package/lib/tweaker/tweakerStorage.d.ts +2 -0
- package/lib/utils/events.d.ts +2 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +65 -64
- package/package.json +1 -1
- package/lib/en3-C4mzaF6q.cjs +0 -8
- package/lib/en3-hbkN1OPu.js +0 -343
- package/lib/events-Crwi8fz6.cjs +0 -1
|
@@ -5,9 +5,11 @@ export type TweakerChangedSizes = {
|
|
|
5
5
|
export interface TweakerStorageState {
|
|
6
6
|
openedPanels: TweakerOpenedPanels;
|
|
7
7
|
changedSizes: TweakerChangedSizes;
|
|
8
|
+
scrollValue: number;
|
|
8
9
|
}
|
|
9
10
|
declare class TweakerStorage {
|
|
10
11
|
#private;
|
|
12
|
+
scrollValue: number;
|
|
11
13
|
constructor();
|
|
12
14
|
openPanel(key: string): void;
|
|
13
15
|
closePanel(key: string): void;
|
package/lib/utils/events.d.ts
CHANGED
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),l=require("../canvas-CU5Xjahf.cjs"),m=require("../coordinates-D8Np3cPD.cjs"),p=require("../dom-JBOkFLTh.cjs"),n=require("../easings-DsS5-Kqc.cjs"),h=require("../events-BGwqaxVW.cjs"),I=require("../file-EevnUtRj.cjs"),C=require("../function-MthRj-GJ.cjs"),v=require("../gestures-DHLrn6Q8.cjs"),f=require("../layout-8ryRAMGJ.cjs"),i=require("../math-GDWEqu7y.cjs"),d=require("../polyfills-CM4SCDTt.cjs"),o=require("../object-CCiXnER2.cjs"),r=require("../string-DhgS_iFl.cjs"),O=require("../style-At6aDoqG.cjs"),g=require("../url-C3dWnJQg.cjs");function y(t,e,...a){return[...t.slice(0,e),...a,...t.slice(e)]}function P(t,e){const a=t.length;e=e%a;const s=new Array(a);for(let u=0;u<a;u++){const c=(u+e)%a;s[c]=t[u]}return s}function T(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function q(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function E(t,e){const a=t.styleMap.get(e);if(a){const s=a.toString();return s.startsWith("var")?E(t,s.slice(4,-1)):s}}function x(...t){const e={};return Array.from(document.styleSheets).forEach(a=>{Array.from(a.cssRules).forEach(s=>{s instanceof CSSStyleRule&&s.selectorText===":root"&&t.forEach(u=>{const c=E(s,u);c&&(e[u]=c)})})}),t.forEach(a=>{e[a]||console.warn(`variable named ${a} not found`)}),e}function Q(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function D(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}exports.parseAttribute=b.parseAttribute;exports.parseAttributeValue=b.parseAttributeValue;exports.isBrowser=S.isBrowser;exports.contain=l.contain;exports.cover=l.cover;exports.fixPosition=l.fixPosition;exports.measureText=l.measureText;exports.getPointerPosition=m.getPointerPosition;exports.normalize=m.normalize;exports.screenToCartesian=m.screenToCartesian;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getAllParentElements=p.getAllParentElements;exports.getElement=p.getElement;exports.easeInCubic=n.easeInCubic;exports.easeInExpo=n.easeInExpo;exports.easeInOutCubic=n.easeInOutCubic;exports.easeInOutExpo=n.easeInOutExpo;exports.easeInOutQuad=n.easeInOutQuad;exports.easeInOutQuart=n.easeInOutQuart;exports.easeInOutQuint=n.easeInOutQuint;exports.easeInQuad=n.easeInQuad;exports.easeInQuart=n.easeInQuart;exports.easeInQuint=n.easeInQuint;exports.easeOutCubic=n.easeOutCubic;exports.easeOutExpo=n.easeOutExpo;exports.easeOutQuad=n.easeOutQuad;exports.easeOutQuart=n.easeOutQuart;exports.easeOutQuint=n.easeOutQuint;exports.linear=n.linear;exports.dispatchBeforeSizeChangeEvent=h.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=h.dispatchSizeChangeEvent;exports.createJSONAndSave=I.createJSONAndSave;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=v.setupDrag;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=i.calculateDistance;exports.calculateDistanceWithRadius=i.calculateDistanceWithRadius;exports.clamp=i.clamp;exports.damp=i.damp;exports.lerp=i.lerp;exports.mapRange=i.mapRange;exports.round=i.round;exports.smootherstep=i.smootherstep;exports.smoothstep=i.smoothstep;exports.step=i.step;exports.nullishCoalescing=d.nullishCoalescing;exports.preciseNumber=d.preciseNumber;exports.roundNumberTo=d.roundNumberTo;exports.toStep=d.toStep;exports.cloneDeep=o.cloneDeep;exports.compareObjects=o.compareObjects;exports.isESClass=o.isESClass;exports.isNullish=o.isNullish;exports.isObject=o.isObject;exports.mergeDeep=o.mergeDeep;exports.mixin=o.mixin;exports.omit=o.omit;exports.pick=o.pick;exports.camelToKebab=r.camelToKebab;exports.capitalize=r.capitalize;exports.generateId=r.generateId;exports.isUppercase=r.isUppercase;exports.kebabToCamel=r.kebabToCamel;exports.snakeToDotted=r.snakeToDotted;exports.toPascalCase=r.toPascalCase;exports.uncapitalize=r.uncapitalize;exports.getElementTransitionDurationMS=O.getElementTransitionDurationMS;exports.getElementTransitionDurationS=O.getElementTransitionDurationS;exports.changeHistory=g.changeHistory;exports.normalizeBase=g.normalizeBase;exports.splitPath=g.splitPath;exports.decode=D;exports.dotCircleCollision=q;exports.dotRectCollision=T;exports.encode=Q;exports.getRootVariables=x;exports.insert=y;exports.shiftArray=P;
|
package/lib/utils/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { a as g, p as b } from "../attributes-69we3byR.js";
|
|
2
2
|
import { i as C } from "../browser-0zX67oeU.js";
|
|
3
|
-
import { a as
|
|
3
|
+
import { a as S, c as O, f as y, m as w } from "../canvas-DeZ0SLUJ.js";
|
|
4
4
|
import { g as v, n as P, s as T } from "../coordinates-CgdGoSYs.js";
|
|
5
|
-
import { f as Q, b as D, a as R, g as
|
|
6
|
-
import { c as j, n as N, f as V, p as
|
|
7
|
-
import {
|
|
8
|
-
import { c as
|
|
9
|
-
import { d as
|
|
10
|
-
import { s as
|
|
11
|
-
import { g as
|
|
12
|
-
import { e as
|
|
13
|
-
import { n as
|
|
14
|
-
import { c as
|
|
15
|
-
import { c as
|
|
16
|
-
import { a as
|
|
17
|
-
import { c as
|
|
5
|
+
import { f as Q, b as D, a as R, g as z } from "../dom-0S_WDL4g.js";
|
|
6
|
+
import { c as j, n as N, f as V, p as B, b as M, i as U, m as W, e as q, g as H, j as J, d as K, o as L, a as $, h as F, k as G, l as X } from "../easings-BKi40vHz.js";
|
|
7
|
+
import { a as Z, d as _ } from "../events-C_coq1Mk.js";
|
|
8
|
+
import { c as ae } from "../file-lxi_oXJf.js";
|
|
9
|
+
import { d as te, t as oe } from "../function-C10DGppn.js";
|
|
10
|
+
import { s as re } from "../gestures-D2Fdra_G.js";
|
|
11
|
+
import { g as ce, a as ue, b as le } from "../layout-HoBT_Da2.js";
|
|
12
|
+
import { e as pe, f as me, c as de, d as xe, l as ge, m as be, r as he, b as Ce, a as Ee, s as Se } from "../math-BOBiC4TN.js";
|
|
13
|
+
import { n as ye, p as we, r as Ie, t as ve } from "../polyfills-X6KXuHg-.js";
|
|
14
|
+
import { c as Te, d as Ae, i as Qe, b as De, a as Re, m as ze, e as ke, o as je, p as Ne } from "../object-D6MVWB4l.js";
|
|
15
|
+
import { c as Be, a as Me, g as Ue, i as We, k as qe, s as He, t as Je, u as Ke } from "../string-f0Dnk0L1.js";
|
|
16
|
+
import { a as $e, g as Fe } from "../style-CklEF62D.js";
|
|
17
|
+
import { c as Xe, n as Ye, s as Ze } from "../url-DMNfW7uN.js";
|
|
18
18
|
function i(a, e, ...s) {
|
|
19
19
|
return [...a.slice(0, e), ...s, ...a.slice(e)];
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function c(a, e) {
|
|
22
22
|
const s = a.length;
|
|
23
23
|
e = e % s;
|
|
24
24
|
const t = new Array(s);
|
|
@@ -28,7 +28,7 @@ function u(a, e) {
|
|
|
28
28
|
}
|
|
29
29
|
return t;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function u(a, e) {
|
|
32
32
|
return a.x < e.x + e.width && a.x > e.x && a.y < e.y + e.height && a.y > e.y;
|
|
33
33
|
}
|
|
34
34
|
function l(a, e) {
|
|
@@ -63,29 +63,30 @@ function m(a) {
|
|
|
63
63
|
return window.btoa(e);
|
|
64
64
|
}
|
|
65
65
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
pe as calculateDistance,
|
|
67
|
+
me as calculateDistanceWithRadius,
|
|
68
|
+
Be as camelToKebab,
|
|
69
69
|
Me as capitalize,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
Xe as changeHistory,
|
|
71
|
+
de as clamp,
|
|
72
|
+
Te as cloneDeep,
|
|
73
|
+
Ae as compareObjects,
|
|
74
|
+
S as contain,
|
|
75
|
+
O as cover,
|
|
76
|
+
ae as createJSONAndSave,
|
|
77
|
+
xe as damp,
|
|
78
|
+
te as debounce,
|
|
79
79
|
m as decode,
|
|
80
|
-
Z as
|
|
80
|
+
Z as dispatchBeforeSizeChangeEvent,
|
|
81
|
+
_ as dispatchSizeChangeEvent,
|
|
81
82
|
l as dotCircleCollision,
|
|
82
|
-
|
|
83
|
+
u as dotRectCollision,
|
|
83
84
|
j as easeInCubic,
|
|
84
85
|
N as easeInExpo,
|
|
85
86
|
V as easeInOutCubic,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
B as easeInOutExpo,
|
|
88
|
+
M as easeInOutQuad,
|
|
89
|
+
U as easeInOutQuart,
|
|
89
90
|
W as easeInOutQuint,
|
|
90
91
|
q as easeInQuad,
|
|
91
92
|
H as easeInQuart,
|
|
@@ -101,47 +102,47 @@ export {
|
|
|
101
102
|
y as fixPosition,
|
|
102
103
|
Ue as generateId,
|
|
103
104
|
R as getAllParentElements,
|
|
104
|
-
|
|
105
|
+
ce as getCumulativeOffsetLeft,
|
|
105
106
|
ue as getCumulativeOffsetTop,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
le as getCumulativePosition,
|
|
108
|
+
z as getElement,
|
|
109
|
+
$e as getElementTransitionDurationMS,
|
|
110
|
+
Fe as getElementTransitionDurationS,
|
|
110
111
|
v as getPointerPosition,
|
|
111
112
|
f as getRootVariables,
|
|
112
113
|
i as insert,
|
|
113
114
|
C as isBrowser,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
Qe as isESClass,
|
|
116
|
+
De as isNullish,
|
|
117
|
+
Re as isObject,
|
|
118
|
+
We as isUppercase,
|
|
119
|
+
qe as kebabToCamel,
|
|
120
|
+
ge as lerp,
|
|
120
121
|
X as linear,
|
|
121
|
-
|
|
122
|
+
be as mapRange,
|
|
122
123
|
w as measureText,
|
|
123
|
-
|
|
124
|
+
ze as mergeDeep,
|
|
124
125
|
ke as mixin,
|
|
125
126
|
P as normalize,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
Ye as normalizeBase,
|
|
128
|
+
ye as nullishCoalescing,
|
|
129
|
+
je as omit,
|
|
129
130
|
g as parseAttribute,
|
|
130
131
|
b as parseAttributeValue,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
Ne as pick,
|
|
133
|
+
we as preciseNumber,
|
|
134
|
+
he as round,
|
|
135
|
+
Ie as roundNumberTo,
|
|
135
136
|
T as screenToCartesian,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
137
|
+
re as setupDrag,
|
|
138
|
+
c as shiftArray,
|
|
139
|
+
Ce as smootherstep,
|
|
140
|
+
Ee as smoothstep,
|
|
141
|
+
He as snakeToDotted,
|
|
142
|
+
Ze as splitPath,
|
|
143
|
+
Se as step,
|
|
144
|
+
oe as throttle,
|
|
145
|
+
Je as toPascalCase,
|
|
146
|
+
ve as toStep,
|
|
147
|
+
Ke as uncapitalize
|
|
147
148
|
};
|
package/package.json
CHANGED
package/lib/en3-C4mzaF6q.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";var he=Object.defineProperty,ae=Object.defineProperties;var ce=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var Z=(n,e,i)=>e in n?he(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i,O=(n,e)=>{for(var i in e||(e={}))le.call(e,i)&&Z(n,i,e[i]);if(X)for(var i of X(e))de.call(e,i)&&Z(n,i,e[i]);return n},J=(n,e)=>ae(n,ce(e));var Q=(n,e,i)=>{if(!e.has(n))throw TypeError("Cannot "+i)};var t=(n,e,i)=>(Q(n,e,"read from private field"),i?i.call(n):e.get(n)),s=(n,e,i)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,i)},r=(n,e,i,a)=>(Q(n,e,"write to private field"),a?a.call(n,i):e.set(n,i),i);const ee=require("./order/index.cjs"),te=require("./window-resizer/index.cjs"),ie=require("./ticker/index.cjs"),re=require("./dom-JBOkFLTh.cjs"),E=require("three"),se=require("./layout-box/index.cjs");function ne(n){const e=i=>{i.dispose();for(const a of Object.keys(i)){const c=i[a];c&&typeof c=="object"&&"minFilter"in c&&c.dispose()}};n.traverse(i=>{if(i instanceof E.Mesh){if(i.geometry.dispose(),!Array.isArray(i.material)&&i.material.isMaterial)e(i.material);else if(Array.isArray(i.material))for(const a of i.material)e(a)}})}var L,l,p,y,x,C,w,R;class G{constructor(e,i){s(this,L,void 0);s(this,l,void 0);s(this,p,void 0);s(this,y,void 0);s(this,x,void 0);s(this,C,void 0);s(this,w,void 0);s(this,R,void 0);r(this,L,e),r(this,l,(i==null?void 0:i.cameraType)==="orthographic"?new E.OrthographicCamera:new E.PerspectiveCamera),r(this,p,new E.Scene),r(this,y,[]),r(this,x,(i==null?void 0:i.cameraDistance)||1e3),t(this,l).near=(i==null?void 0:i.cameraNear)||1,t(this,l).far=(i==null?void 0:i.cameraFar)||11e3,r(this,C,(i==null?void 0:i.cameraFov)||"auto"),t(this,l).position.z=t(this,x),t(this,l).name=`Cameras.${t(this,L)}`,r(this,w,re.getElement(i==null?void 0:i.sizeElement)||document.documentElement),this.beforeRenderCallback=i==null?void 0:i.beforeRender,r(this,R,new se.LayoutBox(t(this,w))),t(this,R).onResize(()=>{this.resize()})}get name(){return t(this,L)}get camera(){return t(this,l)}get scene(){return t(this,p)}get box(){return t(this,R)}get cameraDistance(){return t(this,x)}set cameraDistance(e){r(this,x,e),this.resize()}get sizeElement(){return t(this,w)}get isClipped(){return t(this,w)!==m.containerElement}resize(){const{width:e,height:i}=t(this,R);t(this,l).userData.controlled||(t(this,l).position.z=t(this,x)),t(this,l)instanceof E.PerspectiveCamera?(t(this,l).aspect=e/i,t(this,l).fov=t(this,C)==="auto"?2*Math.atan(i/2/t(this,x))*(180/Math.PI):t(this,C)):t(this,l)instanceof E.OrthographicCamera&&(t(this,l).left=e/-2,t(this,l).right=e/2,t(this,l).top=i/2,t(this,l).bottom=i/-2),t(this,l).updateProjectionMatrix()}destroy(){t(this,y).forEach(e=>{e.userData.box.destroy()}),t(this,p).clear(),ne(t(this,p)),m.destroyView(this.name),t(this,R).destroy()}attachToHTMLElement(e,i,a){const c=new se.LayoutBox(e,J(O({},a),{containerElement:t(this,w),cartesian:!0,scrollStep:!this.isClipped}));return c.bindObject(i),i.userData.box=c,t(this,y).push(i),i}detachFromHTMLElement(e){r(this,y,t(this,y).filter(i=>i===e?(e.userData.box.destroy(),!1):!0))}add(...e){const i=e[0],a=e[1],c=e[2];return a&&this.attachToHTMLElement(a,i,c),this.scene.add(i),i}remove(e,i){this.scene.remove(e),i&&this.detachFromHTMLElement(e)}}L=new WeakMap,l=new WeakMap,p=new WeakMap,y=new WeakMap,x=new WeakMap,C=new WeakMap,w=new WeakMap,R=new WeakMap;const W=new Map;var v,P,k,D,j;class oe{constructor(e){s(this,v,void 0);s(this,P,void 0);s(this,k,void 0);s(this,D,void 0);s(this,j,void 0);r(this,v,e.targetName||void 0),r(this,P,e.eventDispatcher||e.object3D),r(this,k,e.propagation||!1),r(this,D,e.object3D),r(this,j,t(this,v)?()=>t(this,D).getObjectByName(t(this,v))||t(this,D):()=>t(this,D))}get object3D(){return t(this,D)}get eventDispatcher(){return t(this,P)}get propagation(){return t(this,k)}get target(){return t(this,j).call(this)}dispatch(e,i){this.eventDispatcher.dispatchEvent(O({originalEvent:i,type:e},this.intersection))}}v=new WeakMap,P=new WeakMap,k=new WeakMap,D=new WeakMap,j=new WeakMap;var f,o,T,A,F,N,q;class ue{constructor(){s(this,f,[]);s(this,o,[]);s(this,T,new E.Vector2);s(this,A,new E.Raycaster);s(this,F,e=>{for(let i=0;i<t(this,o).length;i++)t(this,o)[i].dispatch("pointerDown",e)});s(this,N,e=>{for(let i=0;i<t(this,o).length;i++)t(this,o)[i].dispatch("pointerUp",e)});s(this,q,e=>{if(!t(this,f).length)return;t(this,T).x=e.clientX/m.width*2-1,t(this,T).y=-(e.clientY/m.height)*2+1,m.camera&&t(this,A).setFromCamera(t(this,T),m.camera);const i=[];for(const h of t(this,f)){const b=t(this,A).intersectObject(h.target);b.length&&(h.intersection=b[0],i.push(h))}let a=!1;const c=t(this,o).filter(h=>!i.find(b=>b.object3D.uuid===h.object3D.uuid)),K=i.sort((h,b)=>b.object3D.position.z-h.object3D.position.z).filter((h,b)=>a?(c.push(h),!1):(a=!h.propagation,!0)),U=K.filter(h=>!t(this,o).find(b=>b.object3D.uuid===h.object3D.uuid));for(let h=0;h<c.length;h++)c[h].dispatch("pointerLeave",e);for(let h=0;h<U.length;h++)U[h].dispatch("pointerEnter",e);r(this,o,K);for(let h=0;h<t(this,o).length;h++)t(this,o)[h].dispatch("pointerMove",e)});m.containerElement.addEventListener("pointerdown",t(this,F)),m.containerElement.addEventListener("pointerup",t(this,N)),m.containerElement.addEventListener("pointermove",t(this,q))}destroy(){m.containerElement.removeEventListener("pointerdown",t(this,F)),m.containerElement.removeEventListener("pointerup",t(this,N)),m.containerElement.removeEventListener("pointermove",t(this,q)),r(this,f,[]),r(this,o,[])}add(e,i){if(t(this,f).find(c=>c.object3D.uuid===e.uuid))return;const a=new oe(O({object3D:e},i));t(this,f).push(a)}remove(e){r(this,f,t(this,f).filter(i=>i.object3D.uuid!==e.uuid)),r(this,o,t(this,o).filter(i=>i.object3D.uuid!==e.uuid))}}f=new WeakMap,o=new WeakMap,T=new WeakMap,A=new WeakMap,F=new WeakMap,N=new WeakMap,q=new WeakMap;var $,g,d,V,u,M,S,H,I,z,_,B,Y;class me{constructor(){s(this,$,`https://unpkg.com/three@0.${E.REVISION}.x`);s(this,g,null);s(this,d,null);s(this,V,null);s(this,u,new Map);s(this,M,0);s(this,S,0);s(this,H,0);s(this,I,2);s(this,z,!1);s(this,_,!1);s(this,B,()=>{r(this,M,t(this,g).clientWidth),r(this,S,t(this,g).clientHeight),r(this,H,Math.min(t(this,I),devicePixelRatio||1)),t(this,d).setPixelRatio(t(this,H)),t(this,d).setSize(t(this,M),t(this,S))});s(this,Y,()=>{t(this,d).setRenderTarget(null),t(this,u).forEach(e=>{this.render(e)})})}get CDNVersion(){return t(this,$)}get containerElement(){return t(this,g)}get webglRenderer(){return t(this,d)}get raycaster(){return t(this,V)}get views(){return t(this,u)}get view(){return this.getView("default")}get camera(){return this.getView("default").camera}get scene(){return this.getView("default").scene}get width(){return t(this,M)}get height(){return t(this,S)}get pixelRatio(){return t(this,H)}get cacheAssets(){return t(this,_)}setup(e){if(t(this,z)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}r(this,g,re.getElement(e==null?void 0:e.containerElement)||document.body),r(this,I,(e==null?void 0:e.maxPixelRatio)||2),r(this,d,new E.WebGLRenderer(e==null?void 0:e.webGLRendererParameters)),t(this,d).domElement.style.cssText=`
|
|
2
|
-
position: fixed;
|
|
3
|
-
left: 0;
|
|
4
|
-
top: 0;
|
|
5
|
-
width: 100%;
|
|
6
|
-
height: 100%;
|
|
7
|
-
z-index: ${(e==null?void 0:e.zIndex)||0};
|
|
8
|
-
`,(t(this,g).shadowRoot||t(this,g)).append(t(this,d).domElement),t(this,u).set("default",new G("default",O({sizeElement:t(this,g)},e==null?void 0:e.view))),r(this,V,new ue),r(this,_,(e==null?void 0:e.cacheAssets)||!1),r(this,z,!0),te.windowResizer.subscribe(t(this,B),ee.RESIZE_ORDER.EN3),ie.ticker.subscribe(t(this,Y),{order:ee.TICK_ORDER.EN3})}destroy(){if(!t(this,z)){console.warn("[en3.setup]: You are trying to destory en3 but it has not been initialized.");return}te.windowResizer.unsubscribe(t(this,B)),ie.ticker.unsubscribe(t(this,Y)),t(this,V).destroy(),t(this,u).forEach(e=>{e.destroy()}),t(this,d).dispose(),t(this,d).domElement.remove(),r(this,d,null),r(this,z,!1),W.forEach(e=>{e.dispose()}),W.clear()}createView(e,i){const a=t(this,u).size,c=new G(e,i);return t(this,u).set(e,c),a===1&&t(this,d).setScissorTest(!0),c}getView(e){return t(this,u).get(e)}destroyView(e){const i=t(this,u).get(e);i&&(t(this,u).delete(e),i.destroy(),t(this,u).size<=1&&t(this,d).setScissorTest(!1))}render(e){var i;if(t(this,u).size>1||this.view.isClipped){const a=e.box.left+e.box.CSSTranslation.x+e.box.scrollValue.x,c=m.height-e.box.height-e.box.top+e.box.CSSTranslation.y+e.box.scrollValue.y*-1;t(this,d).setScissor(a,c,e.box.width,e.box.height),t(this,d).setViewport(a,c,e.box.width,e.box.height)}(i=e.beforeRenderCallback)==null||i.call(e),t(this,d).render(e.scene,e.camera)}}$=new WeakMap,g=new WeakMap,d=new WeakMap,V=new WeakMap,u=new WeakMap,M=new WeakMap,S=new WeakMap,H=new WeakMap,I=new WeakMap,z=new WeakMap,_=new WeakMap,B=new WeakMap,Y=new WeakMap;const m=new me;exports.En3View=G;exports.dispose=ne;exports.en3=m;exports.en3Cache=W;
|
package/lib/en3-hbkN1OPu.js
DELETED
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
var he = Object.defineProperty, ae = Object.defineProperties;
|
|
2
|
-
var ne = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var K = Object.getOwnPropertySymbols;
|
|
4
|
-
var ce = Object.prototype.hasOwnProperty, le = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var U = (h, e, i) => e in h ? he(h, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : h[e] = i, H = (h, e) => {
|
|
6
|
-
for (var i in e || (e = {}))
|
|
7
|
-
ce.call(e, i) && U(h, i, e[i]);
|
|
8
|
-
if (K)
|
|
9
|
-
for (var i of K(e))
|
|
10
|
-
le.call(e, i) && U(h, i, e[i]);
|
|
11
|
-
return h;
|
|
12
|
-
}, X = (h, e) => ae(h, ne(e));
|
|
13
|
-
var Z = (h, e, i) => {
|
|
14
|
-
if (!e.has(h))
|
|
15
|
-
throw TypeError("Cannot " + i);
|
|
16
|
-
};
|
|
17
|
-
var t = (h, e, i) => (Z(h, e, "read from private field"), i ? i.call(h) : e.get(h)), s = (h, e, i) => {
|
|
18
|
-
if (e.has(h))
|
|
19
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
-
e instanceof WeakSet ? e.add(h) : e.set(h, i);
|
|
21
|
-
}, r = (h, e, i, n) => (Z(h, e, "write to private field"), n ? n.call(h, i) : e.set(h, i), i);
|
|
22
|
-
import { RESIZE_ORDER as oe, TICK_ORDER as de } from "./order/index.js";
|
|
23
|
-
import { windowResizer as q } from "./window-resizer/index.js";
|
|
24
|
-
import { ticker as J } from "./ticker/index.js";
|
|
25
|
-
import { g as re } from "./dom-0S_WDL4g.js";
|
|
26
|
-
import { Mesh as ue, OrthographicCamera as Q, PerspectiveCamera as ee, Scene as me, Vector2 as fe, Raycaster as ge, REVISION as Ee, WebGLRenderer as be } from "three";
|
|
27
|
-
import { LayoutBox as te } from "./layout-box/index.js";
|
|
28
|
-
function xe(h) {
|
|
29
|
-
const e = (i) => {
|
|
30
|
-
i.dispose();
|
|
31
|
-
for (const n of Object.keys(i)) {
|
|
32
|
-
const c = i[n];
|
|
33
|
-
c && typeof c == "object" && "minFilter" in c && c.dispose();
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
h.traverse((i) => {
|
|
37
|
-
if (i instanceof ue) {
|
|
38
|
-
if (i.geometry.dispose(), !Array.isArray(i.material) && i.material.isMaterial)
|
|
39
|
-
e(i.material);
|
|
40
|
-
else if (Array.isArray(i.material))
|
|
41
|
-
for (const n of i.material)
|
|
42
|
-
e(n);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
var z, l, D, x, b, L, y, w;
|
|
47
|
-
class ie {
|
|
48
|
-
constructor(e, i) {
|
|
49
|
-
s(this, z, void 0);
|
|
50
|
-
s(this, l, void 0);
|
|
51
|
-
s(this, D, void 0);
|
|
52
|
-
s(this, x, void 0);
|
|
53
|
-
s(this, b, void 0);
|
|
54
|
-
s(this, L, void 0);
|
|
55
|
-
s(this, y, void 0);
|
|
56
|
-
s(this, w, void 0);
|
|
57
|
-
r(this, z, e), r(this, l, (i == null ? void 0 : i.cameraType) === "orthographic" ? new Q() : new ee()), r(this, D, new me()), r(this, x, []), r(this, b, (i == null ? void 0 : i.cameraDistance) || 1e3), t(this, l).near = (i == null ? void 0 : i.cameraNear) || 1, t(this, l).far = (i == null ? void 0 : i.cameraFar) || 11e3, r(this, L, (i == null ? void 0 : i.cameraFov) || "auto"), t(this, l).position.z = t(this, b), t(this, l).name = `Cameras.${t(this, z)}`, r(this, y, re(i == null ? void 0 : i.sizeElement) || document.documentElement), this.beforeRenderCallback = i == null ? void 0 : i.beforeRender, r(this, w, new te(t(this, y))), t(this, w).onResize(() => {
|
|
58
|
-
this.resize();
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
get name() {
|
|
62
|
-
return t(this, z);
|
|
63
|
-
}
|
|
64
|
-
get camera() {
|
|
65
|
-
return t(this, l);
|
|
66
|
-
}
|
|
67
|
-
get scene() {
|
|
68
|
-
return t(this, D);
|
|
69
|
-
}
|
|
70
|
-
get box() {
|
|
71
|
-
return t(this, w);
|
|
72
|
-
}
|
|
73
|
-
get cameraDistance() {
|
|
74
|
-
return t(this, b);
|
|
75
|
-
}
|
|
76
|
-
set cameraDistance(e) {
|
|
77
|
-
r(this, b, e), this.resize();
|
|
78
|
-
}
|
|
79
|
-
get sizeElement() {
|
|
80
|
-
return t(this, y);
|
|
81
|
-
}
|
|
82
|
-
get isClipped() {
|
|
83
|
-
return t(this, y) !== m.containerElement;
|
|
84
|
-
}
|
|
85
|
-
resize() {
|
|
86
|
-
const { width: e, height: i } = t(this, w);
|
|
87
|
-
t(this, l).userData.controlled || (t(this, l).position.z = t(this, b)), t(this, l) instanceof ee ? (t(this, l).aspect = e / i, t(this, l).fov = t(this, L) === "auto" ? 2 * Math.atan(i / 2 / t(this, b)) * (180 / Math.PI) : t(this, L)) : t(this, l) instanceof Q && (t(this, l).left = e / -2, t(this, l).right = e / 2, t(this, l).top = i / 2, t(this, l).bottom = i / -2), t(this, l).updateProjectionMatrix();
|
|
88
|
-
}
|
|
89
|
-
destroy() {
|
|
90
|
-
t(this, x).forEach((e) => {
|
|
91
|
-
e.userData.box.destroy();
|
|
92
|
-
}), t(this, D).clear(), xe(t(this, D)), m.destroyView(this.name), t(this, w).destroy();
|
|
93
|
-
}
|
|
94
|
-
attachToHTMLElement(e, i, n) {
|
|
95
|
-
const c = new te(e, X(H({}, n), {
|
|
96
|
-
containerElement: t(this, y),
|
|
97
|
-
cartesian: !0,
|
|
98
|
-
scrollStep: !this.isClipped
|
|
99
|
-
}));
|
|
100
|
-
return c.bindObject(i), i.userData.box = c, t(this, x).push(i), i;
|
|
101
|
-
}
|
|
102
|
-
detachFromHTMLElement(e) {
|
|
103
|
-
r(this, x, t(this, x).filter((i) => i === e ? (e.userData.box.destroy(), !1) : !0));
|
|
104
|
-
}
|
|
105
|
-
add(...e) {
|
|
106
|
-
const i = e[0], n = e[1], c = e[2];
|
|
107
|
-
return n && this.attachToHTMLElement(n, i, c), this.scene.add(i), i;
|
|
108
|
-
}
|
|
109
|
-
remove(e, i) {
|
|
110
|
-
this.scene.remove(e), i && this.detachFromHTMLElement(e);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
z = new WeakMap(), l = new WeakMap(), D = new WeakMap(), x = new WeakMap(), b = new WeakMap(), L = new WeakMap(), y = new WeakMap(), w = new WeakMap();
|
|
114
|
-
const se = /* @__PURE__ */ new Map();
|
|
115
|
-
var v, O, P, p, j;
|
|
116
|
-
class ye {
|
|
117
|
-
constructor(e) {
|
|
118
|
-
s(this, v, void 0);
|
|
119
|
-
s(this, O, void 0);
|
|
120
|
-
s(this, P, void 0);
|
|
121
|
-
s(this, p, void 0);
|
|
122
|
-
s(this, j, void 0);
|
|
123
|
-
r(this, v, e.targetName || void 0), r(this, O, e.eventDispatcher || e.object3D), r(this, P, e.propagation || !1), r(this, p, e.object3D), r(this, j, t(this, v) ? () => t(this, p).getObjectByName(t(this, v)) || t(this, p) : () => t(this, p));
|
|
124
|
-
}
|
|
125
|
-
get object3D() {
|
|
126
|
-
return t(this, p);
|
|
127
|
-
}
|
|
128
|
-
get eventDispatcher() {
|
|
129
|
-
return t(this, O);
|
|
130
|
-
}
|
|
131
|
-
get propagation() {
|
|
132
|
-
return t(this, P);
|
|
133
|
-
}
|
|
134
|
-
get target() {
|
|
135
|
-
return t(this, j).call(this);
|
|
136
|
-
}
|
|
137
|
-
dispatch(e, i) {
|
|
138
|
-
this.eventDispatcher.dispatchEvent(H({
|
|
139
|
-
originalEvent: i,
|
|
140
|
-
type: e
|
|
141
|
-
}, this.intersection));
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
v = new WeakMap(), O = new WeakMap(), P = new WeakMap(), p = new WeakMap(), j = new WeakMap();
|
|
145
|
-
var f, d, C, k, A, F, N;
|
|
146
|
-
class we {
|
|
147
|
-
constructor() {
|
|
148
|
-
s(this, f, []);
|
|
149
|
-
s(this, d, []);
|
|
150
|
-
s(this, C, new fe());
|
|
151
|
-
s(this, k, new ge());
|
|
152
|
-
s(this, A, (e) => {
|
|
153
|
-
for (let i = 0; i < t(this, d).length; i++)
|
|
154
|
-
t(this, d)[i].dispatch("pointerDown", e);
|
|
155
|
-
});
|
|
156
|
-
s(this, F, (e) => {
|
|
157
|
-
for (let i = 0; i < t(this, d).length; i++)
|
|
158
|
-
t(this, d)[i].dispatch("pointerUp", e);
|
|
159
|
-
});
|
|
160
|
-
s(this, N, (e) => {
|
|
161
|
-
if (!t(this, f).length)
|
|
162
|
-
return;
|
|
163
|
-
t(this, C).x = e.clientX / m.width * 2 - 1, t(this, C).y = -(e.clientY / m.height) * 2 + 1, m.camera && t(this, k).setFromCamera(t(this, C), m.camera);
|
|
164
|
-
const i = [];
|
|
165
|
-
for (const a of t(this, f)) {
|
|
166
|
-
const E = t(this, k).intersectObject(a.target);
|
|
167
|
-
E.length && (a.intersection = E[0], i.push(a));
|
|
168
|
-
}
|
|
169
|
-
let n = !1;
|
|
170
|
-
const c = t(this, d).filter(
|
|
171
|
-
(a) => !i.find((E) => E.object3D.uuid === a.object3D.uuid)
|
|
172
|
-
), W = i.sort(
|
|
173
|
-
(a, E) => E.object3D.position.z - a.object3D.position.z
|
|
174
|
-
).filter((a, E) => n ? (c.push(a), !1) : (n = !a.propagation, !0)), _ = W.filter(
|
|
175
|
-
(a) => !t(this, d).find((E) => E.object3D.uuid === a.object3D.uuid)
|
|
176
|
-
);
|
|
177
|
-
for (let a = 0; a < c.length; a++)
|
|
178
|
-
c[a].dispatch("pointerLeave", e);
|
|
179
|
-
for (let a = 0; a < _.length; a++)
|
|
180
|
-
_[a].dispatch("pointerEnter", e);
|
|
181
|
-
r(this, d, W);
|
|
182
|
-
for (let a = 0; a < t(this, d).length; a++)
|
|
183
|
-
t(this, d)[a].dispatch("pointerMove", e);
|
|
184
|
-
});
|
|
185
|
-
m.containerElement.addEventListener(
|
|
186
|
-
"pointerdown",
|
|
187
|
-
t(this, A)
|
|
188
|
-
), m.containerElement.addEventListener("pointerup", t(this, F)), m.containerElement.addEventListener(
|
|
189
|
-
"pointermove",
|
|
190
|
-
t(this, N)
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
destroy() {
|
|
194
|
-
m.containerElement.removeEventListener(
|
|
195
|
-
"pointerdown",
|
|
196
|
-
t(this, A)
|
|
197
|
-
), m.containerElement.removeEventListener(
|
|
198
|
-
"pointerup",
|
|
199
|
-
t(this, F)
|
|
200
|
-
), m.containerElement.removeEventListener(
|
|
201
|
-
"pointermove",
|
|
202
|
-
t(this, N)
|
|
203
|
-
), r(this, f, []), r(this, d, []);
|
|
204
|
-
}
|
|
205
|
-
add(e, i) {
|
|
206
|
-
if (t(this, f).find((c) => c.object3D.uuid === e.uuid))
|
|
207
|
-
return;
|
|
208
|
-
const n = new ye(H({
|
|
209
|
-
object3D: e
|
|
210
|
-
}, i));
|
|
211
|
-
t(this, f).push(n);
|
|
212
|
-
}
|
|
213
|
-
remove(e) {
|
|
214
|
-
r(this, f, t(this, f).filter(
|
|
215
|
-
(i) => i.object3D.uuid !== e.uuid
|
|
216
|
-
)), r(this, d, t(this, d).filter((i) => i.object3D.uuid !== e.uuid));
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
f = new WeakMap(), d = new WeakMap(), C = new WeakMap(), k = new WeakMap(), A = new WeakMap(), F = new WeakMap(), N = new WeakMap();
|
|
220
|
-
var G, g, o, T, u, V, M, S, I, R, Y, $, B;
|
|
221
|
-
class pe {
|
|
222
|
-
constructor() {
|
|
223
|
-
s(this, G, `https://unpkg.com/three@0.${Ee}.x`);
|
|
224
|
-
s(this, g, null);
|
|
225
|
-
s(this, o, null);
|
|
226
|
-
s(this, T, null);
|
|
227
|
-
s(this, u, /* @__PURE__ */ new Map());
|
|
228
|
-
s(this, V, 0);
|
|
229
|
-
s(this, M, 0);
|
|
230
|
-
s(this, S, 0);
|
|
231
|
-
s(this, I, 2);
|
|
232
|
-
s(this, R, !1);
|
|
233
|
-
s(this, Y, !1);
|
|
234
|
-
s(this, $, () => {
|
|
235
|
-
r(this, V, t(this, g).clientWidth), r(this, M, t(this, g).clientHeight), r(this, S, Math.min(t(this, I), devicePixelRatio || 1)), t(this, o).setPixelRatio(t(this, S)), t(this, o).setSize(t(this, V), t(this, M));
|
|
236
|
-
});
|
|
237
|
-
s(this, B, () => {
|
|
238
|
-
t(this, o).setRenderTarget(null), t(this, u).forEach((e) => {
|
|
239
|
-
this.render(e);
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
get CDNVersion() {
|
|
244
|
-
return t(this, G);
|
|
245
|
-
}
|
|
246
|
-
get containerElement() {
|
|
247
|
-
return t(this, g);
|
|
248
|
-
}
|
|
249
|
-
get webglRenderer() {
|
|
250
|
-
return t(this, o);
|
|
251
|
-
}
|
|
252
|
-
get raycaster() {
|
|
253
|
-
return t(this, T);
|
|
254
|
-
}
|
|
255
|
-
get views() {
|
|
256
|
-
return t(this, u);
|
|
257
|
-
}
|
|
258
|
-
get view() {
|
|
259
|
-
return this.getView("default");
|
|
260
|
-
}
|
|
261
|
-
get camera() {
|
|
262
|
-
return this.getView("default").camera;
|
|
263
|
-
}
|
|
264
|
-
get scene() {
|
|
265
|
-
return this.getView("default").scene;
|
|
266
|
-
}
|
|
267
|
-
get width() {
|
|
268
|
-
return t(this, V);
|
|
269
|
-
}
|
|
270
|
-
get height() {
|
|
271
|
-
return t(this, M);
|
|
272
|
-
}
|
|
273
|
-
get pixelRatio() {
|
|
274
|
-
return t(this, S);
|
|
275
|
-
}
|
|
276
|
-
get cacheAssets() {
|
|
277
|
-
return t(this, Y);
|
|
278
|
-
}
|
|
279
|
-
setup(e) {
|
|
280
|
-
if (t(this, R)) {
|
|
281
|
-
console.warn("[en3.setup]: You are trying to setup en3 again.");
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
r(this, g, re(e == null ? void 0 : e.containerElement) || document.body), r(this, I, (e == null ? void 0 : e.maxPixelRatio) || 2), r(this, o, new be(e == null ? void 0 : e.webGLRendererParameters)), t(this, o).domElement.style.cssText = `
|
|
285
|
-
position: fixed;
|
|
286
|
-
left: 0;
|
|
287
|
-
top: 0;
|
|
288
|
-
width: 100%;
|
|
289
|
-
height: 100%;
|
|
290
|
-
z-index: ${(e == null ? void 0 : e.zIndex) || 0};
|
|
291
|
-
`, (t(this, g).shadowRoot || t(this, g)).append(t(this, o).domElement), t(this, u).set(
|
|
292
|
-
"default",
|
|
293
|
-
new ie("default", H({
|
|
294
|
-
sizeElement: t(this, g)
|
|
295
|
-
}, e == null ? void 0 : e.view))
|
|
296
|
-
), r(this, T, new we()), r(this, Y, (e == null ? void 0 : e.cacheAssets) || !1), r(this, R, !0), q.subscribe(t(this, $), oe.EN3), J.subscribe(t(this, B), { order: de.EN3 });
|
|
297
|
-
}
|
|
298
|
-
destroy() {
|
|
299
|
-
if (!t(this, R)) {
|
|
300
|
-
console.warn(
|
|
301
|
-
"[en3.setup]: You are trying to destory en3 but it has not been initialized."
|
|
302
|
-
);
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
q.unsubscribe(t(this, $)), J.unsubscribe(t(this, B)), t(this, T).destroy(), t(this, u).forEach((e) => {
|
|
306
|
-
e.destroy();
|
|
307
|
-
}), t(this, o).dispose(), t(this, o).domElement.remove(), r(this, o, null), r(this, R, !1), se.forEach((e) => {
|
|
308
|
-
e.dispose();
|
|
309
|
-
}), se.clear();
|
|
310
|
-
}
|
|
311
|
-
createView(e, i) {
|
|
312
|
-
const n = t(this, u).size, c = new ie(e, i);
|
|
313
|
-
return t(this, u).set(e, c), n === 1 && t(this, o).setScissorTest(!0), c;
|
|
314
|
-
}
|
|
315
|
-
getView(e) {
|
|
316
|
-
return t(this, u).get(e);
|
|
317
|
-
}
|
|
318
|
-
destroyView(e) {
|
|
319
|
-
const i = t(this, u).get(e);
|
|
320
|
-
i && (t(this, u).delete(e), i.destroy(), t(this, u).size <= 1 && t(this, o).setScissorTest(!1));
|
|
321
|
-
}
|
|
322
|
-
render(e) {
|
|
323
|
-
var i;
|
|
324
|
-
if (t(this, u).size > 1 || this.view.isClipped) {
|
|
325
|
-
const n = e.box.left + e.box.CSSTranslation.x + e.box.scrollValue.x, c = m.height - e.box.height - e.box.top + e.box.CSSTranslation.y + e.box.scrollValue.y * -1;
|
|
326
|
-
t(this, o).setScissor(n, c, e.box.width, e.box.height), t(this, o).setViewport(
|
|
327
|
-
n,
|
|
328
|
-
c,
|
|
329
|
-
e.box.width,
|
|
330
|
-
e.box.height
|
|
331
|
-
);
|
|
332
|
-
}
|
|
333
|
-
(i = e.beforeRenderCallback) == null || i.call(e), t(this, o).render(e.scene, e.camera);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
G = new WeakMap(), g = new WeakMap(), o = new WeakMap(), T = new WeakMap(), u = new WeakMap(), V = new WeakMap(), M = new WeakMap(), S = new WeakMap(), I = new WeakMap(), R = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), B = new WeakMap();
|
|
337
|
-
const m = new pe();
|
|
338
|
-
export {
|
|
339
|
-
ie as E,
|
|
340
|
-
se as a,
|
|
341
|
-
xe as d,
|
|
342
|
-
m as e
|
|
343
|
-
};
|
package/lib/events-Crwi8fz6.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function t(e){e.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}exports.dispatchSizeChangeEvent=t;
|