UNPKG

threepipe

Version:

A 3D viewer framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.

62 lines 2.48 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { HemisphereLight } from 'three'; import { iLightCommons } from '../object/iLightCommons'; import { uiColor, uiPanelContainer, uiSlider, uiToggle, uiVector } from 'uiconfig.js'; import { onChange3 } from 'ts-browser-helpers'; let HemisphereLight2 = class HemisphereLight2 extends HemisphereLight { constructor(skyColor, groundColor, intensity) { super(skyColor, groundColor, intensity); this.assetType = 'light'; this.setDirty = iLightCommons.setDirty; this.refreshUi = iLightCommons.refreshUi; this.isHemisphereLight2 = true; iLightCommons.upgradeLight.call(this); } autoScale() { console.warn('AutoScale not supported on Lights'); return this; } autoCenter() { console.warn('AutoCenter not supported on Lights'); return this; } /** * @deprecated use `this` instead */ get lightObject() { return this; } /** * @deprecated use `this` instead */ get modelObject() { return this; } }; __decorate([ uiToggle('Enabled'), onChange3('setDirty') ], HemisphereLight2.prototype, "visible", void 0); __decorate([ uiColor('Sky Color', (that) => ({ onChange: () => that.setDirty() })) ], HemisphereLight2.prototype, "color", void 0); __decorate([ uiColor('Ground Color', (that) => ({ onChange: () => that.setDirty() })) ], HemisphereLight2.prototype, "groundColor", void 0); __decorate([ uiSlider('Intensity', [0, 30], 0.01), onChange3('setDirty') ], HemisphereLight2.prototype, "intensity", void 0); __decorate([ uiVector('Position', undefined, undefined, (that) => ({ onChange: () => that.setDirty() })) ], HemisphereLight2.prototype, "position", void 0); HemisphereLight2 = __decorate([ uiPanelContainer('Hemisphere Light') ], HemisphereLight2); export { HemisphereLight2 }; //# sourceMappingURL=HemisphereLight2.js.map