@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
53 lines (52 loc) • 1.13 kB
JavaScript
;
export class TypedContainer {
constructor(_node) {
this._node = _node;
}
set_node(node) {
this._node = node;
}
node() {
return this._node;
}
// clone() {
// let content;
// const cloned_container = new (<any>this.constructor)() as TypedContainer<T>;
// cloned_container.set_node(this.node());
// if ((content = this.content()) != null) {
// cloned_container.set_content(content); //, this.eval_key() );
// }
// return cloned_container;
// }
// reset_caches() {}
set_content(content) {
this._content = content;
this._post_set_content();
}
has_content() {
return this._content != null;
}
content() {
return this._content;
}
_post_set_content() {
}
coreContent() {
return this._content;
}
coreContentCloned() {
return this._content;
}
// abstract clone_content(): T
// update_eval_key(eval_key?: number){
// this._eval_key = eval_key || performance.now();
// }
// eval_key(): number {
// return this._eval_key;
// }
infos() {
return [];
}
}
export class BaseContainer extends TypedContainer {
}