aptechka 0.7.2 → 0.7.3
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/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 +5 -0
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.d.ts +1 -1
- package/lib/en3/helpers/index.js +1203 -669
- 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-BQMd-J6t.cjs +8 -0
- package/lib/{en3-hbkN1OPu.js → en3-CsNHRA0v.js} +22 -22
- 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/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/traverseMaterials-B87RMkV0.js +29 -0
- package/lib/traverseMaterials-Crv7f9BJ.cjs +1 -0
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +314 -296
- 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/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/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;
|