Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObservablePoint3D

Represents a point in 3D space.

Hierarchy

Implements

  • IPoint

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new ObservablePoint3D(cb: () => void, scope: any, x?: number, y?: number, z?: number): ObservablePoint3D
  • Creates a new observable point.

    Parameters

    • cb: () => void

      The callback when changed.

        • (): void
        • Returns void

    • scope: any

      The owner of callback.

    • Default value x: number = 0

      The position on the x axis.

    • Default value y: number = 0

      The position on the y axis.

    • Default value z: number = 0

      The position on the z axis.

    Returns ObservablePoint3D

Properties

Private _z

_z: number

Protected cb

cb: () => void

The callback when changed.

Type declaration

    • (): void
    • Returns void

Protected scope

scope: any

The owner of callback.

x

x: number

X coord

memberof

PIXI.IPoint#

member

{number} x

y

y: number

Y coord

memberof

PIXI.IPoint#

member

{number} y

Accessors

z

  • get z(): number
  • set z(value: number): void

Methods

clone

  • clone(cb?: undefined | ((...params: any[]) => any), scope?: any): ObservablePoint3D

copyFrom

  • copyFrom(p: IPoint): this

copyTo

  • copyTo(p: IPoint): any

equals

  • equals(p: IPoint): boolean

set

  • set(x: number, y?: undefined | number, z?: undefined | number): this
  • Sets the point to a new x, y and z position.

    Parameters

    • x: number

      The position on the x axis.

    • Optional y: undefined | number

      The position on the y axis.

    • Optional z: undefined | number

      The position on the z axis.

    Returns this

setFrom

  • setFrom(array: ArrayLike<number>): this
  • Sets the point to a new x, y and z position.

    Parameters

    • array: ArrayLike<number>

      The array containing x, y and z, expected length is 3.

    Returns this

Generated using TypeDoc