Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tresjs/core

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tresjs/core - npm Package Compare versions

Comparing version 2.0.0-beta.7 to 2.0.0-beta.8

1

dist/components/TresCanvas.d.ts

@@ -17,2 +17,3 @@ import { ShadowMapType, TextureEncoding, ToneMapping } from 'three';

preset?: RendererPresetsType;
disableRender?: boolean;
}

@@ -19,0 +20,0 @@ /**

@@ -17,4 +17,5 @@ import { ShadowMapType, TextureEncoding, ToneMapping } from 'three';

preset?: RendererPresetsType;
disableRender?: boolean;
}
export declare const TresScene: import("vue").DefineComponent<TresSceneProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<TresSceneProps>, {}>;
export default TresScene;

62

dist/tres.js
/**
* name: @tresjs/core
* version: v2.0.0-beta.7
* version: v2.0.0-beta.8
* (c) 2023

@@ -21,3 +21,3 @@ * description: Declarative ThreeJS using Vue Components

if (i === "Perspective") {
const { near: d, far: P, fov: g } = c || {
const { near: d, far: C, fov: g } = c || {
near: 0.1,

@@ -27,5 +27,5 @@ far: 1e3,

};
_ = new F(g, ((u = e.aspectRatio) == null ? void 0 : u.value) || window.innerWidth / window.innerHeight, d, P), (f = e.cameras) == null || f.push(_);
_ = new F(g, ((u = e.aspectRatio) == null ? void 0 : u.value) || window.innerWidth / window.innerHeight, d, C), (f = e.cameras) == null || f.push(_);
} else {
const { left: d, right: P, top: g, bottom: R, near: w, far: p } = c || {
const { left: d, right: C, top: g, bottom: P, near: w, far: p } = c || {
left: -100,

@@ -38,3 +38,3 @@ right: 100,

};
_ = new Ie(d, P, g, R, w, p), (m = e.cameras) == null || m.push(_);
_ = new Ie(d, C, g, P, w, p), (m = e.cameras) == null || m.push(_);
}

@@ -125,5 +125,5 @@ return e.camera = _, t("camera", e.camera), _;

shadowMapType: d = Ge,
physicallyCorrectLights: P = !1,
physicallyCorrectLights: C = !1,
useLegacyLights: g = !1,
outputEncoding: R = te,
outputEncoding: P = te,
toneMapping: w = ae,

@@ -137,7 +137,7 @@ toneMappingExposure: p = 1,

preset: L = void 0
} = fe(e), { state: h, setState: T } = D(), { width: C, height: O } = l(E) == !0 || l(E) === "" || l(E) === "true" ? qe() : Ke(h.container), { logError: B, logWarning: Pe } = I(), { pixelRatio: J } = Je(), { pause: Re, resume: Le } = Me(), U = le(() => C.value / O.value);
!l(E) && ((ee = (Z = h.container) == null ? void 0 : Z.value) == null ? void 0 : ee.offsetHeight) === 0 && Pe(`Oops... Seems like your canvas height is currently 0px, by default it takes the height of it's parent, so make sure it has some height with CSS.
} = fe(e), { state: h, setState: T } = D(), { width: R, height: O } = l(E) == !0 || l(E) === "" || l(E) === "true" ? qe() : Ke(h.container), { logError: B, logWarning: Ce } = I(), { pixelRatio: J } = Je(), { pause: Pe, resume: Le } = Me(), U = le(() => R.value / O.value);
!l(E) && ((ee = (Z = h.container) == null ? void 0 : Z.value) == null ? void 0 : ee.offsetHeight) === 0 && Ce(`Oops... Seems like your canvas height is currently 0px, by default it takes the height of it's parent, so make sure it has some height with CSS.
You could set windowSize=true to force the canvas to be the size of the window.`);
const X = () => {
t.value && (t.value.setSize(C.value, O.value), t.value.setPixelRatio(Math.min(J.value, 2)));
t.value && (t.value.setSize(R.value, O.value), t.value.setPixelRatio(Math.min(J.value, 2)));
}, Q = () => {

@@ -151,3 +151,3 @@ if (!t.value)

}
t.value.shadowMap.enabled = l(m), t.value.shadowMap.type = l(d), t.value.toneMapping = l(w) || ae, t.value.toneMappingExposure = l(p), t.value.outputEncoding = l(R) || te, M != null && M.value && t.value.setClearColor(nt(l(M))), t.value.useLegacyLights = l(g);
t.value.shadowMap.enabled = l(m), t.value.shadowMap.type = l(d), t.value.toneMapping = l(w) || ae, t.value.toneMappingExposure = l(p), t.value.outputEncoding = l(P) || te, M != null && M.value && t.value.setClearColor(nt(l(M))), t.value.useLegacyLights = l(g);
}, Te = () => {

@@ -170,6 +170,6 @@ const A = Y(h.canvas);

}, Ae = () => {
t.value && (t.value.dispose(), t.value = void 0, o.value = !1, Re());
t.value && (t.value.dispose(), t.value = void 0, o.value = !1, Pe());
};
return W([U, J], X), W(
[m, d, R, g, w, p, M],
[m, d, P, g, w, p, M],
Q

@@ -213,3 +213,3 @@ ), W(

}
async function Ct(e) {
async function Rt(e) {
const t = new Ue(), o = new We(t), a = (n) => new Promise((r, s) => {

@@ -256,3 +256,3 @@ o.load(

}
const Ce = Symbol();
const Re = Symbol();
function ft() {

@@ -279,5 +279,5 @@ const e = de({

};
return Se(Ce, a), a;
return Se(Re, a), a;
}
const D = () => Oe(Ce, {
const D = () => Oe(Re, {
state: de({

@@ -305,3 +305,3 @@ camera: void 0,

}
const Pt = !0, re = "[TresJS ▲ ■ ●] ";
const Ct = !0, re = "[TresJS ▲ ■ ●] ";
function I() {

@@ -322,3 +322,3 @@ function e(a, n) {

}
function Rt() {
function Pt() {
const { logWarning: e } = I();

@@ -447,3 +447,4 @@ function t(a, n, r) {

"windowSize",
"preset"
"preset",
"disableRender"
],

@@ -461,11 +462,11 @@ setup(e, { slots: t, expose: o }) {

function c() {
const { renderer: m } = st(e), { activeCamera: d } = N(), { onLoop: P } = Me(), { raycaster: g, pointer: R } = lt();
const { renderer: m } = st(e), { activeCamera: d } = N(), { onLoop: C } = Me(), { raycaster: g, pointer: P } = lt();
let w = null, p = null;
ce(() => {
d.value && g.value.setFromCamera(R.value, d.value);
}), P(() => {
var x, b, y, M, E, L, h, T, C, O;
if (d.value && ((x = m.value) == null || x.render(r, d.value)), g.value) {
d.value && g.value.setFromCamera(P.value, d.value);
}), C(() => {
var x, b, y, M, E, L, h, T, R, O;
if (d.value && e.disableRender === !0 && ((x = m.value) == null || x.render(r, d.value)), g.value) {
const B = g.value.intersectObjects(r.children);
B.length > 0 ? (p = B[0], w === null && ((M = (y = (b = p.object) == null ? void 0 : b.events) == null ? void 0 : y.onPointerEnter) == null || M.call(y, p)), (h = (L = (E = p.object) == null ? void 0 : E.events) == null ? void 0 : L.onPointerMove) == null || h.call(L, p)) : w !== null && ((O = (C = (T = p == null ? void 0 : p.object) == null ? void 0 : T.events) == null ? void 0 : C.onPointerLeave) == null || O.call(C, w), p = null), w = p;
B.length > 0 ? (p = B[0], w === null && ((M = (y = (b = p.object) == null ? void 0 : b.events) == null ? void 0 : y.onPointerEnter) == null || M.call(y, p)), (h = (L = (E = p.object) == null ? void 0 : E.events) == null ? void 0 : L.onPointerMove) == null || h.call(L, p)) : w !== null && ((O = (R = (T = p == null ? void 0 : p.object) == null ? void 0 : T.events) == null ? void 0 : R.onPointerLeave) == null || O.call(R, w), p = null), w = p;
}

@@ -541,3 +542,4 @@ }), Xe(n.value, "click", () => {

"windowSize",
"preset"
"preset",
"disableRender"
],

@@ -559,3 +561,3 @@ setup(e, { slots: t, expose: o }) {

we as extend,
Pt as isProd,
Ct as isProd,
ct as trasverseObjects,

@@ -568,6 +570,6 @@ N as useCamera,

st as useRenderer,
Rt as useSeek,
Ct as useTexture,
Pt as useSeek,
Rt as useTexture,
D as useTres,
ft as useTresProvider
};
{
"name": "@tresjs/core",
"description": "Declarative ThreeJS using Vue Components",
"version": "2.0.0-beta.7",
"version": "2.0.0-beta.8",
"type": "module",

@@ -6,0 +6,0 @@ "author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc