threepipe
Version:
A 3D viewer framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.
20 lines • 758 B
JavaScript
import { iObjectCommons } from './iObjectCommons';
export const iLightCommons = {
setDirty: function (options) {
this.dispatchEvent({ bubbleToParent: true, ...options, type: 'lightUpdate', light: this, object: this }); // this sets sceneUpdate in root scene
iObjectCommons.setDirty.call(this, options);
},
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