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