mirror of
https://github.com/photonstorm/phaser
synced 2024-12-30 06:53:07 +00:00
1 line
21 KiB
JSON
1 line
21 KiB
JSON
|
{"class":{"name":"Phaser.Point","extends":"","static":false,"constructor":true,"parameters":[{"name":"x","type":["number"],"help":"The horizontal position of this Point.","optional":true,"default":"0"},{"name":"y","type":["number"],"help":"The vertical position of this Point.","optional":true,"default":"0"}],"help":"A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.\\nThe following code creates a point at (0,0):\\n`var myPoint = new Phaser.Point();`\\nYou can also use them as 2D Vectors and you'll find different vector related methods in this class."},"consts":[],"methods":{"public":[{"name":"add","static":false,"returns":{"types":["Phaser.Point"],"help":"The new Point object."},"help":"Adds the coordinates of two points together to create a new point.","line":483,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Point"],"help":"The first Point object.","optional":false,"default":null},{"name":"b","type":["Phaser.Point"],"help":"The second Point object.","optional":false,"default":null},{"name":"out","type":["Phaser.Point"],"help":"Optional Point to store the value in, if not supplied a new Point object will be created.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"angle","static":false,"returns":{"types":["number"],"help":"The angle between the two Points."},"help":"Returns the angle between two Point objects.","line":576,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Point"],"help":"The first Point object.","optional":false,"default":null},{"name":"b","type":["Phaser.Point"],"help":"The second Point object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"angleSq","static":false,"returns":{"types":["number"],"help":"The angle squared between the two Points."},"help":"Returns the angle squared between two Point objects.","line":591,"public":true,"protected":false,"private":false,"parameters":[{"name":"a","type":["Phaser.Point"],"help":"The first Point object.","optional":false,"default":null},{"name":"b","type":["Phaser.Point"],"help":"The second Point object.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"centroid","static":false,"returns":{"types":["Phaser.Point"],"help":"The new Point object."},"help":"Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned.","line":834,"public":true,"protected":false,"private":false,"parameters":[{"name":"points","type":["array Phaser.Point"],"help":"The array of one or more points.","optional":false,"default":null},{"name":"out","type":["Phaser.Point"],"help":"Optional Point to store the value in, if not supplied a new Point object will be created.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"clamp","static":false,"returns":{"types":["Phaser.Point"],"help":"This Point object."},"help":"Clamps this Point object values to be between the given min and max.","line":202,"public":true,"protected":false,"private":false,"parameters":[{"name":"min","type":["number"],"help":"The minimum value to clamp this Point to.","optional":false,"default":null},{"name":"max","type":["number"],"help":"The maximum value to clamp this Point to.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"clampX","static":false,"returns":{"types":["Phaser.Point"],"help":"This Point object."},"help":"Clamps the x value of this Point to be between the given min and max.","line":172,"public":true,"protected":false,"private":false,"parameters":[{"name":"min","type":["number"],"help":"The minimum value to clamp this Point to.","optional":false,"default":null},{"name":"max","type":["number"],"help":"The maximum value to clamp this Point to.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"clampY","static":false,"returns":{"types":["Phaser.Point"],"help":"This Point object."},"help":"Cla
|