@tresjs/core 4.0.0-next.0 → 4.0.0-next.2
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/index.d.ts +3 -17
- package/dist/{components → src/components}/TresCanvas.vue.d.ts +10 -2
- package/dist/{composables → src/composables}/useCamera/index.d.ts +366 -399
- package/dist/src/composables/usePointerEventHandler/index.d.ts +17 -0
- package/dist/{composables → src/composables}/useRenderer/const.d.ts +4 -0
- package/dist/{composables → src/composables}/useRenderer/index.d.ts +8 -3
- package/dist/src/composables/useSizes/index.d.ts +11 -0
- package/dist/src/composables/useTresContextProvider/index.d.ts +75 -0
- package/dist/src/core/nodeOps.d.ts +4 -0
- package/dist/src/directives/index.d.ts +5 -0
- package/dist/src/directives/vAlwaysLookAt.d.ts +6 -0
- package/dist/src/directives/vDistanceTo.d.ts +6 -0
- package/dist/src/directives/vLightHelper.d.ts +6 -0
- package/dist/src/directives/vLog.d.ts +6 -0
- package/dist/src/index.d.ts +18 -0
- package/dist/{types → src/types}/index.d.ts +20 -16
- package/dist/{utils → src/utils}/index.d.ts +3 -2
- package/dist/tres.js +866 -587
- package/dist/tres.umd.cjs +3 -3
- package/package.json +30 -29
- package/dist/composables/useLoader/index.d.ts +0 -44
- package/dist/composables/usePointerEventHandler/index.d.ts +0 -19
- package/dist/composables/useRaycaster/index.d.ts +0 -18
- package/dist/composables/useSeek/index.d.ts +0 -19
- package/dist/composables/useTresContextProvider/index.d.ts +0 -44
- package/dist/core/nodeOps.d.ts +0 -3
- package/dist/core/renderer.d.ts +0 -5
- /package/dist/{components → src/components}/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useLogger.d.ts +0 -0
- /package/dist/{composables → src/composables}/useRenderLoop/index.d.ts +0 -0
- /package/dist/{composables → src/composables}/useTexture/index.d.ts +0 -0
- /package/dist/{core → src/core}/catalogue.d.ts +0 -0
- /package/dist/{core → src/core}/revision.d.ts +0 -0
- /package/dist/{devtools → src/devtools}/highlight.d.ts +0 -0
- /package/dist/{devtools → src/devtools}/index.d.ts +0 -0
- /package/dist/{devtools → src/devtools}/plugin.d.ts +0 -0
- /package/dist/{devtools → src/devtools}/utils.d.ts +0 -0
- /package/dist/{utils → src/utils}/normalize.d.ts +0 -0
- /package/dist/{utils → src/utils}/perf.d.ts +0 -0
- /package/dist/{utils → src/utils}/template-compiler-options.d.ts +0 -0
- /package/dist/{utils → src/utils}/test-utils.d.ts +0 -0
package/dist/tres.js
CHANGED
|
@@ -1,71 +1,185 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/core
|
|
3
|
-
* version: v4.0.0-next.
|
|
4
|
-
* (c)
|
|
3
|
+
* version: v4.0.0-next.2
|
|
4
|
+
* (c) 2024
|
|
5
5
|
* description: Declarative ThreeJS using Vue Components
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
import { ref as
|
|
12
|
-
import * as
|
|
13
|
-
import { PerspectiveCamera as
|
|
14
|
-
import { createEventHook as
|
|
15
|
-
const
|
|
16
|
-
|
|
8
|
+
var $e = Object.defineProperty;
|
|
9
|
+
var He = (e, r, t) => r in e ? $e(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
|
|
10
|
+
var Y = (e, r, t) => (He(e, typeof r != "symbol" ? r + "" : r, t), t);
|
|
11
|
+
import { ref as k, computed as x, watchEffect as se, onUnmounted as J, shallowRef as $, watch as I, reactive as be, readonly as Z, provide as ee, inject as Ne, defineComponent as le, useSlots as Fe, getCurrentInstance as ue, onMounted as We, openBlock as Ue, createElementBlock as Ge, normalizeClass as ze, unref as Ve, normalizeStyle as Je, createRenderer as Qe, h as ce, Fragment as Ye } from "vue";
|
|
12
|
+
import * as Me from "three";
|
|
13
|
+
import { PerspectiveCamera as te, Camera as qe, Clock as Ke, Vector3 as _e, Color as G, MeshBasicMaterial as Ce, DoubleSide as Xe, REVISION as Ze, SRGBColorSpace as et, ACESFilmicToneMapping as Ee, PCFSoftShadowMap as tt, NoToneMapping as nt, WebGLRenderer as q, LoadingManager as rt, TextureLoader as ot, Vector2 as st, Raycaster as it, BufferAttribute as at, Scene as lt, Line as ut, BufferGeometry as de, Float32BufferAttribute as fe, LineBasicMaterial as ct, Mesh as dt, BackSide as ft, DirectionalLightHelper as pt, PointLightHelper as mt, SpotLightHelper as vt, HemisphereLightHelper as gt, ArrowHelper as ht } from "three";
|
|
14
|
+
import { createEventHook as H, useRafFn as Se, toValue as _, unrefElement as yt, useDevicePixelRatio as wt, usePointer as bt, useElementBounding as Mt, useWindowSize as _t, useElementSize as Ct, refDebounced as pe, useFps as Et, useMemory as St } from "@vueuse/core";
|
|
15
|
+
const xt = "@tresjs/core", Tt = "module", kt = "4.0.0-next.2", Pt = "pnpm@8.10.2", At = "Declarative ThreeJS using Vue Components", Lt = "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)", Ot = "MIT", Bt = [
|
|
16
|
+
"vue",
|
|
17
|
+
"3d",
|
|
18
|
+
"threejs",
|
|
19
|
+
"three",
|
|
20
|
+
"threejs-vue"
|
|
21
|
+
], jt = !1, Dt = {
|
|
22
|
+
".": {
|
|
23
|
+
types: "./dist/index.d.ts",
|
|
24
|
+
require: "./dist/tres.umd.cjs",
|
|
25
|
+
import: "./dist/tres.js"
|
|
26
|
+
},
|
|
27
|
+
"./components": {
|
|
28
|
+
types: "./dist/components/index.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./composables": {
|
|
31
|
+
types: "./dist/composables/index.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./types": {
|
|
34
|
+
types: "./dist/types/index.d.ts"
|
|
35
|
+
},
|
|
36
|
+
"./utils": {
|
|
37
|
+
types: "./dist/utils/index.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"./*": "./*"
|
|
40
|
+
}, It = "./dist/tres.js", Rt = "./dist/tres.js", $t = "./dist/index.d.ts", Ht = [
|
|
41
|
+
"dist",
|
|
42
|
+
"*.d.ts"
|
|
43
|
+
], Nt = {
|
|
44
|
+
access: "public"
|
|
45
|
+
}, Ft = {
|
|
46
|
+
dev: "cd playground && npm run dev",
|
|
47
|
+
build: "vite build",
|
|
48
|
+
playground: "cd playground && npm run dev",
|
|
49
|
+
test: "vitest",
|
|
50
|
+
"test:ci": "vitest run",
|
|
51
|
+
"test:ui": "vitest --ui",
|
|
52
|
+
release: "release-it",
|
|
53
|
+
coverage: "vitest run --coverage",
|
|
54
|
+
lint: "eslint . --ext .js,.jsx,.ts,.tsx,.vue",
|
|
55
|
+
"docs:dev": "vitepress dev docs",
|
|
56
|
+
"docs:build": "vitepress build docs",
|
|
57
|
+
"docs:serve": "vitepress serve docs",
|
|
58
|
+
"docs:preview": "vitepress preview docs",
|
|
59
|
+
"docs:contributors": "esno scripts/update-contributors.ts"
|
|
60
|
+
}, Wt = {
|
|
61
|
+
three: ">=0.133",
|
|
62
|
+
vue: ">=3.4"
|
|
63
|
+
}, Ut = {
|
|
64
|
+
"@alvarosabu/utils": "^3.2.0",
|
|
65
|
+
"@vue/devtools-api": "^6.6.1",
|
|
66
|
+
"@vueuse/core": "^10.9.0"
|
|
67
|
+
}, Gt = {
|
|
68
|
+
"@release-it/conventional-changelog": "^8.0.1",
|
|
69
|
+
"@stackblitz/sdk": "^1.9.0",
|
|
70
|
+
"@tresjs/cientos": "3.8.0",
|
|
71
|
+
"@tresjs/eslint-config-vue": "^0.2.1",
|
|
72
|
+
"@types/three": "^0.162.0",
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^7.4.0",
|
|
74
|
+
"@typescript-eslint/parser": "^7.4.0",
|
|
75
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
76
|
+
"@vitest/coverage-c8": "^0.33.0",
|
|
77
|
+
"@vitest/ui": "^1.4.0",
|
|
78
|
+
"@vue/test-utils": "^2.4.5",
|
|
79
|
+
eslint: "^8.57.0",
|
|
80
|
+
"eslint-plugin-vue": "^9.24.0",
|
|
81
|
+
esno: "^4.7.0",
|
|
82
|
+
gsap: "^3.12.5",
|
|
83
|
+
jsdom: "^24.0.0",
|
|
84
|
+
kolorist: "^1.8.0",
|
|
85
|
+
ohmyfetch: "^0.4.21",
|
|
86
|
+
pathe: "^1.1.2",
|
|
87
|
+
"release-it": "^17.1.1",
|
|
88
|
+
"rollup-plugin-analyzer": "^4.0.0",
|
|
89
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
90
|
+
"rollup-plugin-visualizer": "^5.12.0",
|
|
91
|
+
three: "^0.162.0",
|
|
92
|
+
unocss: "^0.58.7",
|
|
93
|
+
unplugin: "^1.10.0",
|
|
94
|
+
"unplugin-vue-components": "^0.26.0",
|
|
95
|
+
vite: "^5.2.6",
|
|
96
|
+
"vite-plugin-banner": "^0.7.1",
|
|
97
|
+
"vite-plugin-dts": "3.7.3",
|
|
98
|
+
"vite-plugin-inspect": "^0.8.3",
|
|
99
|
+
"vite-plugin-require-transform": "^1.0.21",
|
|
100
|
+
"vite-svg-loader": "^5.1.0",
|
|
101
|
+
vitepress: "1.0.1",
|
|
102
|
+
vitest: "^1.4.0",
|
|
103
|
+
vue: "^3.4.21",
|
|
104
|
+
"vue-demi": "^0.14.7"
|
|
105
|
+
}, zt = {
|
|
106
|
+
name: xt,
|
|
107
|
+
type: Tt,
|
|
108
|
+
version: kt,
|
|
109
|
+
packageManager: Pt,
|
|
110
|
+
description: At,
|
|
111
|
+
author: Lt,
|
|
112
|
+
license: Ot,
|
|
113
|
+
keywords: Bt,
|
|
114
|
+
sideEffects: jt,
|
|
115
|
+
exports: Dt,
|
|
116
|
+
main: It,
|
|
117
|
+
module: Rt,
|
|
118
|
+
types: $t,
|
|
119
|
+
files: Ht,
|
|
120
|
+
publishConfig: Nt,
|
|
121
|
+
scripts: Ft,
|
|
122
|
+
peerDependencies: Wt,
|
|
123
|
+
dependencies: Ut,
|
|
124
|
+
devDependencies: Gt
|
|
125
|
+
}, Vt = ({ sizes: e, scene: r }) => {
|
|
126
|
+
const t = k([]), s = x(
|
|
17
127
|
() => t.value[0]
|
|
18
|
-
),
|
|
19
|
-
t.value.some(({ uuid: c }) => c ===
|
|
20
|
-
},
|
|
21
|
-
t.value = t.value.filter(({ uuid:
|
|
22
|
-
},
|
|
23
|
-
const
|
|
24
|
-
if (!
|
|
128
|
+
), i = (o, u = !1) => {
|
|
129
|
+
t.value.some(({ uuid: c }) => c === o.uuid) || (u ? n(o) : t.value.push(o));
|
|
130
|
+
}, l = (o) => {
|
|
131
|
+
t.value = t.value.filter(({ uuid: u }) => u !== o.uuid);
|
|
132
|
+
}, n = (o) => {
|
|
133
|
+
const u = o instanceof qe ? o : t.value.find((f) => f.uuid === o);
|
|
134
|
+
if (!u)
|
|
25
135
|
return;
|
|
26
|
-
const c = t.value.filter(({ uuid:
|
|
27
|
-
t.value = [
|
|
136
|
+
const c = t.value.filter(({ uuid: f }) => f !== u.uuid);
|
|
137
|
+
t.value = [u, ...c];
|
|
28
138
|
};
|
|
29
|
-
return
|
|
30
|
-
e.aspectRatio.value && t.value.forEach((
|
|
31
|
-
|
|
139
|
+
return se(() => {
|
|
140
|
+
e.aspectRatio.value && t.value.forEach((o) => {
|
|
141
|
+
!o.manual && (o instanceof te || Jt(o)) && (o instanceof te ? o.aspect = e.aspectRatio.value : (o.left = e.width.value * -0.5, o.right = e.width.value * 0.5, o.top = e.height.value * 0.5, o.bottom = e.height.value * -0.5), o.updateProjectionMatrix());
|
|
32
142
|
});
|
|
33
|
-
}),
|
|
143
|
+
}), J(() => {
|
|
34
144
|
t.value = [];
|
|
35
145
|
}), {
|
|
36
|
-
camera:
|
|
146
|
+
camera: s,
|
|
37
147
|
cameras: t,
|
|
38
|
-
registerCamera:
|
|
39
|
-
deregisterCamera:
|
|
40
|
-
setCameraActive:
|
|
148
|
+
registerCamera: i,
|
|
149
|
+
deregisterCamera: l,
|
|
150
|
+
setCameraActive: n
|
|
41
151
|
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
152
|
+
};
|
|
153
|
+
function Jt(e) {
|
|
154
|
+
return e.hasOwnProperty("isOrthographicCamera") && e.isOrthographicCamera;
|
|
155
|
+
}
|
|
156
|
+
const xe = H(), Te = H(), ie = H(), R = new Ke();
|
|
157
|
+
let z = 0, V = 0;
|
|
158
|
+
const { pause: Qt, resume: Yt, isActive: qt } = Se(
|
|
45
159
|
() => {
|
|
46
|
-
|
|
160
|
+
xe.trigger({ delta: z, elapsed: V, clock: R }), Te.trigger({ delta: z, elapsed: V, clock: R }), ie.trigger({ delta: z, elapsed: V, clock: R });
|
|
47
161
|
},
|
|
48
162
|
{ immediate: !1 }
|
|
49
163
|
);
|
|
50
|
-
|
|
51
|
-
|
|
164
|
+
ie.on(() => {
|
|
165
|
+
z = R.getDelta(), V = R.getElapsedTime();
|
|
52
166
|
});
|
|
53
|
-
const
|
|
54
|
-
onBeforeLoop:
|
|
55
|
-
onLoop:
|
|
56
|
-
onAfterLoop:
|
|
57
|
-
pause:
|
|
58
|
-
resume:
|
|
59
|
-
isActive:
|
|
60
|
-
}),
|
|
61
|
-
function
|
|
62
|
-
function e(
|
|
63
|
-
console.error(`${
|
|
167
|
+
const ae = () => ({
|
|
168
|
+
onBeforeLoop: xe.on,
|
|
169
|
+
onLoop: Te.on,
|
|
170
|
+
onAfterLoop: ie.on,
|
|
171
|
+
pause: Qt,
|
|
172
|
+
resume: Yt,
|
|
173
|
+
isActive: qt
|
|
174
|
+
}), Un = !0, me = "[TresJS ▲ ■ ●] ";
|
|
175
|
+
function P() {
|
|
176
|
+
function e(s, i) {
|
|
177
|
+
console.error(`${me} ${s}`, i || "");
|
|
64
178
|
}
|
|
65
|
-
function r(
|
|
66
|
-
console.warn(`${
|
|
179
|
+
function r(s) {
|
|
180
|
+
console.warn(`${me} ${s}`);
|
|
67
181
|
}
|
|
68
|
-
function t(
|
|
182
|
+
function t(s, i) {
|
|
69
183
|
}
|
|
70
184
|
return {
|
|
71
185
|
logError: e,
|
|
@@ -73,418 +187,455 @@ function j() {
|
|
|
73
187
|
logMessage: t
|
|
74
188
|
};
|
|
75
189
|
}
|
|
76
|
-
function
|
|
77
|
-
return typeof e == "number" ? [e, e, e] : e instanceof
|
|
190
|
+
function Gn(e) {
|
|
191
|
+
return typeof e == "number" ? [e, e, e] : e instanceof _e ? [e.x, e.y, e.z] : e;
|
|
78
192
|
}
|
|
79
|
-
function
|
|
80
|
-
return e instanceof
|
|
193
|
+
function Kt(e) {
|
|
194
|
+
return e instanceof G ? e : Array.isArray(e) ? new G(...e) : new G(e);
|
|
81
195
|
}
|
|
82
|
-
class
|
|
196
|
+
class Xt extends Me.Mesh {
|
|
83
197
|
constructor(...t) {
|
|
84
198
|
super(...t);
|
|
85
|
-
|
|
86
|
-
|
|
199
|
+
Y(this, "type", "HightlightMesh");
|
|
200
|
+
Y(this, "createTime");
|
|
87
201
|
this.createTime = Date.now();
|
|
88
202
|
}
|
|
89
203
|
onBeforeRender() {
|
|
90
|
-
const
|
|
91
|
-
this.scale.set(
|
|
204
|
+
const s = (Date.now() - this.createTime) / 1e3, n = 1 + 0.07 * Math.sin(2.5 * s);
|
|
205
|
+
this.scale.set(n, n, n);
|
|
92
206
|
}
|
|
93
207
|
}
|
|
94
|
-
const
|
|
208
|
+
const ke = (e, r) => {
|
|
95
209
|
for (const t of Object.keys(r))
|
|
96
|
-
r[t] instanceof Object && Object.assign(r[t],
|
|
210
|
+
r[t] instanceof Object && Object.assign(r[t], ke(e[t], r[t]));
|
|
97
211
|
return Object.assign(e || {}, r), e;
|
|
98
|
-
},
|
|
99
|
-
function
|
|
212
|
+
}, Zt = "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", en = /* @__PURE__ */ tn(Zt);
|
|
213
|
+
function ve(e) {
|
|
100
214
|
return e && e.nodeType === 1;
|
|
101
215
|
}
|
|
102
|
-
function
|
|
216
|
+
function F(e) {
|
|
103
217
|
return e.replace(/-([a-z])/g, (r, t) => t.toUpperCase());
|
|
104
218
|
}
|
|
105
|
-
function
|
|
106
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
107
|
-
for (let
|
|
108
|
-
t[
|
|
109
|
-
return r ? (
|
|
219
|
+
function tn(e, r) {
|
|
220
|
+
const t = /* @__PURE__ */ Object.create(null), s = e.split(",");
|
|
221
|
+
for (let i = 0; i < s.length; i++)
|
|
222
|
+
t[s[i]] = !0;
|
|
223
|
+
return r ? (i) => !!t[i.toLowerCase()] : (i) => !!t[i];
|
|
110
224
|
}
|
|
111
|
-
const
|
|
112
|
-
const t = /* @__PURE__ */ new Set(),
|
|
113
|
-
for (const
|
|
114
|
-
const
|
|
115
|
-
t.has(
|
|
225
|
+
const nn = (e, r) => {
|
|
226
|
+
const t = /* @__PURE__ */ new Set(), s = [];
|
|
227
|
+
for (const i of e) {
|
|
228
|
+
const l = r(i);
|
|
229
|
+
t.has(l) || (t.add(l), s.push(i));
|
|
116
230
|
}
|
|
117
|
-
return
|
|
118
|
-
},
|
|
231
|
+
return s;
|
|
232
|
+
}, ge = (e, r) => {
|
|
119
233
|
if (!r)
|
|
120
234
|
return;
|
|
121
235
|
const t = Array.isArray(r) ? r : r.match(/([^[.\]])+/g);
|
|
122
|
-
return t == null ? void 0 : t.reduce((
|
|
123
|
-
},
|
|
124
|
-
const
|
|
125
|
-
|
|
236
|
+
return t == null ? void 0 : t.reduce((s, i) => s && s[i], e);
|
|
237
|
+
}, rn = (e, r, t) => {
|
|
238
|
+
const s = Array.isArray(r) ? r : r.match(/([^[.\]])+/g);
|
|
239
|
+
s && s.reduce((i, l, n) => (i[l] === void 0 && (i[l] = {}), n === s.length - 1 && (i[l] = t), i[l]), e);
|
|
126
240
|
};
|
|
127
|
-
function
|
|
128
|
-
if (
|
|
129
|
-
const
|
|
130
|
-
return
|
|
241
|
+
function Pe(e, r) {
|
|
242
|
+
if (ve(e) && ve(r)) {
|
|
243
|
+
const i = e.attributes, l = r.attributes;
|
|
244
|
+
return i.length !== l.length ? !1 : Array.from(i).every(({ name: n, value: o }) => r.getAttribute(n) === o);
|
|
131
245
|
}
|
|
132
246
|
if (e === r)
|
|
133
247
|
return !0;
|
|
134
248
|
if (e === null || typeof e != "object" || r === null || typeof r != "object")
|
|
135
249
|
return !1;
|
|
136
|
-
const t = Object.keys(e),
|
|
137
|
-
if (t.length !==
|
|
250
|
+
const t = Object.keys(e), s = Object.keys(r);
|
|
251
|
+
if (t.length !== s.length)
|
|
138
252
|
return !1;
|
|
139
|
-
for (const
|
|
140
|
-
if (!
|
|
253
|
+
for (const i of t)
|
|
254
|
+
if (!s.includes(i) || !Pe(e[i], r[i]))
|
|
141
255
|
return !1;
|
|
142
256
|
return !0;
|
|
143
257
|
}
|
|
144
|
-
function
|
|
258
|
+
function on(e, r) {
|
|
145
259
|
if (!Array.isArray(e) || !Array.isArray(r) || e.length !== r.length)
|
|
146
260
|
return !1;
|
|
147
261
|
for (let t = 0; t < e.length; t++)
|
|
148
|
-
if (!
|
|
262
|
+
if (!Pe(e[t], r[t]))
|
|
149
263
|
return !1;
|
|
150
264
|
return !0;
|
|
151
265
|
}
|
|
152
|
-
const
|
|
153
|
-
function
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
return
|
|
157
|
-
for (const c of
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
return
|
|
266
|
+
const sn = Array.isArray;
|
|
267
|
+
function an(e, r, t, s) {
|
|
268
|
+
const i = (u) => {
|
|
269
|
+
if (u.uuid === r)
|
|
270
|
+
return u;
|
|
271
|
+
for (const c of u.children) {
|
|
272
|
+
const f = i(c);
|
|
273
|
+
if (f)
|
|
274
|
+
return f;
|
|
161
275
|
}
|
|
162
|
-
},
|
|
163
|
-
if (!
|
|
276
|
+
}, l = i(e);
|
|
277
|
+
if (!l) {
|
|
164
278
|
console.warn("Object with UUID not found in the scene.");
|
|
165
279
|
return;
|
|
166
280
|
}
|
|
167
|
-
let
|
|
168
|
-
for (let
|
|
169
|
-
if (
|
|
170
|
-
|
|
281
|
+
let n = l;
|
|
282
|
+
for (let u = 0; u < t.length - 1; u++)
|
|
283
|
+
if (n[t[u]] !== void 0)
|
|
284
|
+
n = n[t[u]];
|
|
171
285
|
else {
|
|
172
286
|
console.warn(`Property path is not valid: ${t.join(".")}`);
|
|
173
287
|
return;
|
|
174
288
|
}
|
|
175
|
-
const
|
|
176
|
-
o
|
|
289
|
+
const o = t[t.length - 1];
|
|
290
|
+
n[o] !== void 0 ? n[o] = s : console.warn(`Property path is not valid: ${t.join(".")}`);
|
|
177
291
|
}
|
|
178
|
-
function
|
|
179
|
-
const r = new
|
|
292
|
+
function ln(e) {
|
|
293
|
+
const r = new Ce({
|
|
180
294
|
color: 11003607,
|
|
181
295
|
// Highlight color, e.g., yellow
|
|
182
296
|
transparent: !0,
|
|
183
297
|
opacity: 0.2,
|
|
184
298
|
depthTest: !1,
|
|
185
299
|
// So the highlight is always visible
|
|
186
|
-
side:
|
|
300
|
+
side: Xe
|
|
187
301
|
// To e
|
|
188
302
|
});
|
|
189
|
-
return new
|
|
303
|
+
return new Xt(e.geometry.clone(), r);
|
|
190
304
|
}
|
|
191
|
-
|
|
305
|
+
function Ae(e) {
|
|
306
|
+
var t;
|
|
307
|
+
let r = e.value;
|
|
308
|
+
return e.value && ((t = e.value) != null && t.isMesh) && (r = e.value.position), Array.isArray(e.value) && (r = new _e(...r)), r;
|
|
309
|
+
}
|
|
310
|
+
const un = Number.parseInt(Ze.replace("dev", "")), W = {
|
|
192
311
|
realistic: {
|
|
193
312
|
shadows: !0,
|
|
194
313
|
physicallyCorrectLights: !0,
|
|
195
|
-
outputColorSpace:
|
|
196
|
-
toneMapping:
|
|
314
|
+
outputColorSpace: et,
|
|
315
|
+
toneMapping: Ee,
|
|
197
316
|
toneMappingExposure: 3,
|
|
198
317
|
shadowMap: {
|
|
199
318
|
enabled: !0,
|
|
200
|
-
type:
|
|
319
|
+
type: tt
|
|
201
320
|
}
|
|
321
|
+
},
|
|
322
|
+
flat: {
|
|
323
|
+
toneMapping: nt,
|
|
324
|
+
toneMappingExposure: 1
|
|
202
325
|
}
|
|
203
326
|
};
|
|
204
|
-
function
|
|
327
|
+
function cn({
|
|
205
328
|
scene: e,
|
|
206
329
|
canvas: r,
|
|
207
330
|
options: t,
|
|
208
|
-
disableRender:
|
|
209
|
-
|
|
331
|
+
disableRender: s,
|
|
332
|
+
emit: i,
|
|
333
|
+
contextParts: { sizes: l, camera: n, render: o, invalidate: u, advance: c }
|
|
210
334
|
}) {
|
|
211
|
-
const
|
|
212
|
-
alpha:
|
|
213
|
-
depth:
|
|
214
|
-
canvas:
|
|
215
|
-
context:
|
|
216
|
-
stencil:
|
|
217
|
-
antialias:
|
|
218
|
-
precision:
|
|
219
|
-
powerPreference:
|
|
220
|
-
premultipliedAlpha:
|
|
221
|
-
preserveDrawingBuffer:
|
|
222
|
-
logarithmicDepthBuffer:
|
|
223
|
-
failIfMajorPerformanceCaveat:
|
|
224
|
-
})),
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
335
|
+
const f = x(() => ({
|
|
336
|
+
alpha: _(t.alpha) ?? !0,
|
|
337
|
+
depth: _(t.depth),
|
|
338
|
+
canvas: yt(r),
|
|
339
|
+
context: _(t.context),
|
|
340
|
+
stencil: _(t.stencil),
|
|
341
|
+
antialias: _(t.antialias) ?? !0,
|
|
342
|
+
precision: _(t.precision),
|
|
343
|
+
powerPreference: _(t.powerPreference),
|
|
344
|
+
premultipliedAlpha: _(t.premultipliedAlpha),
|
|
345
|
+
preserveDrawingBuffer: _(t.preserveDrawingBuffer),
|
|
346
|
+
logarithmicDepthBuffer: _(t.logarithmicDepthBuffer),
|
|
347
|
+
failIfMajorPerformanceCaveat: _(t.failIfMajorPerformanceCaveat)
|
|
348
|
+
})), a = $(new q(f.value));
|
|
349
|
+
function g() {
|
|
350
|
+
t.renderMode === "on-demand" && u();
|
|
351
|
+
}
|
|
352
|
+
I(f, () => {
|
|
353
|
+
a.value.dispose(), a.value = new q(f.value), g();
|
|
354
|
+
}), I([l.width, l.height], () => {
|
|
355
|
+
a.value.setSize(l.width.value, l.height.value), g();
|
|
356
|
+
}, {
|
|
357
|
+
immediate: !0
|
|
358
|
+
}), I(() => t.clearColor, g);
|
|
359
|
+
const { pixelRatio: d } = wt();
|
|
360
|
+
I(d, () => {
|
|
361
|
+
a.value.setPixelRatio(d.value);
|
|
233
362
|
});
|
|
234
|
-
const { logError:
|
|
235
|
-
|
|
363
|
+
const { logError: h } = P(), { resume: y, onLoop: p } = ae();
|
|
364
|
+
p(() => {
|
|
365
|
+
n.value && !_(s) && o.frames.value > 0 && (a.value.render(e, n.value), i("render", a.value)), o.priority.value = 0, _(t.renderMode) === "always" ? o.frames.value = 1 : o.frames.value = Math.max(0, o.frames.value - 1);
|
|
366
|
+
}), y();
|
|
367
|
+
const v = (() => {
|
|
368
|
+
const M = new q(), w = {
|
|
236
369
|
shadowMap: {
|
|
237
|
-
enabled:
|
|
238
|
-
type:
|
|
370
|
+
enabled: M.shadowMap.enabled,
|
|
371
|
+
type: M.shadowMap.type
|
|
239
372
|
},
|
|
240
|
-
toneMapping:
|
|
241
|
-
toneMappingExposure:
|
|
242
|
-
outputColorSpace:
|
|
373
|
+
toneMapping: M.toneMapping,
|
|
374
|
+
toneMappingExposure: M.toneMappingExposure,
|
|
375
|
+
outputColorSpace: M.outputColorSpace
|
|
243
376
|
};
|
|
244
|
-
return
|
|
245
|
-
})();
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
377
|
+
return M.dispose(), w;
|
|
378
|
+
})(), C = _(t.renderMode);
|
|
379
|
+
return C === "on-demand" && u(), C === "manual" && setTimeout(() => {
|
|
380
|
+
c();
|
|
381
|
+
}, 1), se(() => {
|
|
382
|
+
const M = _(t.preset);
|
|
383
|
+
M && (M in W || h(`Renderer Preset must be one of these: ${Object.keys(W).join(", ")}`), ke(a.value, W[M])), C === "always" && (o.frames.value = Math.max(1, o.frames.value));
|
|
384
|
+
const w = (L, A) => {
|
|
385
|
+
const O = _(L), Q = () => {
|
|
386
|
+
if (M)
|
|
387
|
+
return ge(W[M], A);
|
|
253
388
|
};
|
|
254
|
-
if (
|
|
255
|
-
return
|
|
256
|
-
const
|
|
257
|
-
return
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
|
|
389
|
+
if (O !== void 0)
|
|
390
|
+
return O;
|
|
391
|
+
const N = Q();
|
|
392
|
+
return N !== void 0 ? N : ge(v, A);
|
|
393
|
+
}, b = (L, A) => rn(a.value, A, w(L, A));
|
|
394
|
+
b(t.shadows, "shadowMap.enabled"), b(t.toneMapping ?? Ee, "toneMapping"), b(t.shadowMapType, "shadowMap.type"), un < 150 && b(!t.useLegacyLights, "physicallyCorrectLights"), b(t.outputColorSpace, "outputColorSpace"), b(t.toneMappingExposure, "toneMappingExposure");
|
|
395
|
+
const E = w(t.clearColor, "clearColor");
|
|
396
|
+
E && a.value.setClearColor(
|
|
397
|
+
E ? Kt(E) : new G(0)
|
|
263
398
|
// default clear color is not easily/efficiently retrievable from three
|
|
264
399
|
);
|
|
265
|
-
})
|
|
266
|
-
|
|
267
|
-
return _(() => {
|
|
268
|
-
s.value && !E(n) && i.value.render(e, s.value);
|
|
269
|
-
}), g(), U(() => {
|
|
270
|
-
u(), i.value.dispose(), i.value.forceContextLoss();
|
|
400
|
+
}), J(() => {
|
|
401
|
+
a.value.dispose(), a.value.forceContextLoss();
|
|
271
402
|
}), {
|
|
272
|
-
renderer:
|
|
403
|
+
renderer: a
|
|
273
404
|
};
|
|
274
405
|
}
|
|
275
|
-
const
|
|
276
|
-
function
|
|
406
|
+
const K = (e) => typeof e == "function", dn = (e) => !!e && e.constructor === Array;
|
|
407
|
+
function fn(e) {
|
|
277
408
|
const r = { nodes: {}, materials: {} };
|
|
278
409
|
return e && e.traverse((t) => {
|
|
279
410
|
t.name && (r.nodes[t.name] = t), t.material && !r.materials[t.material.name] && (r.materials[t.material.name] = t.material);
|
|
280
411
|
}), r;
|
|
281
412
|
}
|
|
282
|
-
async function
|
|
283
|
-
const { logError:
|
|
284
|
-
|
|
285
|
-
const
|
|
286
|
-
(c) => new Promise((
|
|
287
|
-
|
|
413
|
+
async function zn(e, r, t, s, i) {
|
|
414
|
+
const { logError: l } = P(), n = new e();
|
|
415
|
+
i && i(n), t && t(n);
|
|
416
|
+
const u = (Array.isArray(r) ? r : [r]).map(
|
|
417
|
+
(c) => new Promise((f, a) => {
|
|
418
|
+
n.load(
|
|
288
419
|
c,
|
|
289
|
-
(
|
|
290
|
-
|
|
420
|
+
(g) => {
|
|
421
|
+
g.scene && Object.assign(g, fn(g.scene)), f(g);
|
|
291
422
|
},
|
|
292
|
-
|
|
293
|
-
(
|
|
423
|
+
s,
|
|
424
|
+
(g) => a(l("[useLoader] - Failed to load resource", g))
|
|
294
425
|
);
|
|
295
426
|
})
|
|
296
427
|
);
|
|
297
|
-
return
|
|
428
|
+
return dn(r) ? await Promise.all(u) : await u[0];
|
|
298
429
|
}
|
|
299
|
-
async function
|
|
300
|
-
const r = new
|
|
430
|
+
async function Vn(e) {
|
|
431
|
+
const r = new rt(), t = new ot(r), s = (i) => new Promise((l, n) => {
|
|
301
432
|
t.load(
|
|
302
|
-
|
|
303
|
-
(
|
|
433
|
+
i,
|
|
434
|
+
(o) => l(o),
|
|
304
435
|
() => null,
|
|
305
436
|
() => {
|
|
306
|
-
|
|
437
|
+
n(new Error("[useTextures] - Failed to load texture"));
|
|
307
438
|
}
|
|
308
439
|
);
|
|
309
440
|
});
|
|
310
|
-
if (
|
|
311
|
-
const
|
|
312
|
-
return e.length > 1 ?
|
|
441
|
+
if (sn(e)) {
|
|
442
|
+
const i = await Promise.all(e.map((l) => s(l)));
|
|
443
|
+
return e.length > 1 ? i : i[0];
|
|
313
444
|
} else {
|
|
314
445
|
const {
|
|
315
|
-
map:
|
|
316
|
-
displacementMap:
|
|
317
|
-
normalMap:
|
|
318
|
-
roughnessMap:
|
|
319
|
-
metalnessMap:
|
|
446
|
+
map: i,
|
|
447
|
+
displacementMap: l,
|
|
448
|
+
normalMap: n,
|
|
449
|
+
roughnessMap: o,
|
|
450
|
+
metalnessMap: u,
|
|
320
451
|
aoMap: c,
|
|
321
|
-
alphaMap:
|
|
322
|
-
matcap:
|
|
452
|
+
alphaMap: f,
|
|
453
|
+
matcap: a
|
|
323
454
|
} = e;
|
|
324
455
|
return {
|
|
325
|
-
map:
|
|
326
|
-
displacementMap:
|
|
327
|
-
normalMap:
|
|
328
|
-
roughnessMap:
|
|
329
|
-
metalnessMap:
|
|
330
|
-
aoMap: c ? await
|
|
331
|
-
alphaMap:
|
|
332
|
-
matcap:
|
|
456
|
+
map: i ? await s(i) : null,
|
|
457
|
+
displacementMap: l ? await s(l) : null,
|
|
458
|
+
normalMap: n ? await s(n) : null,
|
|
459
|
+
roughnessMap: o ? await s(o) : null,
|
|
460
|
+
metalnessMap: u ? await s(u) : null,
|
|
461
|
+
aoMap: c ? await s(c) : null,
|
|
462
|
+
alphaMap: f ? await s(f) : null,
|
|
463
|
+
matcap: a ? await s(a) : null
|
|
333
464
|
};
|
|
334
465
|
}
|
|
335
466
|
}
|
|
336
|
-
const
|
|
337
|
-
const
|
|
338
|
-
if (
|
|
467
|
+
const pn = (e, r) => {
|
|
468
|
+
const t = x(() => r.renderer.value.domElement), { x: s, y: i } = bt({ target: t }), { width: l, height: n, top: o, left: u } = Mt(t), c = ({ x: w, y: b }) => {
|
|
469
|
+
if (t.value)
|
|
339
470
|
return {
|
|
340
|
-
x: (
|
|
341
|
-
y: -((b -
|
|
471
|
+
x: (w - u.value) / l.value * 2 - 1,
|
|
472
|
+
y: -((b - o.value) / n.value) * 2 + 1
|
|
342
473
|
};
|
|
343
|
-
},
|
|
344
|
-
if (
|
|
345
|
-
return
|
|
346
|
-
},
|
|
347
|
-
const b =
|
|
348
|
-
x: (
|
|
349
|
-
y: (
|
|
474
|
+
}, f = ({ x: w, y: b }) => {
|
|
475
|
+
if (r.camera.value)
|
|
476
|
+
return r.raycaster.value.setFromCamera(new st(w, b), r.camera.value), r.raycaster.value.intersectObjects(e.value, !1);
|
|
477
|
+
}, a = (w) => {
|
|
478
|
+
const b = c({
|
|
479
|
+
x: (w == null ? void 0 : w.clientX) ?? s.value,
|
|
480
|
+
y: (w == null ? void 0 : w.clientY) ?? i.value
|
|
350
481
|
});
|
|
351
|
-
return b ?
|
|
352
|
-
},
|
|
353
|
-
|
|
354
|
-
},
|
|
355
|
-
|
|
482
|
+
return b ? f(b) || [] : [];
|
|
483
|
+
}, g = x(() => a()), d = H(), h = H(), y = (w, b) => {
|
|
484
|
+
w.trigger({ event: b, intersects: a(b) });
|
|
485
|
+
}, p = (w) => {
|
|
486
|
+
y(h, w);
|
|
356
487
|
};
|
|
357
|
-
let
|
|
358
|
-
const
|
|
488
|
+
let m;
|
|
489
|
+
const v = (w) => {
|
|
359
490
|
var b;
|
|
360
|
-
|
|
361
|
-
},
|
|
491
|
+
m = (b = a(w)[0]) == null ? void 0 : b.object;
|
|
492
|
+
}, C = (w) => {
|
|
362
493
|
var b;
|
|
363
|
-
|
|
364
|
-
},
|
|
365
|
-
return
|
|
366
|
-
|
|
494
|
+
w instanceof PointerEvent && m === ((b = a(w)[0]) == null ? void 0 : b.object) && y(d, w);
|
|
495
|
+
}, M = (w) => h.trigger({ event: w, intersects: [] });
|
|
496
|
+
return t.value.addEventListener("pointerup", C), t.value.addEventListener("pointerdown", v), t.value.addEventListener("pointermove", p), t.value.addEventListener("pointerleave", M), J(() => {
|
|
497
|
+
t != null && t.value && (t.value.removeEventListener("pointerup", C), t.value.removeEventListener("pointerdown", v), t.value.removeEventListener("pointermove", p), t.value.removeEventListener("pointerleave", M));
|
|
367
498
|
}), {
|
|
368
|
-
intersects:
|
|
369
|
-
onClick: (
|
|
370
|
-
onPointerMove: (
|
|
499
|
+
intersects: g,
|
|
500
|
+
onClick: (w) => d.on(w).off,
|
|
501
|
+
onPointerMove: (w) => h.on(w).off
|
|
371
502
|
};
|
|
372
503
|
};
|
|
373
|
-
function
|
|
374
|
-
const { logWarning: e } =
|
|
375
|
-
function r(
|
|
376
|
-
let
|
|
377
|
-
return
|
|
378
|
-
c[
|
|
379
|
-
}),
|
|
504
|
+
function Jn() {
|
|
505
|
+
const { logWarning: e } = P();
|
|
506
|
+
function r(l, n, o) {
|
|
507
|
+
let u = null;
|
|
508
|
+
return l.traverse((c) => {
|
|
509
|
+
c[n] === o && (u = c);
|
|
510
|
+
}), u || e(`Child with ${n} '${o}' not found.`), u;
|
|
380
511
|
}
|
|
381
|
-
function t(
|
|
382
|
-
const
|
|
383
|
-
return
|
|
384
|
-
c[
|
|
385
|
-
}),
|
|
512
|
+
function t(l, n, o) {
|
|
513
|
+
const u = [];
|
|
514
|
+
return l.traverse((c) => {
|
|
515
|
+
c[n].includes(o) && u.push(c);
|
|
516
|
+
}), u.length || e(`Children with ${n} '${o}' not found.`), u;
|
|
386
517
|
}
|
|
387
|
-
function
|
|
388
|
-
return r(
|
|
518
|
+
function s(l, n) {
|
|
519
|
+
return r(l, "name", n);
|
|
389
520
|
}
|
|
390
|
-
function
|
|
391
|
-
return t(
|
|
521
|
+
function i(l, n) {
|
|
522
|
+
return t(l, "name", n);
|
|
392
523
|
}
|
|
393
524
|
return {
|
|
394
525
|
seek: r,
|
|
395
|
-
seekByName:
|
|
526
|
+
seekByName: s,
|
|
396
527
|
seekAll: t,
|
|
397
|
-
seekAllByName:
|
|
528
|
+
seekAllByName: i
|
|
398
529
|
};
|
|
399
530
|
}
|
|
400
|
-
const
|
|
401
|
-
const
|
|
531
|
+
const mn = (e) => {
|
|
532
|
+
const r = be({
|
|
402
533
|
click: /* @__PURE__ */ new Map(),
|
|
403
534
|
pointerMove: /* @__PURE__ */ new Map(),
|
|
404
535
|
pointerEnter: /* @__PURE__ */ new Map(),
|
|
405
536
|
pointerLeave: /* @__PURE__ */ new Map()
|
|
406
|
-
}),
|
|
407
|
-
|
|
408
|
-
},
|
|
409
|
-
|
|
410
|
-
},
|
|
411
|
-
Object.values(
|
|
412
|
-
},
|
|
413
|
-
const { onClick: g, onPointerMove:
|
|
414
|
-
g &&
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
const l = k(
|
|
418
|
-
() => gt(
|
|
537
|
+
}), t = k(/* @__PURE__ */ new Set()), s = (a) => {
|
|
538
|
+
t.value.add(a);
|
|
539
|
+
}, i = (a) => {
|
|
540
|
+
t.value.delete(a);
|
|
541
|
+
}, l = (a) => {
|
|
542
|
+
Object.values(r).forEach((g) => g.delete(a)), i(a);
|
|
543
|
+
}, n = (a) => {
|
|
544
|
+
const { onClick: g, onPointerMove: d, onPointerEnter: h, onPointerLeave: y } = a;
|
|
545
|
+
g && r.click.set(a, g), d && r.pointerMove.set(a, d), h && r.pointerEnter.set(a, h), y && r.pointerLeave.set(a, y);
|
|
546
|
+
}, o = x(
|
|
547
|
+
() => nn(
|
|
419
548
|
[
|
|
420
|
-
...Array.from(
|
|
421
|
-
...Object.values(
|
|
549
|
+
...Array.from(t.value),
|
|
550
|
+
...Object.values(r).map((a) => Array.from(a.keys())).flat()
|
|
422
551
|
],
|
|
423
|
-
({ uuid:
|
|
552
|
+
({ uuid: a }) => a
|
|
424
553
|
)
|
|
425
|
-
)
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
554
|
+
);
|
|
555
|
+
e.registerObjectAtPointerEventHandler = n, e.deregisterObjectAtPointerEventHandler = l, e.registerBlockingObjectAtPointerEventHandler = s, e.deregisterBlockingObjectAtPointerEventHandler = i;
|
|
556
|
+
const { onClick: u, onPointerMove: c } = pn(o, e);
|
|
557
|
+
u(({ intersects: a, event: g }) => {
|
|
558
|
+
var d;
|
|
559
|
+
a.length && ((d = r.click.get(a[0].object)) == null || d(a[0], g));
|
|
429
560
|
});
|
|
430
561
|
let f;
|
|
431
|
-
return
|
|
432
|
-
var
|
|
433
|
-
const
|
|
434
|
-
f && f !==
|
|
562
|
+
return c(({ intersects: a, event: g }) => {
|
|
563
|
+
var m, v, C, M;
|
|
564
|
+
const d = (m = a == null ? void 0 : a[0]) == null ? void 0 : m.object, { pointerLeave: h, pointerEnter: y, pointerMove: p } = r;
|
|
565
|
+
f && f !== d && ((v = h.get(f)) == null || v(f, g)), d && (f !== d && ((C = y.get(d)) == null || C(a[0], g)), (M = p.get(d)) == null || M(a[0], g)), f = d || null;
|
|
435
566
|
}), {
|
|
436
|
-
registerObject:
|
|
437
|
-
deregisterObject:
|
|
567
|
+
registerObject: n,
|
|
568
|
+
deregisterObject: l,
|
|
569
|
+
registerBlockingObject: s,
|
|
570
|
+
deregisterBlockingObject: i
|
|
438
571
|
};
|
|
439
572
|
};
|
|
440
|
-
function
|
|
573
|
+
function Le(e) {
|
|
441
574
|
let r = 0;
|
|
442
575
|
return e.traverse((t) => {
|
|
443
576
|
if (t.isMesh && t.geometry) {
|
|
444
|
-
const
|
|
445
|
-
r +=
|
|
577
|
+
const s = t.geometry, i = s.attributes.position.count * 3 * Float32Array.BYTES_PER_ELEMENT, l = s.index ? s.index.count * Uint32Array.BYTES_PER_ELEMENT : 0, n = s.attributes.normal ? s.attributes.normal.count * 3 * Float32Array.BYTES_PER_ELEMENT : 0, o = s.attributes.uv ? s.attributes.uv.count * 2 * Float32Array.BYTES_PER_ELEMENT : 0, u = i + l + n + o;
|
|
578
|
+
r += u;
|
|
446
579
|
}
|
|
447
580
|
}), r;
|
|
448
581
|
}
|
|
449
|
-
function
|
|
582
|
+
function vn(e) {
|
|
450
583
|
return (e / 1024).toFixed(2);
|
|
451
584
|
}
|
|
452
|
-
const
|
|
453
|
-
function
|
|
585
|
+
const ne = k({}), re = (e) => Object.assign(ne.value, e);
|
|
586
|
+
function gn(e, r, t = 10) {
|
|
587
|
+
const s = _(e) ? _t() : Ct(x(() => _(r).parentElement)), i = Z(pe(s.width, t)), l = Z(pe(s.height, t)), n = x(() => i.value / l.value);
|
|
588
|
+
return {
|
|
589
|
+
height: l,
|
|
590
|
+
width: i,
|
|
591
|
+
aspectRatio: n
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
function hn({
|
|
454
595
|
scene: e,
|
|
455
596
|
canvas: r,
|
|
456
597
|
windowSize: t,
|
|
457
|
-
disableRender:
|
|
458
|
-
rendererOptions:
|
|
598
|
+
disableRender: s,
|
|
599
|
+
rendererOptions: i,
|
|
600
|
+
emit: l
|
|
459
601
|
}) {
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
aspectRatio: l
|
|
466
|
-
}, m = D(e), {
|
|
467
|
-
camera: f,
|
|
468
|
-
cameras: u,
|
|
469
|
-
registerCamera: g,
|
|
470
|
-
deregisterCamera: _,
|
|
602
|
+
const { logWarning: n } = P(), o = $(e), u = gn(t, r), {
|
|
603
|
+
camera: c,
|
|
604
|
+
cameras: f,
|
|
605
|
+
registerCamera: a,
|
|
606
|
+
deregisterCamera: g,
|
|
471
607
|
setCameraActive: d
|
|
472
|
-
} =
|
|
608
|
+
} = Vt({ sizes: u, scene: e }), h = {
|
|
609
|
+
mode: k(i.renderMode || "always"),
|
|
610
|
+
priority: k(0),
|
|
611
|
+
frames: k(0),
|
|
612
|
+
maxFrames: 60,
|
|
613
|
+
canBeInvalidated: x(() => h.mode.value === "on-demand" && h.frames.value === 0)
|
|
614
|
+
};
|
|
615
|
+
function y(B = 1) {
|
|
616
|
+
i.renderMode === "on-demand" ? h.frames.value = Math.min(h.maxFrames, h.frames.value + B) : n("`invalidate` can only be used when `renderMode` is set to `on-demand`");
|
|
617
|
+
}
|
|
618
|
+
function p() {
|
|
619
|
+
i.renderMode === "manual" ? h.frames.value = 1 : n("`advance` can only be used when `renderMode` is set to `manual`");
|
|
620
|
+
}
|
|
621
|
+
const { renderer: m } = cn(
|
|
473
622
|
{
|
|
474
623
|
scene: e,
|
|
475
624
|
canvas: r,
|
|
476
|
-
options:
|
|
477
|
-
|
|
478
|
-
|
|
625
|
+
options: i,
|
|
626
|
+
emit: l,
|
|
627
|
+
// TODO: replace contextParts with full ctx at https://github.com/Tresjs/tres/issues/516
|
|
628
|
+
contextParts: { sizes: u, camera: c, render: h, invalidate: y, advance: p },
|
|
629
|
+
disableRender: s
|
|
479
630
|
}
|
|
480
|
-
),
|
|
481
|
-
sizes:
|
|
482
|
-
scene:
|
|
483
|
-
camera:
|
|
484
|
-
cameras:
|
|
485
|
-
renderer:
|
|
486
|
-
raycaster:
|
|
487
|
-
controls:
|
|
631
|
+
), v = {
|
|
632
|
+
sizes: u,
|
|
633
|
+
scene: o,
|
|
634
|
+
camera: c,
|
|
635
|
+
cameras: Z(f),
|
|
636
|
+
renderer: m,
|
|
637
|
+
raycaster: $(new it()),
|
|
638
|
+
controls: k(null),
|
|
488
639
|
perf: {
|
|
489
640
|
maxFrames: 160,
|
|
490
641
|
fps: {
|
|
@@ -497,216 +648,243 @@ function Tt({
|
|
|
497
648
|
accumulator: []
|
|
498
649
|
}
|
|
499
650
|
},
|
|
500
|
-
|
|
501
|
-
|
|
651
|
+
render: h,
|
|
652
|
+
advance: p,
|
|
653
|
+
extend: re,
|
|
654
|
+
invalidate: y,
|
|
655
|
+
registerCamera: a,
|
|
502
656
|
setCameraActive: d,
|
|
503
|
-
deregisterCamera:
|
|
657
|
+
deregisterCamera: g
|
|
504
658
|
};
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
let v = performance.now();
|
|
508
|
-
const b = ({ timestamp: I }) => {
|
|
509
|
-
p.scene.value && (p.perf.memory.allocatedMem = ve(p.scene.value)), I - v >= C && (v = I, p.perf.fps.accumulator.push(M.value), p.perf.fps.accumulator.length > S && p.perf.fps.accumulator.shift(), p.perf.fps.value = M.value, P.value && w.value && (p.perf.memory.accumulator.push(w.value.usedJSHeapSize / 1024 / 1024), p.perf.memory.accumulator.length > S && p.perf.memory.accumulator.shift(), p.perf.memory.currentMem = p.perf.memory.accumulator.reduce((Ee, Ce) => Ee + Ce, 0) / p.perf.memory.accumulator.length));
|
|
659
|
+
ee("useTres", v), v.scene.value.__tres = {
|
|
660
|
+
root: v
|
|
510
661
|
};
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
662
|
+
const C = 100, M = Et({ every: C }), { isSupported: w, memory: b } = St({ interval: C }), E = 160;
|
|
663
|
+
let L = performance.now();
|
|
664
|
+
const A = ({ timestamp: B }) => {
|
|
665
|
+
v.scene.value && (v.perf.memory.allocatedMem = Le(v.scene.value)), B - L >= C && (L = B, v.perf.fps.accumulator.push(M.value), v.perf.fps.accumulator.length > E && v.perf.fps.accumulator.shift(), v.perf.fps.value = M.value, w.value && b.value && (v.perf.memory.accumulator.push(b.value.usedJSHeapSize / 1024 / 1024), v.perf.memory.accumulator.length > E && v.perf.memory.accumulator.shift(), v.perf.memory.currentMem = v.perf.memory.accumulator.reduce((Ie, Re) => Ie + Re, 0) / v.perf.memory.accumulator.length));
|
|
666
|
+
};
|
|
667
|
+
let O = 0;
|
|
668
|
+
const Q = 1, { pause: N } = Se(({ delta: B }) => {
|
|
669
|
+
window.__TRES__DEVTOOLS__ && (A({ timestamp: performance.now() }), O += B, O >= Q && (window.__TRES__DEVTOOLS__.cb(v), O = 0));
|
|
514
670
|
}, { immediate: !0 });
|
|
515
|
-
return
|
|
516
|
-
|
|
517
|
-
}),
|
|
671
|
+
return J(() => {
|
|
672
|
+
N();
|
|
673
|
+
}), v;
|
|
518
674
|
}
|
|
519
|
-
function
|
|
520
|
-
const e =
|
|
675
|
+
function yn() {
|
|
676
|
+
const e = Ne("useTres");
|
|
521
677
|
if (!e)
|
|
522
678
|
throw new Error("useTresContext must be used together with useTresContextProvider");
|
|
523
679
|
return e;
|
|
524
680
|
}
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
const { logError: se } = j(), W = [
|
|
681
|
+
const Qn = yn;
|
|
682
|
+
const { logError: he } = P(), X = [
|
|
528
683
|
"onClick",
|
|
529
684
|
"onPointerMove",
|
|
530
685
|
"onPointerEnter",
|
|
531
686
|
"onPointerLeave"
|
|
532
|
-
]
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
687
|
+
];
|
|
688
|
+
function ye(e) {
|
|
689
|
+
const r = e.__tres.root;
|
|
690
|
+
r && r.render && r.render.canBeInvalidated.value && r.invalidate();
|
|
691
|
+
}
|
|
692
|
+
const wn = () => {
|
|
693
|
+
let e = null;
|
|
694
|
+
function r(n, o, u, c) {
|
|
695
|
+
if (c || (c = {}), c.args || (c.args = []), n === "template" || en(n))
|
|
536
696
|
return null;
|
|
537
|
-
let
|
|
538
|
-
if (
|
|
539
|
-
(
|
|
540
|
-
const
|
|
541
|
-
|
|
697
|
+
let f = n.replace("Tres", ""), a;
|
|
698
|
+
if (n === "primitive") {
|
|
699
|
+
(c == null ? void 0 : c.object) === void 0 && he("Tres primitives need a prop 'object'");
|
|
700
|
+
const g = c.object;
|
|
701
|
+
f = g.type, a = Object.assign(g.clone(), { type: f });
|
|
542
702
|
} else {
|
|
543
|
-
const
|
|
544
|
-
|
|
703
|
+
const g = ne.value[f];
|
|
704
|
+
g || he(`${f} is not defined on the THREE namespace. Use extend to add it to the catalog.`), a = new g(...c.args);
|
|
545
705
|
}
|
|
546
|
-
return
|
|
547
|
-
...
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
throw "could not find tres__registerAtPointerEventHandler on scene's userData";
|
|
564
|
-
(o = h == null ? void 0 : (s = h.userData).tres__registerAtPointerEventHandler) == null || o.call(s, e);
|
|
565
|
-
}
|
|
706
|
+
return a ? (a.isCamera && (c != null && c.position || a.position.set(3, 3, 3), c != null && c.lookAt || a.lookAt(0, 0, 0)), (c == null ? void 0 : c.attach) === void 0 && (a.isMaterial ? a.attach = "material" : a.isBufferGeometry && (a.attach = "geometry")), a.__tres = {
|
|
707
|
+
...a.__tres,
|
|
708
|
+
type: f,
|
|
709
|
+
memoizedProps: c,
|
|
710
|
+
eventCount: 0,
|
|
711
|
+
disposable: !0,
|
|
712
|
+
primitive: n === "primitive"
|
|
713
|
+
}, a.isObject3D && (c != null && c.material || c != null && c.geometry) && (a.__tres.disposable = !1), a) : null;
|
|
714
|
+
}
|
|
715
|
+
function t(n, o) {
|
|
716
|
+
if (!n)
|
|
717
|
+
return;
|
|
718
|
+
o && o.isScene && (e = o), e && (n.__tres.root = e.__tres.root);
|
|
719
|
+
const u = o || e;
|
|
720
|
+
if (n != null && n.isObject3D) {
|
|
721
|
+
const { registerCamera: c, registerObjectAtPointerEventHandler: f } = n.__tres.root;
|
|
722
|
+
n != null && n.isCamera && c(n), n && X.some((a) => n[a]) && f(n);
|
|
566
723
|
}
|
|
567
|
-
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}
|
|
594
|
-
(t = e.dispose) == null || t.call(e);
|
|
724
|
+
n != null && n.isObject3D && (u != null && u.isObject3D) ? (u.add(n), n.dispatchEvent({ type: "added" })) : n != null && n.isFog ? u.fog = n : typeof (n == null ? void 0 : n.attach) == "string" && (n.__previousAttach = n[u == null ? void 0 : u.attach], u && (u[n.attach] = n));
|
|
725
|
+
}
|
|
726
|
+
function s(n) {
|
|
727
|
+
var f, a;
|
|
728
|
+
if (!n)
|
|
729
|
+
return;
|
|
730
|
+
const o = n.__tres;
|
|
731
|
+
n.parent = n.parent || e;
|
|
732
|
+
const {
|
|
733
|
+
deregisterObjectAtPointerEventHandler: u,
|
|
734
|
+
deregisterBlockingObjectAtPointerEventHandler: c
|
|
735
|
+
} = o.root;
|
|
736
|
+
if (n.isObject3D) {
|
|
737
|
+
const g = (y) => {
|
|
738
|
+
var m, v;
|
|
739
|
+
const p = y;
|
|
740
|
+
o.disposable && ((m = p.material) == null || m.dispose(), p.material = void 0, (v = p.geometry) == null || v.dispose(), p.geometry = void 0);
|
|
741
|
+
}, d = (y) => {
|
|
742
|
+
c(y), y && X.some((p) => y[p]) && (u == null || u(y));
|
|
743
|
+
}, h = (y) => {
|
|
744
|
+
const p = n.__tres.root.deregisterCamera;
|
|
745
|
+
y.isCamera && (p == null || p(y));
|
|
746
|
+
};
|
|
747
|
+
(f = n.removeFromParent) == null || f.call(n), n.traverse((y) => {
|
|
748
|
+
g(y), h(y), d == null || d(y);
|
|
749
|
+
}), g(n), h(n), d == null || d(n), ye(n), (a = n.dispose) == null || a.call(n);
|
|
595
750
|
}
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
751
|
+
}
|
|
752
|
+
function i(n, o, u, c) {
|
|
753
|
+
if (n) {
|
|
754
|
+
let f = n, a = o;
|
|
755
|
+
if (n.__tres.primitive && a === "object" && u !== null) {
|
|
756
|
+
const y = r("primitive", void 0, void 0, {
|
|
757
|
+
object: c
|
|
758
|
+
});
|
|
759
|
+
for (const p in y) {
|
|
760
|
+
if (p === "uuid")
|
|
761
|
+
continue;
|
|
762
|
+
const m = n[p], v = y[p];
|
|
763
|
+
!(m != null && m.set) && !K(m) ? n[p] = v : m.constructor === v.constructor && (m != null && m.copy) ? m == null || m.copy(v) : Array.isArray(v) ? m.set(...v) : !m.isColor && m.setScalar ? m.setScalar(v) : m.set(v);
|
|
764
|
+
}
|
|
765
|
+
y.__tres.root = e == null ? void 0 : e.__tres.root, y.isGroup ? (n.geometry = void 0, n.material = void 0) : delete n.isGroup;
|
|
766
|
+
}
|
|
767
|
+
if (n.__tres.root) {
|
|
768
|
+
const {
|
|
769
|
+
registerBlockingObjectAtPointerEventHandler: y,
|
|
770
|
+
deregisterBlockingObjectAtPointerEventHandler: p
|
|
771
|
+
} = n.__tres.root;
|
|
772
|
+
if (n.isObject3D && a === "blocks-pointer-events") {
|
|
773
|
+
c || c === "" ? y(n) : p(n);
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
604
776
|
}
|
|
605
|
-
let
|
|
606
|
-
if (
|
|
607
|
-
const
|
|
608
|
-
|
|
777
|
+
let g = F(a), d = f == null ? void 0 : f[g];
|
|
778
|
+
if (a === "args") {
|
|
779
|
+
const y = n, p = u ?? [], m = c ?? [], v = n.__tres.type || n.type;
|
|
780
|
+
v && p.length && !on(p, m) && (f = Object.assign(y, new ne.value[v](...c)));
|
|
609
781
|
return;
|
|
610
782
|
}
|
|
611
|
-
if (
|
|
612
|
-
if (
|
|
783
|
+
if (f.type === "BufferGeometry") {
|
|
784
|
+
if (a === "args")
|
|
613
785
|
return;
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
new
|
|
786
|
+
f.setAttribute(
|
|
787
|
+
F(a),
|
|
788
|
+
new at(...c)
|
|
617
789
|
);
|
|
618
790
|
return;
|
|
619
791
|
}
|
|
620
|
-
if (
|
|
621
|
-
const
|
|
622
|
-
|
|
792
|
+
if (a.includes("-") && d === void 0) {
|
|
793
|
+
const y = a.split("-");
|
|
794
|
+
d = y.reduce((p, m) => p[F(m)], f), a = y.pop(), g = a.toLowerCase(), d != null && d.set || (f = y.reduce((p, m) => p[F(m)], f));
|
|
623
795
|
}
|
|
624
|
-
let
|
|
625
|
-
if (
|
|
626
|
-
|
|
796
|
+
let h = c;
|
|
797
|
+
if (h === "" && (h = !0), K(d)) {
|
|
798
|
+
X.includes(o) || (Array.isArray(h) ? n[g](...h) : n[g](h));
|
|
627
799
|
return;
|
|
628
800
|
}
|
|
629
|
-
!(
|
|
801
|
+
!(d != null && d.set) && !K(d) ? f[g] = h : d.constructor === h.constructor && (d != null && d.copy) ? d == null || d.copy(h) : Array.isArray(h) ? d.set(...h) : !d.isColor && d.setScalar ? d.setScalar(h) : d.set(h), ye(n);
|
|
630
802
|
}
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
return (
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
803
|
+
}
|
|
804
|
+
function l(n) {
|
|
805
|
+
return (n == null ? void 0 : n.parent) || null;
|
|
806
|
+
}
|
|
807
|
+
return {
|
|
808
|
+
insert: t,
|
|
809
|
+
remove: s,
|
|
810
|
+
createElement: r,
|
|
811
|
+
patchProp: i,
|
|
812
|
+
parentNode: l,
|
|
813
|
+
createText: () => void 0,
|
|
814
|
+
createComment: () => void 0,
|
|
815
|
+
setText: () => void 0,
|
|
816
|
+
setElementText: () => void 0,
|
|
817
|
+
nextSibling: () => void 0,
|
|
818
|
+
querySelector: () => void 0,
|
|
819
|
+
setScopeId: () => void 0,
|
|
820
|
+
cloneNode: () => void 0,
|
|
821
|
+
insertStaticContent: () => void 0
|
|
822
|
+
};
|
|
823
|
+
};
|
|
824
|
+
function bn() {
|
|
825
|
+
return Oe().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
648
826
|
}
|
|
649
|
-
function
|
|
650
|
-
return typeof navigator < "u" && typeof window < "u" ? window : typeof
|
|
827
|
+
function Oe() {
|
|
828
|
+
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
651
829
|
}
|
|
652
|
-
const
|
|
653
|
-
let
|
|
654
|
-
function
|
|
830
|
+
const Mn = typeof Proxy == "function", _n = "devtools-plugin:setup", Cn = "plugin:settings:set";
|
|
831
|
+
let j, oe;
|
|
832
|
+
function En() {
|
|
655
833
|
var e;
|
|
656
|
-
return
|
|
834
|
+
return j !== void 0 || (typeof window < "u" && window.performance ? (j = !0, oe = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (j = !0, oe = globalThis.perf_hooks.performance) : j = !1), j;
|
|
657
835
|
}
|
|
658
|
-
function
|
|
659
|
-
return
|
|
836
|
+
function Sn() {
|
|
837
|
+
return En() ? oe.now() : Date.now();
|
|
660
838
|
}
|
|
661
|
-
class
|
|
839
|
+
class xn {
|
|
662
840
|
constructor(r, t) {
|
|
663
841
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = r, this.hook = t;
|
|
664
|
-
const
|
|
842
|
+
const s = {};
|
|
665
843
|
if (r.settings)
|
|
666
|
-
for (const
|
|
667
|
-
const
|
|
668
|
-
n
|
|
844
|
+
for (const n in r.settings) {
|
|
845
|
+
const o = r.settings[n];
|
|
846
|
+
s[n] = o.defaultValue;
|
|
669
847
|
}
|
|
670
|
-
const
|
|
671
|
-
let
|
|
848
|
+
const i = `__vue-devtools-plugin-settings__${r.id}`;
|
|
849
|
+
let l = Object.assign({}, s);
|
|
672
850
|
try {
|
|
673
|
-
const
|
|
674
|
-
Object.assign(
|
|
851
|
+
const n = localStorage.getItem(i), o = JSON.parse(n);
|
|
852
|
+
Object.assign(l, o);
|
|
675
853
|
} catch {
|
|
676
854
|
}
|
|
677
855
|
this.fallbacks = {
|
|
678
856
|
getSettings() {
|
|
679
|
-
return
|
|
857
|
+
return l;
|
|
680
858
|
},
|
|
681
|
-
setSettings(
|
|
859
|
+
setSettings(n) {
|
|
682
860
|
try {
|
|
683
|
-
localStorage.setItem(
|
|
861
|
+
localStorage.setItem(i, JSON.stringify(n));
|
|
684
862
|
} catch {
|
|
685
863
|
}
|
|
686
|
-
|
|
864
|
+
l = n;
|
|
687
865
|
},
|
|
688
866
|
now() {
|
|
689
|
-
return
|
|
867
|
+
return Sn();
|
|
690
868
|
}
|
|
691
|
-
}, t && t.on(
|
|
692
|
-
|
|
869
|
+
}, t && t.on(Cn, (n, o) => {
|
|
870
|
+
n === this.plugin.id && this.fallbacks.setSettings(o);
|
|
693
871
|
}), this.proxiedOn = new Proxy({}, {
|
|
694
|
-
get: (
|
|
872
|
+
get: (n, o) => this.target ? this.target.on[o] : (...u) => {
|
|
695
873
|
this.onQueue.push({
|
|
696
|
-
method:
|
|
697
|
-
args:
|
|
874
|
+
method: o,
|
|
875
|
+
args: u
|
|
698
876
|
});
|
|
699
877
|
}
|
|
700
878
|
}), this.proxiedTarget = new Proxy({}, {
|
|
701
|
-
get: (
|
|
702
|
-
method:
|
|
703
|
-
args:
|
|
879
|
+
get: (n, o) => this.target ? this.target[o] : o === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(o) ? (...u) => (this.targetQueue.push({
|
|
880
|
+
method: o,
|
|
881
|
+
args: u,
|
|
704
882
|
resolve: () => {
|
|
705
883
|
}
|
|
706
|
-
}), this.fallbacks[
|
|
884
|
+
}), this.fallbacks[o](...u)) : (...u) => new Promise((c) => {
|
|
707
885
|
this.targetQueue.push({
|
|
708
|
-
method:
|
|
709
|
-
args:
|
|
886
|
+
method: o,
|
|
887
|
+
args: u,
|
|
710
888
|
resolve: c
|
|
711
889
|
});
|
|
712
890
|
})
|
|
@@ -720,24 +898,24 @@ class Ht {
|
|
|
720
898
|
t.resolve(await this.target[t.method](...t.args));
|
|
721
899
|
}
|
|
722
900
|
}
|
|
723
|
-
function
|
|
724
|
-
const t = e,
|
|
725
|
-
if (
|
|
726
|
-
|
|
901
|
+
function Tn(e, r) {
|
|
902
|
+
const t = e, s = Oe(), i = bn(), l = Mn && t.enableEarlyProxy;
|
|
903
|
+
if (i && (s.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !l))
|
|
904
|
+
i.emit(_n, e, r);
|
|
727
905
|
else {
|
|
728
|
-
const
|
|
729
|
-
(
|
|
906
|
+
const n = l ? new xn(t, i) : null;
|
|
907
|
+
(s.__VUE_DEVTOOLS_PLUGINS__ = s.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
730
908
|
pluginDescriptor: t,
|
|
731
909
|
setupFn: r,
|
|
732
|
-
proxy:
|
|
733
|
-
}),
|
|
910
|
+
proxy: n
|
|
911
|
+
}), n && r(n.proxiedTarget);
|
|
734
912
|
}
|
|
735
913
|
}
|
|
736
|
-
function
|
|
914
|
+
function kn(e, r) {
|
|
737
915
|
const t = `▲ ■ ●${e}`;
|
|
738
916
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, r) : r === "error" ? console.error(t) : r === "warn" ? console.warn(t) : console.log(t);
|
|
739
917
|
}
|
|
740
|
-
const
|
|
918
|
+
const Be = (e) => {
|
|
741
919
|
const r = {
|
|
742
920
|
id: e.uuid,
|
|
743
921
|
label: e.type,
|
|
@@ -749,9 +927,9 @@ const ye = (e) => {
|
|
|
749
927
|
textColor: 5750629,
|
|
750
928
|
backgroundColor: 15793395
|
|
751
929
|
});
|
|
752
|
-
const t =
|
|
930
|
+
const t = Le(e);
|
|
753
931
|
return t > 0 && r.tags.push({
|
|
754
|
-
label: `${
|
|
932
|
+
label: `${vn(t)} KB`,
|
|
755
933
|
textColor: 15707189,
|
|
756
934
|
backgroundColor: 16775644,
|
|
757
935
|
tooltip: "Memory usage"
|
|
@@ -778,151 +956,151 @@ const ye = (e) => {
|
|
|
778
956
|
tooltip: "Position"
|
|
779
957
|
})), r;
|
|
780
958
|
};
|
|
781
|
-
function
|
|
959
|
+
function je(e, r) {
|
|
782
960
|
e.children.forEach((t) => {
|
|
783
961
|
if (t.type === "HightlightMesh")
|
|
784
962
|
return;
|
|
785
|
-
const
|
|
786
|
-
r.children.push(
|
|
963
|
+
const s = Be(t);
|
|
964
|
+
r.children.push(s), je(t, s);
|
|
787
965
|
});
|
|
788
966
|
}
|
|
789
|
-
const
|
|
967
|
+
const Pn = [], D = "tres:inspector", An = be({
|
|
790
968
|
sceneGraph: null
|
|
791
969
|
});
|
|
792
|
-
function
|
|
793
|
-
|
|
970
|
+
function Ln(e, r) {
|
|
971
|
+
Tn(
|
|
794
972
|
{
|
|
795
973
|
id: "dev.esm.tres",
|
|
796
974
|
label: "TresJS 🪐",
|
|
797
975
|
logo: "https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg",
|
|
798
976
|
packageName: "tresjs",
|
|
799
977
|
homepage: "https://tresjs.org",
|
|
800
|
-
componentStateTypes:
|
|
978
|
+
componentStateTypes: Pn,
|
|
801
979
|
app: e
|
|
802
980
|
},
|
|
803
981
|
(t) => {
|
|
804
|
-
typeof t.now != "function" &&
|
|
982
|
+
typeof t.now != "function" && kn(
|
|
805
983
|
// eslint-disable-next-line max-len
|
|
806
984
|
"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."
|
|
807
985
|
), t.addInspector({
|
|
808
|
-
id:
|
|
986
|
+
id: D,
|
|
809
987
|
label: "TresJS 🪐",
|
|
810
988
|
icon: "account_tree",
|
|
811
989
|
treeFilterPlaceholder: "Search instances"
|
|
812
990
|
}), setInterval(() => {
|
|
813
|
-
t.sendInspectorTree(
|
|
991
|
+
t.sendInspectorTree(D);
|
|
814
992
|
}, 1e3), setInterval(() => {
|
|
815
993
|
t.notifyComponentUpdate();
|
|
816
|
-
}, 5e3), t.on.getInspectorTree((
|
|
817
|
-
if (
|
|
818
|
-
const
|
|
819
|
-
|
|
994
|
+
}, 5e3), t.on.getInspectorTree((l) => {
|
|
995
|
+
if (l.inspectorId === D) {
|
|
996
|
+
const n = Be(r.scene.value);
|
|
997
|
+
je(r.scene.value, n), An.sceneGraph = n, l.rootNodes = [n];
|
|
820
998
|
}
|
|
821
999
|
});
|
|
822
|
-
let
|
|
823
|
-
t.on.getInspectorState((
|
|
824
|
-
if (
|
|
825
|
-
const [
|
|
826
|
-
if (!
|
|
1000
|
+
let s = null, i = null;
|
|
1001
|
+
t.on.getInspectorState((l) => {
|
|
1002
|
+
if (l.inspectorId === D) {
|
|
1003
|
+
const [n] = r.scene.value.getObjectsByProperty("uuid", l.nodeId);
|
|
1004
|
+
if (!n)
|
|
827
1005
|
return;
|
|
828
|
-
if (
|
|
829
|
-
const
|
|
830
|
-
|
|
1006
|
+
if (i && s && s.parent && i.remove(s), n.isMesh) {
|
|
1007
|
+
const o = ln(n);
|
|
1008
|
+
n.add(o), s = o, i = n;
|
|
831
1009
|
}
|
|
832
|
-
|
|
1010
|
+
l.state = {
|
|
833
1011
|
object: [
|
|
834
1012
|
{
|
|
835
1013
|
key: "uuid",
|
|
836
1014
|
editable: !0,
|
|
837
|
-
value:
|
|
1015
|
+
value: n.uuid
|
|
838
1016
|
},
|
|
839
1017
|
{
|
|
840
1018
|
key: "name",
|
|
841
1019
|
editable: !0,
|
|
842
|
-
value:
|
|
1020
|
+
value: n.name
|
|
843
1021
|
},
|
|
844
1022
|
{
|
|
845
1023
|
key: "type",
|
|
846
1024
|
editable: !0,
|
|
847
|
-
value:
|
|
1025
|
+
value: n.type
|
|
848
1026
|
},
|
|
849
1027
|
{
|
|
850
1028
|
key: "position",
|
|
851
1029
|
editable: !0,
|
|
852
|
-
value:
|
|
1030
|
+
value: n.position
|
|
853
1031
|
},
|
|
854
1032
|
{
|
|
855
1033
|
key: "rotation",
|
|
856
1034
|
editable: !0,
|
|
857
|
-
value:
|
|
1035
|
+
value: n.rotation
|
|
858
1036
|
},
|
|
859
1037
|
{
|
|
860
1038
|
key: "scale",
|
|
861
1039
|
editable: !0,
|
|
862
|
-
value:
|
|
1040
|
+
value: n.scale
|
|
863
1041
|
},
|
|
864
1042
|
{
|
|
865
1043
|
key: "geometry",
|
|
866
|
-
value:
|
|
1044
|
+
value: n.geometry
|
|
867
1045
|
},
|
|
868
1046
|
{
|
|
869
1047
|
key: "material",
|
|
870
|
-
value:
|
|
1048
|
+
value: n.material
|
|
871
1049
|
},
|
|
872
1050
|
{
|
|
873
1051
|
key: "color",
|
|
874
1052
|
editable: !0,
|
|
875
|
-
value:
|
|
1053
|
+
value: n.color
|
|
876
1054
|
},
|
|
877
1055
|
{
|
|
878
1056
|
key: "intensity",
|
|
879
1057
|
editable: !0,
|
|
880
|
-
value:
|
|
1058
|
+
value: n.intensity
|
|
881
1059
|
},
|
|
882
1060
|
{
|
|
883
1061
|
key: "castShadow",
|
|
884
1062
|
editable: !0,
|
|
885
|
-
value:
|
|
1063
|
+
value: n.castShadow
|
|
886
1064
|
},
|
|
887
1065
|
{
|
|
888
1066
|
key: "receiveShadow",
|
|
889
1067
|
editable: !0,
|
|
890
|
-
value:
|
|
1068
|
+
value: n.receiveShadow
|
|
891
1069
|
},
|
|
892
1070
|
{
|
|
893
1071
|
key: "frustumCulled",
|
|
894
1072
|
editable: !0,
|
|
895
|
-
value:
|
|
1073
|
+
value: n.frustumCulled
|
|
896
1074
|
},
|
|
897
1075
|
{
|
|
898
1076
|
key: "matrixAutoUpdate",
|
|
899
1077
|
editable: !0,
|
|
900
|
-
value:
|
|
1078
|
+
value: n.matrixAutoUpdate
|
|
901
1079
|
},
|
|
902
1080
|
{
|
|
903
1081
|
key: "matrixWorldNeedsUpdate",
|
|
904
1082
|
editable: !0,
|
|
905
|
-
value:
|
|
1083
|
+
value: n.matrixWorldNeedsUpdate
|
|
906
1084
|
},
|
|
907
1085
|
{
|
|
908
1086
|
key: "matrixWorld",
|
|
909
|
-
value:
|
|
1087
|
+
value: n.matrixWorld
|
|
910
1088
|
},
|
|
911
1089
|
{
|
|
912
1090
|
key: "visible",
|
|
913
1091
|
editable: !0,
|
|
914
|
-
value:
|
|
1092
|
+
value: n.visible
|
|
915
1093
|
}
|
|
916
1094
|
]
|
|
917
1095
|
};
|
|
918
1096
|
}
|
|
919
|
-
}), t.on.editInspectorState((
|
|
920
|
-
|
|
1097
|
+
}), t.on.editInspectorState((l) => {
|
|
1098
|
+
l.inspectorId === D && an(r.scene.value, l.nodeId, l.path, l.state.value);
|
|
921
1099
|
});
|
|
922
1100
|
}
|
|
923
1101
|
);
|
|
924
1102
|
}
|
|
925
|
-
const
|
|
1103
|
+
const On = ["data-scene", "data-tres"], Bn = /* @__PURE__ */ le({
|
|
926
1104
|
__name: "TresCanvas",
|
|
927
1105
|
props: {
|
|
928
1106
|
shadows: { type: Boolean, default: void 0 },
|
|
@@ -932,6 +1110,7 @@ const Gt = ["data-scene"], zt = /* @__PURE__ */ Z({
|
|
|
932
1110
|
useLegacyLights: { type: Boolean, default: void 0 },
|
|
933
1111
|
outputColorSpace: {},
|
|
934
1112
|
toneMappingExposure: {},
|
|
1113
|
+
renderMode: { default: "always" },
|
|
935
1114
|
camera: {},
|
|
936
1115
|
preset: {},
|
|
937
1116
|
windowSize: { type: Boolean, default: void 0 },
|
|
@@ -948,107 +1127,207 @@ const Gt = ["data-scene"], zt = /* @__PURE__ */ Z({
|
|
|
948
1127
|
logarithmicDepthBuffer: { type: Boolean, default: void 0 },
|
|
949
1128
|
failIfMajorPerformanceCaveat: { type: Boolean, default: void 0 }
|
|
950
1129
|
},
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1130
|
+
emits: ["render"],
|
|
1131
|
+
setup(e, { expose: r, emit: t }) {
|
|
1132
|
+
var y;
|
|
1133
|
+
const s = e, i = t, l = k(), n = $(new lt()), { resume: o } = ae(), u = Fe(), c = (y = ue()) == null ? void 0 : y.appContext.app;
|
|
1134
|
+
re(Me);
|
|
1135
|
+
const f = (p) => le({
|
|
954
1136
|
setup() {
|
|
955
|
-
var
|
|
956
|
-
const
|
|
957
|
-
return
|
|
1137
|
+
var v;
|
|
1138
|
+
const m = (v = ue()) == null ? void 0 : v.appContext;
|
|
1139
|
+
return m && (m.app = c), ee("useTres", p), ee("extend", re), typeof window < "u" && Ln(m == null ? void 0 : m.app, p), () => ce(Ye, null, u != null && u.default ? u.default() : []);
|
|
958
1140
|
}
|
|
959
|
-
}),
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
},
|
|
963
|
-
|
|
964
|
-
},
|
|
965
|
-
return r({ context:
|
|
966
|
-
const
|
|
967
|
-
|
|
968
|
-
scene:
|
|
969
|
-
canvas:
|
|
970
|
-
windowSize:
|
|
971
|
-
disableRender:
|
|
972
|
-
rendererOptions:
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
m
|
|
976
|
-
|
|
977
|
-
|
|
1141
|
+
}), a = (p) => {
|
|
1142
|
+
const m = f(p), { render: v } = Qe(wn());
|
|
1143
|
+
v(ce(m), n.value);
|
|
1144
|
+
}, g = (p, m = !1) => {
|
|
1145
|
+
n.value.children = [], m && (p.renderer.value.dispose(), p.renderer.value.renderLists.dispose(), p.renderer.value.forceContextLoss()), a(p), o();
|
|
1146
|
+
}, d = x(() => s.disableRender), h = $(null);
|
|
1147
|
+
return r({ context: h, dispose: () => g(h.value, !0) }), We(() => {
|
|
1148
|
+
const p = l;
|
|
1149
|
+
h.value = hn({
|
|
1150
|
+
scene: n.value,
|
|
1151
|
+
canvas: p,
|
|
1152
|
+
windowSize: s.windowSize ?? !1,
|
|
1153
|
+
disableRender: d.value ?? !1,
|
|
1154
|
+
rendererOptions: s,
|
|
1155
|
+
emit: i
|
|
1156
|
+
}), mn(h.value);
|
|
1157
|
+
const { registerCamera: m, camera: v, cameras: C, deregisterCamera: M } = h.value;
|
|
1158
|
+
a(h.value);
|
|
1159
|
+
const w = () => {
|
|
1160
|
+
const b = new te(
|
|
978
1161
|
45,
|
|
979
1162
|
window.innerWidth / window.innerHeight,
|
|
980
1163
|
0.1,
|
|
981
1164
|
1e3
|
|
982
1165
|
);
|
|
983
|
-
|
|
984
|
-
const
|
|
985
|
-
C.value.length >= 2 && (
|
|
1166
|
+
b.position.set(3, 3, 3), b.lookAt(0, 0, 0), m(b);
|
|
1167
|
+
const E = se(() => {
|
|
1168
|
+
C.value.length >= 2 && (b.removeFromParent(), M(b), E == null || E());
|
|
986
1169
|
});
|
|
987
1170
|
};
|
|
988
|
-
|
|
989
|
-
() =>
|
|
990
|
-
(
|
|
991
|
-
|
|
1171
|
+
I(
|
|
1172
|
+
() => s.camera,
|
|
1173
|
+
(b, E) => {
|
|
1174
|
+
b && m(b), E && (E.removeFromParent(), M(E));
|
|
992
1175
|
},
|
|
993
1176
|
{
|
|
994
1177
|
immediate: !0
|
|
995
1178
|
}
|
|
996
|
-
),
|
|
997
|
-
|
|
998
|
-
), P());
|
|
999
|
-
}), (d, y) => (xe(), De("canvas", {
|
|
1179
|
+
), v.value || w();
|
|
1180
|
+
}), (p, m) => (Ue(), Ge("canvas", {
|
|
1000
1181
|
ref_key: "canvas",
|
|
1001
|
-
ref:
|
|
1002
|
-
"data-scene":
|
|
1003
|
-
class:
|
|
1004
|
-
|
|
1182
|
+
ref: l,
|
|
1183
|
+
"data-scene": n.value.uuid,
|
|
1184
|
+
class: ze(p.$attrs.class),
|
|
1185
|
+
"data-tres": `tresjs ${Ve(zt).version}`,
|
|
1186
|
+
style: Je({
|
|
1005
1187
|
display: "block",
|
|
1006
1188
|
width: "100%",
|
|
1007
1189
|
height: "100%",
|
|
1008
|
-
position:
|
|
1190
|
+
position: p.windowSize ? "fixed" : "relative",
|
|
1009
1191
|
top: 0,
|
|
1010
1192
|
left: 0,
|
|
1011
1193
|
pointerEvents: "auto",
|
|
1012
1194
|
touchAction: "none",
|
|
1013
|
-
...
|
|
1195
|
+
...p.$attrs.style
|
|
1014
1196
|
})
|
|
1015
|
-
}, null, 14,
|
|
1197
|
+
}, null, 14, On));
|
|
1016
1198
|
}
|
|
1017
|
-
}),
|
|
1199
|
+
}), jn = [
|
|
1018
1200
|
"TresCanvas",
|
|
1019
1201
|
"TresLeches",
|
|
1020
1202
|
"TresScene"
|
|
1021
|
-
],
|
|
1203
|
+
], Dn = {
|
|
1022
1204
|
template: {
|
|
1023
1205
|
compilerOptions: {
|
|
1024
|
-
isCustomElement: (e) => e.startsWith("Tres") && !
|
|
1206
|
+
isCustomElement: (e) => e.startsWith("Tres") && !jn.includes(e) || e === "primitive"
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
}, Yn = Dn, qn = {
|
|
1210
|
+
mounted: (e, r) => {
|
|
1211
|
+
if (r.arg) {
|
|
1212
|
+
console.log(`v-log:${r.arg}`, e[r.arg]);
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
console.log("v-log", e);
|
|
1216
|
+
}
|
|
1217
|
+
};
|
|
1218
|
+
class De extends ut {
|
|
1219
|
+
constructor(r, t) {
|
|
1220
|
+
const s = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], i = new de();
|
|
1221
|
+
i.setAttribute("position", new fe(s, 3)), i.computeBoundingSphere();
|
|
1222
|
+
const l = new ct({ fog: !1 });
|
|
1223
|
+
super(i, l), this.light = r, this.color = t, this.type = "RectAreaLightHelper";
|
|
1224
|
+
const n = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new de();
|
|
1225
|
+
o.setAttribute("position", new fe(n, 3)), o.computeBoundingSphere(), this.add(new dt(o, new Ce({ side: ft, fog: !1 })));
|
|
1226
|
+
}
|
|
1227
|
+
updateMatrixWorld() {
|
|
1228
|
+
if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
|
|
1229
|
+
this.material.color.set(this.color), this.children[0].material.color.set(this.color);
|
|
1230
|
+
else {
|
|
1231
|
+
this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);
|
|
1232
|
+
const r = this.material.color, t = Math.max(r.r, r.g, r.b);
|
|
1233
|
+
t > 1 && r.multiplyScalar(1 / t), this.children[0].material.color.copy(this.material.color);
|
|
1025
1234
|
}
|
|
1235
|
+
this.matrixWorld.extractRotation(this.light.matrixWorld).scale(this.scale).copyPosition(this.light.matrixWorld), this.children[0].matrixWorld.copy(this.matrixWorld);
|
|
1236
|
+
}
|
|
1237
|
+
dispose() {
|
|
1238
|
+
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
|
1026
1239
|
}
|
|
1027
|
-
}
|
|
1240
|
+
}
|
|
1241
|
+
const { logWarning: we } = P();
|
|
1242
|
+
let U, T;
|
|
1243
|
+
const In = {
|
|
1244
|
+
DirectionalLight: pt,
|
|
1245
|
+
PointLight: mt,
|
|
1246
|
+
SpotLight: vt,
|
|
1247
|
+
HemisphereLight: gt,
|
|
1248
|
+
RectAreaLight: De
|
|
1249
|
+
}, Kn = {
|
|
1250
|
+
mounted: (e) => {
|
|
1251
|
+
if (!e.isLight) {
|
|
1252
|
+
we(`${e.type} is not a light`);
|
|
1253
|
+
return;
|
|
1254
|
+
}
|
|
1255
|
+
U = In[e.type], e.parent.add(new U(e, 1, e.color.getHex()));
|
|
1256
|
+
},
|
|
1257
|
+
updated: (e) => {
|
|
1258
|
+
T = e.parent.children.find((r) => r instanceof U), !(T instanceof De) && T.update();
|
|
1259
|
+
},
|
|
1260
|
+
unmounted: (e) => {
|
|
1261
|
+
if (!e.isLight) {
|
|
1262
|
+
we(`${e.type} is not a light`);
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1265
|
+
T = e.parent.children.find((r) => r instanceof U), T && T.dispose && T.dispose(), e.parent.remove(T);
|
|
1266
|
+
}
|
|
1267
|
+
}, { logWarning: Rn } = P(), Xn = {
|
|
1268
|
+
updated: (e, r) => {
|
|
1269
|
+
const t = Ae(r);
|
|
1270
|
+
if (!t) {
|
|
1271
|
+
Rn(`v-always-look-at: problem with binding value: ${r.value}`);
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1274
|
+
const { onLoop: s } = ae();
|
|
1275
|
+
s(() => {
|
|
1276
|
+
e.lookAt(t);
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
}, { logWarning: $n } = P(), Zn = {
|
|
1280
|
+
updated: (e, r) => {
|
|
1281
|
+
var i;
|
|
1282
|
+
const t = Ae(r);
|
|
1283
|
+
if (!t) {
|
|
1284
|
+
$n(`v-distance-to: problem with binding value: ${r.value}`);
|
|
1285
|
+
return;
|
|
1286
|
+
}
|
|
1287
|
+
S && (S.dispose(), e.parent.remove(S));
|
|
1288
|
+
const s = t.clone().sub(e.position);
|
|
1289
|
+
s.normalize(), S = new ht(s, e.position, e.position.distanceTo(t), 16776960), e.parent.add(S), console.table(
|
|
1290
|
+
[
|
|
1291
|
+
["Distance:", e.position.distanceTo(t)],
|
|
1292
|
+
[`origin: ${e.name || e.type}`, `x:${e.position.x}, y:${e.position.y}, z:${(i = e.position) == null ? void 0 : i.z}`],
|
|
1293
|
+
[`Destiny: ${e.name || e.type}`, `x:${t.x}, y:${t.y}, z:${t == null ? void 0 : t.z}`]
|
|
1294
|
+
]
|
|
1295
|
+
);
|
|
1296
|
+
},
|
|
1297
|
+
unmounted: (e) => {
|
|
1298
|
+
S == null || S.dispose(), e.parent.remove(S);
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
let S = null;
|
|
1302
|
+
const er = {
|
|
1028
1303
|
install(e) {
|
|
1029
|
-
e.component("TresCanvas",
|
|
1304
|
+
e.component("TresCanvas", Bn);
|
|
1030
1305
|
}
|
|
1031
1306
|
};
|
|
1032
1307
|
export {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1308
|
+
Bn as TresCanvas,
|
|
1309
|
+
ne as catalogue,
|
|
1310
|
+
er as default,
|
|
1311
|
+
re as extend,
|
|
1312
|
+
Un as isProd,
|
|
1313
|
+
Kt as normalizeColor,
|
|
1314
|
+
Gn as normalizeVectorFlexibleParam,
|
|
1315
|
+
Yn as templateCompilerOptions,
|
|
1316
|
+
fn as trasverseObjects,
|
|
1317
|
+
Vt as useCamera,
|
|
1318
|
+
zn as useLoader,
|
|
1319
|
+
P as useLogger,
|
|
1320
|
+
mn as usePointerEventHandler,
|
|
1321
|
+
pn as useRaycaster,
|
|
1322
|
+
ae as useRenderLoop,
|
|
1323
|
+
cn as useRenderer,
|
|
1324
|
+
Jn as useSeek,
|
|
1325
|
+
Vn as useTexture,
|
|
1326
|
+
Qn as useTres,
|
|
1327
|
+
yn as useTresContext,
|
|
1328
|
+
hn as useTresContextProvider,
|
|
1329
|
+
Xn as vAlwaysLookAt,
|
|
1330
|
+
Zn as vDistanceTo,
|
|
1331
|
+
Kn as vLightHelper,
|
|
1332
|
+
qn as vLog
|
|
1054
1333
|
};
|