Skip to content

useViewport 0.1.0 view source

function useViewport(
  scope: Fusion.Scope
): Fusion.StateObject<Vector2>

Returns the current viewport size. Updates when the current camera changes or when the viewport size is changed.


Parameters

scope : Fusion.Scope

The scope to store cleanup tasks.


Returns -> Fusion.StateObject<Vector2>

A state object with the viewport size.


Example Usage

-- TODO: write example