Function attachFreeControl
-
attachFreeControl(
camera: FreeCamera,
canvas: HTMLCanvasElement,
scene?: SceneContext,
): () => voidParameters
- camera: FreeCamera
- canvas: HTMLCanvasElement
Optionalscene: SceneContext
Returns () => void
Optionalscene: SceneContext
Attach keyboard + mouse controls to a FreeCamera. Matches Babylon.js FreeCamera input behavior:
Camera stays plain data — this function reads/writes its properties. Returns a cleanup function to remove all listeners and the beforeRender hook.