lingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
73 lines • 1.91 kB
JavaScript
import ObjectManager from "../core/ObjectManager";
import { Sphere } from "three";
import HelperSprite from "../core/utils/HelperSprite";
import Cube from "../primitives/Cube";
export default class PooledPointLightBase extends ObjectManager {
$light;
$boundingSphere = new Sphere();
helperSprite;
constructor() {
super();
this.helperSprite = new HelperSprite("light", this);
}
disposeNode() {
super.disposeNode();
this.helperSprite.dispose();
}
_distance = 500;
get distance() {
return this._distance;
}
set distance(value) {
this._distance = value;
if (this.$light)
this.$light.distance = value;
}
_intensity = 10;
get intensity() {
return this._intensity;
}
set intensity(value) {
this._intensity = value;
if (this.$light)
this.$light.intensity = value;
}
_shadows = true;
get shadows() {
return this._shadows;
}
set shadows(value) {
this._shadows = value;
if (this.$light)
this.$light.shadows = value;
}
_color = "#ffffff";
get color() {
return this._color;
}
set color(value) {
this._color = value;
if (this.$light)
this.$light.color = value;
}
_fade = true;
get fade() {
return this._fade;
}
set fade(value) {
this._fade = value;
if (this.$light)
this.$light.fade = value;
}
renderCheckBox;
get isRendered() {
if (!this.renderCheckBox) {
const renderCheckBox = (this.renderCheckBox = new Cube());
renderCheckBox.$ghost();
renderCheckBox.opacity = 0.001;
this.append(renderCheckBox);
}
return this.renderCheckBox.isRendered;
}
}
//# sourceMappingURL=PooledPointLightBase.js.map