@shopware-ag/dive
Version:
Shopware Spatial Framework
40 lines (39 loc) • 1.05 kB
JavaScript
var L = Object.defineProperty;
var R = (e, s, a) => s in e ? L(e, s, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[s] = a;
var r = (e, s, a) => R(e, typeof s != "symbol" ? s + "" : s, a);
import { PerspectiveCamera as n } from "three/webgpu";
const c = 1, K = 2, S = 4, i = 8, A = 16, E = {
fov: 70,
near: 1e-3,
far: 1e3
}, t = class t extends n {
constructor(a = E) {
super(
a.fov || E.fov,
1,
a.near || E.near,
a.far || E.far
);
r(this, "isDIVEPerspectiveCamera", !0);
r(this, "onSetCameraLayer", () => {
});
this.layers.mask = t.EDITOR_VIEW_LAYER_MASK;
}
onResize(a, o) {
this.aspect = a / o, this.updateProjectionMatrix();
}
setCameraLayer(a) {
this.layers.mask = a === "LIVE" ? t.LIVE_VIEW_LAYER_MASK : t.EDITOR_VIEW_LAYER_MASK, this.onSetCameraLayer(this.layers.mask);
}
};
r(t, "EDITOR_VIEW_LAYER_MASK", c | S | i | A), r(t, "LIVE_VIEW_LAYER_MASK", A);
let _ = t;
export {
K as C,
_ as D,
i as H,
A as P,
S as U,
c as a,
E as b
};