API

Function createCameraGizmo

  • Build a display-only camera gizmo and attach it to the given utility layer. Call attachCameraGizmoToCamera to bind a camera.

    The gizmo has two independently-toggleable parts, both visible by default and parented to a root that follows the attached camera's world translation

    • orientation each frame:
    • A camera body (displayBody, defaults to true) — a distance-scaled box + 3 cylinders ported from BJS _CreateCameraMesh, lit grey, sized so it stays a roughly constant size on screen.
    • A camera frustum (displayFrustum, defaults to true) — 12 thin cylinder edges forming a truncated-pyramid wireframe sized from the camera's fov / near / far (far clamped to 60× near), unlit white.

    Set the matching option to false to display only one of them.

    Parameters

    Returns CameraGizmo