UNPKG

threepipe

Version:

A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.

23 lines (19 loc) 636 B
import {Light} from 'three' import {IUiConfigContainer} from 'uiconfig.js' import {AHelperWidget} from './AHelperWidget' export abstract class ALightHelperWidget extends AHelperWidget { light: (Light & IUiConfigContainer)|undefined protected constructor(object: Light & IUiConfigContainer) { super(object) this.light = object this.traverse(o => { o.userData.__keepShadowDef = true o.castShadow = false o.receiveShadow = false }) } preRender() { // req because its a light if (!this.visible) return this._objectBeforeRender() } }