first commit
This commit is contained in:
34
framework/Scene.js
Normal file
34
framework/Scene.js
Normal file
@@ -0,0 +1,34 @@
|
||||
export class Scene {
|
||||
|
||||
constructor( ) {
|
||||
|
||||
this.meshes = [];
|
||||
|
||||
}
|
||||
|
||||
|
||||
addMesh( mesh ) {
|
||||
|
||||
this.meshes.push( mesh );
|
||||
|
||||
return this;
|
||||
|
||||
}
|
||||
|
||||
|
||||
draw( passEncoder ) {
|
||||
|
||||
for ( const mesh of this.meshes ) {
|
||||
|
||||
if ( typeof mesh.draw === "function" ) {
|
||||
|
||||
mesh.draw( passEncoder );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user