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

Resolution

Extends:

three~EventDispatcher → Resolution

A resolution.

Static Member Summary

Static Public Members
public static get

An auto sizing constant.

Constructor Summary

Public Constructor
public

constructor(resizable: Resizable, width: Number, height: Number, scale: Number)

Constructs a new resolution.

Member Summary

Public Members
public get

The base height.

public set
public get

The base width.

public set
public get

The effective height.

public set
public get

The preferred height.

public set
public get

The preferred width.

public set
public
this member was deprecated. Use an event listener for "change" events instead.

A resizable object.

public get

The resolution scale.

public set
public

target: Vector2

this member was deprecated. Added for backward-compatibility.

The preferred resolution.

public get

The effective width.

public set

Method Summary

Public Methods
public

copy(resolution: Resolution)

Copies the given resolution.

public
this method was deprecated. Use baseHeight instead.

Returns the base height.

public
this method was deprecated. Use baseWidth instead.

Returns the base width.

public
this method was deprecated. Use height instead.

Returns the effective height.

public
this method was deprecated. Use preferredHeight instead.

Returns the preferred height.

public
this method was deprecated. Use preferredWidth instead.

Returns the preferred width.

public
this method was deprecated. Use scale instead.

Returns the current resolution scale.

public
this method was deprecated. Use width instead.

Returns the effective width.

public
this method was deprecated. Use baseHeight instead.

Sets the base height.

public

setBaseSize(width: Number, height: Number)

Sets the base size.

public
this method was deprecated. Use baseWidth instead.

Sets the base width.

public
this method was deprecated. Use preferredHeight instead.

Sets the preferred height.

public

setPreferredSize(width: Number, height: Number)

Sets the preferred size.

public
this method was deprecated. Use preferredWidth instead.

Sets the preferred width.

public

setScale(value: Number)

this method was deprecated. Use scale instead.

Sets the resolution scale.

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(resizable: Resizable, width: Number, height: Number, scale: Number) source

Constructs a new resolution.

TODO Remove resizable param.

Params:

NameTypeAttributeDescription
resizable Resizable

A resizable object.

width Number
  • optional
  • default: Resolution.AUTO_SIZE

The preferred width.

height Number
  • optional
  • default: Resolution.AUTO_SIZE

The preferred height.

scale Number
  • optional
  • default: 1.0

A resolution scale.

Public Members

public get baseHeight: Number source

The base height.

public set baseHeight source

public get baseWidth: Number source

The base width.

public set baseWidth source

public get height: Number source

The effective height.

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

public set height source

public get preferredHeight: Number source

The preferred height.

public set preferredHeight source

public get preferredWidth: Number source

The preferred width.

public set preferredWidth source

public resizable: Resizable source

this member was deprecated. Use an event listener for "change" events instead.

A resizable object.

public get scale: Number source

The resolution scale.

public set scale source

public target: Vector2 source

this member was deprecated. Added for backward-compatibility.

The preferred resolution.

public get width: Number source

The effective width.

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

public set width source

Public Methods

public copy(resolution: Resolution) source

Copies the given resolution.

Params:

NameTypeAttributeDescription
resolution Resolution

The resolution.

public getBaseHeight(): Number source

this method was deprecated. Use baseHeight instead.

Returns the base height.

Return:

Number

The base height.

public getBaseWidth(): Number source

this method was deprecated. Use baseWidth instead.

Returns the base width.

Return:

Number

The base width.

public getHeight(): Number source

this method was deprecated. Use height instead.

Returns the effective height.

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

Return:

Number

The effective height.

public getPreferredHeight(): Number source

this method was deprecated. Use preferredHeight instead.

Returns the preferred height.

Return:

Number

The preferred height.

public getPreferredWidth(): Number source

this method was deprecated. Use preferredWidth instead.

Returns the preferred width.

Return:

Number

The preferred width.

public getScale(): Number source

this method was deprecated. Use scale instead.

Returns the current resolution scale.

Return:

Number

The scale.

public getWidth(): Number source

this method was deprecated. Use width instead.

Returns the effective width.

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

Return:

Number

The effective width.

public setBaseHeight(value: Number) source

this method was deprecated. Use baseHeight instead.

Sets the base height.

Params:

NameTypeAttributeDescription
value Number

The height.

public setBaseSize(width: Number, height: Number) source

Sets the base size.

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.

public setBaseWidth(value: Number) source

this method was deprecated. Use baseWidth instead.

Sets the base width.

Params:

NameTypeAttributeDescription
value Number

The width.

public setPreferredHeight(value: Number) source

this method was deprecated. Use preferredHeight instead.

Sets the preferred height.

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

Params:

NameTypeAttributeDescription
value Number

The height.

public setPreferredSize(width: Number, height: Number) source

Sets the preferred size.

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.

public setPreferredWidth(value: Number) source

this method was deprecated. Use preferredWidth instead.

Sets the preferred width.

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

Params:

NameTypeAttributeDescription
value Number

The width.

public setScale(value: Number) source

this method was deprecated. Use scale instead.

Sets the resolution scale.

Also sets the preferred resolution to Resizer.AUTO_SIZE.

Params:

NameTypeAttributeDescription
value Number

The scale.