The Point object represents a location in a two-dimensional coordinate system, where x represents
the horizontal axis and y represents the vertical axis.
An observable point is a point that triggers a callback when the point's position is changed.
Public methods | |
---|---|
public | set(x: number, y: number): void |
public | copy(point: PIXI.Point, PIXI.ObservablePoint): void |
public | x(): void |
public | y(): void |
public | set(x: number, y: number): void |
public | copy(point: PIXI.Point, PIXI.ObservablePoint): void |
public | x(): void |
public | y(): void |
Sets the point to a new x and y position.
If y is omitted, both x and y will be set to x.
Name | Type | Attribute | Description |
---|---|---|---|
x | position of the point on the x axis |
||
y | position of the point on the y axis |
void
Copies the data from another point
Name | Type | Attribute | Description |
---|---|---|---|
point | point to copy from |
void
The position of the displayObject on the x axis relative to the local coordinates of the parent.
void
The position of the displayObject on the x axis relative to the local coordinates of the parent.
void
Sets the point to a new x and y position.
If y is omitted, both x and y will be set to x.
Name | Type | Attribute | Description |
---|---|---|---|
x | position of the point on the x axis |
||
y | position of the point on the y axis |
void
Copies the data from another point
Name | Type | Attribute | Description |
---|---|---|---|
point | point to copy from |
void
The position of the displayObject on the x axis relative to the local coordinates of the parent.
void
The position of the displayObject on the x axis relative to the local coordinates of the parent.
void
{ "comment": "/**\n * The Point object represents a location in a two-dimensional coordinate system, where x represents\n * the horizontal axis and y represents the vertical axis.\n * An observable point is a point that triggers a callback when the point's position is changed.\n *\n * @class\n * @memberof PIXI\n */", "meta": { "range": [ 329, 2384 ], "filename": "ObservablePoint.js", "lineno": 11, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100018817", "name": "ObservablePoint", "type": "ClassDeclaration", "paramnames": [ "cb", "scope", "x", "y" ] } }, "classdesc": "The Point object represents a location in a two-dimensional coordinate system, where x represents
", "kind": "class", "memberof": "PIXI", "name": "ObservablePoint", "longname": "PIXI.ObservablePoint", "scope": "static", "params": [ { "type": { "names": [ "function" ] }, "description": "
the horizontal axis and y represents the vertical axis.
An observable point is a point that triggers a callback when the point's position is changed.callback when changed
", "name": "cb" }, { "type": { "names": [ "object" ] }, "description": "owner of callback
", "name": "scope" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "position of the point on the x axis
", "name": "x" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "position of the point on the y axis
", "name": "y" } ], "___id": "T000002R001779", "___s": true, "$methods": [ { "comment": "/**\n * Sets the point to a new x and y position.\n * If y is omitted, both x and y will be set to x.\n *\n * @param {number} [x=0] - position of the point on the x axis\n * @param {number} [y=0] - position of the point on the y axis\n */", "meta": { "range": [ 1016, 1267 ], "filename": "ObservablePoint.js", "lineno": 35, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100018856", "name": "ObservablePoint#set", "type": "MethodDefinition", "paramnames": [ "x", "y" ] }, "vars": { "": null } }, "description": "Sets the point to a new x and y position.
", "params": [ { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "
If y is omitted, both x and y will be set to x.position of the point on the x axis
", "name": "x" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "position of the point on the y axis
", "name": "y" } ], "name": "set", "longname": "PIXI.ObservablePoint#set", "kind": "function", "memberof": "PIXI.ObservablePoint", "scope": "instance", "___id": "T000002R001785", "___s": true, "skip": true, "slug": "PIXI.ObservablePointset", "filepath": "core\\math\\ObservablePoint.js" }, { "comment": "/**\n * Copies the data from another point\n *\n * @param {PIXI.Point|PIXI.ObservablePoint} point - point to copy from\n */", "meta": { "range": [ 1413, 1612 ], "filename": "ObservablePoint.js", "lineno": 53, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100018914", "name": "ObservablePoint#copy", "type": "MethodDefinition", "paramnames": [ "point" ] }, "vars": { "": null } }, "description": "Copies the data from another point
", "params": [ { "type": { "names": [ "PIXI.Point", "PIXI.ObservablePoint" ] }, "description": "point to copy from
", "name": "point" } ], "name": "copy", "longname": "PIXI.ObservablePoint#copy", "kind": "function", "memberof": "PIXI.ObservablePoint", "scope": "instance", "___id": "T000002R001790", "___s": true, "skip": true, "slug": "PIXI.ObservablePointcopy", "filepath": "core\\math\\ObservablePoint.js" }, { "comment": "/**\n * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n *\n * @member {number}\n */", "meta": { "range": [ 1769, 1812 ], "filename": "ObservablePoint.js", "lineno": 68, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100018962", "name": "ObservablePoint#x", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "The position of the displayObject on the x axis relative to the local coordinates of the parent.
", "kind": "member", "type": { "names": [ "number" ] }, "name": "x", "longname": "PIXI.ObservablePoint#x", "memberof": "PIXI.ObservablePoint", "scope": "instance", "params": [], "___id": "T000002R001793", "___s": true, "skip": true, "slug": "PIXI.ObservablePointx", "filepath": "core\\math\\ObservablePoint.js" }, { "comment": "/**\n * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n *\n * @member {number}\n */", "meta": { "range": [ 2154, 2197 ], "filename": "ObservablePoint.js", "lineno": 87, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100018998", "name": "ObservablePoint#y", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "The position of the displayObject on the x axis relative to the local coordinates of the parent.
", "kind": "member", "type": { "names": [ "number" ] }, "name": "y", "longname": "PIXI.ObservablePoint#y", "memberof": "PIXI.ObservablePoint", "scope": "instance", "params": [], "___id": "T000002R001796", "___s": true, "skip": true, "slug": "PIXI.ObservablePointy", "filepath": "core\\math\\ObservablePoint.js" }, { "comment": "/**\n * Sets the point to a new x and y position.\n * If y is omitted, both x and y will be set to x.\n *\n * @param {number} [x=0] - position of the point on the x axis\n * @param {number} [y=0] - position of the point on the y axis\n */", "meta": { "range": [ 1016, 1267 ], "filename": "ObservablePoint.js", "lineno": 35, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100093535", "name": "ObservablePoint#set", "type": "MethodDefinition", "paramnames": [ "x", "y" ] }, "vars": { "": null } }, "description": "Sets the point to a new x and y position.
", "params": [ { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "
If y is omitted, both x and y will be set to x.position of the point on the x axis
", "name": "x" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "position of the point on the y axis
", "name": "y" } ], "name": "set", "longname": "PIXI.ObservablePoint#set", "kind": "function", "memberof": "PIXI.ObservablePoint", "scope": "instance", "___id": "T000002R008719", "___s": true, "skip": true, "slug": "PIXI.ObservablePointset", "filepath": "core\\math\\ObservablePoint.js" }, { "comment": "/**\n * Copies the data from another point\n *\n * @param {PIXI.Point|PIXI.ObservablePoint} point - point to copy from\n */", "meta": { "range": [ 1413, 1612 ], "filename": "ObservablePoint.js", "lineno": 53, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100093593", "name": "ObservablePoint#copy", "type": "MethodDefinition", "paramnames": [ "point" ] }, "vars": { "": null } }, "description": "Copies the data from another point
", "params": [ { "type": { "names": [ "PIXI.Point", "PIXI.ObservablePoint" ] }, "description": "point to copy from
", "name": "point" } ], "name": "copy", "longname": "PIXI.ObservablePoint#copy", "kind": "function", "memberof": "PIXI.ObservablePoint", "scope": "instance", "___id": "T000002R008724", "___s": true, "skip": true, "slug": "PIXI.ObservablePointcopy", "filepath": "core\\math\\ObservablePoint.js" }, { "comment": "/**\n * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n *\n * @member {number}\n */", "meta": { "range": [ 1769, 1812 ], "filename": "ObservablePoint.js", "lineno": 68, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100093641", "name": "ObservablePoint#x", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "The position of the displayObject on the x axis relative to the local coordinates of the parent.
", "kind": "member", "type": { "names": [ "number" ] }, "name": "x", "longname": "PIXI.ObservablePoint#x", "memberof": "PIXI.ObservablePoint", "scope": "instance", "params": [], "___id": "T000002R008727", "___s": true, "skip": true, "slug": "PIXI.ObservablePointx", "filepath": "core\\math\\ObservablePoint.js" }, { "comment": "/**\n * The position of the displayObject on the x axis relative to the local coordinates of the parent.\n *\n * @member {number}\n */", "meta": { "range": [ 2154, 2197 ], "filename": "ObservablePoint.js", "lineno": 87, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math", "code": { "id": "astnode100093677", "name": "ObservablePoint#y", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "The position of the displayObject on the x axis relative to the local coordinates of the parent.
", "kind": "member", "type": { "names": [ "number" ] }, "name": "y", "longname": "PIXI.ObservablePoint#y", "memberof": "PIXI.ObservablePoint", "scope": "instance", "params": [], "___id": "T000002R008730", "___s": true, "skip": true, "slug": "PIXI.ObservablePointy", "filepath": "core\\math\\ObservablePoint.js" } ], "$attributes": [], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "filepath": "core\\math\\ObservablePoint.js" }