Home Reference Source
import {Resizer} from 'postprocessing'
public class | source

Resizer

A resizer.

Static Member Summary

Static Public Members
public static get

An auto sizing constant.

Constructor Summary

Public Constructor
public

constructor(resizeable: Resizable, width: Number, height: Number)

Constructs a new resizer.

Member Summary

Public Members
public

base: Vector2

The base size.

public get

The calculated height.

public set

Sets the target height.

public

A resizable object.

public
this member was deprecated. Added for internal use only.

A scale.

public get

The calculated width.

public set

Sets the target width.

Static Public Members

public static get AUTO_SIZE: Number source

An auto sizing constant.

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

Public Constructors

public constructor(resizeable: Resizable, width: Number, height: Number) source

Constructs a new resizer.

Params:

NameTypeAttributeDescription
resizeable Resizable

A resizable object.

width Number
  • optional
  • default: Resizer.AUTO_SIZE

The width.

height Number
  • optional
  • default: Resizer.AUTO_SIZE

The height.

Public Members

public base: Vector2 source

The base size.

This size will be passed to the resizable object every time the width or height is changed.

public get height: Number source

The calculated height.

If both the width and the height are set to Resizer.AUTO_SIZE, the base height will be returned.

public set height: Number source

Sets the target height.

Use Resizer.AUTO_SIZE to automatically calculate the height based on the width and the original aspect ratio.

public resizable: Resizable source

A resizable object.

public scale: Number source

this member was deprecated. Added for internal use only.

A scale.

If both the width and the height are set to Resizer.AUTO_SIZE, they will be scaled uniformly using this scalar.

public get width: Number source

The calculated width.

If both the width and the height are set to Resizer.AUTO_SIZE, the base width will be returned.

public set width: Number source

Sets the target width.

Use Resizer.AUTO_SIZE to automatically calculate the width based on the height and the original aspect ratio.