The same entity as in Lens Scripting.
.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel; const assetManager = model.project.assetManager; // Find a Material and configure frustum culling on its first pass const materials = assetManager.assets.filter(a => a.isOfType('Material')) as Editor.Assets.Material[]; if (materials.length === 0) return; const mat = materials[0]; const pass = mat.passInfos[0]; // Auto: engine determines culling from mesh bounds pass.frustumCulling = Editor.Assets.FrustumCullMode.Auto; console.log(`"${mat.name}" frustumCulling: Auto (${pass.frustumCulling})`); // Extend: expand culling bounds (useful for vertex-animated meshes // that move outside their bounding box) pass.frustumCulling = Editor.Assets.FrustumCullMode.Extend; console.log(`Set to Extend (${pass.frustumCulling})`); Copy
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel; const assetManager = model.project.assetManager; // Find a Material and configure frustum culling on its first pass const materials = assetManager.assets.filter(a => a.isOfType('Material')) as Editor.Assets.Material[]; if (materials.length === 0) return; const mat = materials[0]; const pass = mat.passInfos[0]; // Auto: engine determines culling from mesh bounds pass.frustumCulling = Editor.Assets.FrustumCullMode.Auto; console.log(`"${mat.name}" frustumCulling: Auto (${pass.frustumCulling})`); // Extend: expand culling bounds (useful for vertex-animated meshes // that move outside their bounding box) pass.frustumCulling = Editor.Assets.FrustumCullMode.Extend; console.log(`Set to Extend (${pass.frustumCulling})`);
Automatically determine frustum culling behavior.
Extend frustum bounds beyond automatic culling.
The same entity as in Lens Scripting.
See
.
Example