Examples
const bin3D = genBinRenderables3D(BasicMaterial, BasicMaterialInstance)
app.registerSystem({
schedule: AppSchedule.Update,
system: bin3D
})Function
genBinRenderables3D<T extends Material>(assettype: Constructor<T>, componenttype: object): SystemFuncCreates a system that rebuilds 3D opaque render passes for one
Material type.
assettype supplies the material type ID used as the pass key, while
componenttype identifies the matching MaterialInstance component
for T. The returned system queries renderables with
GlobalTransform3D, Meshed, and componenttype, and
cameras with RenderLists3D, GlobalTransform3D, and
Camera.
Each matching camera’s render lists are cleared before a new opaque pass is
created for the material type. Every matching renderable is then appended as
a RenderType using its material handle ID, mesh handle ID, and
resolved transform. The same renderables are added to every matching camera;
this factory does not perform visibility or frustum filtering. With no
matching camera, the generated system does no work.
MaterialInstancePlugin normally installs this system for a
material/component pair. The factory itself only returns the system.
const bin3D = genBinRenderables3D(BasicMaterial, BasicMaterialInstance)
app.registerSystem({
schedule: AppSchedule.Update,
system: bin3D
})