lingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
19 lines • 723 B
JavaScript
import { DirectionalLight as ThreeDirectionalLight } from "three";
import scene from "../../engine/scene";
import { directionalLightDefaults, directionalLightSchema } from "../../interface/IDirectionalLight";
import LightBase from "../core/LightBase";
class DirectionalLight extends LightBase {
static componentName = "directionalLight";
static defaults = directionalLightDefaults;
static schema = directionalLightSchema;
constructor() {
super(new ThreeDirectionalLight());
scene.add(this.object3d.target);
}
disposeNode() {
super.disposeNode();
scene.remove(this.object3d.target);
}
}
export default DirectionalLight;
//# sourceMappingURL=DirectionalLight.js.map