Files
WebGPU-FFT-Ocean-Demo/framework/Scene.js
2025-12-31 14:22:45 +01:00

35 lines
294 B
JavaScript

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 );
}
}
}
}