mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 02:23:29 +00:00
1 line
No EOL
5.4 KiB
JSON
1 line
No EOL
5.4 KiB
JSON
{"class":{"name":"PIXI.Matrix","extends":"","static":false,"constructor":true,"parameters":[],"help":"The Matrix class is now an object, which makes it a lot faster,\\nhere is a representation of it :\\n| a | b | tx|\\n| c | d | ty|\\n| 0 | 0 | 1 |"},"consts":[],"methods":{"public":[{"name":"apply","static":false,"returns":{"types":["Phaser.Point"],"help":"The new point, transformed through this matrix"},"help":"Get a new position with the current transformation applied.\\nCan be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering)","line":132,"public":true,"protected":false,"private":false,"parameters":[{"name":"pos","type":["Phaser.Point"],"help":"The origin","optional":false,"default":null},{"name":"[newPos]","type":["Phaser.Point"],"help":"The point that the new position is assigned to (allowed to be same as input)","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"applyInverse","static":false,"returns":{"types":["Phaser.Point"],"help":"The new point, inverse-transformed through this matrix"},"help":"Get a new position with the inverse of the current transformation applied.\\nCan be used to go from the world coordinate space to a child's coordinate space. (e.g. input)","line":151,"public":true,"protected":false,"private":false,"parameters":[{"name":"pos","type":["Phaser.Point"],"help":"The origin","optional":false,"default":null},{"name":"[newPos]","type":["Phaser.Point"],"help":"The point that the new position is assigned to (allowed to be same as input)","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"fromArray","static":false,"returns":null,"help":"Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows:\\n\\na = array[0]\\nb = array[1]\\nc = array[3]\\nd = array[4]\\ntx = array[2]\\nty = array[5]","line":73,"public":true,"protected":false,"private":false,"parameters":[{"name":"array","type":["array"],"help":"The array that the matrix will be populated from.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"identity","static":false,"returns":{"types":["PIXI.Matrix"],"help":"This matrix. Good for chaining method calls."},"help":"Resets this Matix to an identity (default) matrix.","line":256,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"toArray","static":false,"returns":{"types":["array"],"help":"the newly created array which contains the matrix"},"help":"Creates an array from the current Matrix object.","line":90,"public":true,"protected":false,"private":false,"parameters":[{"name":"transpose","type":["boolean"],"help":"Whether we need to transpose the matrix or not","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"translate","static":false,"returns":{"types":["PIXI.Matrix"],"help":"This matrix. Good for chaining method calls."},"help":"Translates the matrix on the x and y.\\n\\n*\/\\nPIXI.Matrix.prototype.translate = function(x, y)\\n{\\nthis.tx += x;\\nthis.ty += y;\\n\\nreturn this;\\n};\\n\\n\/**\\nApplies a scale transformation to the matrix.\\n\\n*\/\\nPIXI.Matrix.prototype.scale = function(x, y)\\n{\\nthis.a *= x;\\nthis.d *= y;\\nthis.c *= x;\\nthis.b *= y;\\nthis.tx *= x;\\nthis.ty *= y;\\n\\nreturn this;\\n};\\n\\n\\n\/**\\nApplies a rotation transformation to the matrix.\\n*\/\\nPIXI.Matrix.prototype.rotate = function(angle)\\n{\\nvar cos = Math.cos( angle );\\nvar sin = Math.sin( angle );\\n\\nvar a1 = this.a;\\nvar c1 = this.c;\\nvar tx1 = this.tx;\\n\\nthis.a = a1 * cos-this.b * sin;\\nthis.b = a1 * sin+this.b * cos;\\nthis.c = c1 * cos-this.d * sin;\\nthis.d = c1 * sin+this.d * cos;\\nthis.tx = tx1 * cos - this.ty * sin;\\nthis.ty = tx1 * sin + this.ty * cos;\\n\\nreturn this;\\n};\\n\\n\/**\\nAppends the given Matrix to this Matrix.","line":232,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"","optional":false,"default":null},{"name":"y","type":["number"],"help":"","optional":false,"default":null},{"name":"x","type":["number"],"help":" The amount to scale horizontally","optional":false,"default":null},{"name":"y","type":["number"],"help":" The amount to scale vertically","optional":false,"default":null},{"name":"angle","type":["number"],"help":" The angle in radians.","optional":false,"default":null},{"name":"matrix","type":["PIXI.Matrix"],"help":"","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[],"static":[]},"properties":{"public":[{"name":"a","type":["number"],"help":"","inlineHelp":"","line":22,"default":"1","public":true,"protected":false,"private":false,"readOnly":false},{"name":"b","type":["number"],"help":"","inlineHelp":"","line":29,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"c","type":["number"],"help":"","inlineHelp":"","line":36,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"d","type":["number"],"help":"","inlineHelp":"","line":43,"default":"1","public":true,"protected":false,"private":false,"readOnly":false},{"name":"tx","type":["number"],"help":"","inlineHelp":"","line":50,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"ty","type":["number"],"help":"","inlineHelp":"","line":57,"default":"0","public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[]}} |