UNPKG

mylingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

26 lines 897 B
import { Color, HemisphereLight } from "three"; import LightBase from "../core/LightBase"; import { skyLightDefaults, skyLightSchema } from "../../interface/ISkyLight"; export default class Skylight extends LightBase { static componentName = "skyLight"; static defaults = skyLightDefaults; static schema = skyLightSchema; constructor() { super(HemisphereLight); this.innerY = 0; } get groundColor() { const light = this.lightState.get(); if (!light) return "#ffffff"; return "#" + light.groundColor.getHexString(); } set groundColor(val) { this.cancelHandle("groundColor", () => this.lightState.get((light) => light && (light.groundColor = new Color(val)))); } get castShadow() { return false; } set castShadow(_) { } } //# sourceMappingURL=SkyLight.js.map