genenerateDrawGizmo3Dsystem

View sourcegenenerateDrawGizmo3Dsystem<T>(label: Constructor<T>): SystemFunc

Creates the canvas-2D fallback system for a labelled Gizmo3D resource.

Canvas 2D cannot render 3D gizmos, so this factory calls warn immediately when it is created. The label is combined with Gizmo3D through typeidGeneric(Gizmo3D, [label]); use the same constructor that identifies the resource installed in the world.

The returned system looks up that labelled Gizmo3D resource, clears its GizmoBuffer every time it runs, and performs no rendering. It accepts a world and returns undefined. The factory does not install the resource or register the returned system in a schedule.

Examples

import { AppSchedule } from '@wimaengine/core'
import { genenerateDrawGizmo3Dsystem } from '@wimaengine/gizmo'

class PhysicsDebug {}
const discardPhysicsGizmo = genenerateDrawGizmo3Dsystem(PhysicsDebug)
app.registerSystem({ schedule: AppSchedule.Update, system: discardPhysicsGizmo })

Type Parameters

T

Parameters

NameDescriptionDefault
label——

Returns

A system that clears the labelled 3D gizmo buffer without rendering.