@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
25 lines (24 loc) • 483 B
JavaScript
;
export class PolyPlugin {
constructor(_name, _callback, _options) {
this._name = _name;
this._callback = _callback;
this._options = _options;
}
name() {
return this._name;
}
libraryName() {
return this._options.libraryName;
}
init(poly) {
this._callback(poly);
}
toJSON() {
return {
name: this._name,
libraryName: this._options.libraryName,
libraryImportPath: this._options.libraryImportPath
};
}
}