threepipe
Version:
A 3D viewer framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.
23 lines • 914 B
JavaScript
import { iObjectCommons } from './iObjectCommons';
export const iLightCommons = {
setDirty: function (options, ...args) {
if (typeof options === 'string') { // just incase called by decorators
options = { change: options };
}
// this.dispatchEvent({bubbleToParent: true, ...options, type: 'lightUpdate', light: this, object: this, args}) // this sets sceneUpdate in root scene
iObjectCommons.setDirty.call(this, options, ...args);
},
upgradeLight: upgradeLight,
refreshUi: iObjectCommons.refreshUi,
};
/**
* Converts three.js Light to ILight setup object events, adds utility methods, and runs objectProcessor.
* @param parent
* @param objectProcessor
*/
function upgradeLight(parent, objectProcessor) {
if (!this)
return;
iObjectCommons.upgradeObject3D.call(this, parent, objectProcessor);
}
//# sourceMappingURL=iLightCommons.js.map