postprocessing - v7.0.0-beta.16
    Preparing search index...

    Class Viewport

    A viewport.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    AUTO_SIZE: -1 = AUTO_SIZE

    An auto sizing constant.

    Can be used to automatically calculate the width or height based on the original aspect ratio.

    Accessors

    • get baseHeight(): number

      The unscaled base height in logical pixels.

      Returns number

      1
      
    • set baseHeight(value: number): void

      Parameters

      • value: number

      Returns void

    • get baseWidth(): number

      The unscaled base width in logical pixels.

      Returns number

      1
      
    • set baseWidth(value: number): void

      Parameters

      • value: number

      Returns void

    • get enabled(): boolean

      Indicates whether this viewport is enabled.

      Returns boolean

      false
      
    • set enabled(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get height(): number

      The effective height, calculated based on the preferred size, pixel ratio and resolution scale.

      Returns number

    • get offsetX(): number

      The effective offset along the X-axis, calculated based on the scale and pixel ratio.

      Returns number

      0
      
    • get offsetY(): number

      The effective offset along the Y-axis, calculated based on the scale and pixel ratio.

      Returns number

      0
      
    • get pixelRatio(): number

      The device pixel ratio.

      Returns number

      1.0
      
    • set pixelRatio(value: number): void

      Parameters

      • value: number

      Returns void

    • get scale(): number

      The resolution scale.

      Returns number

      1.0
      
    • set scale(value: number): void

      Parameters

      • value: number

      Returns void

    • get width(): number

      The effective width, calculated based on the preferred size, pixel ratio and resolution scale.

      Returns number

    Methods

    • Sets the offset and the preferred size in logical pixels.

      If the width and height are omitted, x and y will be used for the size instead.

      Parameters

      • x: number

        The X-offset.

      • y: number

        The Y-offset.

      • Optionalwidth: number

        The width.

      • Optionalheight: number

        The height.

      Returns void

    • Sets the offset in logical pixels.

      Parameters

      • x: number

        The X-offset.

      • y: number

        The Y-offset.

      Returns void