@tresjs/core
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -6,2 +6,3 @@ import { App } from 'vue'; | ||
export * from './types'; | ||
import { normalizeColor, normalizeVectorFlexibleParam } from './utils/normalize'; | ||
export interface TresOptions { | ||
@@ -16,1 +17,2 @@ extends?: Record<string, unknown>; | ||
export default plugin; | ||
export { normalizeColor, normalizeVectorFlexibleParam }; |
191
dist/tres.js
/** | ||
* name: @tresjs/core | ||
* version: v2.2.0 | ||
* version: v2.3.0 | ||
* (c) 2023 | ||
@@ -8,8 +8,8 @@ * description: Declarative ThreeJS using Vue Components | ||
*/ | ||
import { ref as G, shallowReactive as ce, toRefs as ue, provide as Te, inject as Le, watchEffect as fe, toRef as _e, shallowRef as Ae, computed as V, watch as D, onUnmounted as le, reactive as Se, createRenderer as Oe, defineComponent as de, onMounted as ke, h as L } from "vue"; | ||
import { ref as V, shallowReactive as ce, toRefs as ue, provide as Te, inject as Le, watchEffect as fe, toRef as _e, shallowRef as Ae, computed as G, watch as D, onUnmounted as le, reactive as Se, createRenderer as Oe, defineComponent as de, onMounted as ke, h as L } from "vue"; | ||
import * as q from "three"; | ||
import { PerspectiveCamera as z, OrthographicCamera as je, Clock as pe, Color as W, SRGBColorSpace as De, ACESFilmicToneMapping as Ie, PCFSoftShadowMap as Be, PCFShadowMap as He, LinearSRGBColorSpace as ae, NoToneMapping as ne, WebGLRenderer as Ge, LoadingManager as Ve, TextureLoader as Ne, Raycaster as Fe, Vector2 as ze, BufferAttribute as We } from "three"; | ||
import { createEventHook as A, useRafFn as Ue, toValue as m, useWindowSize as Ye, useElementSize as $e, useDevicePixelRatio as qe, unrefElement as U, usePointer as Ke, useElementBounding as Je } from "@vueuse/core"; | ||
const me = G({}), ve = (e) => void Object.assign(me.value, e), re = (e) => typeof e == "function", ge = (e) => !!e && e.constructor === Array, b = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"]; | ||
function Xe() { | ||
import { PerspectiveCamera as z, OrthographicCamera as je, Clock as pe, Vector3 as De, Color as W, SRGBColorSpace as Ie, ACESFilmicToneMapping as Be, PCFSoftShadowMap as He, PCFShadowMap as Ve, LinearSRGBColorSpace as ae, NoToneMapping as ne, WebGLRenderer as Ge, LoadingManager as Fe, TextureLoader as Ne, Raycaster as ze, Vector2 as We, BufferAttribute as Ue } from "three"; | ||
import { createEventHook as A, useRafFn as Ye, toValue as m, useWindowSize as $e, useElementSize as qe, useDevicePixelRatio as Ke, unrefElement as U, usePointer as Je, useElementBounding as Xe } from "@vueuse/core"; | ||
const me = V({}), ve = (e) => void Object.assign(me.value, e), re = (e) => typeof e == "function", ge = (e) => !!e && e.constructor === Array, b = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"]; | ||
function Qe() { | ||
const e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0, a = Math.random() * 4294967295 | 0; | ||
@@ -19,5 +19,5 @@ return (b[e & 255] + b[e >> 8 & 255] + b[e >> 16 & 255] + b[e >> 24 & 255] + "-" + b[t & 255] + b[t >> 8 & 255] + "-" + b[t >> 16 & 15 | 64] + b[t >> 24 & 255] + "-" + b[n & 63 | 128] + b[n >> 8 & 255] + "-" + b[n >> 16 & 255] + b[n >> 24 & 255] + b[a & 255] + b[a >> 8 & 255] + b[a >> 16 & 255] + b[a >> 24 & 255]).toLowerCase(); | ||
const K = Symbol(); | ||
function Qe() { | ||
function Ze() { | ||
const e = ce({ | ||
uuid: Xe(), | ||
uuid: Qe(), | ||
camera: void 0, | ||
@@ -55,6 +55,6 @@ cameras: [], | ||
}); | ||
var Ze = /* @__PURE__ */ ((e) => (e.Perspective = "Perspective", e.Orthographic = "Orthographic", e))(Ze || {}); | ||
const et = 45; | ||
let x; | ||
function tt() { | ||
var et = /* @__PURE__ */ ((e) => (e.Perspective = "Perspective", e.Orthographic = "Orthographic", e))(et || {}); | ||
const tt = 45; | ||
let R; | ||
function at() { | ||
const { state: e, setState: t, aspectRatio: n } = S(); | ||
@@ -67,5 +67,5 @@ function a(s = "Perspective", c) { | ||
far: 1e3, | ||
fov: et | ||
fov: tt | ||
}; | ||
x = new z(v, ((l = e.aspectRatio) == null ? void 0 : l.value) || window.innerWidth / window.innerHeight, y, h), (d = e.cameras) == null || d.push(x); | ||
R = new z(v, ((l = e.aspectRatio) == null ? void 0 : l.value) || window.innerWidth / window.innerHeight, y, h), (d = e.cameras) == null || d.push(R); | ||
} else { | ||
@@ -80,5 +80,5 @@ const { left: y, right: h, top: v, bottom: M, near: w, far: E } = c || { | ||
}; | ||
x = new je(y, h, v, M, w, E), (p = e.cameras) == null || p.push(x); | ||
R = new je(y, h, v, M, w, E), (p = e.cameras) == null || p.push(R); | ||
} | ||
return e.camera = x, t("camera", e.camera), x; | ||
return e.camera = R, t("camera", e.camera), R; | ||
} | ||
@@ -113,3 +113,3 @@ function o() { | ||
let I = 0, B = 0; | ||
const { pause: at, resume: nt, isActive: rt } = Ue( | ||
const { pause: nt, resume: rt, isActive: ot } = Ye( | ||
() => { | ||
@@ -128,8 +128,11 @@ we.trigger({ delta: I, elapsed: B, clock: _ }), be.trigger({ delta: I, elapsed: B, clock: _ }), J.trigger({ delta: I, elapsed: B, clock: _ }); | ||
onAfterLoop: J.on, | ||
pause: at, | ||
resume: nt, | ||
isActive: rt | ||
pause: nt, | ||
resume: rt, | ||
isActive: ot | ||
}; | ||
} | ||
function ot(e) { | ||
function Pt(e) { | ||
return typeof e == "number" ? [e, e, e] : e instanceof De ? [e.x, e.y, e.z] : e; | ||
} | ||
function it(e) { | ||
return e instanceof W ? e : Array.isArray(e) ? new W(...e) : new W(e); | ||
@@ -139,8 +142,8 @@ } | ||
realistic: { | ||
outputColorSpace: De, | ||
toneMapping: Ie, | ||
outputColorSpace: Ie, | ||
toneMapping: Be, | ||
toneMappingExposure: 3, | ||
shadowMap: { | ||
enabled: !0, | ||
type: Be | ||
type: He | ||
} | ||
@@ -152,7 +155,7 @@ } | ||
return Object.assign(e || {}, t), e; | ||
}, it = "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", st = /* @__PURE__ */ ct(it); | ||
}, st = "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", ct = /* @__PURE__ */ ut(st); | ||
function j(e) { | ||
return e.replace(/-([a-z])/g, (t, n) => n.toUpperCase()); | ||
} | ||
function ct(e, t) { | ||
function ut(e, t) { | ||
const n = /* @__PURE__ */ Object.create(null), a = e.split(","); | ||
@@ -163,3 +166,3 @@ for (let o = 0; o < a.length; o++) | ||
} | ||
const ut = (e, t) => { | ||
const ft = (e, t) => { | ||
const n = /* @__PURE__ */ new Set(), a = []; | ||
@@ -171,3 +174,3 @@ for (const o of e) { | ||
return a; | ||
}, Mt = !0, oe = "[TresJS ▲ ■ ●] "; | ||
}, xt = !0, oe = "[TresJS ▲ ■ ●] "; | ||
function O() { | ||
@@ -188,4 +191,4 @@ function e(a, o) { | ||
} | ||
function ft(e) { | ||
const t = Ae(), n = G(!1), { | ||
function lt(e) { | ||
const t = Ae(), n = V(!1), { | ||
alpha: a = !0, | ||
@@ -200,3 +203,3 @@ antialias: o = !0, | ||
shadows: d = !1, | ||
shadowMapType: p = He, | ||
shadowMapType: p = Ve, | ||
useLegacyLights: y = !1, | ||
@@ -209,9 +212,9 @@ outputColorSpace: h = ae, | ||
preserveDrawingBuffer: k = !1, | ||
clearColor: C, | ||
windowSize: R = !1, | ||
preset: N = void 0 | ||
} = ue(e), { state: f, setState: g } = S(), { width: X, height: Q } = m(R) == !0 || m(R) === "" || m(R) === "true" ? Ye() : $e(f.container), { logError: Ee, logWarning: Me } = O(), { pixelRatio: Z } = qe(), { pause: Pe, resume: Ce } = he(), F = V(() => X.value / Q.value); | ||
clearColor: x, | ||
windowSize: C = !1, | ||
preset: F = void 0 | ||
} = ue(e), { state: f, setState: g } = S(), { width: X, height: Q } = m(C) == !0 || m(C) === "" || m(C) === "true" ? $e() : qe(f.container), { logError: Ee, logWarning: Me } = O(), { pixelRatio: Z } = Ke(), { pause: Pe, resume: xe } = he(), N = G(() => X.value / Q.value); | ||
setTimeout(() => { | ||
var P; | ||
!m(R) && !((P = f.canvas) != null && P.value.offsetHeight) && Me(`Oops... Seems like your canvas height is currently 0px, it's posible that you couldn't watch your scene. | ||
!m(C) && !((P = f.canvas) != null && P.value.offsetHeight) && Me(`Oops... Seems like your canvas height is currently 0px, it's posible that you couldn't watch your scene. | ||
You could set windowSize=true to force the canvas to be the size of the window.`); | ||
@@ -224,3 +227,3 @@ }, 1e3); | ||
return; | ||
const P = m(N); | ||
const P = m(F); | ||
if (P) { | ||
@@ -230,4 +233,4 @@ P in Y || Ee("Renderer Preset must be one of these: " + Object.keys(Y).join(", ")), ye(t.value, Y[P]); | ||
} | ||
t.value.shadowMap.enabled = m(d), t.value.shadowMap.type = m(p), t.value.toneMapping = m(v) || ne, t.value.toneMappingExposure = m(M), t.value.outputColorSpace = m(h) || ae, C != null && C.value && t.value.setClearColor(ot(m(C))), t.value.useLegacyLights = m(y); | ||
}, Re = () => { | ||
t.value.shadowMap.enabled = m(d), t.value.shadowMap.type = m(p), t.value.toneMapping = m(v) || ne, t.value.toneMappingExposure = m(M), t.value.outputColorSpace = m(h) || ae, x != null && x.value && t.value.setClearColor(it(m(x))), t.value.useLegacyLights = m(y); | ||
}, Ce = () => { | ||
const P = U(f.canvas); | ||
@@ -247,8 +250,8 @@ P && (t.value = new Ge({ | ||
premultipliedAlpha: m(c) | ||
}), g("renderer", t.value), g("clock", new pe()), g("aspectRatio", F), te(), ee(), Ce(), n.value = !0); | ||
}, xe = () => { | ||
}), g("renderer", t.value), g("clock", new pe()), g("aspectRatio", N), te(), ee(), xe(), n.value = !0); | ||
}, Re = () => { | ||
t.value && (t.value.dispose(), t.value = void 0, n.value = !1, Pe()); | ||
}; | ||
return D([F, Z], ee), D( | ||
[d, p, h, y, v, M, C], | ||
return D([N, Z], ee), D( | ||
[d, p, h, y, v, M, x], | ||
te | ||
@@ -258,3 +261,3 @@ ), D( | ||
() => { | ||
U(f.canvas) && U(f.container) && Re(); | ||
U(f.canvas) && U(f.container) && Ce(); | ||
}, | ||
@@ -265,7 +268,7 @@ { immediate: !0, deep: !0 } | ||
isReady: n, | ||
dispose: xe, | ||
aspectRatio: F | ||
dispose: Re, | ||
aspectRatio: N | ||
}; | ||
} | ||
function lt(e) { | ||
function dt(e) { | ||
const t = { nodes: {}, materials: {} }; | ||
@@ -276,3 +279,3 @@ return e && e.traverse((n) => { | ||
} | ||
async function Pt(e, t, n, a, o) { | ||
async function Ct(e, t, n, a, o) { | ||
const { logError: i } = O(), u = new e(); | ||
@@ -285,3 +288,3 @@ o && o(u), n && n(u); | ||
(p) => { | ||
p.scene && Object.assign(p, lt(p.scene)), l(p); | ||
p.scene && Object.assign(p, dt(p.scene)), l(p); | ||
}, | ||
@@ -295,4 +298,4 @@ a, | ||
} | ||
async function Ct(e) { | ||
const t = new Ve(), n = new Ne(t), a = (o) => new Promise((i, u) => { | ||
async function Rt(e) { | ||
const t = new Fe(), n = new Ne(t), a = (o) => new Promise((i, u) => { | ||
n.load( | ||
@@ -333,7 +336,7 @@ o, | ||
} | ||
const dt = (e) => { | ||
const { state: t } = S(), n = V(() => { | ||
const pt = (e) => { | ||
const { state: t } = S(), n = G(() => { | ||
var f; | ||
return (f = t.canvas) == null ? void 0 : f.value; | ||
}), { x: a, y: o } = Ke({ target: n }), { width: i, height: u, top: r, left: s } = Je(n), c = new Fe(), l = ({ x: f, y: g }) => { | ||
}), { x: a, y: o } = Je({ target: n }), { width: i, height: u, top: r, left: s } = Xe(n), c = new ze(), l = ({ x: f, y: g }) => { | ||
if (n.value) | ||
@@ -346,3 +349,3 @@ return { | ||
if (t.camera) | ||
return c.setFromCamera(new ze(f, g), t.camera), c.intersectObjects(e.value, !1); | ||
return c.setFromCamera(new We(f, g), t.camera), c.intersectObjects(e.value, !1); | ||
}, p = (f) => { | ||
@@ -354,3 +357,3 @@ const g = l({ | ||
return g ? d(g) || [] : []; | ||
}, y = V(() => p()), h = A(), v = A(), M = (f, g) => { | ||
}, y = G(() => p()), h = A(), v = A(), M = (f, g) => { | ||
f.trigger({ event: g, intersects: p(g) }); | ||
@@ -364,10 +367,10 @@ }, w = (f) => { | ||
E = (g = p(f)[0]) == null ? void 0 : g.object; | ||
}, C = (f) => { | ||
}, x = (f) => { | ||
var g; | ||
f instanceof PointerEvent && E === ((g = p(f)[0]) == null ? void 0 : g.object) && M(h, f); | ||
}, R = (f) => v.trigger({ event: f, intersects: [] }), N = fe(() => { | ||
n != null && n.value && (n.value.addEventListener("pointerup", C), n.value.addEventListener("pointerdown", k), n.value.addEventListener("pointermove", w), n.value.addEventListener("pointerleave", R), N()); | ||
}, C = (f) => v.trigger({ event: f, intersects: [] }), F = fe(() => { | ||
n != null && n.value && (n.value.addEventListener("pointerup", x), n.value.addEventListener("pointerdown", k), n.value.addEventListener("pointermove", w), n.value.addEventListener("pointerleave", C), F()); | ||
}); | ||
return le(() => { | ||
n != null && n.value && (n.value.removeEventListener("pointerup", C), n.value.removeEventListener("pointerdown", k), n.value.removeEventListener("pointermove", w), n.value.removeEventListener("pointerleave", R)); | ||
n != null && n.value && (n.value.removeEventListener("pointerup", x), n.value.removeEventListener("pointerdown", k), n.value.removeEventListener("pointermove", w), n.value.removeEventListener("pointerleave", C)); | ||
}), { | ||
@@ -379,3 +382,3 @@ intersects: y, | ||
}; | ||
function Rt() { | ||
function Tt() { | ||
const { logWarning: e } = O(); | ||
@@ -396,3 +399,3 @@ function t(a, o, i) { | ||
} | ||
const pt = () => { | ||
const mt = () => { | ||
const e = Se({ | ||
@@ -412,8 +415,8 @@ click: /* @__PURE__ */ new Map(), | ||
}); | ||
}, a = V( | ||
() => ut( | ||
}, a = G( | ||
() => ft( | ||
Object.values(e).map((r) => Array.from(r.keys())).flat(), | ||
({ uuid: r }) => r | ||
) | ||
), { onClick: o, onPointerMove: i } = dt(a); | ||
), { onClick: o, onPointerMove: i } = pt(a); | ||
o(({ intersects: r, event: s }) => { | ||
@@ -438,6 +441,6 @@ var c; | ||
let $ = null, T = null; | ||
const { logError: ie } = O(), mt = { | ||
const { logError: ie } = O(), vt = { | ||
createElement(e, t, n, a) { | ||
var s, c; | ||
if (a || (a = {}), a.args || (a.args = []), e === "template" || st(e)) | ||
if (a || (a = {}), a.args || (a.args = []), e === "template" || ct(e)) | ||
return null; | ||
@@ -490,3 +493,3 @@ let o = e.replace("Tres", ""), i; | ||
j(i), | ||
new We(...a) | ||
new Ue(...a) | ||
); | ||
@@ -519,4 +522,4 @@ return; | ||
insertStaticContent: () => void 0 | ||
}, { createApp: vt } = Oe(mt), gt = (e) => { | ||
const t = vt(n); | ||
}, { createApp: gt } = Oe(vt), wt = (e) => { | ||
const t = gt(n); | ||
function n() { | ||
@@ -528,3 +531,3 @@ return e && e.default ? e.default() : []; | ||
ve(q); | ||
const { logWarning: se } = O(), wt = de({ | ||
const { logWarning: se } = O(), bt = de({ | ||
name: "TresScene", | ||
@@ -550,3 +553,3 @@ props: [ | ||
e.physicallyCorrectLights === !0 && se("physicallyCorrectLights is deprecated, useLegacyLights is now false by default"); | ||
const a = G(), o = G(), i = new q.Scene(), u = pt(), { setState: r } = S(); | ||
const a = V(), o = V(), i = new q.Scene(), u = mt(), { setState: r } = S(); | ||
i.userData[H.REGISTER_AT_POINTER_EVENT_HANDLER] = u.registerObject, r("scene", i), r("canvas", o), r("container", a), r("pointerEventHandler", u); | ||
@@ -559,3 +562,3 @@ const { onLoop: s, resume: c } = he(); | ||
}); | ||
const { activeCamera: l, pushCamera: d, clearCameras: p } = tt(); | ||
const { activeCamera: l, pushCamera: d, clearCameras: p } = at(); | ||
function y() { | ||
@@ -572,3 +575,3 @@ const w = i.getObjectByProperty("isCamera", !0); | ||
function h() { | ||
const { renderer: w } = ft(e); | ||
const { renderer: w } = lt(e); | ||
e.camera && d(e.camera), s(() => { | ||
@@ -581,3 +584,3 @@ var E; | ||
function M() { | ||
v = gt(t); | ||
v = wt(t); | ||
const w = S(); | ||
@@ -636,3 +639,3 @@ v.provide("useTres", w), v.provide(K, w), v.provide("extend", ve), v.mount(i), y(); | ||
} | ||
}), bt = de({ | ||
}), ht = de({ | ||
name: "TresCanvas", | ||
@@ -657,30 +660,32 @@ props: [ | ||
setup(e, { slots: t, expose: n }) { | ||
const a = Qe(); | ||
return n(a), () => L(wt, e, t); | ||
const a = Ze(); | ||
return n(a), () => L(bt, e, t); | ||
} | ||
}), xt = { | ||
}), Lt = { | ||
install(e) { | ||
e.component("TresCanvas", bt); | ||
e.component("TresCanvas", ht); | ||
} | ||
}; | ||
export { | ||
Ze as CameraType, | ||
et as CameraType, | ||
K as TRES_CONTEXT_KEY, | ||
bt as TresCanvas, | ||
ht as TresCanvas, | ||
me as catalogue, | ||
xt as default, | ||
Lt as default, | ||
ve as extend, | ||
Mt as isProd, | ||
lt as trasverseObjects, | ||
tt as useCamera, | ||
Pt as useLoader, | ||
xt as isProd, | ||
it as normalizeColor, | ||
Pt as normalizeVectorFlexibleParam, | ||
dt as trasverseObjects, | ||
at as useCamera, | ||
Ct as useLoader, | ||
O as useLogger, | ||
pt as usePointerEventHandler, | ||
dt as useRaycaster, | ||
mt as usePointerEventHandler, | ||
pt as useRaycaster, | ||
he as useRenderLoop, | ||
ft as useRenderer, | ||
Rt as useSeek, | ||
Ct as useTexture, | ||
lt as useRenderer, | ||
Tt as useSeek, | ||
Rt as useTexture, | ||
S as useTres, | ||
Qe as useTresProvider | ||
Ze as useTresProvider | ||
}; |
{ | ||
"name": "@tresjs/core", | ||
"description": "Declarative ThreeJS using Vue Components", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "packageManager": "pnpm@8.3.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76103
1530