Table of contents

Public interface

Signature
interface TLCameraConstraints {}
Source

packages/editor/src/lib/editor/types/misc-types.ts


Properties

baseZoom

Public propertysignature

The camera's base for its zoom steps.

  • default: Sets the initial zoom to 100%.
  • fit-x: The x axis will completely fill the viewport bounds.
  • fit-y: The y axis will completely fill the viewport bounds.
  • fit-min: The smaller axis will completely fill the viewport bounds.
  • fit-max: The larger axis will completely fill the viewport bounds.
  • fit-x-100: The x axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
  • fit-y-100: The y axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
  • fit-min-100: The smaller axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
  • fit-max-100: The larger axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
Signature
baseZoom:
  | 'default'
  | 'fit-max-100'
  | 'fit-max'
  | 'fit-min-100'
  | 'fit-min'
  | 'fit-x-100'
  | 'fit-x'
  | 'fit-y-100'
  | 'fit-y'

behavior

Public propertysignature

The behavior for the constraints for both axes or each axis individually.

  • free: The bounds are ignored when moving the camera.
  • 'fixed': The bounds will be positioned within the viewport based on the origin
  • contain: The 'fixed' behavior will be used when the zoom is below the zoom level at which the bounds would fill the viewport; and when above this zoom, the bounds will use the 'inside' behavior.
  • inside: The bounds will stay completely within the viewport.
  • outside: The bounds will stay touching the viewport.
Signature
behavior:
  | 'contain'
  | 'fixed'
  | 'free'
  | 'inside'
  | 'outside'
  | {
      x: 'contain' | 'fixed' | 'free' | 'inside' | 'outside'
      y: 'contain' | 'fixed' | 'free' | 'inside' | 'outside'
    }

bounds

Public propertysignature

The bounds (in page space) of the constrained space

Signature
bounds: BoxModel
References

BoxModel


initialZoom

Public propertysignature

The camera's initial zoom, used also when the camera is reset.

  • default: Sets the initial zoom to 100%.
  • fit-x: The x axis will completely fill the viewport bounds.
  • fit-y: The y axis will completely fill the viewport bounds.
  • fit-min: The smaller axis will completely fill the viewport bounds.
  • fit-max: The larger axis will completely fill the viewport bounds.
  • fit-x-100: The x axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
  • fit-y-100: The y axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
  • fit-min-100: The smaller axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
  • fit-max-100: The larger axis will completely fill the viewport bounds, or 100% zoom, whichever is smaller.
Signature
initialZoom:
  | 'default'
  | 'fit-max-100'
  | 'fit-max'
  | 'fit-min-100'
  | 'fit-min'
  | 'fit-x-100'
  | 'fit-x'
  | 'fit-y-100'
  | 'fit-y'

origin

Public propertysignature

The origin for placement. Used to position the bounds within the viewport when an axis is fixed or contained and zoom is below the axis fit.

Signature
origin: VecLike
References

VecLike


padding

Public propertysignature

The padding inside of the viewport (in screen space)

Signature
padding: VecLike
References

VecLike


TLBrushPropsTLCameraMoveOptions