@tresjs/core 2.4.0-next.4 → 2.4.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/TresCanvas.vue.d.ts +108 -54
- package/dist/composables/useCamera/index.d.ts +86 -77
- package/dist/composables/usePointerEventHandler/index.d.ts +4 -3
- package/dist/composables/useTresContextProvider/index.d.ts +1 -1
- package/dist/core/nodeOps.d.ts +1 -1
- package/dist/tres.js +395 -389
- package/dist/tres.umd.cjs +2 -2
- package/dist/types/index.d.ts +13 -4
- package/package.json +1 -1
- package/dist/keys.d.ts +0 -9
- package/dist/utils/test-utils.d.ts +0 -1
package/dist/tres.js
CHANGED
|
@@ -1,466 +1,476 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/core
|
|
3
|
-
* version: v2.4.0-next.
|
|
3
|
+
* version: v2.4.0-next.6
|
|
4
4
|
* (c) 2023
|
|
5
5
|
* description: Declarative ThreeJS using Vue Components
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
|
-
import { ref as
|
|
9
|
-
import * as
|
|
10
|
-
import { PerspectiveCamera as
|
|
11
|
-
import { createEventHook as
|
|
12
|
-
const K =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const { IS_ACTIVE_CAMERA: n, REGISTER_CAMERA: t, DEREGISTER_CAMERA: i } = L, o = F([]), l = M(
|
|
23
|
-
() => o.value.find(({ userData: s }) => s[n])
|
|
24
|
-
), r = (s, c = !0) => {
|
|
25
|
-
o.value.some(({ uuid: v }) => v === s.uuid) || (o.value.push(s), c && m(s));
|
|
26
|
-
}, p = (s) => {
|
|
27
|
-
if (s.userData[n]) {
|
|
28
|
-
const c = o.value[o.value.length - 1];
|
|
29
|
-
c && m(c.uuid);
|
|
8
|
+
import { ref as j, computed as P, watchEffect as b, onUnmounted as V, shallowRef as W, watch as J, reactive as re, readonly as I, provide as ae, inject as ne, createRenderer as oe, defineComponent as se, useSlots as ie, onMounted as ue, openBlock as le, createElementBlock as ce, normalizeStyle as fe } from "vue";
|
|
9
|
+
import * as pe from "three";
|
|
10
|
+
import { PerspectiveCamera as G, OrthographicCamera as me, Camera as ve, Clock as de, SRGBColorSpace as ge, ACESFilmicToneMapping as we, PCFSoftShadowMap as ye, Vector3 as Ce, Color as B, WebGLRenderer as z, LoadingManager as Me, TextureLoader as _e, Raycaster as Pe, Vector2 as Ee, BufferAttribute as Le, Scene as xe } from "three";
|
|
11
|
+
import { createEventHook as k, useRafFn as he, toValue as m, unrefElement as Te, useDevicePixelRatio as be, usePointer as De, useElementBounding as ke, useWindowSize as Se, useElementSize as Ae } from "@vueuse/core";
|
|
12
|
+
const K = j({}), X = (e) => void Object.assign(K.value, e), N = (e) => typeof e == "function", Y = (e) => !!e && e.constructor === Array;
|
|
13
|
+
function Be({ sizes: e, scene: n }) {
|
|
14
|
+
const t = j([]), r = P(
|
|
15
|
+
() => t.value.find(({ userData: a }) => a.tres__isActiveCamera)
|
|
16
|
+
), o = (a, i = !0) => {
|
|
17
|
+
t.value.some(({ uuid: f }) => f === a.uuid) || (t.value.push(a), i && l(a));
|
|
18
|
+
}, u = (a) => {
|
|
19
|
+
if (a.userData.tres__isActiveCamera) {
|
|
20
|
+
const i = t.value[t.value.length - 1];
|
|
21
|
+
i && l(i.uuid);
|
|
30
22
|
}
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
t.value = t.value.filter(({ uuid: i }) => i !== a.uuid);
|
|
24
|
+
}, l = (a) => {
|
|
25
|
+
const i = a instanceof ve ? a : t.value.find((c) => c.uuid === a);
|
|
26
|
+
if (!i)
|
|
27
|
+
return;
|
|
28
|
+
t.value.forEach(({ userData: c }) => c.tres__isActiveCamera = !1);
|
|
29
|
+
const f = i;
|
|
30
|
+
f.userData.tres__isActiveCamera = !0;
|
|
31
|
+
}, s = () => {
|
|
32
|
+
t.value = [];
|
|
37
33
|
};
|
|
38
|
-
return
|
|
39
|
-
e.aspectRatio.value &&
|
|
40
|
-
|
|
34
|
+
return b(() => {
|
|
35
|
+
e.aspectRatio.value && t.value.forEach((a) => {
|
|
36
|
+
a instanceof G && (a.aspect = e.aspectRatio.value), (a instanceof G || a instanceof me) && a.updateProjectionMatrix();
|
|
41
37
|
});
|
|
42
|
-
}),
|
|
43
|
-
|
|
38
|
+
}), n.userData.tres__registerCamera = o, n.userData.tres__deregisterCamera = u, V(() => {
|
|
39
|
+
s();
|
|
44
40
|
}), {
|
|
45
|
-
camera:
|
|
46
|
-
cameras:
|
|
47
|
-
addCamera:
|
|
48
|
-
removeCamera:
|
|
49
|
-
setCameraActive:
|
|
41
|
+
camera: r,
|
|
42
|
+
cameras: t,
|
|
43
|
+
addCamera: o,
|
|
44
|
+
removeCamera: u,
|
|
45
|
+
setCameraActive: l
|
|
50
46
|
};
|
|
51
47
|
}
|
|
52
|
-
const
|
|
53
|
-
let
|
|
54
|
-
const { pause:
|
|
48
|
+
const Q = k(), Z = k(), $ = k(), D = new de();
|
|
49
|
+
let O = 0, R = 0;
|
|
50
|
+
const { pause: Oe, resume: Re, isActive: ze } = he(
|
|
55
51
|
() => {
|
|
56
|
-
|
|
52
|
+
Q.trigger({ delta: O, elapsed: R, clock: D }), Z.trigger({ delta: O, elapsed: R, clock: D }), $.trigger({ delta: O, elapsed: R, clock: D });
|
|
57
53
|
},
|
|
58
54
|
{ immediate: !1 }
|
|
59
55
|
);
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
$.on(() => {
|
|
57
|
+
O = D.getDelta(), R = D.getElapsedTime();
|
|
62
58
|
});
|
|
63
|
-
const
|
|
64
|
-
onBeforeLoop:
|
|
65
|
-
onLoop:
|
|
66
|
-
onAfterLoop:
|
|
67
|
-
pause:
|
|
68
|
-
resume:
|
|
69
|
-
isActive:
|
|
70
|
-
}),
|
|
59
|
+
const ee = () => ({
|
|
60
|
+
onBeforeLoop: Q.on,
|
|
61
|
+
onLoop: Z.on,
|
|
62
|
+
onAfterLoop: $.on,
|
|
63
|
+
pause: Oe,
|
|
64
|
+
resume: Re,
|
|
65
|
+
isActive: ze
|
|
66
|
+
}), F = {
|
|
71
67
|
realistic: {
|
|
72
68
|
outputColorSpace: ge,
|
|
73
|
-
toneMapping:
|
|
69
|
+
toneMapping: we,
|
|
74
70
|
toneMappingExposure: 3,
|
|
75
71
|
shadowMap: {
|
|
76
72
|
enabled: !0,
|
|
77
|
-
type:
|
|
73
|
+
type: ye
|
|
78
74
|
}
|
|
79
75
|
}
|
|
80
|
-
},
|
|
81
|
-
for (const
|
|
82
|
-
|
|
83
|
-
return Object.assign(e || {},
|
|
84
|
-
},
|
|
85
|
-
function
|
|
86
|
-
return e.replace(/-([a-z])/g, (
|
|
76
|
+
}, te = (e, n) => {
|
|
77
|
+
for (const t of Object.keys(n))
|
|
78
|
+
n[t] instanceof Object && Object.assign(n[t], te(e[t], n[t]));
|
|
79
|
+
return Object.assign(e || {}, n), e;
|
|
80
|
+
}, Fe = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", He = /* @__PURE__ */ Ge(Fe);
|
|
81
|
+
function A(e) {
|
|
82
|
+
return e.replace(/-([a-z])/g, (n, t) => t.toUpperCase());
|
|
87
83
|
}
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
for (let
|
|
91
|
-
|
|
92
|
-
return
|
|
84
|
+
function Ge(e, n) {
|
|
85
|
+
const t = /* @__PURE__ */ Object.create(null), r = e.split(",");
|
|
86
|
+
for (let o = 0; o < r.length; o++)
|
|
87
|
+
t[r[o]] = !0;
|
|
88
|
+
return n ? (o) => !!t[o.toLowerCase()] : (o) => !!t[o];
|
|
93
89
|
}
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
for (const
|
|
97
|
-
const
|
|
98
|
-
|
|
90
|
+
const je = (e, n) => {
|
|
91
|
+
const t = /* @__PURE__ */ new Set(), r = [];
|
|
92
|
+
for (const o of e) {
|
|
93
|
+
const u = n(o);
|
|
94
|
+
t.has(u) || (t.add(u), r.push(o));
|
|
99
95
|
}
|
|
100
|
-
return
|
|
101
|
-
},
|
|
102
|
-
function
|
|
103
|
-
function e(
|
|
104
|
-
console.error(`${
|
|
96
|
+
return r;
|
|
97
|
+
}, at = !0, q = "[TresJS ▲ ■ ●] ";
|
|
98
|
+
function S() {
|
|
99
|
+
function e(r, o) {
|
|
100
|
+
console.error(`${q} ${r}`, o || "");
|
|
105
101
|
}
|
|
106
|
-
function
|
|
107
|
-
console.warn(`${
|
|
102
|
+
function n(r) {
|
|
103
|
+
console.warn(`${q} ${r}`);
|
|
108
104
|
}
|
|
109
|
-
function
|
|
105
|
+
function t(r, o) {
|
|
110
106
|
}
|
|
111
107
|
return {
|
|
112
108
|
logError: e,
|
|
113
|
-
logWarning:
|
|
114
|
-
logMessage:
|
|
109
|
+
logWarning: n,
|
|
110
|
+
logMessage: t
|
|
115
111
|
};
|
|
116
112
|
}
|
|
117
|
-
function
|
|
118
|
-
return typeof e == "number" ? [e, e, e] : e instanceof
|
|
113
|
+
function nt(e) {
|
|
114
|
+
return typeof e == "number" ? [e, e, e] : e instanceof Ce ? [e.x, e.y, e.z] : e;
|
|
119
115
|
}
|
|
120
|
-
function
|
|
121
|
-
return e instanceof
|
|
116
|
+
function Ve(e) {
|
|
117
|
+
return e instanceof B ? e : Array.isArray(e) ? new B(...e) : new B(e);
|
|
122
118
|
}
|
|
123
119
|
function We({
|
|
124
120
|
scene: e,
|
|
125
|
-
canvas:
|
|
126
|
-
options:
|
|
127
|
-
disableRender:
|
|
128
|
-
contextParts: { sizes:
|
|
121
|
+
canvas: n,
|
|
122
|
+
options: t,
|
|
123
|
+
disableRender: r,
|
|
124
|
+
contextParts: { sizes: o, camera: u }
|
|
129
125
|
}) {
|
|
130
|
-
const l =
|
|
131
|
-
alpha:
|
|
132
|
-
depth:
|
|
133
|
-
canvas:
|
|
134
|
-
context:
|
|
135
|
-
stencil:
|
|
136
|
-
antialias:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
126
|
+
const l = P(() => ({
|
|
127
|
+
alpha: m(t.alpha),
|
|
128
|
+
depth: m(t.depth),
|
|
129
|
+
canvas: Te(n),
|
|
130
|
+
context: m(t.context),
|
|
131
|
+
stencil: m(t.stencil),
|
|
132
|
+
antialias: m(t.antialias) === void 0 ? (
|
|
133
|
+
// an opinionated default of tres
|
|
134
|
+
!0
|
|
135
|
+
) : m(t.antialias),
|
|
136
|
+
precision: m(t.precision),
|
|
137
|
+
powerPreference: m(t.powerPreference),
|
|
138
|
+
premultipliedAlpha: m(t.premultipliedAlpha),
|
|
139
|
+
preserveDrawingBuffer: m(t.preserveDrawingBuffer),
|
|
140
|
+
logarithmicDepthBuffer: m(t.logarithmicDepthBuffer),
|
|
141
|
+
failIfMajorPerformanceCaveat: m(t.failIfMajorPerformanceCaveat)
|
|
142
|
+
})), s = W(new z(l.value));
|
|
144
143
|
J(l, () => {
|
|
145
|
-
|
|
146
|
-
}),
|
|
147
|
-
|
|
144
|
+
s.value.dispose(), s.value = new z(l.value);
|
|
145
|
+
}), b(() => {
|
|
146
|
+
s.value.setSize(o.width.value, o.height.value);
|
|
148
147
|
});
|
|
149
|
-
const { pixelRatio:
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
const { pixelRatio: a } = be();
|
|
149
|
+
b(() => {
|
|
150
|
+
s.value.setPixelRatio(a.value);
|
|
152
151
|
});
|
|
153
|
-
const { logError:
|
|
154
|
-
const
|
|
152
|
+
const { logError: i } = S(), c = (() => {
|
|
153
|
+
const d = new z(), v = {
|
|
155
154
|
shadowMap: {
|
|
156
|
-
enabled:
|
|
157
|
-
type:
|
|
155
|
+
enabled: d.shadowMap.enabled,
|
|
156
|
+
type: d.shadowMap.type
|
|
158
157
|
},
|
|
159
|
-
toneMapping:
|
|
160
|
-
toneMappingExposure:
|
|
161
|
-
outputColorSpace:
|
|
162
|
-
useLegacyLights:
|
|
158
|
+
toneMapping: d.toneMapping,
|
|
159
|
+
toneMappingExposure: d.toneMappingExposure,
|
|
160
|
+
outputColorSpace: d.outputColorSpace,
|
|
161
|
+
useLegacyLights: d.useLegacyLights
|
|
163
162
|
};
|
|
164
|
-
return
|
|
163
|
+
return d.dispose(), v;
|
|
165
164
|
})();
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
if (
|
|
169
|
-
|
|
165
|
+
b(() => {
|
|
166
|
+
const d = m(t.preset);
|
|
167
|
+
if (d) {
|
|
168
|
+
d in F || i("Renderer Preset must be one of these: " + Object.keys(F).join(", ")), te(s.value, F[d]);
|
|
170
169
|
return;
|
|
171
170
|
}
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
171
|
+
const v = m(t.shadows);
|
|
172
|
+
s.value.shadowMap.enabled = v !== void 0 ? v : c.shadowMap.enabled;
|
|
173
|
+
const y = m(t.shadowMapType);
|
|
174
|
+
s.value.shadowMap.type = y !== void 0 ? y : c.shadowMap.type;
|
|
175
|
+
const E = m(t.toneMapping);
|
|
176
|
+
s.value.toneMapping = E !== void 0 ? E : c.toneMapping;
|
|
177
|
+
const x = m(t.toneMappingExposure);
|
|
178
|
+
s.value.toneMappingExposure = x !== void 0 ? x : c.toneMappingExposure;
|
|
179
|
+
const h = m(t.outputColorSpace);
|
|
180
|
+
s.value.outputColorSpace = h !== void 0 ? h : c.outputColorSpace;
|
|
181
|
+
const T = m(t.useLegacyLights);
|
|
182
|
+
s.value.useLegacyLights = T !== void 0 ? T : c.useLegacyLights;
|
|
183
|
+
const L = m(t.clearColor);
|
|
184
|
+
L && s.value.setClearColor(
|
|
185
|
+
L ? Ve(L) : new B(0)
|
|
187
186
|
// default clear color is not easily/efficiently retrievable from three
|
|
188
187
|
);
|
|
189
188
|
});
|
|
190
|
-
const { pause:
|
|
191
|
-
return
|
|
192
|
-
|
|
193
|
-
}),
|
|
194
|
-
|
|
189
|
+
const { pause: w, resume: C, onLoop: _ } = ee();
|
|
190
|
+
return _(() => {
|
|
191
|
+
u.value && !m(r) && s.value.render(e, u.value);
|
|
192
|
+
}), C(), V(() => {
|
|
193
|
+
w(), s.value.dispose(), s.value.forceContextLoss();
|
|
195
194
|
}), {
|
|
196
|
-
renderer:
|
|
195
|
+
renderer: s
|
|
197
196
|
};
|
|
198
197
|
}
|
|
199
198
|
function $e(e) {
|
|
200
|
-
const
|
|
201
|
-
return e && e.traverse((
|
|
202
|
-
|
|
203
|
-
}),
|
|
199
|
+
const n = { nodes: {}, materials: {} };
|
|
200
|
+
return e && e.traverse((t) => {
|
|
201
|
+
t.name && (n.nodes[t.name] = t), t.material && !n.materials[t.material.name] && (n.materials[t.material.name] = t.material);
|
|
202
|
+
}), n;
|
|
204
203
|
}
|
|
205
|
-
async function
|
|
206
|
-
const { logError:
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
(
|
|
204
|
+
async function ot(e, n, t, r, o) {
|
|
205
|
+
const { logError: u } = S(), l = new e();
|
|
206
|
+
o && o(l), t && t(l);
|
|
207
|
+
const a = (Array.isArray(n) ? n : [n]).map(
|
|
208
|
+
(i) => new Promise((f, c) => {
|
|
210
209
|
l.load(
|
|
211
|
-
|
|
212
|
-
(
|
|
213
|
-
|
|
210
|
+
i,
|
|
211
|
+
(w) => {
|
|
212
|
+
w.scene && Object.assign(w, $e(w.scene)), f(w);
|
|
214
213
|
},
|
|
215
|
-
|
|
216
|
-
(
|
|
214
|
+
r,
|
|
215
|
+
(w) => c(u("[useLoader] - Failed to load resource", w))
|
|
217
216
|
);
|
|
218
217
|
})
|
|
219
218
|
);
|
|
220
|
-
return
|
|
219
|
+
return Y(n) ? await Promise.all(a) : await a[0];
|
|
221
220
|
}
|
|
222
|
-
async function
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
(
|
|
221
|
+
async function st(e) {
|
|
222
|
+
const n = new Me(), t = new _e(n), r = (o) => new Promise((u, l) => {
|
|
223
|
+
t.load(
|
|
224
|
+
o,
|
|
225
|
+
(s) => u(s),
|
|
227
226
|
() => null,
|
|
228
227
|
() => {
|
|
229
228
|
l(new Error("[useTextures] - Failed to load texture"));
|
|
230
229
|
}
|
|
231
230
|
);
|
|
232
231
|
});
|
|
233
|
-
if (
|
|
234
|
-
const
|
|
235
|
-
return e.length > 1 ?
|
|
232
|
+
if (Y(e)) {
|
|
233
|
+
const o = await Promise.all(e.map((u) => r(u)));
|
|
234
|
+
return e.length > 1 ? o : o[0];
|
|
236
235
|
} else {
|
|
237
236
|
const {
|
|
238
|
-
map:
|
|
239
|
-
displacementMap:
|
|
237
|
+
map: o,
|
|
238
|
+
displacementMap: u,
|
|
240
239
|
normalMap: l,
|
|
241
|
-
roughnessMap:
|
|
242
|
-
metalnessMap:
|
|
243
|
-
aoMap:
|
|
240
|
+
roughnessMap: s,
|
|
241
|
+
metalnessMap: a,
|
|
242
|
+
aoMap: i,
|
|
244
243
|
alphaMap: f,
|
|
245
|
-
matcap:
|
|
244
|
+
matcap: c
|
|
246
245
|
} = e;
|
|
247
246
|
return {
|
|
248
|
-
map:
|
|
249
|
-
displacementMap:
|
|
250
|
-
normalMap: l ? await
|
|
251
|
-
roughnessMap:
|
|
252
|
-
metalnessMap:
|
|
253
|
-
aoMap:
|
|
254
|
-
alphaMap: f ? await
|
|
255
|
-
matcap:
|
|
247
|
+
map: o ? await r(o) : null,
|
|
248
|
+
displacementMap: u ? await r(u) : null,
|
|
249
|
+
normalMap: l ? await r(l) : null,
|
|
250
|
+
roughnessMap: s ? await r(s) : null,
|
|
251
|
+
metalnessMap: a ? await r(a) : null,
|
|
252
|
+
aoMap: i ? await r(i) : null,
|
|
253
|
+
alphaMap: f ? await r(f) : null,
|
|
254
|
+
matcap: c ? await r(c) : null
|
|
256
255
|
};
|
|
257
256
|
}
|
|
258
257
|
}
|
|
259
|
-
const
|
|
260
|
-
const
|
|
261
|
-
if (
|
|
258
|
+
const Ie = (e, { renderer: n, camera: t }) => {
|
|
259
|
+
const r = P(() => n.value.domElement), { x: o, y: u } = De({ target: r }), { width: l, height: s, top: a, left: i } = ke(r), f = new Pe(), c = ({ x: p, y: M }) => {
|
|
260
|
+
if (r.value)
|
|
262
261
|
return {
|
|
263
|
-
x: (
|
|
264
|
-
y: -((
|
|
262
|
+
x: (p - i.value) / l.value * 2 - 1,
|
|
263
|
+
y: -((M - a.value) / s.value) * 2 + 1
|
|
265
264
|
};
|
|
266
|
-
},
|
|
267
|
-
if (
|
|
268
|
-
return f.setFromCamera(new
|
|
269
|
-
},
|
|
270
|
-
const
|
|
271
|
-
x: (
|
|
272
|
-
y: (
|
|
265
|
+
}, w = ({ x: p, y: M }) => {
|
|
266
|
+
if (t.value)
|
|
267
|
+
return f.setFromCamera(new Ee(p, M), t.value), f.intersectObjects(e.value, !1);
|
|
268
|
+
}, C = (p) => {
|
|
269
|
+
const M = c({
|
|
270
|
+
x: (p == null ? void 0 : p.clientX) ?? o.value,
|
|
271
|
+
y: (p == null ? void 0 : p.clientY) ?? u.value
|
|
273
272
|
});
|
|
274
|
-
return
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
|
|
273
|
+
return M ? w(M) || [] : [];
|
|
274
|
+
}, _ = P(() => C()), d = k(), v = k(), y = (p, M) => {
|
|
275
|
+
p.trigger({ event: M, intersects: C(M) });
|
|
276
|
+
}, E = (p) => {
|
|
277
|
+
y(v, p);
|
|
279
278
|
};
|
|
280
|
-
let
|
|
281
|
-
const
|
|
282
|
-
var
|
|
283
|
-
|
|
284
|
-
},
|
|
285
|
-
var
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
return
|
|
289
|
-
|
|
279
|
+
let x;
|
|
280
|
+
const h = (p) => {
|
|
281
|
+
var M;
|
|
282
|
+
x = (M = C(p)[0]) == null ? void 0 : M.object;
|
|
283
|
+
}, T = (p) => {
|
|
284
|
+
var M;
|
|
285
|
+
p instanceof PointerEvent && x === ((M = C(p)[0]) == null ? void 0 : M.object) && y(d, p);
|
|
286
|
+
}, L = (p) => v.trigger({ event: p, intersects: [] });
|
|
287
|
+
return r.value.addEventListener("pointerup", T), r.value.addEventListener("pointerdown", h), r.value.addEventListener("pointermove", E), r.value.addEventListener("pointerleave", L), V(() => {
|
|
288
|
+
r != null && r.value && (r.value.removeEventListener("pointerup", T), r.value.removeEventListener("pointerdown", h), r.value.removeEventListener("pointermove", E), r.value.removeEventListener("pointerleave", L));
|
|
290
289
|
}), {
|
|
291
|
-
intersects:
|
|
292
|
-
onClick: (
|
|
293
|
-
onPointerMove: (
|
|
290
|
+
intersects: _,
|
|
291
|
+
onClick: (p) => d.on(p).off,
|
|
292
|
+
onPointerMove: (p) => v.on(p).off
|
|
294
293
|
};
|
|
295
294
|
};
|
|
296
|
-
function
|
|
297
|
-
const { logWarning: e } =
|
|
298
|
-
function
|
|
295
|
+
function it() {
|
|
296
|
+
const { logWarning: e } = S();
|
|
297
|
+
function n(r, o, u) {
|
|
299
298
|
let l = null;
|
|
300
|
-
return
|
|
301
|
-
|
|
302
|
-
}), l || e(`Child with ${
|
|
299
|
+
return r.traverse((s) => {
|
|
300
|
+
s[o] === u && (l = s);
|
|
301
|
+
}), l || e(`Child with ${o} '${u}' not found.`), l;
|
|
303
302
|
}
|
|
304
|
-
function
|
|
305
|
-
return
|
|
303
|
+
function t(r, o) {
|
|
304
|
+
return n(r, "name", o);
|
|
306
305
|
}
|
|
307
306
|
return {
|
|
308
|
-
seek:
|
|
309
|
-
seekByName:
|
|
307
|
+
seek: n,
|
|
308
|
+
seekByName: t
|
|
310
309
|
};
|
|
311
310
|
}
|
|
312
|
-
const
|
|
313
|
-
const
|
|
311
|
+
const Ne = (e, n) => {
|
|
312
|
+
const t = re({
|
|
314
313
|
click: /* @__PURE__ */ new Map(),
|
|
315
314
|
pointerMove: /* @__PURE__ */ new Map(),
|
|
316
315
|
pointerEnter: /* @__PURE__ */ new Map(),
|
|
317
316
|
pointerLeave: /* @__PURE__ */ new Map()
|
|
318
|
-
}),
|
|
319
|
-
Object.values(
|
|
320
|
-
},
|
|
321
|
-
const { onClick:
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
e.userData
|
|
325
|
-
const
|
|
326
|
-
() =>
|
|
327
|
-
Object.values(
|
|
328
|
-
({ uuid:
|
|
317
|
+
}), r = (i) => {
|
|
318
|
+
Object.values(t).forEach((f) => f.delete(i));
|
|
319
|
+
}, o = (i) => {
|
|
320
|
+
const { onClick: f, onPointerMove: c, onPointerEnter: w, onPointerLeave: C } = i;
|
|
321
|
+
f && t.click.set(i, f), c && t.pointerMove.set(i, c), w && t.pointerEnter.set(i, w), C && t.pointerLeave.set(i, C);
|
|
322
|
+
};
|
|
323
|
+
e.userData.tres__registerAtPointerEventHandler = o, e.userData.tres__deregisterAtPointerEventHandler = r;
|
|
324
|
+
const u = P(
|
|
325
|
+
() => je(
|
|
326
|
+
Object.values(t).map((i) => Array.from(i.keys())).flat(),
|
|
327
|
+
({ uuid: i }) => i
|
|
329
328
|
)
|
|
330
|
-
), { onClick:
|
|
331
|
-
|
|
332
|
-
var
|
|
333
|
-
|
|
329
|
+
), { onClick: l, onPointerMove: s } = Ie(u, n);
|
|
330
|
+
l(({ intersects: i, event: f }) => {
|
|
331
|
+
var c;
|
|
332
|
+
i.length && ((c = t.click.get(i[0].object)) == null || c(i[0], f));
|
|
334
333
|
});
|
|
335
|
-
let
|
|
336
|
-
return
|
|
337
|
-
var
|
|
338
|
-
const
|
|
339
|
-
|
|
334
|
+
let a;
|
|
335
|
+
return s(({ intersects: i, event: f }) => {
|
|
336
|
+
var d, v, y, E;
|
|
337
|
+
const c = (d = i == null ? void 0 : i[0]) == null ? void 0 : d.object, { pointerLeave: w, pointerEnter: C, pointerMove: _ } = t;
|
|
338
|
+
a && a !== c && ((v = w.get(a)) == null || v(a, f)), c && (a !== c && ((y = C.get(c)) == null || y(i[0], f)), (E = _.get(c)) == null || E(i[0], f)), a = c || null;
|
|
340
339
|
}), {
|
|
341
|
-
registerObject:
|
|
342
|
-
deregisterObject:
|
|
340
|
+
registerObject: o,
|
|
341
|
+
deregisterObject: r
|
|
343
342
|
};
|
|
344
343
|
};
|
|
345
|
-
function
|
|
344
|
+
function qe({
|
|
346
345
|
scene: e,
|
|
347
|
-
canvas:
|
|
348
|
-
windowSize:
|
|
349
|
-
disableRender:
|
|
350
|
-
rendererOptions:
|
|
346
|
+
canvas: n,
|
|
347
|
+
windowSize: t,
|
|
348
|
+
disableRender: r,
|
|
349
|
+
rendererOptions: o
|
|
351
350
|
}) {
|
|
352
|
-
const
|
|
353
|
-
() =>
|
|
354
|
-
), l =
|
|
355
|
-
height:
|
|
351
|
+
const u = P(
|
|
352
|
+
() => m(t) ? Se() : Ae(m(n).parentElement)
|
|
353
|
+
), l = P(() => u.value.width.value), s = P(() => u.value.height.value), a = P(() => l.value / s.value), i = {
|
|
354
|
+
height: s,
|
|
356
355
|
width: l,
|
|
357
|
-
aspectRatio:
|
|
358
|
-
}, f =
|
|
359
|
-
camera:
|
|
360
|
-
cameras:
|
|
361
|
-
addCamera:
|
|
362
|
-
removeCamera:
|
|
363
|
-
setCameraActive:
|
|
364
|
-
} =
|
|
356
|
+
aspectRatio: a
|
|
357
|
+
}, f = W(e), {
|
|
358
|
+
camera: c,
|
|
359
|
+
cameras: w,
|
|
360
|
+
addCamera: C,
|
|
361
|
+
removeCamera: _,
|
|
362
|
+
setCameraActive: d
|
|
363
|
+
} = Be({ sizes: i, scene: e }), { renderer: v } = We(
|
|
365
364
|
{
|
|
366
365
|
scene: e,
|
|
367
|
-
canvas:
|
|
368
|
-
options:
|
|
369
|
-
contextParts: { sizes:
|
|
370
|
-
disableRender:
|
|
366
|
+
canvas: n,
|
|
367
|
+
options: o,
|
|
368
|
+
contextParts: { sizes: i, camera: c },
|
|
369
|
+
disableRender: r
|
|
371
370
|
}
|
|
372
|
-
),
|
|
373
|
-
sizes:
|
|
374
|
-
scene:
|
|
375
|
-
camera:
|
|
376
|
-
cameras:
|
|
377
|
-
renderer:
|
|
378
|
-
addCamera:
|
|
379
|
-
removeCamera:
|
|
380
|
-
setCameraActive:
|
|
371
|
+
), y = {
|
|
372
|
+
sizes: i,
|
|
373
|
+
scene: I(f),
|
|
374
|
+
camera: c,
|
|
375
|
+
cameras: I(w),
|
|
376
|
+
renderer: v,
|
|
377
|
+
addCamera: C,
|
|
378
|
+
removeCamera: _,
|
|
379
|
+
setCameraActive: d
|
|
381
380
|
};
|
|
382
|
-
return
|
|
381
|
+
return ae("useTres", y), y;
|
|
383
382
|
}
|
|
384
|
-
function
|
|
385
|
-
const e =
|
|
383
|
+
function ut() {
|
|
384
|
+
const e = ne("useTres");
|
|
386
385
|
if (!e)
|
|
387
386
|
throw new Error("useTresContext must be used together with useTresContextProvider");
|
|
388
387
|
return e;
|
|
389
388
|
}
|
|
390
|
-
let H = null,
|
|
391
|
-
const { logError:
|
|
392
|
-
createElement(e,
|
|
393
|
-
var
|
|
394
|
-
if (
|
|
389
|
+
let H = null, g = null;
|
|
390
|
+
const { logError: U } = S(), Ue = {
|
|
391
|
+
createElement(e, n, t, r) {
|
|
392
|
+
var l, s;
|
|
393
|
+
if (r || (r = {}), r.args || (r.args = []), e === "template" || He(e))
|
|
395
394
|
return null;
|
|
396
|
-
let
|
|
395
|
+
let o = e.replace("Tres", ""), u;
|
|
397
396
|
if (e === "primitive") {
|
|
398
|
-
(
|
|
399
|
-
const
|
|
400
|
-
|
|
397
|
+
(r == null ? void 0 : r.object) === void 0 && U("Tres primitives need a prop 'object'");
|
|
398
|
+
const a = r.object;
|
|
399
|
+
o = a.type, u = Object.assign(a, { type: o, attach: r.attach, primitive: !0 });
|
|
401
400
|
} else {
|
|
402
|
-
const
|
|
403
|
-
|
|
401
|
+
const a = K.value[o];
|
|
402
|
+
a || U(`${o} is not defined on the THREE namespace. Use extend to add it to the catalog.`), u = new a(...r.args);
|
|
404
403
|
}
|
|
405
|
-
|
|
406
|
-
const { GEOMETRY_VIA_PROP: l, MATERIAL_VIA_PROP: r } = L;
|
|
407
|
-
return o.isObject3D && ((p = t == null ? void 0 : t.material) != null && p.isMaterial && (o.userData[r] = !0), (m = t == null ? void 0 : t.geometry) != null && m.isBufferGeometry && (o.userData[l] = !0)), o;
|
|
404
|
+
return u.isCamera && (r != null && r.position || u.position.set(3, 3, 3), r != null && r.lookAt || u.lookAt(0, 0, 0)), (r == null ? void 0 : r.attach) === void 0 && (u.isMaterial ? u.attach = "material" : u.isBufferGeometry && (u.attach = "geometry")), u.isObject3D && ((l = r == null ? void 0 : r.material) != null && l.isMaterial && (u.userData.tres__materialViaProp = !0), (s = r == null ? void 0 : r.geometry) != null && s.isBufferGeometry && (u.userData.tres__geometryViaProp = !0)), u;
|
|
408
405
|
},
|
|
409
|
-
insert(e,
|
|
410
|
-
var
|
|
411
|
-
if (
|
|
406
|
+
insert(e, n) {
|
|
407
|
+
var t, r, o, u, l, s, a, i, f;
|
|
408
|
+
if (n && n.isScene && (g = n), (((t = e == null ? void 0 : e.__vnode) == null ? void 0 : t.type) === "TresGroup" || ((r = e == null ? void 0 : e.__vnode) == null ? void 0 : r.type) === "TresObject3D") && n === null && !((u = (o = e == null ? void 0 : e.__vnode) == null ? void 0 : o.ctx) != null && u.asyncResolved)) {
|
|
412
409
|
H = e;
|
|
413
410
|
return;
|
|
414
411
|
} else
|
|
415
|
-
(l = e == null ? void 0 : e.__vnode) != null && l.type.includes("Controls") &&
|
|
416
|
-
|
|
412
|
+
(l = e == null ? void 0 : e.__vnode) != null && l.type.includes("Controls") && n === null && (H = g);
|
|
413
|
+
if (n || (n = H), e != null && e.isObject3D) {
|
|
414
|
+
if (e != null && e.isCamera) {
|
|
415
|
+
if (!(g != null && g.userData.tres__registerCamera))
|
|
416
|
+
throw "could not find tres__registerCamera on scene's userData";
|
|
417
|
+
(a = g == null ? void 0 : (s = g.userData).tres__registerCamera) == null || a.call(s, e);
|
|
418
|
+
}
|
|
419
|
+
if (e != null && e.onClick || e != null && e.onPointerMove || e != null && e.onPointerEnter || e != null && e.onPointerLeave) {
|
|
420
|
+
if (!(g != null && g.userData.tres__registerAtPointerEventHandler))
|
|
421
|
+
throw "could not find tres__registerAtPointerEventHandler on scene's userData";
|
|
422
|
+
(f = g == null ? void 0 : (i = g.userData).tres__registerAtPointerEventHandler) == null || f.call(i, e);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
e != null && e.isObject3D && (n != null && n.isObject3D) ? (n.add(e), e.dispatchEvent({ type: "added" })) : e != null && e.isFog ? n.fog = e : typeof (e == null ? void 0 : e.attach) == "string" && (e.__previousAttach = e[n == null ? void 0 : n.attach], n && (n[e.attach] = e));
|
|
417
426
|
},
|
|
418
427
|
remove(e) {
|
|
419
|
-
var
|
|
428
|
+
var n, t;
|
|
420
429
|
if (e) {
|
|
421
430
|
if (e.isObject3D) {
|
|
422
|
-
const
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}, s = (a
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
431
|
+
const r = e, o = (a) => {
|
|
432
|
+
var f, c;
|
|
433
|
+
const i = a;
|
|
434
|
+
a.userData.tres__materialViaProp || (f = i.material) == null || f.dispose(), a.userData.tres__geometryViaProp || (c = i.geometry) == null || c.dispose();
|
|
435
|
+
}, u = g == null ? void 0 : g.userData.tres__deregisterAtPointerEventHandler, l = (a) => {
|
|
436
|
+
if (!u)
|
|
437
|
+
throw "could not find tres__deregisterAtPointerEventHandler on scene's userData";
|
|
438
|
+
(a != null && a.onClick || a != null && a.onPointerMove || a != null && a.onPointerEnter || a != null && a.onPointerLeave) && (u == null || u(a));
|
|
439
|
+
}, s = (a) => {
|
|
440
|
+
const i = g == null ? void 0 : g.userData.tres__deregisterCamera;
|
|
441
|
+
if (!i)
|
|
442
|
+
throw "could not find tres__deregisterCamera on scene's userData";
|
|
443
|
+
a.isCamera && (i == null || i(a));
|
|
434
444
|
};
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}),
|
|
445
|
+
r.traverse((a) => {
|
|
446
|
+
o(a), s(a), l == null || l(a);
|
|
447
|
+
}), o(r), s(r), l == null || l(r);
|
|
438
448
|
}
|
|
439
|
-
(
|
|
449
|
+
(n = e.removeFromParent) == null || n.call(e), (t = e.dispose) == null || t.call(e);
|
|
440
450
|
}
|
|
441
451
|
},
|
|
442
|
-
patchProp(e,
|
|
452
|
+
patchProp(e, n, t, r) {
|
|
443
453
|
if (e) {
|
|
444
|
-
let
|
|
445
|
-
if (
|
|
446
|
-
if (
|
|
454
|
+
let o = e, u = n, l = A(u), s = o == null ? void 0 : o[l];
|
|
455
|
+
if (o.type === "BufferGeometry") {
|
|
456
|
+
if (u === "args")
|
|
447
457
|
return;
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
new
|
|
458
|
+
o.setAttribute(
|
|
459
|
+
A(u),
|
|
460
|
+
new Le(...r)
|
|
451
461
|
);
|
|
452
462
|
return;
|
|
453
463
|
}
|
|
454
|
-
if (
|
|
455
|
-
const
|
|
456
|
-
|
|
464
|
+
if (u.includes("-") && s === void 0) {
|
|
465
|
+
const i = u.split("-");
|
|
466
|
+
s = i.reduce((f, c) => f[A(c)], o), u = i.pop(), l = u.toLowerCase(), s != null && s.set || (o = i.reduce((f, c) => f[A(c)], o));
|
|
457
467
|
}
|
|
458
|
-
let
|
|
459
|
-
if (
|
|
460
|
-
Array.isArray(
|
|
468
|
+
let a = r;
|
|
469
|
+
if (a === "" && (a = !0), N(s)) {
|
|
470
|
+
Array.isArray(a) ? e[l](...a) : e[l](a);
|
|
461
471
|
return;
|
|
462
472
|
}
|
|
463
|
-
!(
|
|
473
|
+
!(s != null && s.set) && !N(s) ? o[l] = a : s.constructor === a.constructor && (s != null && s.copy) ? s == null || s.copy(a) : Array.isArray(a) ? s.set(...a) : !s.isColor && s.setScalar ? s.setScalar(a) : s.set(a);
|
|
464
474
|
}
|
|
465
475
|
},
|
|
466
476
|
parentNode(e) {
|
|
@@ -475,15 +485,15 @@ const { logError: q } = h(), qe = {
|
|
|
475
485
|
setScopeId: () => void 0,
|
|
476
486
|
cloneNode: () => void 0,
|
|
477
487
|
insertStaticContent: () => void 0
|
|
478
|
-
}, { createApp: Je } =
|
|
479
|
-
const
|
|
480
|
-
function
|
|
488
|
+
}, { createApp: Je } = oe(Ue), Ke = (e) => {
|
|
489
|
+
const n = Je(t);
|
|
490
|
+
function t() {
|
|
481
491
|
return e && e.default ? e.default() : [];
|
|
482
492
|
}
|
|
483
|
-
return
|
|
493
|
+
return n;
|
|
484
494
|
};
|
|
485
|
-
X(
|
|
486
|
-
const Xe = ["data-scene"],
|
|
495
|
+
X(pe);
|
|
496
|
+
const Xe = ["data-scene"], Ye = /* @__PURE__ */ se({
|
|
487
497
|
__name: "TresCanvas",
|
|
488
498
|
props: {
|
|
489
499
|
shadows: { type: Boolean },
|
|
@@ -510,53 +520,49 @@ const Xe = ["data-scene"], Qe = /* @__PURE__ */ ie({
|
|
|
510
520
|
failIfMajorPerformanceCaveat: { type: Boolean }
|
|
511
521
|
},
|
|
512
522
|
setup(e) {
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
const
|
|
523
|
+
const n = e, { logWarning: t } = S(), r = j(), o = W(new xe());
|
|
524
|
+
ee();
|
|
525
|
+
const u = ie();
|
|
516
526
|
let l;
|
|
517
|
-
const
|
|
518
|
-
l = Ke(
|
|
519
|
-
},
|
|
520
|
-
return
|
|
521
|
-
const
|
|
522
|
-
scene:
|
|
523
|
-
canvas:
|
|
524
|
-
windowSize:
|
|
525
|
-
disableRender:
|
|
526
|
-
rendererOptions:
|
|
527
|
-
...a,
|
|
528
|
-
antialias: a.antialias === void 0 ? !0 : a.antialias
|
|
529
|
-
// an opinionated default of tres
|
|
530
|
-
}
|
|
527
|
+
const s = (i) => {
|
|
528
|
+
l = Ke(u), l.provide("useTres", i), l.provide("extend", X), l.mount(o.value);
|
|
529
|
+
}, a = P(() => n.disableRender);
|
|
530
|
+
return ue(() => {
|
|
531
|
+
const i = r, f = qe({
|
|
532
|
+
scene: o.value,
|
|
533
|
+
canvas: i,
|
|
534
|
+
windowSize: n.windowSize,
|
|
535
|
+
disableRender: a,
|
|
536
|
+
rendererOptions: n
|
|
531
537
|
});
|
|
532
|
-
|
|
533
|
-
const { addCamera:
|
|
534
|
-
|
|
535
|
-
const
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
const
|
|
538
|
+
Ne(o.value, f);
|
|
539
|
+
const { addCamera: c, camera: w, cameras: C, removeCamera: _ } = f;
|
|
540
|
+
s(f);
|
|
541
|
+
const d = () => {
|
|
542
|
+
const v = new G(45, window.innerWidth / window.innerHeight, 0.1, 1e3);
|
|
543
|
+
v.position.set(3, 3, 3), v.lookAt(0, 0, 0), c(v);
|
|
544
|
+
const y = b(
|
|
539
545
|
() => {
|
|
540
|
-
|
|
546
|
+
C.value.length >= 2 && (v.removeFromParent(), _(v), y == null || y());
|
|
541
547
|
}
|
|
542
548
|
);
|
|
543
549
|
};
|
|
544
|
-
J(() =>
|
|
545
|
-
|
|
550
|
+
J(() => n.camera, (v, y) => {
|
|
551
|
+
v ? c(v) : y && (y.removeFromParent(), _(y));
|
|
546
552
|
}, {
|
|
547
553
|
immediate: !0
|
|
548
|
-
}),
|
|
554
|
+
}), w.value || (t(
|
|
549
555
|
"No camera found. Creating a default perspective camera. To have full control over a camera, please add one to the scene."
|
|
550
|
-
),
|
|
551
|
-
}), (
|
|
556
|
+
), d());
|
|
557
|
+
}), (i, f) => (le(), ce("canvas", {
|
|
552
558
|
ref_key: "canvas",
|
|
553
|
-
ref:
|
|
554
|
-
"data-scene":
|
|
555
|
-
style:
|
|
559
|
+
ref: r,
|
|
560
|
+
"data-scene": o.value.uuid,
|
|
561
|
+
style: fe({
|
|
556
562
|
display: "block",
|
|
557
563
|
width: "100%",
|
|
558
564
|
height: "100%",
|
|
559
|
-
position:
|
|
565
|
+
position: i.windowSize ? "fixed" : "relative",
|
|
560
566
|
top: 0,
|
|
561
567
|
left: 0,
|
|
562
568
|
pointerEvents: "auto",
|
|
@@ -565,40 +571,40 @@ const Xe = ["data-scene"], Qe = /* @__PURE__ */ ie({
|
|
|
565
571
|
})
|
|
566
572
|
}, null, 12, Xe));
|
|
567
573
|
}
|
|
568
|
-
}),
|
|
574
|
+
}), Qe = [
|
|
569
575
|
"TresCanvas",
|
|
570
576
|
"TresLeches",
|
|
571
577
|
"TresScene"
|
|
572
|
-
],
|
|
578
|
+
], Ze = {
|
|
573
579
|
template: {
|
|
574
580
|
compilerOptions: {
|
|
575
|
-
isCustomElement: (e) => e.startsWith("Tres") && !
|
|
581
|
+
isCustomElement: (e) => e.startsWith("Tres") && !Qe.includes(e) || e === "primitive"
|
|
576
582
|
}
|
|
577
583
|
}
|
|
578
|
-
},
|
|
584
|
+
}, lt = Ze, ct = {
|
|
579
585
|
install(e) {
|
|
580
|
-
e.component("TresCanvas",
|
|
586
|
+
e.component("TresCanvas", Ye);
|
|
581
587
|
}
|
|
582
588
|
};
|
|
583
589
|
export {
|
|
584
|
-
|
|
590
|
+
Ye as TresCanvas,
|
|
585
591
|
K as catalogue,
|
|
586
|
-
|
|
592
|
+
ct as default,
|
|
587
593
|
X as extend,
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
594
|
+
at as isProd,
|
|
595
|
+
Ve as normalizeColor,
|
|
596
|
+
nt as normalizeVectorFlexibleParam,
|
|
597
|
+
lt as templateCompilerOptions,
|
|
592
598
|
$e as trasverseObjects,
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
+
Be as useCamera,
|
|
600
|
+
ot as useLoader,
|
|
601
|
+
S as useLogger,
|
|
602
|
+
Ne as usePointerEventHandler,
|
|
603
|
+
Ie as useRaycaster,
|
|
604
|
+
ee as useRenderLoop,
|
|
599
605
|
We as useRenderer,
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
606
|
+
it as useSeek,
|
|
607
|
+
st as useTexture,
|
|
608
|
+
ut as useTresContext,
|
|
609
|
+
qe as useTresContextProvider
|
|
604
610
|
};
|