the-world-engine
Version:
three.js based, unity like game engine for browser
21 lines (20 loc) • 446 B
JavaScript
import { GameObjectBuilder } from "../hierarchy_object/GameObjectBuilder";
export class SceneBuilder {
v;
$;
constructor(e) {
this.v = e;
this.$ = [];
}
withChild(e) {
this.$.push(e);
return this;
}
build() {
const e = this.$;
for (let t = 0; t < e.length; ++t) {
e[t].build(null);
}
GameObjectBuilder.processEventByGroup(e, this.v);
}
}