","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2 | string | Object>"}},{"identifier":"obj","optional":false,"description":"to be removed
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"the modified Array\nlet arr = [ "foo", "bar", "baz" ];\n// remove "foo" from the arr...","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2 | string | Object>"}}],"extends":[],"implements":[]},{"id":"Vl5qyXOL6LWtM6MsFPu50","name":"weightedRandom","brief":"","access":"public","type":"FunctionDoc","description":"return a weighted random array element, favoring the earlier entries
","params":[{"identifier":"arr","optional":false,"description":"array to pick a element
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2 | string | Object>"}}],"returns":[{"description":"random member of array
","dataType":{"tokens":[{"value":"any","kind":"canonical"}],"template":"any"}}],"extends":[],"implements":[]}]},{"id":"h7VBxtSrmmns7QMOSIne_","name":"file","brief":"","defaultValue":"undefined","readonly":true,"scope":"static","type":"NSDoc","description":"a collection of file utility functions
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"BzucGDExWhbhcPOG3SPWD","name":"getBasename","brief":"","access":"public","type":"FunctionDoc","description":"return the base name of the file without path info
","params":[{"identifier":"path","optional":false,"description":"path containing the basename to extract
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"the base name without path information.
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"pIcgcYP2WOq4KrrCRPvM-","name":"getExtension","brief":"","access":"public","type":"FunctionDoc","description":"return the extension of the file in the given path
","params":[{"identifier":"path","optional":false,"description":"path containing the filename and extension to extract
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"filename extension.
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"NTTLwqCQCH6eXxnQf9CYl","name":"getPath","brief":"","access":"public","type":"FunctionDoc","description":"return the path of the file
","params":[{"identifier":"path","optional":false,"description":"the copmplete file path to extract the path from
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"the extracted path
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]}]},{"id":"ooxLyyOq54yNB-W8eF8Gj","name":"function","brief":"","scope":"static","type":"NSDoc","description":"a collection of utility functions
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"fzFwc4J__sq-de3R8P3Zc","name":"defer","brief":"","access":"public","examples":[{"caption":"","code":"// execute myFunc() when the stack is empty,\n// with the current context and [1, 2, 3] as parameter\nme.utils.function.defer(myFunc, this, 1, 2, 3);"}],"type":"FunctionDoc","description":"Executes a function as soon as the interpreter is idle (stack empty).
","params":[{"identifier":"func","optional":false,"description":"The function to be deferred.
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"thisArg","optional":false,"description":"The value to be passed as the this parameter to the target function when the deferred function is called
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"args","optional":false,"variadic":true,"description":"Optional additional arguments to carry for the function.
","dataType":{"tokens":[{"value":"unknown","kind":"canonical"}],"template":"unknown"}}],"returns":[{"description":"id that can be used to clear the deferred function using\nclearTimeout
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4kNk2RYPW7XuuFp_V_AX1","name":"throttle","brief":"","access":"public","type":"FunctionDoc","description":"returns a function that, when invoked will only be triggered at most once during a given window of time
","params":[{"identifier":"fn","optional":false,"description":"the function to be throttled.
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"delay","optional":false,"description":"The delay in ms
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"no_trailing","optional":false,"description":"disable the execution on the trailing edge
","dataType":{"tokens":[{"value":"no_trailing","kind":"canonical"},{"value":"no_trailing","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the function that will be throttled
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"extends":[],"implements":[]}]},{"id":"EaYaVxg23GzEaoeAP2xXZ","name":"string","brief":"","scope":"static","type":"NSDoc","description":"a collection of string utility functions
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"382AZee7XjkUk1k_Bet7z","name":"capitalize","brief":"","access":"public","type":"FunctionDoc","description":"converts the first character of the given string to uppercase
","params":[{"identifier":"str","optional":false,"description":"the string to be capitalized
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"the capitalized string
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"G4xuMzAJ9uydyAr0RWNuo","name":"isBoolean","brief":"","access":"public","type":"FunctionDoc","description":"returns true if the given string contains a true or false
","params":[{"identifier":"str","optional":false,"description":"the string to be tested
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"true if the string is either true or false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"TOMUgLw03Yvnq2sck_MzS","name":"isDataUrl","brief":"","access":"public","type":"FunctionDoc","description":"returns true if the given string is a data url in the data:[<mediatype>][;base64],<data>
format.\n...","params":[{"identifier":"str","optional":false,"description":"
the string (url) to be tested
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"true if the string is a data url
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"kLB7Sc62ABVl_kkl6XCud","name":"isNumeric","brief":"","access":"public","type":"FunctionDoc","description":"returns true if the given string contains a numeric integer or float value
","params":[{"identifier":"str","optional":false,"description":"the string to be tested
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"true if string contains only digits
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"tsgN3S2jzACjjjnrzMaZO","name":"toHex","brief":"","access":"public","type":"FunctionDoc","description":"convert a string to the corresponding hexadecimal value
","params":[{"identifier":"str","optional":false,"description":"the string to be converted
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"the converted hexadecimal value
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]}]},{"id":"ocywWkPEU_axmypAl84jq","name":"checkVersion","brief":"","access":"public","examples":[{"caption":"","code":"if (me.utils.checkVersion(\"7.0.0\") > 0) {\n console.error(\n \"melonJS is too old. Expected: 7.0.0, Got: 6.3.0\"\n );\n}"}],"type":"FunctionDoc","description":"Compare two version strings
","params":[{"identifier":"v1","optional":false,"description":"First version string to compare
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"v2","optional":false,"description":"second version string to compare
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nMBOAWQVaNPIEcO4jb9jG","name":"getUriFragment","brief":"","access":"public","examples":[{"caption":"","code":"// http://www.example.com/index.html#debug&hitbox=true&mytag=value\nlet UriFragment = me.utils.getUriFragment();\nconsole.log(UriFragment[\"mytag\"]); //> \"value\""}],"type":"FunctionDoc","description":"parse the fragment (hash) from a URL and returns them into
","params":[{"identifier":"url","optional":true,"default":"document.location","description":"an optional params string or URL containing fragment (hash) params to be parsed
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"an object representing the deserialized params string.
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[],"members":[{"id":"4y0IoZGEw2Q1VSmZWXQ3W","name":"debug","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"display the debug panel (if preloaded)
"},{"id":"54KiecKYZc0m9z6IsFy1_","name":"debugToggleKey","brief":"","access":"public","defaultValue":"\"s\"","scope":"static","type":"PropertyDoc","description":"show/hide the debug panel (if preloaded)
"},{"id":"tEK53pHwV5gPOu1uVu7K8","name":"hitbox","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"draw the hitbox in the debug panel (if enabled)
"},{"id":"FMsMwrkjt3GE31nGj2kDy","name":"quadtree","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"draw the quadtree in the debug panel (if enabled)
"},{"id":"Ie-MpCtN506an7xyzDAbf","name":"velocity","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"draw the entities velocity in the debug panel (if enabled)
"},{"id":"J2lqraswLyjFdhHf35-wm","name":"webgl","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"force the renderer to WebGL
"}]}]},{"id":"sAOYnHu37QpiejeoPd_aj","name":"video","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"yYhEv9aNsLEqUkJOqXzHL","name":"renderer","brief":"","defaultValue":"undefined","type":"PropertyDoc","description":"A reference to the active Canvas or WebGL active renderer renderer
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VG4YDNLhNDQaWgXIr04au","name":"createCanvas","brief":"","type":"FunctionDoc","description":"Create and return a new Canvas element
","params":[{"identifier":"width","optional":false,"description":"width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"returnOffscreenCanvas","optional":true,"default":"false","description":"will return an OffscreenCanvas if supported
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"a new Canvas element of the given size
","dataType":{"tokens":[{"value":"HTMLCanvasElement | OffscreenCanvas","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"OffscreenCanvas","kind":"canonical"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"eIqLALHypi-c4jsFEkEaN","name":"getParent","brief":"","type":"FunctionDoc","description":"return a reference to the parent DOM element holding the main canvas
","params":[],"returns":[{"description":"the HTML parent element
","dataType":{"tokens":[{"value":"HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0Wrm5q9Dz_n4Fw6UO0bK2","name":"init","brief":"","examples":[{"caption":"","code":"// init the video with a 640x480 canvas\nme.video.init(640, 480, {\n parent : \"screen\",\n renderer : me.video.AUTO,\n scale : \"auto\",\n scaleMethod : \"fit\"\n});"}],"type":"FunctionDoc","description":"Initialize the "video" system (create a canvas based on the given arguments, and the related renderer).
","params":[{"identifier":"width","optional":false,"description":"The width of the canvas viewport
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"The height of the canvas viewport
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options","optional":true,"description":"optional parameters for the renderer
","dataType":{"tokens":[{"value":"Application.Settings","kind":"canonical"},{"value":"Application.Settings","kind":"link"}],"template":"%1"}}],"returns":[{"description":"false if initialization failed (canvas not supported)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]}]},{"id":"q6n_gZtwxkQrrxp1lggIt","name":"Application","brief":"","see":["game"],"type":"ClassDoc","description":"An Application represents a single melonJS game, and is responsible for updating (each frame) all the related object statu...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"h8nJcSiCQl6TpXZ1QJgBE","name":"Settings","brief":"","see":["Application"],"type":"TypedefDoc","description":"
Application & Renderer Settings definition.
","params":[{"identifier":"options.zoomX","optional":true,"default":"width","description":"The actual width of the canvas with scaling applied
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options.zoomY","optional":true,"default":"height","description":"The actual height of the canvas with scaling applied
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options.compositor","optional":true,"description":"a custom compositor class (WebGL only)
","dataType":{"tokens":[{"value":"Compositor","kind":"canonical"},{"value":"Compositor","kind":"link"}],"template":"%1"}},{"identifier":"option.physic","optional":true,"default":"\"builtin\"","description":"the physic system to use (default: "builtin", or "none" to disable builtin physic)
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[],"members":[{"id":"lb6IPbvzjWHRBM_HvzAzT","name":"antiAlias","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"whether to enable or not video scaling interpolation
"},{"id":"LJc5cA43YTfQ-MuIhdMw_","name":"canvas","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"an existing canvas element to use as the renderer target (by default melonJS will create its own canvas based on given par..."},{"id":"sTyS3c-3d_a_d5dKD7ThS","name":"consoleHeader","brief":"","access":"public","defaultValue":"true","scope":"static","type":"PropertyDoc","description":"
whether to display melonJS version and basic device information in the console
"},{"id":"WZpbs5L2a1qWr_8NHu8-f","name":"depthTest","brief":"","access":"public","defaultValue":"\"sorting\"","scope":"static","type":"PropertyDoc","description":"~Experimental~ the default method to sort object on the z axis in WebGL
"},{"id":"_muoyk_Sc0u_GEn18rP8y","name":"parent","brief":"","access":"public","defaultValue":"document.body","scope":"static","type":"PropertyDoc","description":"the DOM parent element to hold the canvas in the HTML file
"},{"id":"_l-lA21Hkf48EqjGHubw3","name":"powerPreference","brief":"","access":"public","defaultValue":"\"default\"","scope":"static","type":"PropertyDoc","description":"a hint to the user agent indicating what configuration of GPU is suitable for the WebGL context. To be noted that Safari a..."},{"id":"CqzhpS8HHkFirwCyYLNOa","name":"preferWebGL1","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"
if true the renderer will only use WebGL 1
"},{"id":"vI0O8zpeJPigB0FkqpYCB","name":"renderer","brief":"","access":"public","defaultValue":"AUTO","scope":"static","type":"PropertyDoc","description":"renderer to use (CANVAS, WEBGL, AUTO), or a custom renderer class
"},{"id":"uSQzU6hU5ZaDosSly9-On","name":"scale","brief":"","access":"public","defaultValue":"1.0","scope":"static","type":"PropertyDoc","description":"enable scaling of the canvas ('auto' for automatic scaling)
"},{"id":"z5OF58GoYtma7PpB65l76","name":"scaleMethod","brief":"","access":"public","defaultValue":"\"fit\"","scope":"static","type":"PropertyDoc","description":"screen scaling modes :
\n\nfit
: Letterboxed; content is scaled to design aspect ..."},{"id":"okyT-Bmt7A-fiiU4oXtd7","name":"scaleTarget","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"the HTML Element to be used as the reference target when using automatic scaling (by default melonJS will use the parent c..."},{"id":"oUmHdR_Bc5MqfEmX3q0__","name":"transparent","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"
whether to allow transparent pixels in the front buffer (screen).
"}]},{"id":"4qlDOWxN5tfM9QG3zTrY4","name":"isInitialized","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true when this app instance has been initialized
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2Lm2zPkxObFeoHiTIVADK","name":"lastUpdate","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Last time the game update loop was executed. \nUse this value to implement frame prediction in drawing events,\nfor crea...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YPxn1ya7MmtrMOu01io5A","name":"mergeGroup","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"
when true, all objects will be added under the root world container. \nWhen false, a me.Container
object wi...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9-Vbxb8FS0QvJihEQb6M1","name":"parentElement","brief":"","scope":"instance","type":"PropertyDoc","description":"
the parent HTML element holding the main canvas of this application
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rM2FfCHPtPV3RyYsRPyJD","name":"pauseOnBlur","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// keep the default game instance running even when loosing focus\nme.game.pauseOnBlur = false;"}],"scope":"instance","type":"PropertyDoc","description":"Specify whether to pause this app when losing focus
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-AvCUYxe4Mc8sQOhR5iRo","name":"renderer","brief":"","scope":"instance","type":"PropertyDoc","description":"a reference to the active Canvas or WebGL active renderer renderer
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oNIvdtjwD_nMHUmaOjNRI","name":"resumeOnFocus","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"Specify whether to unpause this app when gaining back focus
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bjXsyg7KIvzsK_Ruj9ts3","name":"settings","brief":"","scope":"instance","type":"PropertyDoc","description":"the given settings used when creating this application
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YbmJxCaa9GU0PPbregVdT","name":"sortOn","brief":"","scope":"instance","see":["World.sortOn"],"type":"PropertyDoc","description":"Specify the property to be used when sorting renderables for this application game world.\nAccepted values : "x",...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6tauJid2EzrERYiVLCGzV","name":"stopOnBlur","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"
Specify whether to stop this app when losing focus
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-nm9B2fr5zKmM6Ae_c4bN","name":"viewport","brief":"","scope":"instance","type":"PropertyDoc","description":"the active stage "default" camera
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NLySoDiz6Hp2yM5Jyg6OG","name":"world","brief":"","scope":"instance","type":"PropertyDoc","description":"a reference to the game world, \na world is a virtual environment containing all the game objects
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p0NEaN_uHZBwDUR7lZ0sa","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"width","optional":false,"description":"The width of the canvas viewport
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"The height of the canvas viewport
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options","optional":true,"description":"The optional parameters for the application and default renderer
","dataType":{"tokens":[{"value":"Application.Settings","kind":"canonical"},{"value":"Application.Settings","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"nOFyKayRxb0WlQlLlYc31","name":"draw","brief":"draw the active scene/stage associated to this game
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8oAIYKGXDtHlHCM7m2qox","name":"getParentElement","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the parent HTML Element holding the main canvas of this application
","params":[],"returns":[{"description":"the parent HTML element
","dataType":{"tokens":[{"value":"HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"aMDlhogEgrPiGMtC2rZ4R","name":"init","brief":"","scope":"instance","type":"MethodDoc","description":"init the game instance (create a physic world, update starting time, etc..)
","params":[{"identifier":"width","optional":false,"description":"The width of the canvas viewport
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"The height of the canvas viewport
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options","optional":true,"description":"The optional parameters for the application and default renderer
","dataType":{"tokens":[{"value":"Application.Settings","kind":"canonical"},{"value":"Application.Settings","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"COUkECGit_pOFYTk6HmhD","name":"onLevelLoaded","brief":"","examples":[{"caption":"","code":"// call myFunction () everytime a level is loaded\nme.game.onLevelLoaded = this.myFunction.bind(this);"}],"scope":"instance","type":"MethodDoc","description":"Fired when a level is fully loaded and all renderable instantiated. \nAdditionnaly the level id will also be passed to ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dvBL9JvCwtwOqDUwSOAQ4","name":"repaint","brief":"
force the redraw (not update) of all objects
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DULeAfZUH_jmxEHR9eONP","name":"reset","brief":"","scope":"instance","type":"MethodDoc","description":"reset the game Object manager\ndestroy all current objects
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UMyU6SfMNiAkOlC_TpBey","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update all objects related to this game active scene/stage
","params":[{"identifier":"time","optional":false,"description":"current timestamp as provided by the RAF callback
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"dXmZoJS3RNfIXdnxP8KGY","name":"updateFrameRate","brief":"","scope":"instance","see":["timer.maxfps","World.fps"],"type":"MethodDoc","description":"Update the renderer framerate using the system config variables.
","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"JgVc9LZgVwxtb_0Y-nNyD","name":"BitmapText","brief":"","type":"ClassDoc","description":"a bitmap font object
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"7Wm9gAz8M0UX4gPmg_yme","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yMz6C-cyATED-9wJcPX99","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xZOiXOC8KsVpSnW0aUtZw","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dr2t_Bee8TZjbLaC291Bi","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"90QaY09Mll4Q023GLaA2c","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"M_3IlsOG-UvN7tNEePnBk","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EIzKAcj1PO-6UYzonZANC","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SOQv_IRiONMnG1gudCZcg","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c8upa51Hk18mpuHLH8g2v","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tc3YwnAQmsAMZ7NVh8l2_","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kiBKDeIMSjDwZFqkHclzP","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MD0U5sra_0aUO5L2BWjZn","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gGBJNRS5FSw7B0EFfG_1R","name":"fillStyle","brief":"","access":"public","scope":"instance","see":["Renderable#tint"],"type":"PropertyDoc","description":"defines the color used to tint the bitmap text
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r9Nw5DqpLeL0iP_vfFJgm","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I-34LliMaHstJ4ZblGGzr","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n3vj-IvPuTB_Gmx_TiJvQ","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"orWU2gcNMqMJdH7Q0t301","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aTdqK0AHox3AYJ-NLMUAU","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y_0WSUb5mE7H4pUmHHH1M","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XnxJhx5HnsgBokXbXYyDa","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"11d8s0UamRPf-TbJumbtE","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k-bUatgDBx7jel23429C4","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RIMPf-bUnGRyPVlePcplZ","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sY4UhS8rn4jL-9P-dNF3d","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cbMjBx8ZUMazmjd9TlU3I","name":"lineHeight","brief":"","access":"public","defaultValue":"1.0","scope":"instance","type":"PropertyDoc","description":"Set the line spacing height (when displaying multi-line strings). \nCurrent font height will be multiplied with this va...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tRgSi1DlH-PSk458Nmze2","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"
A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z5gRQUNR9JXhp6Bre8W1w","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T6f_yxj6LHy6ieegZV-Y5","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lpFB5rzI4iuf60W8LI1M2","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QUnWdMUru3bFHrE1kLVt6","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AlX_4mHtT5lRJaBd6J1By","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3SGnn_yOF_TYCzyKLHr-q","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bmD_FXI_x_hyd1b839BCX","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c_gpYwfZcdyBwmxzeVhf4","name":"textAlign","brief":"","access":"public","defaultValue":"\"left\"","scope":"instance","type":"PropertyDoc","description":"
Set the default text alignment (or justification), \npossible values are "left", "right", and "...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eSNvgKCH3m-k1rHn5ossf","name":"textBaseline","brief":"","access":"public","defaultValue":"\"top\"","scope":"instance","type":"PropertyDoc","description":"
Set the text baseline (e.g. the Y-coordinate for the draw operation), \npossible values are "top", "hang...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3pPgq3kRU7StppK74XFZu","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NEH-7T0SD2kTlVxJkUnmb","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6D6LQf9s-KlF-U6fBZYh1","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B3z5oVQB1BC6MsvcXxqco","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GtHLyQFwt0EFadfTPlcsO","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ntmobDzAmivnHTF3njpL5","name":"wordWrapWidth","brief":"","access":"public","defaultValue":"-1","scope":"instance","type":"PropertyDoc","description":"the maximum length in CSS pixel for a single segment of text.\n(use -1 to disable word wrapping)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OJQ_7T93ulcYktLbqZQQd","name":"_text","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"the text to be displayed
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6QSqzjhv1TBHV-nsjJT9Q","name":"fontData","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"font data
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0u5Svjbsw-Rw9iSDO4Hnp","name":"fontImage","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"font image
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xol_pIsKtUsmCtgH6YJka","name":"fontScale","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"scaled font size
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B82Ba4E3T-zaXx-mtVDoc","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Z8gZ7hPN5DWg5uOhFBgiN","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KIgHdPWBsihr3Bm_LeCAG","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nwWt3q4dglfHJkNbbRTz_","name":"constructor","brief":"","examples":[{"caption":"","code":"// Use me.loader.preload or me.loader.load to load assets\nme.loader.preload([\n { name: \"arial\", type: \"binary\" src: \"data/font/arial.fnt\" },\n { name: \"arial\", type: \"image\" src: \"data/font/arial.png\" },\n])\n// Then create an instance of your bitmap font:\nlet myFont = new me.BitmapText(x, y, {font:\"arial\", text:\"Hello\"});\n// two possibilities for using \"myFont\"\n// either call the draw function from your Renderable draw function\nmyFont.draw(renderer, \"Hello!\", 0, 0);\n// or just add it to the word container\nme.game.world.addChild(myFont);"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"position of the text object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the text object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"the text configuration
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.font","description":"a font name to identify the corresponing source image
","dataType":{"tokens":[{"value":"string | Image","kind":"canonical"},{"value":"Image","kind":"canonical"}],"template":"string | %1"}},{"identifier":"settings.fontData","optional":true,"default":"settings.font","description":"the bitmap font data corresponding name, or the bitmap font data itself
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.size","optional":true,"description":"size a scaling ratio
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.fillStyle","optional":true,"description":"a CSS color value used to tint the bitmapText (@see BitmapText.tint)
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"settings.lineWidth","optional":true,"default":"1","description":"line width, in pixels, when drawing stroke
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.textAlign","optional":true,"default":"\"left\"","description":"horizontal text alignment
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.textBaseline","optional":true,"default":"\"top\"","description":"the text baseline
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.lineHeight","optional":true,"default":"1.0","description":"line spacing height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.anchorPoint","optional":true,"default":"{x:0.0, y:0.0}","description":"anchor point to draw the text at
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}},{"identifier":"settings.wordWrapWidth","optional":true,"description":"the maximum length in CSS pixel for a single segment of text
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.text","optional":true,"description":"a string, or an array of strings
","dataType":{"tokens":[{"value":"string | Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"string | %1"}}],"returns":[],"extends":[],"implements":[]},{"id":"4QzBmt6d7BYpUZCGKuXM7","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"k4WSceH-xWXcaM9KRLTtk","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Nb_rWG2ZKVF--3wNl9ssC","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UP8cAaPlhcaBnfLMPAaQH","name":"draw","brief":"","scope":"instance","type":"MethodDoc","description":"draw the bitmap font
","params":[{"identifier":"renderer","optional":false,"description":"Reference to the destination renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"text","optional":true,"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"x","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"VUjvXcY9xdtygbMqWgnsl","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"fCihpNGvEJIfFJemr0R7Y","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UhkzfuAJOOxmKOtVQwWBr","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KnuQihUA7xppK2PFpzG2d","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PbZcRdGp3khsHyV4h222E","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5kIphcJaVTmdhxaMi8o0r","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"5v9ZS3Er47jdjsgyTFnlR","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lgqkQz5o6DyEgco4EzGda","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"m4qjhWAn0dnA0o7tE1CNP","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"6YlaWV2Vzl_y3PEeXPnpX","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"cRiI5cJB3BL6TRbs6nfRQ","name":"measureText","brief":"","scope":"instance","type":"MethodDoc","description":"measure the given text size in pixels
","params":[{"identifier":"text","optional":true,"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"a TextMetrics object with two properties: width
and height
, defining the output dimensions
","dataType":{"tokens":[{"value":"TextMetrics","kind":"canonical"},{"value":"TextMetrics","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LbhoglEEke44M0NGmTv3r","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"cGyZwo_uFDY5rIEjUjGb9","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"twofzx8auuN69gcl2Ufv1","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"XckGV7pauAxpvY7QC5Tyk","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"m2Um4l9Dr3dnARAQS9OZ0","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"26OuY1zyvzluHyVVsWytu","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"HelU6sAKLRYFu-BgZKHjc","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"change the font display size
","params":[{"identifier":"scale","optional":false,"description":"ratio
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this object for chaining
","dataType":{"tokens":[{"value":"BitmapText","kind":"canonical"},{"value":"BitmapText","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lKW9aSdv7P_CJsa1abF0B","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vgBb8jNG1PvLLPy7qXxoz","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QYWRzFpDgY784jOz1VVrB","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"U729-OdUz37_dIibLwYpl","name":"set","brief":"","scope":"instance","type":"MethodDoc","description":"change the font settings
","params":[{"identifier":"textAlign","optional":false,"description":"("left", "center", "right")
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"scale","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this object for chaining
","dataType":{"tokens":[{"value":"BitmapText","kind":"canonical"},{"value":"BitmapText","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wf8AAjhpQY2aw1QibVtGN","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"sPjoU_Z7B4jrEssqFTdm_","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PrBGdnWvRidHCDsoIMxh_","name":"setText","brief":"","scope":"instance","type":"MethodDoc","description":"change the text to be displayed
","params":[{"identifier":"value","optional":false,"default":"\"\"","description":"a string, or an array of strings
","dataType":{"tokens":[{"value":"number | string | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1 | string | %2"}}],"returns":[{"description":"this object for chaining
","dataType":{"tokens":[{"value":"BitmapText","kind":"canonical"},{"value":"BitmapText","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ms4ASbvps7KbyiDuau_1Y","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Rw1X3Le7U9cHAsmz7QbYC","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"a436d4cCe55n5vYt1bo4T","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JzZdAtkDtVwO75ul6PdNR","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XhHyJi4GdMiGPBgzvhVz_","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Lw-XuUupsB5RJ_kvG1R5-","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MK8ciyAEYBeFjH8Lldfsm","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"H70zcQHrDuPCWAN26UHr6","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"S81fPc8ZGlGWOY-qBYFaN","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"iu5Ekx2OuSS9n0GNX7v9F","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this Bitmap Text.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this Bitmap Text bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MV07yo3woxMYoUqUrkFtj","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"58HqQZiVjdCeUIPeiAGhx","name":"Body","brief":"","see":["Renderable.body"],"type":"ClassDoc","description":"a Generic Physic Body Object with some physic properties and behavior functionality, to add as a member of a Renderable.
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"i5oITrk_9wOo8yTgWauvv","name":"ancestor","brief":"","access":"public","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this body,\nor undefined if it has not been added to one.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oBb3e_OiHpa2jpCaTVQE_","name":"bounce","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"the body bouciness level when colliding with other solid bodies :\na value of 0 will not bounce, a value of 1 will fully re...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i_OgfoaG90QiADRvWNqb1","name":"bounds","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
The AABB bounds box reprensenting this body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u3bBMUA4RYPGFIRCiS3NS","name":"collisionType","brief":"","access":"public","defaultValue":"collision.types.ENEMY_OBJECT","examples":[{"caption":"","code":"// set the body collision type\nbody.collisionType = me.collision.types.PLAYER_OBJECT;"}],"scope":"instance","see":["collision.types"],"type":"PropertyDoc","description":"define the collision type of the body for collision filtering
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_WoDm1uZnR74yay6raMSK","name":"falling","brief":"","access":"public","defaultValue":"false","readonly":true,"scope":"instance","type":"PropertyDoc","description":"falling state of the body \ntrue if the object is falling \nfalse if the object is standing on something
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0RlURyzDGRHNtRIXPdTh1","name":"force","brief":"","access":"public","defaultValue":"<0,0>","examples":[{"caption":"","code":" // define a default maximum acceleration, initial force and friction\n this.body.force.set(1, 0);\n this.body.friction.set(0.4, 0);\n this.body.setMaxVelocity(3, 15);\n\n // apply a postive or negative force when pressing left of right key\n update(dt) {\n if (me.input.isKeyPressed(\"left\")) {\n this.body.force.x = -this.body.maxVel.x;\n } else if (me.input.isKeyPressed(\"right\")) {\n this.body.force.x = this.body.maxVel.x;\n }\n }"}],"scope":"instance","see":["Body.setMaxVelocity"],"type":"PropertyDoc","description":"body force to apply to this the body in the current step.\n(any positive or negative force will be cancelled after every wo...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DSz4J7DTheHm9uNlY3eaK","name":"friction","brief":"","access":"public","defaultValue":"<0,0>","scope":"instance","type":"PropertyDoc","description":"
body friction
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3sMSzhEY-8m6R9Y-Rx1E-","name":"gravityScale","brief":"","access":"public","defaultValue":"1.0","scope":"instance","see":["World.gravity"],"type":"PropertyDoc","description":"The degree to which this body is affected by the world gravity
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3S80BKK52tMiRjhpGOuHj","name":"ignoreGravity","brief":"","access":"public","defaultValue":"false","scope":"instance","see":["World.gravity"],"type":"PropertyDoc","description":"If true this body won't be affected by the world gravity
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UDhc6FDo48-D5bL2oze5d","name":"isStatic","brief":"","access":"public","defaultValue":"false","readonly":true,"scope":"instance","type":"PropertyDoc","description":"Either this body is a static body or not.\nA static body is completely fixed and can never change position or angle.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cCfopZTgUJrlvzsPzhd7O","name":"jumping","brief":"","access":"public","defaultValue":"false","readonly":true,"scope":"instance","type":"PropertyDoc","description":"jumping state of the body \nequal true if the body is jumping
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aOqjEuy6kwEZCm7LagDAF","name":"mass","brief":"","access":"public","defaultValue":"1","scope":"instance","type":"PropertyDoc","description":"the body mass
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dViL6bGYftvsE9qNuEfuv","name":"maxVel","brief":"","access":"public","defaultValue":"<490,490>","scope":"instance","type":"PropertyDoc","description":"max velocity (to limit body velocity)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bgpuCQ1ykaYZ9-Dd6olH3","name":"vel","brief":"","access":"public","defaultValue":"<0,0>","scope":"instance","see":["Body.force"],"type":"PropertyDoc","description":"The current velocity of the body.\nSee to apply a force if you need to modify a body velocity
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nYm5djVrOBLLEgq9Aj9cz","name":"addShape","brief":"","examples":[{"caption":"","code":"// add a rectangle shape\nthis.body.addShape(new me.Rect(0, 0, image.width, image.height));\n// add a shape from a JSON object\nthis.body.addShape(me.loader.getJSON(\"shapesdef\").banana);"}],"scope":"instance","type":"MethodDoc","description":"add a collision shape to this body \n(note: me.Rect objects will be converted to me.Polygon before being added)
","params":[{"identifier":"shape","optional":false,"description":"a shape or JSON object
","dataType":{"tokens":[{"value":"Rect | Polygon | Line | Ellipse | Point | Array | Bounds | object","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"},{"value":"Point","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"},{"value":"Bounds","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6<%7> | %8 | object"}}],"returns":[{"description":"the shape array length
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6_9T9SY3b3rU4urWEqf6u","name":"addVertices","brief":"","scope":"instance","type":"MethodDoc","description":"add the given vertices to the body shape
","params":[{"identifier":"vertices","optional":false,"description":"an array of me.Vector2d points defining a convex hull
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}},{"identifier":"index","optional":true,"default":"0","description":"the shape object for which to set the vertices
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"4a2ZF-tIaTu3ccRIG4sD5","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"ancestor","optional":false,"description":"the parent object this body is attached to
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}},{"identifier":"shapes","optional":true,"description":"a initial shape, list of shapes, or JSON object defining the body
","dataType":{"tokens":[{"value":"Rect | Array | Polygon | Array | Line | Array | Ellipse | Array | Point | Array | Bounds | Array | object","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Ellipse","kind":"link"},{"value":"Point","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"},{"value":"Bounds","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1 | %3<%2> | %4 | %5<%6> | %7 | %8<%9> | %10 | %11<%12> | %13 | %14<%15> | %16 | %17<%18> | object"}},{"identifier":"onBodyUpdate","optional":true,"description":"callback for when the body is updated (e.g. add/remove shapes)
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"_xFQ1Ob6kuOaxuxPpZzTa","name":"contains","brief":"","examples":[{"caption":"","code":"if (mySprite.body.contains(10, 10)) {\n // do something\n}\n// or\nif (mySprite.body.contains(myVector2d)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the any of the shape composing the body contains the given point.
","params":[{"identifier":"x","optional":false,"variadic":true,"description":"x coordinate or a vector point to check
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if contains
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"f9rdNcjsRhSlIeGhDWtLk","name":"forEach","brief":"","examples":[{"caption":"","code":"// iterate through all shapes of the physic body\nmySprite.body.forEach((shape) => {\n shape.doSomething();\n});\nmySprite.body.forEach((shape, index) => { ... });\nmySprite.body.forEach((shape, index, array) => { ... });\nmySprite.body.forEach((shape, index, array) => { ... }, thisArg);"}],"scope":"instance","type":"MethodDoc","description":"The forEach() method executes a provided function once per body shape element. \nthe callback function is invoked with ...","params":[{"identifier":"callback","optional":false,"description":"
fnction to execute on each element
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"thisArg","optional":true,"description":"value to use as this(i.e reference Object) when executing callback.
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"Jz5ZmdG9f7LRUZMZYSnqN","name":"fromJSON","brief":"","examples":[{"caption":"","code":"// define the body based on the banana shape\nthis.body.fromJSON(me.loader.getJSON(\"shapesdef\").banana);\n// or ...\nthis.body.fromJSON(me.loader.getJSON(\"shapesdef\"), \"banana\");"}],"scope":"instance","see":["https://www.codeandweb.com/physicseditor"],"type":"MethodDoc","description":"add collision mesh based on a JSON object\n(this will also apply any physic properties defined in the given JSON file)
","params":[{"identifier":"json","optional":false,"description":"a JSON object as exported from a Physics Editor tool
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"id","optional":true,"description":"an optional shape identifier within the given the json object
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"how many shapes were added to the body
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"482vKs3MRD6GJeGGAnqTo","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the AABB bounding box for this body
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Ejku1el-QSuF3AEY3xbys","name":"getShape","brief":"","scope":"instance","type":"MethodDoc","description":"return the collision shape at the given index
","params":[{"identifier":"index","optional":true,"default":"0","description":"the shape object at the specified index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"shape a shape object if defined
","dataType":{"tokens":[{"value":"Polygon | Line | Ellipse","kind":"canonical"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3"}}],"extends":[],"implements":[]},{"id":"7JszHftpEpJTRTo7iM9hT","name":"removeShape","brief":"","scope":"instance","type":"MethodDoc","description":"remove the specified shape from the body shape list
","params":[{"identifier":"shape","optional":false,"description":"a shape object
","dataType":{"tokens":[{"value":"Polygon | Line | Ellipse","kind":"canonical"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"the shape array length
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"t9fL0gOtVBBM1gqP2AKmx","name":"removeShapeAt","brief":"","scope":"instance","type":"MethodDoc","description":"remove the shape at the given index from the body shape list
","params":[{"identifier":"index","optional":false,"description":"the shape object at the specified index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the shape array length
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"L_XF3HBdQ8onhBx3fBZmk","name":"respondToCollision","brief":"","scope":"instance","type":"MethodDoc","description":"the built-in function to solve the collision response
","params":[{"identifier":"response","optional":false,"description":"the collision response object (see {@link ResponseObject})
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"xacCA83IC2ZX_iGrakKho","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this body (counter-clockwise) by the specified angle (in radians).\nUnless specified the body will be rotated around...","params":[{"identifier":"angle","optional":false,"description":"
The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"default":"Body.getBounds().center","description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Body","kind":"canonical"},{"value":"Body","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"a7_fFcMD1EaZ5cIGRDCjR","name":"setCollisionMask","brief":"","examples":[{"caption":"","code":"// filter collision detection with collision shapes, enemies and collectables\nbody.setCollisionMask(me.collision.types.WORLD_SHAPE | me.collision.types.ENEMY_OBJECT | me.collision.types.COLLECTABLE_OBJECT);\n...\n// disable collision detection with all other objects\nbody.setCollisionMask(me.collision.types.NO_OBJECT);"}],"scope":"instance","see":["collision.types"],"type":"MethodDoc","description":"By default all physic bodies are able to collide with all other bodies, \nbut it's also possible to specify 'collision ...","params":[{"identifier":"bitmask ","optional":true,"default":" collision.types.ALL_OBJECT","description":"
the collision mask
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"R_zwOTS_iSiPeTGQGq43K","name":"setCollisionType","brief":"","examples":[{"caption":"","code":"// set the body collision type\nbody.collisionType = me.collision.types.PLAYER_OBJECT;"}],"scope":"instance","see":["collision.types"],"type":"MethodDoc","description":"define the collision type of the body for collision filtering
","params":[{"identifier":"type","optional":false,"description":"the collision type
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"sHMv_nj9H4kIdY2fAVlDX","name":"setFriction","brief":"","scope":"instance","type":"MethodDoc","description":"set the body default friction
","params":[{"identifier":"x","optional":false,"default":"0","description":"horizontal friction
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"default":"0","description":"vertical friction
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Aruw23Sub1IdursNuHowm","name":"setMaxVelocity","brief":"","scope":"instance","type":"MethodDoc","description":"cap the body velocity (body.maxVel property) to the specified value
","params":[{"identifier":"x","optional":false,"description":"max velocity on x axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"max velocity on y axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"wOqeThL5ZGDLOJ-fMqKNE","name":"setStatic","brief":"","scope":"instance","type":"MethodDoc","description":"set the body as a static body\nstatic body do not move automatically and do not check againt collision with others
","params":[{"identifier":"isStatic","optional":true,"default":"true","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"h2KBvq_UDtef7cl-U0P_3","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the body vertices to the given one
","params":[{"identifier":"vertices","optional":false,"description":"an array of me.Vector2d points defining a convex hull
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}},{"identifier":"index","optional":true,"default":"0","description":"the shape object for which to set the vertices
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"clear","optional":true,"default":"true","description":"either to reset the body definition before adding the new vertices
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"_IbFy1cL5a3FJD0hA-bR3","name":"update","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"Updates the parent's position as well as computes the new body's velocity based\non the values of force/friction. Velocity...","params":[{"identifier":"dt","optional":false,"description":"
time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if resulting velocity is different than 0
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]}]},{"id":"MMFCKHfUEMx4FCePq6uzm","name":"Bounds","brief":"","type":"ClassDoc","description":"a bound object contains methods for creating and manipulating axis-aligned bounding boxes (AABB).
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"JpxhqvcaknQBL_qKOLaG-","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZxPBRO4jLkQ1nliP0Np-m","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"return the center position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kqtOdkmSnFuLEDcDWwhwV","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the x axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SjaypRXxz7sUudpCt7LxG","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the y axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XsY6XCiqiBBFtrvHcpubn","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oMxvyTfCHG0a36coMzBzx","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8307LG3jDyzyjx85zI8ig","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1zMc0gJUqQA8mMXfFV2ln","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ljQcovyl9J5oJ7kkhOilO","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"the object type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"koYs2YGreR4CDtc2wSyjI","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"32mDa19nxiIM-Y7fQlFQd","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"x position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FPjOlpyOL256O_ub9AJMT","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"y position of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lwhb06siytjfm2Iauk3Bc","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"add the given vertices to the bounds definition.
","params":[{"identifier":"vertices","optional":false,"description":"an array of Vector2d or Point
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2> | %3<%4>"}},{"identifier":"clear","optional":true,"default":"false","description":"either to reset the bounds before adding the new vertices
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"k5JpSMUqeJ6vX94G5LiF8","name":"addBounds","brief":"","scope":"instance","type":"MethodDoc","description":"add the given bounds to the bounds definition.
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}},{"identifier":"clear","optional":true,"default":"false","description":"either to reset the bounds before adding the new vertices
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"H9Q10DGkCDcW4JTuOhd6y","name":"addFrame","brief":"","scope":"instance","type":"MethodDoc","description":"add the given quad coordinates to this bound definition, multiplied by the given matrix
","params":[{"identifier":"x0","optional":false,"description":"left X coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y0","optional":false,"description":"top Y coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"x1","optional":false,"description":"right X coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y1","optional":false,"description":"bottom y coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m","optional":true,"description":"an optional transform to apply to the given frame coordinates
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"avz9cMujqdbk4Ktl0olYl","name":"addPoint","brief":"","scope":"instance","type":"MethodDoc","description":"add the given point to the bounds definition.
","params":[{"identifier":"point","optional":false,"description":"the vector or point to be added to the bounds
","dataType":{"tokens":[{"value":"Vector2d | Point","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Point","kind":"link"}],"template":"%1 | %2"}},{"identifier":"m","optional":true,"description":"an optional transform to apply to the given point (if the given point is a Vector2d)
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"M-2i0DNy-1x3fbl2FAlvY","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the bounds position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this bounds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this bounds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"PtVOa_5XMGPGDShNEIgG9","name":"clear","brief":"reset the bound
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vYfp0dJUsX-BE80eoQjs1","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this bounds
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FjQIKauaT7_R6rj0zYAQv","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"vertices","optional":true,"description":"an array of Vector2d or Point
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2> | %3<%4>"}}],"returns":[],"extends":[],"implements":[]},{"id":"-7icY3tVe-vk-lEEGzzIM","name":"contains","brief":"","examples":[{"caption":"","code":"if (bounds.contains(10, 10)) {\n // do something\n}\n// or\nif (bounds.contains(myVector2d)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the bounds contains the given point.
","params":[{"identifier":"x","description":"x coordinate or a vector point to check
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the bounds contain the point, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"pQML4YpnNrXsjxtGMwxVu","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this bounds are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"y6aFYKE0yD0Idp_Dmma4v","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the two bounds intersect.
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Bounds | Rect","kind":"canonical"},{"value":"Bounds","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"True if the bounds overlap, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"kCMZlTXSRJMtuWWegGtOT","name":"setMinMax","brief":"","scope":"instance","type":"MethodDoc","description":"sets the bounds to the given min and max value
","params":[{"identifier":"minX","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"minY","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxX","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxY","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"P2pn6ffLF8rVyRNmqI3gb","name":"shift","brief":"","examples":[{"caption":"","code":"bounds.shift(10, 10);\n// or\nbounds.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the bounds to the given x, y position.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"XnK9suWEJLzAtls7M_hEo","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this bounds.
","params":[],"returns":[{"description":"a new Polygon that represents this bounds.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"YtySO3NkBqF3X8KAUzat5","name":"translate","brief":"","examples":[{"caption":"","code":"bounds.translate(10, 10);\n// or\nbounds.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Translates the bounds by the given point
","params":[{"identifier":"x","description":"x coordinate or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"SwrUTi8AUzS17LBchmc7d","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"Updates bounds using the given vertices
","params":[{"identifier":"vertices","optional":false,"description":"an array of Vector2d or Point
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2> | %3<%4>"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"PkkOy03IdokzZoUZsdVPy","name":"Camera2d","brief":"","type":"ClassDoc","description":"a 2D orthographic camera
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"r0ceeC1UPcMClSCjE1T7v","name":"AXIS","brief":"","readonly":true,"type":"EnumDoc","description":"Axis definition
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"6rtvfNEyjDzAB4IqGgoEb","name":"BOTH","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"both axis
"},{"id":"8UvZF5p5oH6ci_7S5I8NY","name":"HORIZONTAL","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"horizontal axis only
"},{"id":"vEaZ3sZso-KYnT39kAyOg","name":"NONE","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"no axis
"},{"id":"YyfZku-mqYJ3A7HYRZ6LA","name":"VERTICAL","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"vertical axis only
"}]},{"id":"9Q3dk0L2PYT2FBdCMq7Jh","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"71U3gy6GDx1vD8eF5o_Gf","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4_5O5cVnAc3U9k-YofmmU","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JeZCPVP011z-2uBSyLDtY","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_OC8YgJOs3TFiq3OgNWs2","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PXQPZVrzC4XmmyYafe8vP","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yli2HDKtrgGLrKU5sech6","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7c_mOSqhHSWiFH8aS1LTs","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"A6ueBgwT-tmpiqQPaT89h","name":"bounds","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Camera bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"o8uJRCpXKBF4DKStnniFI","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yNF568XBAtQNg-xN9M5j0","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3w6HtoxZ08EKMG-c0ycCx","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"J16CjLX6rcSLPv8oa6qi8","name":"damping","brief":"","access":"public","defaultValue":"1.0","scope":"instance","type":"PropertyDoc","description":"Camera damping for smooth transition [0 .. 1].\n1 being the maximum value and will snap the camera to the target position
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"twSpVAHGMn4YzHBzalitw","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SuwAyMHIqPGyM3leQmdG4","name":"far","brief":"","access":"public","defaultValue":"1000","scope":"instance","type":"PropertyDoc","description":"the furthest point relative to the camera.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mmxFuisVyboCSbRdVe2o0","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"so0iG1cbMKPgCx3fA2Fqw","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g4AZogTXrJRSjow4bzbAD","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"x3i9R25xILYhjoDhBbi-R","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"544U1pLjh0As_j1uH4YAE","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VzRHxqT47pjzIdDwplAQw","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TWM39Gw2cfqW1J3eWCHL0","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gNZMhsDuy9chZw0Q4ZK5p","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FdcXX6CT97NPldPHgblGw","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rbCBWL3GB1_xgvUtyDBnz","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LxS1v0knYO3rlYM9CBgpT","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Zup1cdrgeiWARwv9S6aI4","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bSKU0dPlmH5EFZPoVkqE6","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b5KelXLUE-1-gjMfbM4h-","name":"near","brief":"","access":"public","defaultValue":"-1000","scope":"instance","type":"PropertyDoc","description":"the closest point relative to the camera
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CrJcOxAmnbIYa5NA11iYj","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Gk-r4wUeOzq1gYMXmIjJv","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"R1BY6_M8AuFRWw0X37bCu","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yd2hGVlHM7F0JCBr_uKIV","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LiEgkdi6IomdEywos3DDm","name":"projectionMatrix","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the default camera projection matrix\n(2d cameras use an orthographic projection by default).
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cmQRNdMETbv0xW90nS7Hq","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1dMgMSJivaQbRQmQ-aDKV","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z3uWrbmZejV3xCnxsTPyR","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mz_2W9dskIReVlwk658qX","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aCb-NsDMFn7wTHowlaPv0","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YFbveFZXusvaDGe1IO3ZU","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9svHcGkAerbQidKbLmWG4","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lRcyyBeANA3eR6yWa1PvL","name":"smoothFollow","brief":"","access":"private","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"enable or disable damping
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z7THqu4xUh6FG_uDjMHpz","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-LZmm1r5ZSmGBFAwR4l_A","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"eONEfjMRxJ8f7iLnbrUhP","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_faURET-ql4RAzJCR_64X","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"minX","optional":false,"description":"start x offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"minY","optional":false,"description":"start y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxX","optional":false,"description":"end x offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxY","optional":false,"description":"end y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"eD31fFAW3hgrDGrYplI0P","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"gpFaJf13BH4B4Hc7IQRJ0","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XG3C_fri-EMvEQ3qB0Old","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"63-Z6UidNNyS-2WS4TWax","name":"draw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#postDraw"],"type":"MethodDoc","description":"Draw this renderable (automatically called by melonJS).\nAll draw operations for renderable are made respectively\nto the po...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"KuobmxeKINFdYE42JwU2A","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"uuL4Q-3kcV0XzpPdzThxM","name":"fadeIn","brief":"","examples":[{"caption":"","code":"// flash the camera to white for 75ms\nme.game.viewport.fadeIn(\"#FFFFFF\", 75);"}],"scope":"instance","type":"MethodDoc","description":"fadeIn effect
\nfade to the specified color
","params":[{"identifier":"color","optional":false,"description":"a CSS color value
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"duration","optional":true,"default":"1000","description":"expressed in milliseconds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"onComplete","optional":true,"description":"callback once effect is over
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"X3a4wVbth7zj_XA9yx0wK","name":"fadeOut","brief":"","examples":[{"caption":"","code":"// fade the camera to white upon dying, reload the level, and then fade out back\nme.game.viewport.fadeIn(\"#fff\", 150, function() {\n me.audio.play(\"die\", false);\n me.level.reload();\n me.game.viewport.fadeOut(\"#fff\", 150);\n});"}],"scope":"instance","type":"MethodDoc","description":"fadeOut(flash) effect
\nscreen is filled with the specified color and slowly goes back to normal
","params":[{"identifier":"color","optional":false,"description":"a CSS color value
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"duration","optional":true,"default":"1000","description":"expressed in milliseconds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"onComplete","optional":true,"description":"callback once effect is over
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"TqOVZ4CIEqdd51ffI5cFo","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nIPFWzpxtwexWD3CzFUtP","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"piDvoKLu4NnvpuK-pc4WO","name":"focusOn","brief":"","scope":"instance","type":"MethodDoc","description":"set the camera position around the specified object
","params":[{"identifier":"target","optional":false,"description":"the renderable to focus the camera on
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[],"extends":[],"implements":[]},{"id":"JdAUjiXPQxNIY3-e7ISYt","name":"follow","brief":"","examples":[{"caption":"","code":"// set the camera to follow this renderable on both axis, and enable damping\nme.game.viewport.follow(this, me.game.viewport.AXIS.BOTH, 0.1);"}],"scope":"instance","type":"MethodDoc","description":"set the camera to follow the specified renderable. \n(this will put the camera center around the given target)
","params":[{"identifier":"target","optional":false,"description":"renderable or position vector to follow
","dataType":{"tokens":[{"value":"Renderable | Vector2d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"axis","optional":true,"default":"me.game.viewport.AXIS.BOTH","description":"Which axis to follow (see {@link Camera2d.AXIS})
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"damping","optional":true,"default":"1","description":"default damping value
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"_kijihpj59xAY21yGj2QQ","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"k3zwPJhc8Wrv89JSOPWuO","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"V6oym3Ul5LMpHXiQZQrwU","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"E_SfpVNb47Ba9poyKx2mm","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0PQiP8W1g6L0IrBy1UjIO","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"g-HXZ2l7MiROj4o9t1LDa","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"AQuPa6KA3aOFnXpdZ--O5","name":"isVisible","brief":"","scope":"instance","type":"MethodDoc","description":"check if the specified renderable is in the camera
","params":[{"identifier":"obj","optional":false,"description":"to be checked against
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4"}},{"identifier":"floating ","optional":true,"default":" obj.floating","description":"if visibility check should be done against screen coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"true if within the viewport
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"0jTwZ0QGe92UgDXjDan-s","name":"localToWorld","brief":"","scope":"instance","type":"MethodDoc","description":"convert the given "local" (screen) coordinates into world coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate of the local point to be converted
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate of the local point to be converted
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to set the converted value
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"uvHOm5h708h794uc5Psqg","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"dC4ZUW_4xxxebjVCWjziR","name":"move","brief":"","examples":[{"caption":"","code":"// Move the camera up by four pixels\nme.game.viewport.move(0, -4);"}],"scope":"instance","see":["Camera2d.focusOn"],"type":"MethodDoc","description":"move the camera upper-left position by the specified offset.
","params":[{"identifier":"x","optional":false,"description":"horizontal offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"vertical offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"b6wONhZbO2banqlWUmoUK","name":"moveTo","brief":"","scope":"instance","see":["Camera2d.focusOn"],"type":"MethodDoc","description":"move the camera upper-left position to the specified coordinates
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"njdQ-pDuM6AS-kFk3s8Db","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"4yNoUVqelwwF8FOa9Pjg8","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zkYuxhGwjiTvInUKsJDNp","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"NdlTj9HtEDffnaswxJq0J","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"pXXWWLKgTRlAq3kNepIQQ","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"K8BT95Z9k9pmaAQOhmgD-","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"NVYbmBCzMg9ocNlW6YzmY","name":"reset","brief":"","scope":"instance","type":"MethodDoc","description":"reset the camera position to specified coordinates
","params":[{"identifier":"x","optional":true,"default":"0","description":"initial position of the camera on the x axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"0","description":"initial position of the camera on the y axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"upxK3bM5HFV2-2oXsJmnK","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the camera
","params":[{"identifier":"w","optional":false,"description":"new width of the camera
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the camera
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this camera
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"keWZj9pWVm_P10eHAZQCc","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hOFHkd82FegbshD8UnFxs","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KsF-eKwBrSv-pzGsNn-GP","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TksMoQtcX_M_IA5harVEu","name":"setBounds","brief":"","scope":"instance","type":"MethodDoc","description":"set the camera boundaries (set to the world limit by default).\nthe camera is bound to the given coordinates and cannot mov...","params":[{"identifier":"x","optional":false,"description":"
world left limit
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"world top limit
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"world width limit
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"world height limit
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"0zDdthPUNzo3o7qyoz7ki","name":"setDeadzone","brief":"","scope":"instance","see":["Camera2d.follow"],"type":"MethodDoc","description":"change the deadzone settings.\nthe "deadzone" defines an area within the current camera in which\nthe followed ren...","params":[{"identifier":"w","optional":false,"description":"
deadzone width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"deadzone height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"9nPOkayQGR6Utz-QHBJQj","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"sNJqPYMhzBdcf5oPv8SdA","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SAI5-sKagaBVA1q8ILJVn","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RetC2_-JN1FRLtNjC8hpS","name":"shake","brief":"","examples":[{"caption":"","code":"// shake it baby !\nme.game.viewport.shake(10, 500, me.game.viewport.AXIS.BOTH);"}],"scope":"instance","type":"MethodDoc","description":"shake the camera
","params":[{"identifier":"intensity","optional":false,"description":"maximum offset that the screen can be moved\nwhile shaking
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"duration","optional":false,"description":"expressed in milliseconds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"axis","optional":true,"default":"me.game.viewport.AXIS.BOTH","description":"specify on which axis to apply the shake effect (see {@link Camera2d.AXIS})
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"onComplete","optional":true,"description":"callback once shaking effect is over
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"force","optional":true,"description":"if true this will override the current effect
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"7L51Z_o2AW9f3ULQXnycF","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"5QVoH83dVSrtByxC0hULf","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lIqGrvJnKLtxcRuVejjSP","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TXrMhS9VNDjrQWlrytotb","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zRyA6P52FUPYH-BUsBEiF","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XYgsKwW4IGbYLMs9S2UJ_","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LCZD3zGRhi6UpUCmG1x74","name":"unfollow","brief":"","scope":"instance","type":"MethodDoc","description":"unfollow the current target
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2QWtQIAY7lWh38VaHfg1T","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"s9xAYgIwSQp9VccbByF9P","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"i5MPTids8L9NAAmjquW0q","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Wc1XIIVbpH8jaONt-mJHg","name":"worldToLocal","brief":"","scope":"instance","type":"MethodDoc","description":"convert the given world coordinates into "local" (screen) coordinates
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to set the converted value
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"a vector with the converted local coordinates
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qjq-I5rRuwsXnTfExmSG0","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"BEJHHSX6dzuWGDLRS4KZj","name":"CanvasRenderer","brief":"","type":"ClassDoc","description":"a canvas renderer object
","params":[],"returns":[],"extends":["Renderer"],"implements":[],"members":[{"id":"ICyVcRQcDfLW1mnFb8rRV","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"the default method to sort object ("sorting", "z-buffer")
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cn0nxhtfIZarKD9KEfSWb","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the requested video size ratio
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"obTEY4BQQlMcRY0ezR3We","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"return the height of the canvas which this renderer draws to
","params":[],"returns":[{"description":"height of the system Canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"giRBkvq0BPAM4bKE0zAKx","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"true if the current rendering context is valid
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VcAtywdDX0_wFw_ngjlCQ","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"The Path2D instance used by the renderer to draw primitives
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nfaOzUyURuVFIBaXfsgM8","name":"renderTarget","brief":"","scope":"instance","type":"PropertyDoc","description":"The renderer renderTarget
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FnMkWyxILWLhO6KOjOv8g","name":"scaleRatio","brief":"","defaultValue":"<1,1>","scope":"instance","type":"PropertyDoc","description":"the scaling ratio to be applied to the main canvas
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-NZmcfpXlKp0Se8jDc1DM","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The given constructor options
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tfqpMpfVO3GAXUI1U9yd2","name":"type","brief":"","defaultValue":"\"Generic\"","scope":"instance","type":"PropertyDoc","description":"The renderer type : Canvas, WebGL, etc...\n(override this property with a specific value when implementing a custom rendere...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UZzGTvycC138ZA-nYqASo","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"
return the width of the canvas which this renderer draws to
","params":[],"returns":[{"description":"width of the system Canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_SuSddbIMHQ11oZuV9fOJ","name":"beginPath","brief":"","examples":[{"caption":"","code":"// First path\nrenderer.beginPath();\nrenderer.setColor(\"blue\");\nrenderer.moveTo(20, 20);\nrenderer.lineTo(200, 20);\nrenderer.stroke();\n// Second path\nrenderer.beginPath();\nrenderer.setColor(\"green\");\nrenderer.moveTo(20, 20);\nrenderer.lineTo(120, 120);\nrenderer.stroke();"}],"scope":"instance","type":"MethodDoc","description":"starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LkjP1S6Oce2PnO2BYc4jJ","name":"clear","brief":"prepare the framebuffer for drawing a new frame
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"m0DbYjbrNFkag26xADd2X","name":"clearColor","brief":"","scope":"instance","type":"MethodDoc","description":"Clears the main framebuffer with the given color
","params":[{"identifier":"color","optional":true,"default":"\"#000000\"","description":"CSS color.
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"opaque","optional":true,"default":"false","description":"Allow transparency [default] or clear the surface completely [true]
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"82VKbI89O3CRHmH4NUmM-","name":"clearMask","brief":"","scope":"instance","see":["CanvasRenderer#setMask"],"type":"MethodDoc","description":"disable (remove) the rendering mask set through setMask.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IqHXe6qTkSAW5SwVxP_XD","name":"clearRect","brief":"","scope":"instance","type":"MethodDoc","description":"Erase the pixels in the given rectangular area by setting them to transparent black (rgba(0,0,0,0)).
","params":[{"identifier":"x","optional":false,"description":"x axis of the coordinate for the rectangle starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"y axis of the coordinate for the rectangle starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"The rectangle's width.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"The rectangle's height.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Bmjlx34XTtdaXjmBcL7Jt","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"clear the rendering tint set through setTint.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qvZhplJB08SYSPPfORD6T","name":"clipRect","brief":"","scope":"instance","type":"MethodDoc","description":"clip the given region from the original canvas. Once a region is clipped,\nall future drawing will be limited to the clippe...","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"1ltsm62aTG8b7mtmU_jaj","name":"closePath","brief":"
add a straight line from the current point to the start of the current sub-path. If the shape has already been closed or has only one point, this function does nothing
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kVRFL9vz68lioMMs71o-5","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"options","optional":true,"description":"optional parameters for the renderer
","dataType":{"tokens":[{"value":"Application.Settings","kind":"canonical"},{"value":"Application.Settings","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"DyELeAK_8BofFeQ2LSXrs","name":"createPattern","brief":"","examples":[{"caption":"","code":"let tileable = renderer.createPattern(image, \"repeat\");\nlet horizontal = renderer.createPattern(image, \"repeat-x\");\nlet vertical = renderer.createPattern(image, \"repeat-y\");\nlet basic = renderer.createPattern(image, \"no-repeat\");"}],"scope":"instance","see":["ImageLayer#repeat"],"type":"MethodDoc","description":"Create a pattern with the specified repetition
","params":[{"identifier":"image","optional":false,"description":"Source image to be used as the pattern's image
","dataType":{"tokens":[{"value":"HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas | VideoFrame","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"SVGImageElement","kind":"canonical"},{"value":"HTMLVideoElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"ImageBitmap","kind":"canonical"},{"value":"OffscreenCanvas","kind":"canonical"},{"value":"VideoFrame","kind":"canonical"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7"}},{"identifier":"repeat","optional":false,"description":"Define how the pattern should be repeated
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"CanvasPattern","kind":"canonical"},{"value":"CanvasPattern","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"cRmYt0KaADuCBnFlhN-go","name":"drawImage","brief":"","examples":[{"caption":"","code":"// Position the image on the canvas:\nrenderer.drawImage(image, dx, dy);\n// Position the image on the canvas, and specify width and height of the image:\nrenderer.drawImage(image, dx, dy, dWidth, dHeight);\n// Clip the image and position the clipped part on the canvas:\nrenderer.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);"}],"scope":"instance","type":"MethodDoc","description":"Draw an image onto the main using the canvas api
","params":[{"identifier":"image","optional":false,"description":"An element to draw into the context.
","dataType":{"tokens":[{"value":"HTMLImageElement | SVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas | VideoFrame","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"SVGImageElement","kind":"canonical"},{"value":"HTMLVideoElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"ImageBitmap","kind":"canonical"},{"value":"OffscreenCanvas","kind":"canonical"},{"value":"VideoFrame","kind":"canonical"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7"}},{"identifier":"sx","optional":false,"description":"The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"sy","optional":false,"description":"The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"sw","optional":false,"description":"The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rect...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"sh","optional":false,"description":"
The height of the sub-rectangle of the source image to draw into the destination context.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"dx","optional":false,"description":"The X coordinate in the destination canvas at which to place the top-left corner of the source image.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"dy","optional":false,"description":"The Y coordinate in the destination canvas at which to place the top-left corner of the source image.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"dw","optional":false,"description":"The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"dh","optional":false,"description":"
The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the imag...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"44PmEDkJNunexGdWyrJG5","name":"drawPattern","brief":"","scope":"instance","see":["CanvasRenderer#createPattern"],"type":"MethodDoc","description":"
Draw a pattern within the given rectangle.
","params":[{"identifier":"pattern","optional":false,"description":"Pattern object
","dataType":{"tokens":[{"value":"CanvasPattern","kind":"canonical"},{"value":"CanvasPattern","kind":"canonical"}],"template":"%1"}},{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"aWZtjSGKaFJ--1JQNI4Rq","name":"fill","brief":"","scope":"instance","type":"MethodDoc","description":"fill the given shape or the current defined path
","params":[{"identifier":"shape","optional":true,"description":"a shape object to fill
","dataType":{"tokens":[{"value":"Rect | RoundRect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"RoundRect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[],"extends":[],"implements":[]},{"id":"XzEZwmACiC3wFC6FyqbvO","name":"fillArc","brief":"","scope":"instance","type":"MethodDoc","description":"Fill an arc at the specified coordinates with given radius, start and end points
","params":[{"identifier":"x","optional":false,"description":"arc center point x-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"arc center point y-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"start","optional":false,"description":"start angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"end","optional":false,"description":"end angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"antiClockwise","optional":true,"default":"false","description":"draw arc anti-clockwise
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"pm3WBJ1zwek5_XK7GDp5H","name":"fillEllipse","brief":"","scope":"instance","type":"MethodDoc","description":"Fill an ellipse at the specified coordinates with given radius
","params":[{"identifier":"x","optional":false,"description":"ellipse center point x-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"ellipse center point y-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"horizontal radius of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"vertical radius of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"_yT-Ocn4NrWVfY3w93LWE","name":"fillLine","brief":"","scope":"instance","type":"MethodDoc","description":"Fill a line of the given two points
","params":[{"identifier":"startX","optional":false,"description":"the start x coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"startY","optional":false,"description":"the start y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"endX","optional":false,"description":"the end x coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"endY","optional":false,"description":"the end y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"iEpH0FTLGiUfZryBlHXiX","name":"fillPoint","brief":"","scope":"instance","type":"MethodDoc","description":"Draw a a point at the specified coordinates
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"NfP8R1pi7ghA7v0B-gOwz","name":"fillPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Fill the given me.Polygon on the screen
","params":[{"identifier":"poly","optional":false,"description":"the shape to draw
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"c0rY8Us56RhM_fYTnSo3q","name":"fillRect","brief":"","scope":"instance","type":"MethodDoc","description":"Draw a filled rectangle at the specified coordinates
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"fF5ulQHKwJebp2nOXC81R","name":"fillRoundRect","brief":"","scope":"instance","type":"MethodDoc","description":"Draw a rounded filled rectangle at the specified coordinates
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"R9tyo19Lr25Q7wZPiJwdf","name":"flush","brief":"render the main framebuffer on screen
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mDAjyVrz-mt3FeFjIkpVt","name":"getBlendMode","brief":"","scope":"instance","type":"MethodDoc","description":"returns the current blend mode for this renderer
","params":[],"returns":[{"description":"blend mode
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"bekoKRNLhuMLk2EKNM-OA","name":"getCanvas","brief":"","scope":"instance","type":"MethodDoc","description":"return a reference to the current render target corresponding canvas which this renderer draws to
","params":[],"returns":[{"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ClfLs4laGd0XZzGQinR3h","name":"getColor","brief":"","scope":"instance","type":"MethodDoc","description":"get the current fill & stroke style color.
","params":[],"returns":[{"description":"current global color
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"v7KiRG766yvYue6tzq4GQ","name":"getContext","brief":"","scope":"instance","type":"MethodDoc","description":"return a reference to the current render target corresponding Context
","params":[],"returns":[{"dataType":{"tokens":[{"value":"CanvasRenderingContext2D | WebGLRenderingContext","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"bC3LqGVyI6Tr9I8m5snPg","name":"getGlobalAlpha","brief":"","scope":"instance","type":"MethodDoc","description":"Return the global alpha
","params":[],"returns":[{"description":"global alpha value
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ySZmvyeua9fBnulyVei97","name":"getScreenCanvas","brief":"","deprecated":"since 13.1.0","scope":"instance","see":["getCanvas();"],"type":"MethodDoc","description":"return a reference to the screen canvas
","params":[],"returns":[{"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Veh_gNsVBL45A9u9Myygl","name":"getScreenContext","brief":"","deprecated":"since 13.1.0","scope":"instance","see":["getContext();"],"type":"MethodDoc","description":"return a reference to the screen canvas corresponding 2d Context \n(will return buffered context if double buffering is ...","params":[],"returns":[{"dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"daGPClBoBM2_sT9t_urcR","name":"globalAlpha","brief":"","scope":"instance","type":"MethodDoc","description":"
return the current global alpha
","params":[],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"a5t3KtoJObGYD_6UIOXYP","name":"lineTo","brief":"adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates.
","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false},{"identifier":"y","optional":false}],"returns":[],"extends":[],"implements":[]},{"id":"mKP5lmkFwba4Pxp3rkmfH","name":"moveTo","brief":"","scope":"instance","type":"MethodDoc","description":"begins a new sub-path at the point specified by the given (x, y) coordinates.
","params":[{"identifier":"x","optional":false,"description":"The x axis of the point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"The y axis of the point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"ZAC-_Qffw0n_hJngnl01T","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if the given rect or bounds overlaps with the renderer screen coordinates
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Rect | Bounds","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Bounds","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"tpLBKCSReqtIDPCqQgRjY","name":"rect","brief":"","scope":"instance","type":"MethodDoc","description":"creates a rectangular path whose starting point is at (x, y) and whose size is specified by width and height.
","params":[{"identifier":"x","optional":false,"description":"The x axis of the coordinate for the rectangle starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"The y axis of the coordinate for the rectangle starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"The rectangle's width.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"The rectangle's height.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"4PC9w405ZTxPdoFu59a91","name":"reset","brief":"Reset context state
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"btdcVGUKwBbPGHnCKD97d","name":"resetTransform","brief":"Reset the canvas transform to identity
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gk4BWlh2fa4saBS8VFcEF","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resizes the system canvas
","params":[{"identifier":"width","optional":false,"description":"new width of the canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"new height of the canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"lErlbpma0Jn_YTfyJx8xv","name":"restore","brief":"","examples":[{"caption":"","code":" // Save the current state\n renderer.save();\n\n // apply a transform and draw a rect\n renderer.tranform(matrix);\n renderer.fillRect(10, 10, 100, 100);\n\n // Restore to the state saved by the most recent call to save()\n renderer.restore();"}],"scope":"instance","type":"MethodDoc","description":"restores the most recently saved renderer state by popping the top entry in the drawing state stack
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HEFPqaZ9oS4mFIsgskjIz","name":"rotate","brief":"","examples":[{"caption":"","code":" // Rotated rectangle\n renderer.rotate((45 * Math.PI) / 180);\n renderer.setColor(\"red\");\n renderer.fillRect(10, 10, 100, 100);\n\n // Reset transformation matrix to the identity matrix\n renderer.setTransform(1, 0, 0, 1, 0, 0);"}],"scope":"instance","type":"MethodDoc","description":"adds a rotation to the transformation matrix.
","params":[{"identifier":"angle","optional":false,"description":"the rotation angle, clockwise in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"I1NYauI6acTkAX_o67oXH","name":"roundRect","brief":"","scope":"instance","type":"MethodDoc","description":"adds a rounded rectangle to the current path.
","params":[{"identifier":"x","optional":false,"description":"The x axis of the coordinate for the rectangle starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"The y axis of the coordinate for the rectangle starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"The rectangle's width.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"The rectangle's height.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"description":"The corner radius.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"VMZ5ouNiHyhHco5WyICSM","name":"save","brief":"","examples":[{"caption":"","code":" // Save the current state\n renderer.save();\n\n // apply a transform and draw a rect\n renderer.tranform(matrix);\n renderer.fillRect(10, 10, 100, 100);\n\n // Restore to the state saved by the most recent call to save()\n renderer.restore();"}],"scope":"instance","type":"MethodDoc","description":"saves the entire state of the renderer by pushing the current state onto a stack.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AnqsIaFDVWPjgqocmjqY8","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"adds a scaling transformation to the renderer units horizontally and/or vertically
","params":[{"identifier":"x","optional":false,"description":"Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of 1 results i...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"
Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results i...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"X_SJwtSOa6ER7CmrGpVCB","name":"setAntiAlias","brief":"","scope":"instance","type":"MethodDoc","description":"
enable/disable image smoothing (scaling interpolation) for the current render target
","params":[{"identifier":"enable","optional":true,"default":"false","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"6_th_bWJeq8GeVyjyexxt","name":"setBlendMode","brief":"","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation"],"type":"MethodDoc","description":"set a blend mode for the given context. \nSupported blend mode between Canvas and WebGL remderer :
\n\n&q...","params":[{"identifier":"mode","optional":true,"default":"\"normal\"","description":"blend mode : "normal", "multiply", "lighter, "additive", "screen"
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"context","optional":true,"dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"vWXszpIzChaEqbE8TzYnD","name":"setColor","brief":"","scope":"instance","type":"MethodDoc","description":"Set the current fill & stroke style color.\nBy default, or upon reset, the value is set to #000000.
","params":[{"identifier":"color","optional":false,"description":"css color value
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}}],"returns":[],"extends":[],"implements":[]},{"id":"trGbo-8gMub47LTDTlRRv","name":"setGlobalAlpha","brief":"","scope":"instance","type":"MethodDoc","description":"Set the global alpha
","params":[{"identifier":"alpha","optional":false,"description":"0.0 to 1.0 values accepted.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"yKCRGxejEyiWzqhXFcwNk","name":"setLineWidth","brief":"","scope":"instance","type":"MethodDoc","description":"Set the line width on the context
","params":[{"identifier":"width","optional":false,"description":"Line width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Xr7X0zzipxzbUvmEEVCVX","name":"setMask","brief":"","scope":"instance","see":["CanvasRenderer#clearMask"],"type":"MethodDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nIf the drawing or rendering area is l...","params":[{"identifier":"mask","optional":true,"description":"
the shape defining the mask to be applied
","dataType":{"tokens":[{"value":"Rect | RoundRect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"RoundRect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}},{"identifier":"invert","optional":true,"default":"false","description":"either the given shape should define what is visible (default) or the opposite
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"YxZ5WeKf4WpxG_H4hVA0i","name":"setProjection","brief":"","scope":"instance","type":"MethodDoc","description":"set/change the current projection matrix (WebGL only)
","params":[{"identifier":"matrix","optional":false,"dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"95iSIq_85Mdlm3UzxKXo-","name":"setTint","brief":"","scope":"instance","type":"MethodDoc","description":"set a coloring tint for sprite based renderables
","params":[{"identifier":"tint","optional":false,"description":"the tint color
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}},{"identifier":"alpha","optional":true,"description":"an alpha value to be applied to the tint
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"pcTY6Ykl9lbUa2jC34OS5","name":"setTransform","brief":"","scope":"instance","type":"MethodDoc","description":"Reset (overrides) the renderer transformation matrix to the\nidentity one, and then apply the given transformation matrix.
","params":[{"identifier":"a","optional":false,"description":"a matrix2d to transform by, or a the a component to multiply the current matrix by
","dataType":{"tokens":[{"value":"Matrix2d | number","kind":"canonical"},{"value":"Matrix2d","kind":"link"},{"value":"number","kind":"canonical"}],"template":"%1 | %2"}},{"identifier":"b","optional":false,"description":"the b component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"c","optional":false,"description":"the c component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"d","optional":false,"description":"the d component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"e","optional":false,"description":"the e component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"f","optional":false,"description":"the f component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"vwti9nbqMjilSD_zQDQB7","name":"stroke","brief":"","scope":"instance","type":"MethodDoc","description":"stroke the given shape or the current defined path
","params":[{"identifier":"shape","optional":true,"description":"a shape object to stroke
","dataType":{"tokens":[{"value":"Rect | RoundRect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"RoundRect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}},{"identifier":"fill","optional":true,"default":"false","description":"fill the shape with the current color if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"Wkc-cL_gty3dtpUY0yFyn","name":"strokeArc","brief":"","scope":"instance","type":"MethodDoc","description":"Stroke an arc at the specified coordinates with given radius, start and end points
","params":[{"identifier":"x","optional":false,"description":"arc center point x-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"arc center point y-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"start","optional":false,"description":"start angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"end","optional":false,"description":"end angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"antiClockwise","optional":true,"default":"false","description":"draw arc anti-clockwise
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"fill","optional":true,"default":"false","description":"also fill the shape with the current color if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"TtNNoz5WZjOXzZco85OIy","name":"strokeEllipse","brief":"","scope":"instance","type":"MethodDoc","description":"Stroke an ellipse at the specified coordinates with given radius
","params":[{"identifier":"x","optional":false,"description":"ellipse center point x-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"ellipse center point y-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"horizontal radius of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"vertical radius of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"fill","optional":true,"default":"false","description":"also fill the shape with the current color if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"HY-8V51d0gPnsNzuwKhqr","name":"strokeLine","brief":"","scope":"instance","type":"MethodDoc","description":"Stroke a line of the given two points
","params":[{"identifier":"startX","optional":false,"description":"the start x coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"startY","optional":false,"description":"the start y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"endX","optional":false,"description":"the end x coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"endY","optional":false,"description":"the end y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"iFV9Uv5_PDu0BdeFILMy9","name":"strokePoint","brief":"","scope":"instance","type":"MethodDoc","description":"Stroke a Point at the specified coordinates
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"-6OzZD7e96a1KAj31-Hkk","name":"strokePolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Stroke the given me.Polygon on the screen
","params":[{"identifier":"poly","optional":false,"description":"the shape to draw
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}},{"identifier":"fill","optional":true,"default":"false","description":"also fill the shape with the current color if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"QColvVrFDODO_AROGmHak","name":"strokeRect","brief":"","scope":"instance","type":"MethodDoc","description":"Stroke a rectangle at the specified coordinates
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"fill","optional":true,"default":"false","description":"also fill the shape with the current color if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"6c0LjVa5Dlj7O59oa3ELs","name":"strokeRoundRect","brief":"","scope":"instance","type":"MethodDoc","description":"Stroke a rounded rectangle at the specified coordinates
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"fill","optional":true,"default":"false","description":"also fill the shape with the current color if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"eeH4WTywPHVW_MBjz3Lgn","name":"tint","brief":"","scope":"instance","type":"MethodDoc","description":"tint the given image or canvas using the given color
","params":[{"identifier":"src","optional":false,"description":"the source image to be tinted
","dataType":{"tokens":[{"value":"HTMLImageElement | HTMLCanvasElement | OffscreenCanvas","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"OffscreenCanvas","kind":"canonical"}],"template":"%1 | %2 | %3"}},{"identifier":"color","optional":false,"description":"the color that will be used to tint the image
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"mode","optional":true,"default":"\"multiply\"","description":"the composition mode used to tint the image
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"a new canvas or offscreencanvas (if supported) element representing the tinted image
","dataType":{"tokens":[{"value":"HTMLCanvasElement | OffscreenCanvas","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"OffscreenCanvas","kind":"canonical"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"fSJZoxu3hiHOk9x8nMMo1","name":"toBlob","brief":"","examples":[{"caption":"","code":"renderer.convertToBlob().then((blob) => console.log(blob));"}],"scope":"instance","type":"MethodDoc","description":"creates a Blob object representing the last rendered frame
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning a Blob object representing the last rendered frame
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"pXWk7bvsUtsEP4IoD3z6I","name":"toDataURL","brief":"","examples":[{"caption":"","code":"renderer.toDataURL().then((dataURL) => console.log(dataURL));"}],"scope":"instance","type":"MethodDoc","description":"returns a data URL containing a representation of the last frame rendered
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning a string containing the requested data URL.
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Ohu0smPZEXyIHZUb5eNyH","name":"toImageBitmap","brief":"","examples":[{"caption":"","code":"renderer.transferToImageBitmap().then((image) => console.log(image));"}],"scope":"instance","type":"MethodDoc","description":"creates an ImageBitmap object of the last frame rendered\n(not supported by standard Canvas)
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning an ImageBitmap.
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZVspU1PYXGSiBlyGHnDAL","name":"transform","brief":"","scope":"instance","see":["{@link CanvasRenderer.setTransform} which will reset the current transform matrix prior to performing the new transformation"],"type":"MethodDoc","description":"Multiply given matrix into the renderer tranformation matrix
","params":[{"identifier":"a","optional":false,"description":"a matrix2d to transform by, or a the a component to multiply the current matrix by
","dataType":{"tokens":[{"value":"Matrix2d | number","kind":"canonical"},{"value":"Matrix2d","kind":"link"},{"value":"number","kind":"canonical"}],"template":"%1 | %2"}},{"identifier":"b","optional":false,"description":"the b component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"c","optional":false,"description":"the c component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"d","optional":false,"description":"the d component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"e","optional":false,"description":"the e component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"f","optional":false,"description":"the f component to multiply the current matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"91AxyupMsPoHwKBWqtb2V","name":"translate","brief":"","scope":"instance","type":"MethodDoc","description":"adds a translation transformation to the current matrix.
","params":[{"identifier":"x","optional":false,"description":"Distance to move in the horizontal direction. Positive values are to the right, and negative to the left.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Distance to move in the vertical direction. Positive values are down, and negative are up.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"DTzQLMRE7U8oENrg0dZK5","name":"CanvasRenderTarget","brief":"CanvasRenderTarget is 2D render target which exposes a Canvas interface.
","type":"ClassDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"1UMlOrWAVPxDG8WYjXeXW","name":"height","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The height of this canvas texture in pixels
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dp9RgKNYMnY3rjGv2RRd0","name":"width","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The width of this canvas texture in pixels
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VphVs6N2cJXdZuvByRWQ4","name":"clear","brief":"Clears the content of the canvas texture
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mv4awYs62vK0AD8WuPgV_","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"width","optional":false,"description":"the desired width of the canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"the desired height of the canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"attributes","optional":false,"description":"The attributes to create both the canvas and context
","dataType":{"tokens":[{"value":"Settings","kind":"canonical"},{"value":"Settings","kind":"canonical"}],"template":"%1"}},{"identifier":"attributes.context","optional":true,"default":"\"2d\"","description":"the context type to be created ("2d", "webgl")
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"attributes.preferWebGL1","optional":true,"default":"false","description":"set to true for force using WebGL1 instead of WebGL2 (if supported)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"attributes.transparent","optional":true,"default":"false","description":"specify if the canvas contains an alpha channel
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"attributes.offscreenCanvas","optional":true,"default":"false","description":"will create an offscreenCanvas if true instead of a standard canvas
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"attributes.willReadFrequently","optional":true,"default":"false","description":"Indicates whether or not a lot of read-back operations are planned
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"attributes.antiAlias","optional":true,"default":"false","description":"Whether to enable anti-aliasing, use false (default) for a pixelated effect.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"sNI_h3ZaD6KtjJh2w3rpl","name":"getImageData","brief":"","scope":"instance","type":"MethodDoc","description":"Returns an ImageData object representing the underlying pixel data for a specified portion of this canvas texture.\n(Note: ...","params":[{"identifier":"x","optional":false,"description":"
The x-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"The y-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to t...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"
The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"The ImageData extracted from this CanvasRenderTarget.
","dataType":{"tokens":[{"value":"ImageData","kind":"canonical"},{"value":"ImageData","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"f478v1DfrRDf5KHSJ1rEX","name":"invalidate","brief":"","scope":"instance","type":"MethodDoc","description":"invalidate the current CanvasRenderTarget, and force a reupload of the corresponding texture\n(call this if you modify the ...","params":[{"identifier":"renderer","optional":false,"description":"
the renderer to which this canvas texture is attached
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"jUTBrhGkhEu68TOcKcG4m","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"Resizes the canvas texture to the given width and height.
","params":[{"identifier":"width","optional":false,"description":"the desired width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"the desired height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"NyPxms25nyDn1qpx0JAsf","name":"setAntiAlias","brief":"","scope":"instance","type":"MethodDoc","description":"enable/disable image smoothing (scaling interpolation)
","params":[{"identifier":"enable","optional":true,"default":"false","description":"whether to enable or not image smoothing (scaling interpolation)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"6b5FCnNHTNHuoI2nVSTn4","name":"toBlob","brief":"","examples":[{"caption":"","code":"renderTarget.convertToBlob().then((blob) => console.log(blob));"}],"scope":"instance","type":"MethodDoc","description":"creates a Blob object representing the image contained in this canvas texture
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning a Blob object representing the image contained in this canvas texture
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6UreinxWYkCW3xSO4ghg3","name":"toDataURL","brief":"","examples":[{"caption":"","code":"renderer.toDataURL().then((dataURL) => console.log(dataURL));"}],"scope":"instance","type":"MethodDoc","description":"returns a data URL containing a representation of the most recently rendered image of this canvas texture\n(not supported b...","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"
A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning a string containing the requested data URL.
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FnNlTXqVV-Ys8zCOtpuu3","name":"toImageBitmap","brief":"","examples":[{"caption":"","code":"renderTarget.transferToImageBitmap().then((bitmap) => console.log(bitmap));"}],"scope":"instance","type":"MethodDoc","description":"creates an ImageBitmap object from the most recently rendered image of this canvas texture
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning an ImageBitmap.
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"HsEAr_Ihyv59TG9JU9Swm","name":"CanvasTexture","brief":"","deprecated":"since 17.1.0","see":["CanvasRenderTarget"],"type":"ClassDoc","params":[],"returns":[],"extends":["CanvasRenderTarget"],"implements":[],"members":[{"id":"ex_7LQ8--wO0rGYpq6XV3","name":"height","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The height of this canvas texture in pixels
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9BevrQvNqPF6ZJmeO_l6M","name":"width","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The width of this canvas texture in pixels
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"arosDKfFLR-kB3udeX1Qu","name":"clear","brief":"Clears the content of the canvas texture
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0C4NXScbgCL_IWW3izQSZ","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"width","optional":false,"description":"the desired width of the canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"the desired height of the canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"attributes","optional":false,"description":"The attributes to create both the canvas and context
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"attributes.context","optional":true,"default":"\"2d\"","description":"the context type to be created ("2d", "webgl", "webgl2")
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"attributes.offscreenCanvas","optional":true,"default":"false","description":"will create an offscreenCanvas if true instead of a standard canvas
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"attributes.willReadFrequently","optional":true,"default":"false","description":"Indicates whether or not a lot of read-back operations are planned
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"attributes.antiAlias","optional":true,"default":"false","description":"Whether to enable anti-aliasing, use false (default) for a pixelated effect.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"TsS_lbkFFXQqwhva8ECJ3","name":"getImageData","brief":"","scope":"instance","type":"MethodDoc","description":"Returns an ImageData object representing the underlying pixel data for a specified portion of this canvas texture.\n(Note: ...","params":[{"identifier":"x","optional":false,"description":"
The x-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"The y-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to t...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"
The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"The ImageData extracted from this CanvasRenderTarget.
","dataType":{"tokens":[{"value":"ImageData","kind":"canonical"},{"value":"ImageData","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jT_OSTub7Vqz32ImJxwt7","name":"invalidate","brief":"","scope":"instance","type":"MethodDoc","description":"invalidate the current CanvasRenderTarget, and force a reupload of the corresponding texture\n(call this if you modify the ...","params":[{"identifier":"renderer","optional":false,"description":"
the renderer to which this canvas texture is attached
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"1t3h8WQvEjb1-y8e5yWcW","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"Resizes the canvas texture to the given width and height.
","params":[{"identifier":"width","optional":false,"description":"the desired width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"the desired height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"VioWqNmndArh86CL1ge3M","name":"setAntiAlias","brief":"","scope":"instance","type":"MethodDoc","description":"enable/disable image smoothing (scaling interpolation)
","params":[{"identifier":"enable","optional":true,"default":"false","description":"whether to enable or not image smoothing (scaling interpolation)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"5AXqBDFHIOHHgc0QXf454","name":"toBlob","brief":"","examples":[{"caption":"","code":"renderTarget.convertToBlob().then((blob) => console.log(blob));"}],"scope":"instance","type":"MethodDoc","description":"creates a Blob object representing the image contained in this canvas texture
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning a Blob object representing the image contained in this canvas texture
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jdJS4ZQC1LgLUJEBoL0Cl","name":"toDataURL","brief":"","examples":[{"caption":"","code":"renderer.toDataURL().then((dataURL) => console.log(dataURL));"}],"scope":"instance","type":"MethodDoc","description":"returns a data URL containing a representation of the most recently rendered image of this canvas texture\n(not supported b...","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"
A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning a string containing the requested data URL.
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RGW95n9jL30c65WiAWKrg","name":"toImageBitmap","brief":"","examples":[{"caption":"","code":"renderTarget.transferToImageBitmap().then((bitmap) => console.log(bitmap));"}],"scope":"instance","type":"MethodDoc","description":"creates an ImageBitmap object from the most recently rendered image of this canvas texture
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning an ImageBitmap.
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"7IAihFZNjRza2DhnB9hgQ","name":"Collectable","brief":"","type":"ClassDoc","description":"a basic collectable helper class for immovable object (e.g. a coin)
","params":[],"returns":[],"extends":["Sprite"],"implements":[],"members":[{"id":"qLcRZXB875rMIoSmpZR2x","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-JeXee_erMykKDSfl9gGt","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NkncZXoogQRCvjXyQq9Dm","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"370UEENd-EORl_lhPX31d","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0Qp2yk64VJGCSds1wClxc","name":"animationpause","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7tar7gJAThtNFBwciV3cP","name":"animationspeed","brief":"","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"
animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"63ITLtPrNEnp1cPTxY01p","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vCQU-HzS8VdIezIskSdv7","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wZSo9Z3AinXRgor9aURan","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5n751BEOANFFhUusT5lbJ","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xPZTvI6DS4pZ8FwHeNJkm","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-rPsziqknac4mNf1F9N-7","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lzPW-co2sqTeeBzROBYn1","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wmf5N_cYosPBMT2UvV_s8","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WXY19rgvG6Ee6N039aTAe","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iPGxpWn32g4L_vcCZgd7x","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JSlFN5Xj5l23GxANQXsq4","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8oWGvlaUNKyaqKrotsgj3","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OKSKnxGx9jNSCLSazuE0a","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oagGff03p5nm9FoNmiCVF","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g6xERKB72DpaxDjwd5wXW","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6xtaIikh1Ru-pli3csboy","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z5cV3C50D_IjFj-TbeLwl","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hYnBOLGngoiWec5T1aaCz","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dLwaQX4XjX7lqhwLQ-VwW","name":"isVideo","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if this is a video sprite (e.g. a HTMLVideoElement was passed as as source)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4R7T6f6QArxqB8F-doLRO","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"48JsRnRwQsHCR0jUR9rN7","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xz7Jf06jaiFCClMWsz8yM","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Bl5e0fT3I_nBBTlrJ40B8","name":"offset","brief":"","defaultValue":"<0.0,0.0>","scope":"instance","type":"PropertyDoc","description":"global offset for the position to draw from on the source image.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bdsgBWSS98wOaabRCgJ-q","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ksShqPzU3dLNpoCj5c-sV","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LwGuv47k4Uzmt_dnp7JXn","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zq8lPTPtPIOwvjXRh-dEU","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XBhV3ANeXf4_voJW85cPF","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V7lzC8xSuFeUrxtW0n4Ht","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RQ3bzXZNYboeqdcJXwA0p","name":"source","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6cYjB4wrNPPAHktXERUvR","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aZwGk6y1wsVtzRtbIFS_6","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DUqs-2xclB78HDmXcIORz","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zSya7gu5WzGsd07Dbe8Aq","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3OpvDb1wxxTV_5o1wnHLO","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wP9Dy8zER5EZuuRclLTrV","name":"addAnimation","brief":"","examples":[{"caption":"","code":"// walking animation\nthis.addAnimation(\"walk\", [ 0, 1, 2, 3, 4, 5 ]);\n// standing animation\nthis.addAnimation(\"stand\", [ 11, 12 ]);\n// eating animation\nthis.addAnimation(\"eat\", [ 6, 6 ]);\n// rolling animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ]);\n// slower animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ], 200);\n// or get more specific with delay for each frame. Good solution instead of repeating:\nthis.addAnimation(\"turn\", [{ name: 0, delay: 200 }, { name: 1, delay: 100 }])\n// can do this with atlas values as well:\nthis.addAnimation(\"turn\", [{ name: \"turnone\", delay: 200 }, { name: \"turntwo\", delay: 100 }])\n// define an dying animation that stop on the last frame\nthis.addAnimation(\"die\", [{ name: 3, delay: 200 }, { name: 4, delay: 100 }, { name: 5, delay: Infinity }])\n// set the standing animation as default\nthis.setCurrentAnimation(\"stand\");"}],"scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"add an animation \nFor fixed-sized cell sprite sheet, the index list must follow the\nlogic as per the following example...","params":[{"identifier":"name","optional":false,"description":"
animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"index","optional":false,"description":"list of sprite index or name defining the animation. Can also use objects to specify delay for each frame, see below
","dataType":{"tokens":[{"value":"Array | Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1<%2> | %3 | %4"}},{"identifier":"animationspeed","optional":true,"description":"cycling speed for animation in ms
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"frame amount of frame added to the animation (delay between each frame).
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"7oyslXLYPGbES1wKeveZW","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XaEtLLhoZaXrE9xnRRVN2","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2IDDyxyeQNz13bL7AZvdH","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RY1s-oEQYbV562HdfqI1t","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinates of the collectable
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinates of the collectable
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"See {@link Sprite}
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"rYkMPyDqz3n_4ZV421zBw","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"52eF1t0W6JzkAyNYAFJdf","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Pq7nNvvVFmiaSHkCo7K0s","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4YgmPcI6N66wPEeYZWMGp","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"gITs-BHeg8wicuZop4ylw","name":"flicker","brief":"","examples":[{"caption":"","code":"// make the object flicker for 1 second\n// and then remove it\nthis.flicker(1000, function () {\n world.removeChild(this);\n});"}],"scope":"instance","type":"MethodDoc","description":"make the object flicker
","params":[{"identifier":"duration","optional":false,"description":"expressed in milliseconds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"callback","optional":false,"description":"Function to call when flickering ends
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9wkvB76Z_Kby9IcO0fhfu","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"pnylOiLfmpB4hMD_ctxdq","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RBubm2Mg50nbwM3e1s01I","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4N_zVAsBEf3ZmIetFTLOx","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PuIAlTKnlTT8UmHFKgaMn","name":"getCurrentAnimationFrame","brief":"","scope":"instance","type":"MethodDoc","description":"return the current animation frame index.
","params":[],"returns":[{"description":"current animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-KdQgy3ktG3QyBauZGAUh","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"pXIFY7neZesFjingeF0y1","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"azxk44VViFujFJsR2fFPp","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"cVs5QQjKmA3sZ2iLhG9cY","name":"isCurrentAnimation","brief":"","examples":[{"caption":"","code":"if (!this.isCurrentAnimation(\"walk\")) {\n // do something funny...\n}"}],"scope":"instance","type":"MethodDoc","description":"return true if the specified animation is the current one.
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"7_Uvpoo52EFj_Z2F5OOAk","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"xD7CFeERZsfEWKJWJLHoy","name":"isFlickering","brief":"","scope":"instance","type":"MethodDoc","description":"return the flickering state of the object
","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"QemhTw7koohCkdgVkK6UJ","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Vm0_2Xew3M4WimZ9O4DwQ","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"2j0uwPvnwyE6DuMnjo1MD","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bfhHd77fVoEVZxEk3ZDmj","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"eMoGoRSeT1b1fi5H3LeVH","name":"pause","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qBQDmnBS_sc61P_krKoPz","name":"play","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3TTkyKK8rFVYll0QY1ItB","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"b5W8TaSCTKQoF2S7lX19L","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"pmRVpuUE9ErIqy19mjAbo","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"R0tnDYsI9GWmNIVU142Ed","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"1utJ5vtDkeamaiLjCFU0J","name":"reverseAnimation","brief":"","scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"reverse the given or current animation if none is specified
","params":[{"identifier":"name","optional":true,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"efI_vZ0syMzkrZBpr0GBd","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AYSfUqyyL4nN_EIPu-oth","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vC5A9FB_7TVR9nSvHcGY_","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zLEdQ5ehMEGhNjBMNvojk","name":"setAnimationFrame","brief":"","examples":[{"caption":"","code":"// reset the current animation to the first frame\nthis.setAnimationFrame();"}],"scope":"instance","type":"MethodDoc","description":"force the current animation frame index.
","params":[{"identifier":"index","optional":true,"default":"0","description":"animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5DUHZN4oVYWdwuuzG6Z8k","name":"setCurrentAnimation","brief":"","examples":[{"caption":"","code":" // set \"walk\" animation\n this.setCurrentAnimation(\"walk\");\n\n // set \"walk\" animation if it is not the current animation\n if (this.isCurrentAnimation(\"walk\")) {\n this.setCurrentAnimation(\"walk\");\n }\n\n // set \"eat\" animation, and switch to \"walk\" when complete\n this.setCurrentAnimation(\"eat\", \"walk\");\n\n // set \"die\" animation, and remove the object when finished\n this.setCurrentAnimation(\"die\", () => {\n world.removeChild(this);\n return false; // do not reset to first frame\n });\n\n // set \"attack\" animation, and pause for a short duration\n this.setCurrentAnimation(\"die\", () => {\n this.animationpause = true;\n\n // back to \"standing\" animation after 1 second\n setTimeout(function () {\n this.setCurrentAnimation(\"standing\");\n }, 1000);\n\n return false; // do not reset to first frame\n });"}],"scope":"instance","type":"MethodDoc","description":"set the current animation\nthis will always change the animation & set the frame to zero
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"resetAnim","optional":true,"description":"animation id to switch to when complete, or callback
","dataType":{"tokens":[{"value":"string | Function","kind":"canonical"}],"template":"string | Function"}},{"identifier":"preserve_dt","optional":true,"default":"false","description":"if false will reset the elapsed time counter since last frame
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"YoQH_UkxVF-pB_gWSGFzT","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"UR9kJP9uERHrBAL3FJCz6","name":"setRegion","brief":"","examples":[{"caption":"","code":"// change the sprite to \"shadedDark13.png\";\nmySprite.setRegion(mytexture.getRegion(\"shadedDark13.png\"));"}],"scope":"instance","see":["Texture.getRegion"],"type":"MethodDoc","description":"change the current texture atlas region for this sprite
","params":[{"identifier":"region","optional":false,"description":"typically returned through me.Texture.getRegion()
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"S0uZCSK-B3CKCMR2qJw7y","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"P9vZsm2ZJEJ0D1nyL-P9y","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"pcxh4KV7NSIewF_Wq4c8W","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"sDCAmse-5-q7N1tYpzSNV","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UpPRLl2bw17zoSAELKUXM","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"erc0aVoFOZS1e8pzlZZjq","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AOXtUmK4OEAgtDQtXgkIp","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_W9jwyWWlCiuaQVKY5J37","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Mk_Isd9Brm2byrVWDYkY4","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"utPlYJAD18gu7LEAy_mV2","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nhx_uDJBWcfEh3SP_DLlD","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this srite (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"tACnIit8ECgdYcSc6cV3b","name":"update","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"update function. \nautomatically called by the game manager {@link game}
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the Sprite is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ch_JgLFY7R8fHu5lnhjTQ","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"3ZMWy7D8KdGgGY96cpY-0","name":"Color","brief":"","type":"ClassDoc","description":"A color manipulation object.
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"3nu26kL6WYhYJXgzDZGzh","name":"alpha","brief":"","scope":"instance","type":"PropertyDoc","description":"Color Alpha Component [0.0 .. 1.0]
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QsjgoWP_DkPqZTaMxH3OL","name":"b","brief":"","scope":"instance","type":"PropertyDoc","description":"Color Blue Component [0 .. 255]
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"G0pdRsQemR-AUMXRKSD7x","name":"g","brief":"","scope":"instance","type":"PropertyDoc","description":"Color Green Component [0 .. 255]
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z-6TbtQOtPsmp_RKnOmE0","name":"r","brief":"","scope":"instance","type":"PropertyDoc","description":"Color Red Component [0 .. 255]
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WiHU0cnYkPF67wbWbInLp","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"Blend this color with the given one using addition.
","params":[{"identifier":"color","optional":false,"dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gfc-fAmEODvGrfw_uS7f1","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"Create a new copy of this color object.
","params":[],"returns":[{"description":"Reference to the newly cloned object
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"sZNhpoeZng-K5NBCTW3on","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"r","optional":true,"default":"0","description":"red component [0 .. 255]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"g","optional":true,"default":"0","description":"green component [0 .. 255]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"b","optional":true,"default":"0","description":"blue component [0 .. 255]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"alpha","optional":true,"default":"1.0","description":"alpha value [0.0 .. 1.0]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"cp0U9EkmE7NSMtYM4ASOV","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"Copy a color object or CSS color into this one.
","params":[{"identifier":"color","optional":false,"dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-LQ2MpSaW3VIWxVD52vXX","name":"darken","brief":"","scope":"instance","type":"MethodDoc","description":"Darken this color value by 0..1
","params":[{"identifier":"scale","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8gZjbuzMcDhWWZq1TIClG","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"Return true if the r,g,b,a values of this color are equal with the\ngiven one.
","params":[{"identifier":"color","optional":false,"dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"T5_tian9U-GCRPB0YZ-TP","name":"lerp","brief":"","scope":"instance","type":"MethodDoc","description":"Linearly interpolate between this color and the given one.
","params":[{"identifier":"color","optional":false,"dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}},{"identifier":"alpha","optional":false,"description":"with alpha = 0 being this color, and alpha = 1 being the given one.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Z-44tr7LO9bBcskT8eCXe","name":"lighten","brief":"","scope":"instance","type":"MethodDoc","description":"Lighten this color value by 0..1
","params":[{"identifier":"scale","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"aM-pyDVXUisKD_f04sWNY","name":"parseCSS","brief":"","scope":"instance","type":"MethodDoc","description":"Parse a CSS color string and set this color to the corresponding\nr,g,b values
","params":[{"identifier":"cssColor","optional":false,"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RIQMUqKCtng3WKoZ2Q83X","name":"parseHex","brief":"","scope":"instance","type":"MethodDoc","description":"Parse a Hex color ("#RGB", "#RGBA" or "#RRGGBB", "#RRGGBBAA" format) and set this ...","params":[{"identifier":"hexColor","optional":false,"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"argb ","optional":true,"default":" false","description":"
true if format is #ARGB, or #AARRGGBB (as opposed to #RGBA or #RGGBBAA)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jOtNuX5kqy1RYoTlpKXOq","name":"parseRGB","brief":"","scope":"instance","type":"MethodDoc","description":"Parse an RGB or RGBA CSS color string
","params":[{"identifier":"rgbColor","optional":false,"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"c3qx_gb1MT4BaniiXOHyU","name":"random","brief":"","scope":"instance","type":"MethodDoc","description":"Generate random r,g,b values for this color object
","params":[{"identifier":"min","optional":true,"default":"0","description":"minimum value for the random range
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"max","optional":true,"default":"255","description":"maxmium value for the random range
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nfipfv_xt0hHV40t7RXcq","name":"setColor","brief":"","scope":"instance","type":"MethodDoc","description":"Set this color to the specified value.
","params":[{"identifier":"r","optional":false,"description":"red component [0 .. 255]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"g","optional":false,"description":"green component [0 .. 255]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"b","optional":false,"description":"blue component [0 .. 255]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"alpha","optional":true,"default":"1.0","description":"alpha value [0.0 .. 1.0]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Y5IAU1W72k3OgJ18TAkwx","name":"setFloat","brief":"","scope":"instance","type":"MethodDoc","description":"set this color to the specified normalized float values
","params":[{"identifier":"r","optional":false,"description":"red component [0.0 .. 1.0]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"g","optional":false,"description":"green component [0.0 .. 1.0]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"b","optional":false,"description":"blue component [0.0 .. 1.0]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"alpha","optional":true,"default":"1.0","description":"alpha value [0.0 .. 1.0]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Eg8-1MLCGNjlhJqeEPTIf","name":"setHSL","brief":"","scope":"instance","type":"MethodDoc","description":"set this color to the specified HSL value
","params":[{"identifier":"h","optional":false,"description":"hue (a value from 0 to 1)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"s","optional":false,"description":"saturation (a value from 0 to 1)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"l","optional":false,"description":"lightness (a value from 0 to 1)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gQLOL6jLM9OagiSNHonlx","name":"setHSV","brief":"","scope":"instance","type":"MethodDoc","description":"set this color to the specified HSV value
","params":[{"identifier":"h","optional":false,"description":"hue (a value from 0 to 1)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"s","optional":false,"description":"saturation (a value from 0 to 1)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":false,"description":"value (a value from 0 to 1)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"sXQ8d2c3nYAAlBv0WkDO9","name":"toArray","brief":"","scope":"instance","type":"MethodDoc","description":"return an Float Array representation of this object
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Float32Array","kind":"canonical"},{"value":"Float32Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"HGanYC2RzurSqisCDHZ_3","name":"toHex","brief":"","scope":"instance","type":"MethodDoc","description":"return the color in "#RRGGBB" format
","params":[],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"OWZlXDgSM5Cy97yruQF1E","name":"toHex8","brief":"","scope":"instance","type":"MethodDoc","description":"Get the color in "#RRGGBBAA" format
","params":[{"identifier":"alpha","optional":false}],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"avU0ShYVhwfgfgnRDLWLf","name":"toRGB","brief":"","scope":"instance","type":"MethodDoc","description":"Get the color in "rgb(R,G,B)" format
","params":[],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"m4l3z3gV7wO0IijiZB7hb","name":"toRGBA","brief":"","scope":"instance","type":"MethodDoc","description":"Get the color in "rgba(R,G,B,A)" format
","params":[{"identifier":"alpha","optional":true,"default":"1.0","description":"alpha value [0.0 .. 1.0]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"g5WeDJsUu-_4tm8-FZzH9","name":"toUint32","brief":"","scope":"instance","type":"MethodDoc","description":"Pack this color RGB components into a Uint32 ARGB representation
","params":[{"identifier":"alpha","optional":true,"default":"1.0","description":"alpha value [0.0 .. 1.0]
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"eEi3J0UBF7iZm-HuLc5pv","name":"ColorLayer","brief":"","type":"ClassDoc","description":"a generic Color Layer Object. Fills the entire Canvas with the color not just the container the object belongs to.
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"pNFAYEd60HQQ6fGUoV6aW","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HCAA9FkLjdH6bx7_62u0X","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JJESVn7vUrro-mlZNNwCE","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lwVzm-MCBZ7XGR7yg_UnI","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sFhetCp_zysf5qxI85DsD","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GofsjtbAjO9f5OmR00FU2","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3Uh-NFNBsD2qh6vmhezEX","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oOXemDmZMce2P0VfauwEX","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"llp9LLTCr29IIWW1J_bZm","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wXFonQrCM7GKUurbrVfYy","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d19gCSMyz__MBEzkmRjmi","name":"color","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the layer color component
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GdjCM1FQdF2bdvHXRez2U","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j_gmr2E51HY0w7NpoHWT-","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"17MZWjMJah_geKugwbCSn","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"66FQ2t1jHv4DehHioeWb5","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LmAmUiwUpdkRPyKKN9Q06","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8rt3HySahdj1AEctnK8Ic","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"04w3U5hbgT8JuIYKsHfrw","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hRu9Vkp1aqv4JcFTsB94_","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"go-lsnbZAlZimuU00LMaU","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BnGoljaPLIUwsCjRLqRSX","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9fFh_xsV_EWBrbxegJNco","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bJQ64rvDymfK21ugmwovP","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Gsp3JwmdiebXawGZOYtTg","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i7CCpfh5HkI8xBDllOE9M","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"J_Wnd6jprBU40drDLiTXh","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FQp8ZaxspBb45K9z0m5xS","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wqCIOK9nYZEEMCe6CJyYq","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"257lJAlIi6c-x2yw1rIRc","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qWzOgkl_sEUvaaUQ7WMwE","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HGV1w0dIbUSwrF7t8yX2w","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rkiFsq4TCTW5KyeW4E8hW","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HkBPE1nZ8re3jPs1Jlz1W","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"t9DTK3LvJiOQL1Q-BhEht","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U_dpiK75HHYaQZcfzY3JT","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KH1iydla-umMS7cineUje","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bXfAIiNoVEUSHy3KLjDBP","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9zd4m6GxcvB1TKw5Ty9QE","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3Ivwuceg8oxcRZ6tpPkXQ","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_zfl-QBrP9fHYqzjB9kdC","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"98qvn7RRFBnPN98OubSuL","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"name","optional":false,"description":"Layer name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"color","optional":false,"description":"CSS color
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"z ","optional":true,"default":" 0","description":"z-index position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"yKr68fmU7uPFsIiMn5xDy","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"j6vjy7U36TjamiwaRzVD5","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vDwNU1PyqP5bDUk5L_EQJ","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"g8LbscdVVTP8et8aZInzk","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Yw30ythnxBqhrD6L3m_c6","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UO9oDh9GYwspnF_HDWK9v","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UTiNKsooJZsn9bzR0j1K6","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"u3rWu2Pgo3lRL50IwogZD","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JrfoU0F2hy_j4LALveo7_","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"3F-ws1_Sd0hnvsbgg-9Ij","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lGJ5VjvMoFXIHyjJwzk3h","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"2tOaPa62fujLLNlnm_T3m","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ZNcECJcHKnyQa1QYPuwql","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4YpvtPZr05zYhGm6BsFuV","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Eu3AXplk-pRiP9dx-8MFS","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d7PxyYHnQqCsLwON-dIMs","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ghncvvSKc_a_ergGpZH6k","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"h9Hs-e_9kOezEQRq7tbIQ","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"C-kSFQikAWnOxGWwQuHmQ","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Il3ZYaU2rqndnerbxY-V_","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ayye31Axnuqc8ytN48sPs","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XNqAdEvwk0l1mDTGwDO6W","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nQUjCrg6MF9pft82bPgor","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vM0X4O1dEzhleznY-uNhN","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"jSrBto5yBzJlzfpuOT420","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2FcEGCCU6X2xv_HfHsVtZ","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"D0OxFKnlfC1l2k4ul8dJk","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"YcLc8ICyAxfhcdXBR8e91","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wOv0IJEOL_-uPjTxN3It5","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FqGngBTYz-AY-ROnTYpqt","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kvxdkuSWWDjbDDjBDvhDD","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qqXQLuCtHvccnyOJT9b8M","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jR6Y8Xz7iQ5CYO6_4wLlj","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Xb7u5paUEmwv8fm7eZ90j","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"4J7oUCA5Qumt4Ws8x7kan","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UBPdrxgofziQihu7QtgDS","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this color layer (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"g4T6YjY2WqrbYxLWd8THU","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"80V8TIBcawcc17bsD9-7F","name":"Compositor","brief":"","type":"ClassDoc","description":"A base Compositor object.
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"vNqRylqrr6dZ-1T7tbALb","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"an array of vertex attribute properties
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"si30D6Xm34tqo2rFn23KS","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the shader currently used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tNJqLOroF2_RfCIo4N87f","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the default shader created by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5QVBgMgBE8T_mfao3lbY7","name":"mode","brief":"","defaultValue":"gl.TRIANGLES","scope":"instance","type":"PropertyDoc","description":"primitive type to render (gl.POINTS, gl.LINE_STRIP, gl.LINE_LOOP, gl.LINES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN, gl.TRIANGL...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZnNFL3gx3jNlbwMDp0xe4","name":"vertexByteSize","brief":"","defaultValue":"0","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"
the size of a single vertex in bytes\n(will automatically be calculated as attributes definitions are added)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3WHRKYkdEbG2KbwAZ6kLL","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"the vertex data buffer used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6qj7R7RVYi0DDNJR01txZ","name":"vertexSize","brief":"","defaultValue":"0","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"the size of a single vertex in floats\n(will automatically be calculated as attributes definitions are added)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OkjWIO-SO1UAIlIbwrkuk","name":"addAttribute","brief":"","scope":"instance","type":"MethodDoc","description":"add vertex attribute property definition to the compositor
","params":[{"identifier":"name","optional":false,"description":"name of the attribute in the vertex shader
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"size","optional":false,"description":"number of components per vertex attribute. Must be 1, 2, 3, or 4.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"type","optional":false,"description":"data type of each component in the array
","dataType":{"tokens":[{"value":"GLenum","kind":"canonical"},{"value":"GLenum","kind":"canonical"}],"template":"%1"}},{"identifier":"normalized","optional":false,"description":"whether integer data values should be normalized into a certain range when being cast to a float
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"offset","optional":false,"description":"offset in bytes of the first component in the vertex attribute array
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"eB-PlOIoF7OlibQ4sBM7F","name":"bind","brief":"called by the WebGL renderer when a compositor become the current one
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HFxU5qL-A5F99KbaPrSYR","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"renderer","optional":false,"description":"the current WebGL renderer session
","dataType":{"tokens":[{"value":"WebGLRenderer","kind":"canonical"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"additional settings to initialize this compositors
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.attribute","description":"an array of attributes definition
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.attribute.name","description":"name of the attribute in the vertex shader
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.attribute.size","description":"number of components per vertex attribute. Must be 1, 2, 3, or 4.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.attribute.type","description":"data type of each component in the array
","dataType":{"tokens":[{"value":"GLenum","kind":"canonical"},{"value":"GLenum","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.attribute.normalized","description":"whether integer data values should be normalized into a certain range when being cast to a float
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"settings.attribute.offset","description":"offset in bytes of the first component in the vertex attribute array
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.shader","description":"an array of attributes definition
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.shader.vertex","description":"a string containing the GLSL source code to set
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.shader.fragment","description":"a string containing the GLSL source code to set
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"d0YFAYzwpYCElzE-t1QjR","name":"flush","brief":"","scope":"instance","type":"MethodDoc","description":"Flush batched vertex data to the GPU
","params":[{"identifier":"mode","optional":true,"default":"gl.TRIANGLES","description":"the GL drawing mode
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"jjz1dZLcUsva6bMq0qsIa","name":"setProjection","brief":"","scope":"instance","type":"MethodDoc","description":"set/change the current projection matrix
","params":[{"identifier":"matrix","optional":false,"description":"the new projection matrix
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"R0R3dceh6G5BEXw0KSrDL","name":"useShader","brief":"","scope":"instance","see":["GLShader"],"type":"MethodDoc","description":"Select the shader to use for compositing
","params":[{"identifier":"shader","optional":false,"description":"a reference to a GLShader instance
","dataType":{"tokens":[{"value":"GLShader","kind":"canonical"},{"value":"GLShader","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"P2NLSX81ENxVbBaB-pTEh","name":"Container","brief":"","type":"ClassDoc","description":"Container represents a collection of child objects
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"ScGZfig_5NCCGVdEkgc9L","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g2nNwEBsm4ZmZ6vP02mak","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MQ1KYpw2_WlQ8KT7-NcB2","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H_1oGpA9A34MR0dv6USdJ","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3b0GUWWsViRkUwOcLvBGA","name":"autoDepth","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"
Specify if the children z index should automatically be managed by the parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cU6YnLcSNqLeABtp5tFxT","name":"autoSort","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"Specify if the children list should be automatically sorted when adding a new child
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Puz7oRByNQcJs2kAuKGa-","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RcLNGAoCsam87hJkebPsC","name":"backgroundColor","brief":"","defaultValue":"(0, 0, 0, 0.0)","examples":[{"caption":"","code":"// add a red background color to this container\nthis.backgroundColor.setColor(255, 0, 0);"}],"scope":"instance","type":"PropertyDoc","description":"
define a background color for this container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lJgktEMGLphhF0tDDnquO","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SyaOETKGzcOodxxyL28pN","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DbUN90TSnUEBm7zbSgD3H","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yVaVpn014-IjmbQTgPbL2","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VAqY3849IqcLP-pSsug_b","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jOWwZs0wykGxoQh7VABnK","name":"clipping","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Specify if the container draw operation should clip his children to its own bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z4YV0neu5ukBozshFy-e3","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KbCcl3RN1F4BEf0QTIdOO","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ei6tX-h-bLd5GMYlFyBFA","name":"enableChildBoundsUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Specify if the container bounds should automatically take in account\nall child bounds when updated (this is expensive and ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5928XrZ2-vup5skfb8P_0","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"
If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9KOfRt29kDpDiv2wi8exJ","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K-vv2r1Aq_iIuThkAIr1V","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"79P_QuKeYSmS5zkO3DpaW","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JiN2XlEXUOmrtd1jfDWI8","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dds8VZLE44EA1EepmDNZ3","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r3oVz8RHqym_vmutfrqXV","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z90hUoLRnVssclCeksP2z","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wGbnuuM14If7c0q6lQxCs","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Lf6fTzvc0YhKDRBVSovIi","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"499MenSLoSZBYo38jrwKG","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_hKUHoj2hlgvgMIfPmMuf","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LeXX8gnoJ7MjhIMOA6okC","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8o83YVFQY-Xn8TVvFrqBE","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YtJVmQ5DiT-zwudOZxY4N","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Wgk2cUsL1myV8uUvUDpZl","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HVd4raoezPZTvYleU4WxN","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xp5ZRYT5nMbz7F4ZPmG8l","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fCLd2z7ChQuawtSVEAHp-","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"whether the container is the root of the scene
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c-dbDNlBmBvuFIHctNSem","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sTzDJ6VvuNLQ4M8F8A34-","name":"sortOn","brief":"","defaultValue":"\"z\"","scope":"instance","type":"PropertyDoc","description":"
The property of the child object that should be used to sort on this container\nvalue : "x", "y", "...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9UomFkbfeM2YC0HAulsHn","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OXm1nAMYk0XYD7V5wmCKD","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vHpMJhGboP_a6Cm6by99J","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C1IW9hvDr91v437Fx_KY2","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"55IS4q8NDeR2-PSvh_643","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rovSWk-JwjlMdaNqIUEnq","name":"addChild","brief":"","scope":"instance","type":"MethodDoc","description":"Add a child to the container \nif auto-sort is disable, the object will be appended at the bottom of the list.\nAdding a...","params":[{"identifier":"child","optional":false,"description":"
Child to be added
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}},{"identifier":"z","optional":true,"description":"forces the z index of the child to the specified value
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the added child
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lyFktOV1uQNiv9Pr4EQLk","name":"addChildAt","brief":"","scope":"instance","type":"MethodDoc","description":"Add a child to the container at the specified index \n(the list won't be sorted after insertion)
","params":[{"identifier":"child","optional":false,"description":"Child to be added
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}},{"identifier":"index","optional":false,"description":"The index at which to insert the child
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the added child
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Pclr4sNSm2mnqj2D8I6Y-","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"s-KKpcbjEX8fnWOB3gsJX","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KQGpBVL_nGUq-K48_NTud","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kEvSW6P8aUqGLiIZnG5nP","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":true,"default":"0","description":"position of the container (accessible via the inherited pos.x property)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"0","description":"position of the container (accessible via the inherited pos.y property)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":true,"default":"game.viewport.width","description":"width of the container
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":true,"default":"game.viewport.height","description":"height of the container
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Ukt3KduHZw-9qF12ndDh1","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"vw24Z6GlsoWB-dPYkH7VT","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kX69hABT-0w1m181wYtXx","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"pHynxbINAGEVI9X6kHdQB","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"bGKoPx2LPARKtvS9Wwa_5","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UoZX1_wKMjJYvo6aTuAHZ","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FnpiAx0maw1XeAp5TBazB","name":"forEach","brief":"","examples":[{"caption":"","code":"// iterate through all children of this container\ncontainer.forEach((child) => {\n // do something with the child\n child.doSomething();\n});\ncontainer.forEach((child, index) => { ... });\ncontainer.forEach((child, index, array) => { ... });\ncontainer.forEach((child, index, array) => { ... }, thisArg);"}],"scope":"instance","type":"MethodDoc","description":"The forEach() method executes a provided function once per child element. \nthe callback function is invoked with three...","params":[{"identifier":"callback","optional":false,"description":"
fnction to execute on each element
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"thisArg","optional":true,"description":"value to use as this(i.e reference Object) when executing callback.
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"k6VqSdmPk4IQRxI32GzOm","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Nfqv2dl5ADoe6FK_2hBux","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"z4Wwg3us8R4HVVKHSVSQP","name":"getChildAt","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the Child at the specified index
","params":[{"identifier":"index","optional":false,"description":"The index of the child
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the child at the specified index
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DsHTEXEczo7VscqlZuk0V","name":"getChildByGUID","brief":"","scope":"instance","type":"MethodDoc","description":"return the child corresponding to the specified GUID \nnote : avoid calling this function every frame since\nit parses th...","params":[{"identifier":"guid","optional":false,"description":"
child GUID
","dataType":{"tokens":[{"value":"string | RegExp | number | boolean","kind":"canonical"},{"value":"RegExp","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"string | %1 | %2 | boolean"}}],"returns":[{"description":"corresponding child or null
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XvHgjrLYodCpqemUD4IK4","name":"getChildByName","brief":"","scope":"instance","type":"MethodDoc","description":"returns the list of childs with the specified name \nas defined in Tiled (Name field of the Object Properties) \nnote ...","params":[{"identifier":"name","optional":false,"description":"
child name
","dataType":{"tokens":[{"value":"string | RegExp | number | boolean","kind":"canonical"},{"value":"RegExp","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"string | %1 | %2 | boolean"}}],"returns":[{"description":"Array of children
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"6vJ9i4nHe7sroJvXHfpCQ","name":"getChildByProp","brief":"","examples":[{"caption":"","code":" // get the first child object called \"mainPlayer\" in a specific container :\n let ent = myContainer.getChildByProp(\"name\", \"mainPlayer\");\n\n // or query the whole world :\n let ent = container.getChildByProp(\"name\", \"mainPlayer\");\n\n // partial property matches are also allowed by using a RegExp.\n // the following matches \"redCOIN\", \"bluecoin\", \"bagOfCoins\", etc :\n let allCoins = container.getChildByProp(\"name\", /coin/i);\n\n // searching for numbers or other data types :\n let zIndex10 = container.getChildByProp(\"z\", 10);\n let inViewport = container.getChildByProp(\"inViewport\", true);"}],"scope":"instance","type":"MethodDoc","description":"return the child corresponding to the given property and value. \nnote : avoid calling this function every frame since\ni...","params":[{"identifier":"prop","optional":false,"description":"
Property name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"value","optional":false,"description":"Value of the property
","dataType":{"tokens":[{"value":"string | RegExp | number | boolean","kind":"canonical"},{"value":"RegExp","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"string | %1 | %2 | boolean"}}],"returns":[{"description":"Array of childs
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"3wHXXNj6WscSwG1jukm55","name":"getChildByType","brief":"","scope":"instance","type":"MethodDoc","description":"returns the list of childs with the specified class type
","params":[{"identifier":"classType","optional":false,"description":"Class type
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"Array of children
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"iZpAnkJfkI0jkrED1wt8G","name":"getChildIndex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the index of the given Child
","params":[{"identifier":"child","optional":false,"description":"The child object
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[{"description":"index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kgfOnmqBOo9x18-MhXeUw","name":"getChildren","brief":"","scope":"instance","type":"MethodDoc","description":"return all child in this container
","params":[],"returns":[{"description":"an array of renderable object
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"HTVzfqg7PRrJ8shwzj_A0","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"oFEssP_Je90eqn6wYvE5x","name":"getNextChild","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the next child within the container or undefined if none
","params":[{"identifier":"child","optional":false,"description":"The child object
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[{"description":"child
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ctwbYYWvj5-XVWXiwrNQm","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"fqBaIqviNmUWyA-S-FIIM","name":"getRootAncestor","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the instance of the root container (i.e. the current application World container).
","params":[],"returns":[{"description":"root container
","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"G5vqWEXRDFPCecX36mCc8","name":"hasChild","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if contains the specified Child
","params":[{"identifier":"child","optional":false,"description":"The child object
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"VjB4lUkin0oSWavnxgFZP","name":"isAttachedToRoot","brief":"","scope":"instance","type":"MethodDoc","description":"Checks if this container is root or if it's attached to the root container.
","params":[],"returns":[{"description":"true if this container is root or if it's attached to the root container
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"wiON-5ZdAaf_BP7P38IeO","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"-cDlEox8JEJl3xQtFEAGi","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"7UKfAgfb8V18apfVQC9Ji","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SaupyNX-4t7auRzLhYu_b","name":"moveDown","brief":"","scope":"instance","type":"MethodDoc","description":"Move the child in the group one step backward (z depth).
","params":[{"identifier":"child","optional":false,"description":"Child to be moved
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"wuiaEBugaOlGBir1qPUFa","name":"moveToBottom","brief":"","scope":"instance","type":"MethodDoc","description":"Move the specified child the bottom (z depth).
","params":[{"identifier":"child","optional":false,"description":"Child to be moved
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"RJ8KHk77AomVvK2OsSK4u","name":"moveToTop","brief":"","scope":"instance","type":"MethodDoc","description":"Move the specified child to the top(z depth).
","params":[{"identifier":"child","optional":false,"description":"Child to be moved
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"2IKSrHBxz-gJ1GGVOeabB","name":"moveUp","brief":"","scope":"instance","type":"MethodDoc","description":"Move the child in the group one step forward (z depth).
","params":[{"identifier":"child","optional":false,"description":"Child to be moved
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"0QP8TSe71Be8t3d2nMRdb","name":"onChildChange","brief":"","scope":"instance","type":"MethodDoc","description":"a callback to be extended, triggered after a child has been added or removed
","params":[{"identifier":"index","optional":false,"description":"added or removed child index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Ajp7i8Rxf60k_6YEqjDm8","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"NXSFZkvobaHXBlWqn-K6Q","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OK9kw0wqMGeHGEW_MX3PF","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"m5s2FCv0apED5EmqivR9_","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"-nLkH9dE9rk5-emI-AwNh","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"gFmigwiyg_5nhhd-fssWQ","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kCvfuQSo7GnSkVOkqWr-J","name":"removeChild","brief":"","scope":"instance","type":"MethodDoc","description":"Invokes the removeChildNow in a defer, to ensure the child is removed safely after the update & draw stack has complet...","params":[{"identifier":"child","optional":false,"description":"
Child to be removed
","dataType":{"tokens":[{"value":"RendRenderable | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapTexterable","kind":"canonical"},{"value":"RendRenderable","kind":"canonical"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapTexterable","kind":"canonical"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15"}},{"identifier":"keepalive","optional":true,"default":"false","description":"true to prevent calling child.destroy()
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"6YQqeDybLkEPj0cxBpKJ4","name":"removeChildNow","brief":"","scope":"instance","type":"MethodDoc","description":"Removes (and optionally destroys) a child from the container. \n(removal is immediate and unconditional) \nNever use k...","params":[{"identifier":"child","optional":false,"description":"
Child to be removed
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}},{"identifier":"keepalive","optional":true,"default":"False","description":"True to prevent calling child.destroy()
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"Os7N7NmnOsL9y0tE6Vsgl","name":"reset","brief":"reset the container, removing all childrens, and reseting transforms.
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cfEQvKvvVWKdbfhl7p84d","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"R6OLFAFmpxewdQxz2mljX","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"yfCmlwrRo4KiCsVmHQRHg","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rcGX5KglZJXoncauJCCxT","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"aWcVspbTbohlh71v9qMXa","name":"setChildsProperty","brief":"","scope":"instance","type":"MethodDoc","description":"Automatically set the specified property of all childs to the given value
","params":[{"identifier":"prop","optional":false,"description":"property name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"value","optional":false,"description":"property value
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"recursive","optional":true,"default":"false","description":"recursively apply the value to child containers if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"fvn2XNhcE99BuMRJVEA-r","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"1ppN6pxQnQvK4GddZFRl5","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5d25ewoN9H_EaeNNDIPBx","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"62hYgty-S-_j0lmK4CKOR","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"de9LTDI2gYn0ZdhMcHc0y","name":"sort","brief":"","scope":"instance","type":"MethodDoc","description":"Manually trigger the sort of all the childs in the container
","params":[{"identifier":"recursive","optional":true,"default":"false","description":"recursively sort all containers if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"6T851ZACT6jRUOpRG4MjW","name":"swapChildren","brief":"","scope":"instance","type":"MethodDoc","description":"Swaps the position (z-index) of 2 children
","params":[{"identifier":"child","optional":false,"description":"Child to be added
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}},{"identifier":"child2","optional":false,"description":"Child to be added
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"B7-u56sz4y1EvHrUGxr-d","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QeCPMjA_ww7Z2YjeeCx7l","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jb9n0VBWqc6aIwu4jbVsz","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SL6OsBuzF0Ntov59HUeAx","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iDC4qe-5jspkkTPQHM5Y6","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4SxLe95aKvS6O1CuDi_Z5","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"q37Q9WYc_COptFywdDe6x","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this container.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this container bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mfCArEYk6OGGAvU8XGMf5","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this renderable (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"VW0eCLr-pokUykY8SAdQA","name":"update","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"container update function. \nautomatically called by the application update loop {@link Application}
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the Container is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"zyw6MnPu1iJEdzabpP2mh","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"UMHZYN0aJhWdBE3sHCpcq","name":"Detector","brief":"the Detector class contains methods for detecting collisions between bodies using a broadphase algorithm.
","type":"ClassDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"fV158ETwqr3fwCBZ8KtUf","name":"response","brief":"","scope":"instance","type":"PropertyDoc","description":"the default response object used for collisions\n(will be automatically populated by the collides functions)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dUPmaE2BSWDeJnQEKw2Ow","name":"collides","brief":"","scope":"instance","type":"MethodDoc","description":"detect collision between two bodies.
","params":[{"identifier":"bodyA","optional":false,"description":"a reference to body A.
","dataType":{"tokens":[{"value":"Body","kind":"canonical"},{"value":"Body","kind":"link"}],"template":"%1"}},{"identifier":"bodyB","optional":false,"description":"a reference to body B.
","dataType":{"tokens":[{"value":"Body","kind":"canonical"},{"value":"Body","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if colliding
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"3O7hNcH2Gb-17xxjLJqaY","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"world","optional":false,"description":"the physic world this detector is bind to
","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"TTVkAPHp5_MiCf4IY_9CL","name":"shouldCollide","brief":"","scope":"instance","type":"MethodDoc","description":"determine if two objects should collide (based on both respective objects body collision mask and type). \nyou can redef...","params":[{"identifier":"a","optional":false,"description":"
a reference to the object A.
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}},{"identifier":"b","optional":false,"description":"a reference to the object B.
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if they should collide, false otherwise
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]}]},{"id":"FtqP925HWmlxxbiJj__KM","name":"Draggable","brief":"","see":["DropTarget"],"type":"ClassDoc","description":"A Draggable base object
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"bp69Ik8GivNGiE8_AKe6F","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4uTvViiX2zpOwY7Vw2B--","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tEy0MIy8nQooB6PZsvMet","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xe0PTwhrOl_MEH_ZUKpoV","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"o3pUF-QzT0ndAP1S8c-1J","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2ASUanuiIti9I9-l5mOHm","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HlQz6F4D9sKV5pzbn-_4Q","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DcyaRmpgaVjLB12K6ofc7","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"itHolSrdepZ7nTetADUZq","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4j-2CHNIk4KMxs7oWhsqk","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j_oKzBZ93IBszbQceqe5X","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i9hHG8BqV-Fs5sbYYV8Fi","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NjR5VAJ-K4aA9iAxBwSce","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"frHMif7s_4Pf8R6uvPX_3","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n9cGJXLScWpmcpMONT-yg","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CJiMdnOy9loyR0pWlBDRF","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WggnJHVF3eSF9hwgFz7l4","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z5Yil7EH5h3AayM-iTlH0","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3zpIipv5Zibbe9jmpBu6A","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wKLzKiQlStNvHRE2jCYRj","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C_DG8yKo5pxH6fpS9cMKz","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jMDKnoHAw0tFRQQXprc6y","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CQ-4V6K-YcYD8DwJwfMr_","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FScxVKuPQojP7kZhDAS0S","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1BfJg-doLm2LtOPcXvgRO","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ydzyme0OJOgo5rTBYq6ur","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bPRXSrDOX9kxt-fiJA47I","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Kfjzz7AkD1a4fzJ3kQJLp","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zmJ2KKYMO9I5mpMLZWg6I","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6qnE5nlG3Y-r4udeeGelx","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yC-m8WOq2dpZ0Bmv7pkKt","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9ny5taiyuaLDN93T4fHlO","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZK2bSxiuPOvcCx4xjOWX_","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bXNpMkAGT-SHVcJjg8Yc0","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VO_S-hS5iFOQb9FeC1vNl","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CuNECWg4JfB2RwEZ_QNGO","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kx6Cqt-B3Uvra3UFc4yK7","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gfZrtfJLiHgxPkRsTo3Ck","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VOQgMeG9GNPcI8XXE6cGy","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UrN91bVmY_x3IY4Ga83v4","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinates of the draggable object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinates of the draggable object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"draggable object width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"draggable object height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"4ie_QFv757FacTSKy9JJu","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"xMLl2BqKAslJt0qCTeGA3","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4wmgA88A9U97FhTPve0DF","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-BwVu13hM50w3rkwTp9w1","name":"dragEnd","brief":"","scope":"instance","type":"MethodDoc","description":"Gets called when the user stops dragging the entity
","params":[],"returns":[{"description":"false if the object stopped being dragged
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"0VgPy5CIA7AHwqODJGJ0K","name":"dragMove","brief":"","scope":"instance","type":"MethodDoc","description":"Gets called when the user drags this entity around
","params":[{"identifier":"e","optional":false,"description":"the pointer event
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"DyckySSz7d2cxnV1OM2nm","name":"dragStart","brief":"","scope":"instance","type":"MethodDoc","description":"Gets called when the user starts dragging the entity
","params":[{"identifier":"e","optional":false,"description":"the pointer event
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"false if the object is being dragged
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"4zzHfLiD3-0idS_wGFMid","name":"draw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#postDraw"],"type":"MethodDoc","description":"Draw this renderable (automatically called by melonJS).\nAll draw operations for renderable are made respectively\nto the po...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"71Zf3LYzEBZ1SzEwd29S8","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ndJnQhc7xXsnyaW5azNJB","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-rvQmeEIlwM_mHKVY9xmq","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ISRyY4oWI10gTzcxt4ZA7","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"fwpQQU2qPWAyoGZhAPidK","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oFFgSTkLJzoG1fL9rsw7A","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"E-F_LF0YZeqzttEfEq5MK","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"pSH6bgWKmZxJtx0aio4B6","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"fu0t7nHcR3Jhz8X_QarvQ","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"YxtyKiDaSfikQ8_ZSzuB1","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"c9YrAFVWV9RUsuLYX1Ipd","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"0qXVYqpYB1_Af6vu6p9Uw","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"G5DMeIxKIziprk4ipa-UW","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"JxPQt8Dj0SXGNBYDiJ2ai","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"EyzX_dDclLWMGTsSAVFdv","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"TAMd5sCojtu9hyx-Ht0X5","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"OibTuIksuYbkBaMXxiuiB","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XG1ruEj5DJBBcbVZwd9j5","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QWfUZyszjuu0Fcyws7erF","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gzT9K_VoQ7eF7yOJVTRdZ","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hYnOKqwO8KV8CsYfKatDR","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"abpJuewt9R9HGq4qaEi05","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2XIiysVRhVKtsjVEUxxHR","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VLhqVEliAjuhKs2ABqPTR","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"c92ThiI8xI7RfYpyHkuAF","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nsFra1S8DJHKDbOVF-WM0","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"c3BxG4T0ZMNq85FBanm03","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9142xAa57NIEF6cWhZ3Qy","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jH19Pjn4X8TAG3YsfbR7e","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DMtsFDlbSeBWzE5QFNfYa","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"sOClt8nIZnvahYjCYd8qM","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"DjMN12Re45WYPJqWyk2hF","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vuhAHldEViNt9RcQLf7mQ","name":"initEvents","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"Initializes the events the modules needs to listen to\nIt translates the pointer events to me.events\nin order to make them ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MOAC78ZSX2bvBrp6vT3fx","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"
called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"Zchx6RPMcisj_6d0Yq1J3","name":"DraggableEntity","brief":"","deprecated":"since 10.5.0","see":["Draggable"],"type":"ClassDoc","description":"Used to make a game entity draggable
","params":[],"returns":[],"extends":["Entity"],"implements":[],"members":[{"id":"XQUrphNPzdqf_ruUB6QRL","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"dead/living state of the entity \ndefault value : true
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eY-3zU5XDqhx-HOQmcJ86","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZWDQQiH5AX6jN7ivHMwbn","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PZEXpndkAXnmBLJjjsgRm","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N9LGr63Jn7c2ubnGVKbVA","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Hox_T5nq72gshKjurkPVb","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DmVtl-8hIe0t_AdGZimho","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gH_J1OiwgtvRxsYdMRdPI","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"the entity body object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HlWgGC9gNwNUAy5ymK3ve","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HJWOAQXCjV3jUI8KY1ngo","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SWvjJalwNMYKUnZ_MCPL2","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jcAJ6mKkO-L99M2WS-Rtt","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CVjmO_Xx6zTZCt7vSBDdP","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DdyEp0m44TV0gYql5B4wo","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TLPkSQ7aToFqGmwg_UfHx","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BQr7d91UlNsvmuT2eXe5E","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PGJnyF2jOJfkzSYp56Mz0","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"object unique ID (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iyJiCJlxKRW6k7OWXOX9W","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"X0srgMXP-XUN5Zg_Bp-iD","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EzPmrOf8I2nHVVIPBJXzr","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"39qsjMBsjkxorJEg4SzIx","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e75au0OOCOp8Ly_nP_TNa","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BB64uOvykUeSBtrIy68CC","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qvos5zqTLOTWnqZ8T6K-1","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"42ldlzZz1ex669kitPDWM","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XkR3Z-CLMtL1IbnsbUopZ","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nEjlJVZvHtqmlX-eaL4CC","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lSsREC6S2i0bYeXQ0EZtI","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JcfHu2kNhX1C-HzUfpAbw","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gpS-FgugVpqvp_zlkYcv5","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ox5mTC8_oYXdoQf3ErVPx","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WVPI_LqT8TK8-B8VmmvIg","name":"renderable","brief":"","scope":"instance","type":"PropertyDoc","description":"The entity renderable component (can be any objects deriving from me.Renderable, like me.Sprite for example)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SnLXqcQ_CthLGDHnAoshe","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IxaItKEgVf9lW0N7jbt8Z","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BRAX29wfQRkXwUOyhjFUX","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oRph5MCJkO6bg67xY53Nu","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"A5x6bnSnP32_I7K-TAFWE","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"object type (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WMZCF101JNqoqyCzwT3x-","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KXtYByIRI6pvYpWfC-WVL","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3x-oMLHaCFJ8N28VK1Kkw","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gq08IXHTyoPJaJtxEwZgk","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3uQZXWqguDc6EhlYmn19U","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"r4rei2Huf0Qso-sWHQaBz","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinates of the draggable object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinates of the draggable object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"Entity properties (see {@link Entity})
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"H3hhmtlnaPZ9UcJWnB76E","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"NctiJQUrgSGUFoW9fp0N7","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lIZlR9itEw6a6DDpt-kKa","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AubmHTGVvsamPNDpn7f7U","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"-YDvk7bRtO4eyRU0mBv0b","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"M1WxnlMOxjHZjHSSdfR1M","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lnk3BpxiJrMUINBPdAI9c","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZZMBkkZbqar2nLqi9dI2a","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QbO-7bQW9E2eRZeH-d-Og","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"bF2phcb36Pkknn7aD0JXs","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zOk_PlHSI0gkB4FwK9o7F","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"AmGYwkT0Wquev7DkV61Nx","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"eFZqKt58an-AnT-SR6CRn","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5Q3u9O4XJf4vWoY8Rn-hR","name":"onBodyUpdate","brief":"update the bounds when the body is modified
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nnHh1W6mQyOYeFxtUuB-h","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"kGFltHEKxwdYSvBUMRHxZ","name":"onDeactivateEvent","brief":"onDeactivateEvent Notification function
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ff7ERSGDEY6bNfRcXSds-","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8RI4Y3YxTLLtsMrp-LJGx","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"264PpsUnncZkCn8LBLixD","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"yvGKB-iuLUOvllhwq08Sg","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"RO4yfdThTFK2HFFmHNl3x","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ofy3efZXvJ9rUUCzOJs5b","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"02qLAswG8pIdDBR5uQMss","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Oe1Kb6LyDPLqkiobp2icj","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3P7Gy0KTju6bouCxpWBhM","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gY5fYOo7d7wFLFw705Yu8","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"9xRnKKSi5p7MIhDgdTnDK","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZPWXvL-s2gbTBHPCO6kVx","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bTqyptulkV2tD4WaE5NKG","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"7gawiPuW4BLzSFOVXWJ3-","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"q74KgoLWGc_NdXEUUbdXF","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9ETUo9HokWbTkKm8qJ5f7","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4IFHbgn9doMpkJlifFkYK","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"W_Q5PGnkj8GrV2rMpXZEw","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"c9XMafbMBHJZxCMpKxYn_","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"CB5LzSYEXffjsbXyW4T6p","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Ir-gY44bkk9JCgMVxFwLk","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this entity.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this entity bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"icbcDzGDbIO6X4ShlGsHc","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this entity (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"3_6Wmat8P8UWC1AT_M4Wu","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"WMEX-zqFlN6NLnyOkGeCe","name":"DropTarget","brief":"","see":["Draggable"],"type":"ClassDoc","description":"a base drop target object
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"1TQvt88zNymBsAdnYViMO","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"az24VAUOBCvqvyROMH7L5","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xv8bZzmD6Ii9kuIb9oK4K","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pcRis8jIwRy4qrGUNU2G9","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"66vRZ8S88TJyDIefCD6Xl","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HdYm1Scnv61UGGQe5oUO2","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TVb3vyxIA-GOdgaM7sUNj","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vTtttQP7AlI-W_DY2wfH1","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uRSk8g_YpQphyT8eKt1PY","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0G6b1XVjrFAYyyMa-XTHE","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SkxnPpZmBv7WuNCz0rw8o","name":"checkMethod","brief":"","access":"public","defaultValue":"\"overlaps\"","scope":"instance","type":"PropertyDoc","description":"the checkmethod we want to use
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9qz_Vu94ILEuVpa8Tyg_J","name":"CHECKMETHOD_CONTAINS","brief":"","access":"public","defaultValue":"\"contains\"","scope":"instance","type":"PropertyDoc","description":"constant for the contains method
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"58ee8-fLAGBgilj-GN_4I","name":"CHECKMETHOD_OVERLAP","brief":"","access":"public","defaultValue":"\"overlaps\"","scope":"instance","type":"PropertyDoc","description":"constant for the overlaps method
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uAvcmcbLFe_Qr69Oms3jD","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uOOpY6RFlRh_qB5IouqZ7","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_gctT9grV4IcmlhiZN4Xv","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rLP-KixQxc8dHeDY6_mMW","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NZJQ2b5kCmkP870IzJav-","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dnJQDv8y5Yx8coy_aTCdY","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"G8RGAzi51MuLmypKjMOWv","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZtBvfjpfvsFFfs1JpPtrx","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UgX-k7on-cOuKGtKr932X","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"22AxZd1snsy61YThPBJb5","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v7_-E9tVQsLz5YHGsWWrG","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mGyGtD7H_XLu7ZXSy4B-v","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tg2eDpbLMf_MRj456Khny","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CipyIKZb_6EFzMoGr-mhh","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1TmbXHL1xcEfF_hpO4TGM","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"q4XbJuEnAS7LOY6wyJoVi","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pjCu3rTpfFGFi70gL4nQI","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GRXn325vEbOiV0GACAFRg","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5xIU_oSYlDo63sOXusSgQ","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1CJkcw-HrQDawotn_SBxW","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"o-Kyms5bktjQEeqbszEZa","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Zv6k7LL_noL3RApBtH09h","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XHuQ2KQ5JhyMEJNg3jCMp","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iXl1KzIsQLlZm-gSZH1sp","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0zDWenTl6iGtxqdHqFda2","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cVpgElhBOkScNfC0eiBIS","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wbAq12ua-AoWAnPsoyiQa","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"y8uaYfanwuTzRjz8EG_jA","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"z8pFrF4Oes0qAVwLTRA5_","name":"checkOnMe","brief":"","scope":"instance","type":"MethodDoc","description":"Checks if a dropped entity is dropped on the current entity
","params":[{"identifier":"e","optional":false,"description":"the triggering event
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"draggable","optional":false,"description":"the draggable object that is dropped
","dataType":{"tokens":[{"value":"Draggable","kind":"canonical"},{"value":"Draggable","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"zCcFHU7Xq-nrccFl7PauQ","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XWNmDLwYfsH7pqDtiOpk4","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinates of the drop target
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinates of the drop target
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"drop target width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"drop target height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"EIYcdwIkoOGzE7mUfn6r9","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"xpzn2oAuY2hyvE8VacI-8","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Jhdgb-eNFhbCcXoBPq7zN","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BukGgmViaK2HjKBiSpD8d","name":"draw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#postDraw"],"type":"MethodDoc","description":"Draw this renderable (automatically called by melonJS).\nAll draw operations for renderable are made respectively\nto the po...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"OsO-bv5iI64qDvvb-HJui","name":"drop","brief":"","scope":"instance","type":"MethodDoc","description":"Gets called when a draggable entity is dropped on the current entity
","params":[{"identifier":"draggable","optional":false,"description":"the draggable object that is dropped
","dataType":{"tokens":[{"value":"Draggable","kind":"canonical"},{"value":"Draggable","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"GZysXpGL7rxPmL6lpaMVn","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"HGR_T45KNnSn2CuZTqQu_","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZTgk1dHa4reFMzC5o1D9S","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RLzTfuAs5BjIcElwYFCtH","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JEDv7oFpvSm4TBQ7dKmop","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PSA2PFOpC0VhyvLrCdgAv","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"K_-zjLpVqIAcE0Rs_dPHh","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"M5_52cmydpEOso5LjJKm4","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ybEt7WUue5omGaOTk_Wxk","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"5llIkTutFF6EN85vTaMC1","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4LbJCjitFDO_aOaE9eKXp","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"il2CJoqYuTruNAndL3oVY","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yoyfcJfljzaozG6YCnoIM","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"c_6ZTOjOWU3Cz7I5MvUbm","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"Rb2uggteONWbjKNrb6XvO","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"rOakbP0iGCbDft6Hdw7_I","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"dospniiupMIY-JurLeWKV","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lfqrZWSIApIx_XPeWDMj-","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DMWjW7z8wIlATA2X8Wm2j","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VCh7M0B5eakWUg0gJaz4-","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"35Hs7MqM2ERRyR4hs3cpW","name":"setCheckMethod","brief":"","scope":"instance","type":"MethodDoc","description":"Sets the collision method which is going to be used to check a valid drop
","params":[{"identifier":"checkMethod","optional":false,"description":"the checkmethod (defaults to CHECKMETHOD_OVERLAP)
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"14mvZ_rhOzMMLBlJaAl-T","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"wshn-eSdxKbINWglYngRF","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"s9tBwZX5EwXg6Wu4z4eaq","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"f7Ti8fzZaDy4ZR1tZlCSy","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"m9mIwkmdwbCcVoCgaUUVY","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5EUF2io2_EFwNkhjO3JBH","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"1p9pqPXJYgqqGax50kkz2","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Ejg30Q0Et7XbtmXGg7VNO","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"07K6HnVAMjetdmW-Gp0N-","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EDHtZyC-Oc2cjC8qjtjAp","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2980GXTumF0eMXBSmwa95","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"kRx_r7Zz6D1vhnrkzjem4","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"E7yyFHJNq5ixgodsjsfAq","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"iuGXxzrfho8Wqjy_hYwCq","name":"DroptargetEntity","brief":"","deprecated":"since 10.5.0","see":["DropTarget"],"type":"ClassDoc","description":"Used to make a game entity a droptarget
","params":[],"returns":[],"extends":["Entity"],"implements":[],"members":[{"id":"Sg5b3RxsIOPiHlQMasrRQ","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"dead/living state of the entity \ndefault value : true
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"111W8BZ-KFaDwANkGrq5G","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CVvHgHDyy1by_irPwDcGa","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fofulmjwmj4YzsiFvMteE","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"56s1J_g0H2-gyB9Xw-Mvv","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S1twB5Cey3XDuKVCuDwfB","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5YvqJipjSOHBDpnsJPD6b","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vQVESy2bpWq1XHv0ewvsu","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"the entity body object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dJCuauN2Mhhq5MC5AiYTZ","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"itpwLcFqEsu1K9fC9Jtyr","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AxL2s2iBRJqfvyOnzICES","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zKZ_XAkD_PvsaFZv6BhkG","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K6fh1PlPCkjcijzv7Zn4I","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L5zo-vAYcmTkdU9rtybcR","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7Qwdw2GAiF1c1c3v_3SLs","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ccEC-xzLRvHImzSH9Mlzh","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vFWd3jl7ktV4JZunR0CwF","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"object unique ID (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3MKq2wPWA9rSXuMVFGcCX","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y1keCzgvBfD00wpkeSAx9","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CezGWmn909w6Ivj7DKRjg","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-YUsiUrFbXQToV_lc_zdn","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LNgLfqnVkE1SqDYtnjuyr","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n98zMobRqyuFWjKRM3FjM","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tIYzFkPqZbD42mF2PoBEn","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3kcmf_gwG3bU6VSLg98sL","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XuJbkQ5sjzzIpm7gU9c_S","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Oc-j5vUpSLM4E06TDu1K1","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0a-VRzXcAgL3QS7EMnA0k","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HOLVXW6xNlVnL2NFFnp53","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gtvhy0MFdFdKd3omFuOGi","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q2QEq-ODk-8yTg-CvmqZP","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FB0oNTQ-8yqZPP9PLsl3c","name":"renderable","brief":"","scope":"instance","type":"PropertyDoc","description":"The entity renderable component (can be any objects deriving from me.Renderable, like me.Sprite for example)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pMaeR3Saz0BXaaEsi9Ao8","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"l_cipHUz701vs9-HM7bGr","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lIHbqd81p_UjiPZ6COxTk","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"57PY_VyTifBr3FZ1z8OG4","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n-tdb1pDhWrwq-F29XS0h","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"object type (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3MZcFFr50U50TsQgfW1Tg","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DQMhqj_9rP66Sz4uY5nYU","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sFMw3UIn1LSTEFnQU_rzh","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5htiPG9NTDRk6LtSzaPLS","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lDbSiHf80Ph2ENldX1RS9","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"598-AWVc-D-E7nFZ5GJe6","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinates of the draggable object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinates of the draggable object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"Entity properties (see {@link Entity})
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"CBnbxIGVxh5Xm4s4Newjk","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ujk94u4k3D7dDIJJmBK4W","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qUe-21JQA-RUUQUWw3054","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BCqeJacoeGkH94XeuPRPI","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"L0i6DXCzjV9Txogbom0mJ","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ewDrkmFySTzZs05DXxcOA","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"H0Qu82eW_-uXhJ0Xx0LG5","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oVUNjd39S2nvDTn9i8xnE","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EGGlHxfS2Ixi7v5kMx4tq","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"aHWr_cdyF3eJkiUGpauv2","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"WSKto2MKIjf9HZRPZQl5-","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"B4nDAMwR6YeJHgm2zoZvb","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"PrvW7gQ4b0I7OFrwGB0s3","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8cAe787ex3tKF44KIKFmx","name":"onBodyUpdate","brief":"update the bounds when the body is modified
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eXwQNyaooxpwgopZUa-JJ","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"k7h1fM4aAy82ylXE3qVe3","name":"onDeactivateEvent","brief":"onDeactivateEvent Notification function
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I34tSXruR1flzBQpKfnxG","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VwrnD6qMRfY2S6GGaIHVc","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Gu1z4ABi1ROk39VusCcBz","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"GxMdMlGLb0dAF96AiY6Dl","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"SsdVh8kG7nLy0I-m6Q9SG","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5C3rDR-m3v2YjVIv_C90P","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KF2YVvOCKuSK29LL2MVXS","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2xD3k1Y8Yisj4CKYteDdA","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Ex-H0CV4uQmyCKfjai9hc","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AnG1cH4JBSAyFA5JRAHky","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"0vLVBa-25lnVv_H5JNHjz","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"U2-NKoO3hR2h18IJXTQrI","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KA3sVHWvpwqLptpPyoFnb","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"wivNOFdkyjnISrTvQwFFS","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hGfDUp4tC0S_5sBp7cu2Q","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oWSXgXMsbmuaTogl_PhAH","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ftpQfbJC6JOi0GJ6D65Ny","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"q2qASqB65evv2fTdYlFQr","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JN5CrR1X5Htfe478E-LgO","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AGpFl2BvEnZxEXfbFtcD6","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"uyW7BE5epidrhwWrzRDyT","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this entity.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this entity bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VfB5xos5Kt7vZoNypEs6p","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this entity (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"EDLhqz-h0_7Y4GUQuKx2I","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"VMbzbu5OHbe47DMjdM2qn","name":"Ellipse","brief":"","type":"ClassDoc","description":"an ellipse Object
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"BQCs3no3icLaKKHFbI6iA","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the center coordinates of the ellipse
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lsRwTsqZvl2m19sTD_QgV","name":"radius","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Maximum radius of the ellipse
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3dlmAgdJZAMkbAFnOlAyH","name":"radiusSq","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Radius squared, for pythagorean theorom
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tUdhH7HWJmYBITKhKNBJn","name":"radiusV","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Pre-scaled radius vector for ellipse
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zV9ADE6fJ5l22y1FKEXv4","name":"ratio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"x/y scaling ratio for ellipse
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d8jPTmcxODwBuoncsF9Le","name":"type","brief":"","defaultValue":"\"Ellipse\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K0_YjzUt1IXcT8EciGOi1","name":"_bounds","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"The bounding rectangle for this shape
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZEVAIG4AhYf1j6AHLg9gO","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this Ellipse
","params":[],"returns":[{"description":"new Ellipse
","dataType":{"tokens":[{"value":"Ellipse","kind":"canonical"},{"value":"Ellipse","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"7O4aRO3KOpW5sF016b3jJ","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the center x coordinate of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the center y coordinate of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width (diameter) of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"height (diameter) of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"mUxbFFX4uoMNhJK8Dmiqx","name":"contains","brief":"","examples":[{"caption":"","code":"if (circle.contains(10, 10)) {\n // do something\n}\n// or\nif (circle.contains(myVector2d)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"check if this circle/ellipse contains the specified point
","params":[{"identifier":"x","optional":false,"variadic":true,"description":"x coordinate or a vector point to check
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if contains
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"sNaVT3RIA9GMfUkshwu9D","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
","params":[],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PCQm3Zq_ZSwnFHblLSH78","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this Ellipse (counter-clockwise) by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Ellipse","kind":"canonical"},{"value":"Ellipse","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Uj-WX7r3D6QMAJ0H2_Yre","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"Scale this Ellipse by the specified scalar.
","params":[{"identifier":"x","optional":false,"description":"the scale factor along the x-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"the scale factor along the y-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Ellipse","kind":"canonical"},{"value":"Ellipse","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TG6G1E_gYvPWtIt9_tDkD","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"Scale this Ellipse by the specified vector.
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Ellipse","kind":"canonical"},{"value":"Ellipse","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vKhlqWdxGiTaByHrW8gK4","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the Ellipse shape
","params":[{"identifier":"x","optional":false,"description":"the center x coordinate of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the center y coordinate of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width (diameter) of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"height (diameter) of the ellipse
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Ellipse","kind":"canonical"},{"value":"Ellipse","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9Ilsne50gZpVYvxNoKWXC","name":"transform","brief":"","scope":"instance","type":"MethodDoc","description":"apply the given transformation matrix to this ellipse
","params":[{"identifier":"matrix","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RNCvpI_mZRy-QoCQu9j7O","name":"translate","brief":"","examples":[{"caption":"","code":"ellipse.translate(10, 10);\n// or\nellipse.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the circle/ellipse by the specified offset
","params":[{"identifier":"x","description":"x coordinate or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this ellipse
","dataType":{"tokens":[{"value":"Ellipse","kind":"canonical"},{"value":"Ellipse","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"iwJRVm37br_85H5v9AUxD","name":"Entity","brief":"","type":"ClassDoc","description":"a Generic Object Entity
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"9lv7UJb9EbEuM-1ypChT3","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"dead/living state of the entity \ndefault value : true
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mSnU9p6hZA3OBiiv2NRUE","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5-bTp9idIq2scLenJPPBq","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kZ1YKQIW5DQQqkBiSeRwz","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eaZbV15lEjC7h56D9RJbA","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tnW9VOCjd43OsJvqcjPQY","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ymcB1yU_UGZdDDYgOaR5n","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bWyQbEOrYEfDWgPaPL6Fk","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"the entity body object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K7B6HiKlBAUMP7PAEv-Q8","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZOJR_cX-BuGFDzyTOgBaN","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xvi4idYhbzX18gT5r0eNb","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nb2PQPniwVUmoC2pJx7M_","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1YWpPAVTu8YhDOFT44Bc4","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tfTZvMj68sCvgWe6Ap-Gy","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bhqB-rRLCJtispSkPsZG_","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2YOSqjHN_uvLs8PClRBQu","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vZ0YGnbE-eBPKlBjkMCmj","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"object unique ID (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iwyntmw2RSsvY_jBkJA25","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"M42xiTw4g4Df1a51Lx7BM","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MNvx0mZMgfkaBsgQgznyD","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mfZzV8TKmP7WAebl3fD3B","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"76v6Q6FshRrGwAFDd3Hup","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QVrrhXxjmG4XINVrMkjnQ","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2A90xlt-4rGVlp1Hy_nM6","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ESTtRMHjrirWrIvucf7Wf","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sb7-d1yoqbYSPPekpQvaS","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4w4L31p6_w-JmX3AikQBB","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xl5XX1R2SqjQ4s6JOb-N5","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z8jEqXKJ_NvJVDnuHaCPh","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8dvVVsc50cE96JzxIkUqw","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WZhC77CN6Q6dqJM_eUcxe","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QAymK9SzuMmjT0m38a7j8","name":"renderable","brief":"","scope":"instance","type":"PropertyDoc","description":"The entity renderable component (can be any objects deriving from me.Renderable, like me.Sprite for example)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MKRgzln4Zrm6uYXUeJFaf","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3RQRPYtytDtDyZ27lO8os","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n4NfuRjL0xdg35ytijV2f","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YmRQ7S7-mz8uNhN7r4ogC","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0gDyBYi45fyyg0JJYEmti","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"object type (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XhRa4L6jY1WKDSaKxbO2p","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZDLLC9VQOQZBguBnisTC9","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5g58pM91beizYLHVmT787","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"H2qhZ3Qliylp188HQyZSE","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-P__8irm7yStZYeF74-V2","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lhdXMP474q3I_Wq1g-M-q","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinates of the entity object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinates of the entity object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"Entity properties, to be defined through Tiled or when calling the entity constructor\n the physical width the entity takes up in game
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.height","description":"the physical height the entity takes up in game
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.name","optional":true,"description":"object entity name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.id","optional":true,"description":"object unique IDs
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.image","optional":true,"description":"resource name of a spritesheet to use for the entity renderable component
","dataType":{"tokens":[{"value":"Image | string","kind":"canonical"},{"value":"Image","kind":"canonical"}],"template":"%1 | string"}},{"identifier":"settings.anchorPoint","optional":true,"default":"0.0","description":"Entity anchor point
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}},{"identifier":"settings.framewidth","optional":true,"default":"settings.width","description":"width of a single frame in the given spritesheet
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.frameheight","optional":true,"default":"settings.width","description":"height of a single frame in the given spritesheet
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.type","optional":true,"description":"object type
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.collisionMask","optional":true,"description":"Mask collision detection for this object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.shapes","optional":true,"description":"the initial list of collision shapes (usually populated through Tiled)
","dataType":{"tokens":[{"value":"Array | Array | Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Polygon","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Line","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Ellipse","kind":"link"}],"template":"%1<%2> | %3<%4> | %5<%6> | %7<%8>"}}],"returns":[],"extends":[],"implements":[]},{"id":"jBl2Nw7fbNAR062f0SK7B","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"zH8FMUTIbYuc_UMbVHfq7","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wFsQXhNXvY7cKIHIXwoIw","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gObSn2YSqTwSHTBG9POOK","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"PpE0ZiRWRYPC7QnnIzRHd","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QHO_aA1l2X6GH8mISB3Ts","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hK5iY2FFtsgD4rDfNZlA7","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"v3t2rdasEZLPIgC6X9mN7","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nWKIRMTWuju5eTo-Ku97Z","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"FuK7aaFNTnVJjPmeT4P4p","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Wao3PHFQkFZZw2XBILf_6","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"qOxbg5F8w_cIQjl4Y2J3V","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"K_jik2Nl7uAZ4ZmsFOBY9","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RGuQ77vLTkbV8rg_oJyQQ","name":"onBodyUpdate","brief":"update the bounds when the body is modified
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tSoUSpEg0Q5hhZJfXyok8","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"nqXwE0irzhJw9gHDVxhNf","name":"onDeactivateEvent","brief":"onDeactivateEvent Notification function
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QUNdKcoARUC15nUNiKc8P","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WWTp0B6oLM034naS4rzX3","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"BueY6zMQ9kMaAjDzyBKOS","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"25QTRmzpBxeUP0f76yNXj","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"51qW1cU0U0dSWTlUCvjB-","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"a7d90RoJJb2WZOrfJgSpP","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GIKtYVY6m8qgTdMXH-pL4","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4M1Oc5sZy7dHbO3OIDy3m","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"NAPy0pLpTNAB5wL249wAv","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"WZQ1jWzeC7ddOx4KseuXC","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"pHZW78fbH6NcseDzaprR3","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rA4a-cno3u1uqfMl1H0fH","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"64ox5lOeTR0sLdJvy6vn3","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"iDcXu2alPtsMqYTf9A63b","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"icR1e5JBJPtm6fKVfPmBd","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wnFG0qK5MjzsnlIOGYUAj","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4Sw_RKOVDs8ucTMStcVog","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iLTOaD_mfbaAprpnqXuKj","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Ytk5zJEIUWGHthh_vWrZy","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"u-yBpo_1f1RBpu6JAOztT","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"q4Ya-fm24k0pQp8OgCIhe","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this entity.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this entity bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"YKrF1qKAprntHiIHFxOvI","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this entity (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"uQ6grOqTM_nArMWTLQWdC","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"zCAk9emC0SBQ_WPTeT4S-","name":"GLShader","brief":"","type":"ClassDoc","description":"a base GL Shader object
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"ABn3CZhMgpLfioWQVroXi","name":"attributes","brief":"","scope":"instance","type":"PropertyDoc","description":"the location attributes of the shader
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j114UrRXe_FYXyuwi9Pzi","name":"fragment","brief":"","scope":"instance","type":"PropertyDoc","description":"the fragment shader source code
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ClSz6XKkt-1HlR3BoYZQp","name":"gl","brief":"","scope":"instance","type":"PropertyDoc","description":"the active gl rendering context
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EH9b2AM6-qmqSnlDiZihv","name":"program","brief":"","scope":"instance","type":"PropertyDoc","description":"a reference to the shader program (once compiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gHD2v2G9kGErEJXn_ZhXV","name":"uniforms","brief":"","scope":"instance","type":"PropertyDoc","description":"the uniforms of the shader
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_veuc0J7mf8zYGtuRdWw_","name":"vertex","brief":"","scope":"instance","type":"PropertyDoc","description":"the vertex shader source code
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4uvtJWPBa78oMXTzYcwrs","name":"bind","brief":"Installs this shader program as part of current rendering state
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q6DMgjyQ8WEZzPHbhWiJc","name":"constructor","brief":"","examples":[{"caption":"","code":"// create a basic shader\nlet myShader = new me.GLShader(\n // WebGL rendering context\n gl,\n // vertex shader\n [\n \"void main() {\",\n \" gl_Position = doMathToMakeClipspaceCoordinates;\",\n \"}\"\n ].join(\"\\n\"),\n // fragment shader\n [\n \"void main() {\",\n \" gl_FragColor = doMathToMakeAColor;\",\n \"}\"\n ].join(\"\\n\")\n )\n// use the shader\nmyShader.bind();"}],"scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders"],"type":"MethodDoc","params":[{"identifier":"gl","optional":false,"description":"the current WebGL rendering context
","dataType":{"tokens":[{"value":"WebGLRenderingContext","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1"}},{"identifier":"vertex","optional":false,"description":"a string containing the GLSL source code to set
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"fragment","optional":false,"description":"a string containing the GLSL source code to set
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"precision","optional":true,"default":"auto detected","description":"float precision ('lowp', 'mediump' or 'highp').
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"6WcUbfjpk4pp3ZBz4tggE","name":"destroy","brief":"destroy this shader objects resources (program, attributes, uniforms)
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aKU9eZwOW-PFXWy-tNNWm","name":"getAttribLocation","brief":"","scope":"instance","type":"MethodDoc","description":"returns the location of an attribute variable in this shader program
","params":[{"identifier":"name","optional":false,"description":"the name of the attribute variable whose location to get.
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"number indicating the location of the variable name if found. Returns -1 otherwise
","dataType":{"tokens":[{"value":"GLint","kind":"canonical"},{"value":"GLint","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RSou3stUHtIkH2CpLhkVX","name":"setUniform","brief":"","examples":[{"caption":"","code":"myShader.setUniform(\"uProjectionMatrix\", this.projectionMatrix);"}],"scope":"instance","type":"MethodDoc","description":"Set the uniform to the given value
","params":[{"identifier":"name","optional":false,"description":"the uniform name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"value","optional":false,"description":"the value to assign to that uniform
","dataType":{"tokens":[{"value":"object | Float32Array","kind":"canonical"},{"value":"Float32Array","kind":"canonical"}],"template":"object | %1"}}],"returns":[],"extends":[],"implements":[]},{"id":"86-SkWluWghB_mmYQG8fE","name":"setVertexAttributes","brief":"","scope":"instance","type":"MethodDoc","description":"activate the given vertex attribute for this shader
","params":[{"identifier":"gl","optional":false,"description":"the current WebGL rendering context
","dataType":{"tokens":[{"value":"WebGLRenderingContext","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1"}},{"identifier":"attributes","optional":false,"description":"an array of vertex attributes
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1"}},{"identifier":"vertexByteSize","optional":false,"description":"the size of a single vertex in bytes
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"h2hq-rLAD_yilGxHc8076","name":"GUI_Object","brief":"","deprecated":"since 14.0.0","see":["UISpriteElement"],"type":"ClassDoc","description":"A very basic object to manage GUI elements
","params":[],"returns":[],"extends":["Sprite"],"implements":[],"members":[{"id":"kbRSxR3OFwvI4G-KS94e6","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FGRAufwVlWWeUy4cB291r","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KTBiOl4Rms79V6X-5jn2P","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"60g_WHzjlO9NX1FGGLnJq","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U7C8pEqT8b-hSCwXTC-of","name":"animationpause","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3MITWaqe6ICsd_NsEm4f3","name":"animationspeed","brief":"","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"
animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IyqewAhIrBuv_xSmjlR5V","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"drlSYFQKXtI-IE8ob236O","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j9u0sYwVHa8LSKqvDFmy9","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cj9dvmC7_xhvMn9loWwY6","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rDz9ZQxPLb_6HxG0gfTY4","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rIYqs2HI94djklXXmW0Pu","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xPdUBNG8hYl94O97ylpnw","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ET8PCp9NT7abJp6SdpVc1","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oNohQgp5xdYd6GTjjFuJo","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"05CdJTn4pgVYKZIk4viwA","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YlSY8IKDrodREcabHLs3K","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wk76-gmdCXIWhECLRxH2l","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yeD9_voUQU7M-R0YvCoCd","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PT5L0wdNtqTiXiyB8Z5Hg","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PUkM5pa55BC3RXW9ZC3L4","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pSUmsUpxNG7CR6EXBgj3I","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TM9393sS299s3OE5ja5gb","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LxwXa2B_j96uh4slRk9UI","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KXor80IP9ExGZgQJBRqlT","name":"isVideo","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if this is a video sprite (e.g. a HTMLVideoElement was passed as as source)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WSzP5y2HQG4idh__z8-sE","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eZ--e7M-DY8W0BlD83ND2","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3lidRc1wy7eUdK2Z2C_p_","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Sf6qavHPaI4WVc8yFuooo","name":"offset","brief":"","defaultValue":"<0.0,0.0>","scope":"instance","type":"PropertyDoc","description":"global offset for the position to draw from on the source image.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0fDvusyVHfZRemlhSq_5c","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hEkVice8x3hlh5OxiZOXs","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tuYwSHKAvxKSbYBq8B4Ur","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6DoNG8-gWW9pcmooO4VUs","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eLPIDBSWTyK5_X9WAch2Q","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AkPRbiaBBAOptoHTyMBIk","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oM-CUk78keIVUFTKN1L2u","name":"source","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eUSXnib4gZv5H83P7IeRR","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Zud1JteVfq_pWp9SQ-3ok","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NbPVbdQrr9VMCi65PXNgp","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RQy4DvjlIb45c-GTtamsb","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"A5vk7N95kVWsvwURT09az","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K2_AG_W41YzCIt5BZWMvu","name":"addAnimation","brief":"","examples":[{"caption":"","code":"// walking animation\nthis.addAnimation(\"walk\", [ 0, 1, 2, 3, 4, 5 ]);\n// standing animation\nthis.addAnimation(\"stand\", [ 11, 12 ]);\n// eating animation\nthis.addAnimation(\"eat\", [ 6, 6 ]);\n// rolling animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ]);\n// slower animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ], 200);\n// or get more specific with delay for each frame. Good solution instead of repeating:\nthis.addAnimation(\"turn\", [{ name: 0, delay: 200 }, { name: 1, delay: 100 }])\n// can do this with atlas values as well:\nthis.addAnimation(\"turn\", [{ name: \"turnone\", delay: 200 }, { name: \"turntwo\", delay: 100 }])\n// define an dying animation that stop on the last frame\nthis.addAnimation(\"die\", [{ name: 3, delay: 200 }, { name: 4, delay: 100 }, { name: 5, delay: Infinity }])\n// set the standing animation as default\nthis.setCurrentAnimation(\"stand\");"}],"scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"add an animation \nFor fixed-sized cell sprite sheet, the index list must follow the\nlogic as per the following example...","params":[{"identifier":"name","optional":false,"description":"
animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"index","optional":false,"description":"list of sprite index or name defining the animation. Can also use objects to specify delay for each frame, see below
","dataType":{"tokens":[{"value":"Array | Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1<%2> | %3 | %4"}},{"identifier":"animationspeed","optional":true,"description":"cycling speed for animation in ms
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"frame amount of frame added to the animation (delay between each frame).
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"W9Fdglz6GFH2jjJnSCUIZ","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"saHhh1sWW4AQ6JMWHHxzF","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zGVCB-euMSoY0fOK-UUXQ","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"V8tCo_kpJjReFTtGzm6G1","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinate of the GUI Object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate of the GUI Object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"See {@link Sprite}
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"I-vNPYjsRqvwJMseQfCWF","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"I20o1wPWUZJ2_Aaol3wV3","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GeeTZZK4_Fiph3jNyQ0QQ","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jXmm9uy_bO0-4iNyauTaN","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"q2RL7aB_IQlthPU_oESem","name":"flicker","brief":"","examples":[{"caption":"","code":"// make the object flicker for 1 second\n// and then remove it\nthis.flicker(1000, function () {\n world.removeChild(this);\n});"}],"scope":"instance","type":"MethodDoc","description":"make the object flicker
","params":[{"identifier":"duration","optional":false,"description":"expressed in milliseconds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"callback","optional":false,"description":"Function to call when flickering ends
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zvDAuKyiD3t64yuyOmRjD","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hqNl9ItvhRgtfe56cZ2Bn","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"T-Ch4W_woeLhNcWuWVCjg","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lb2gt-x_5I56G4sodzDKG","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wP-nyKnneSnCDKg1Rga2W","name":"getCurrentAnimationFrame","brief":"","scope":"instance","type":"MethodDoc","description":"return the current animation frame index.
","params":[],"returns":[{"description":"current animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5h-D-lWtHnuMUMUSAQWlw","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"K80U7_Z-kMJU6qa3YYVbq","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Xfz23KUw4zfu3KE1enppb","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"vfrUboBdwWNgDqZwccvhz","name":"isCurrentAnimation","brief":"","examples":[{"caption":"","code":"if (!this.isCurrentAnimation(\"walk\")) {\n // do something funny...\n}"}],"scope":"instance","type":"MethodDoc","description":"return true if the specified animation is the current one.
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"sRZZGAFxfy2cYuxelWz0b","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Dq9NvPxzxrHB6j-MxEFso","name":"isFlickering","brief":"","scope":"instance","type":"MethodDoc","description":"return the flickering state of the object
","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"-3uipPU9shb-kufoNEO0m","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EwWS8TeYOeTPaZq2TvK2u","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"g_z2XkDZ1XyifU2bXK5uQ","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Hua4Xi-dF3lYQwMzCNu26","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"c63AYr5eF4wgO4_guJ-JY","name":"pause","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PGCThrlXx_wdd7usnZujO","name":"play","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N4jUVq71zWsjM53NUyTNC","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"3Su-qUjQ_bI9dr5O_Wpb_","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"qCn81grmOcGsItyVgUe8G","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"U4p1iagL76XVoNPWXvg9W","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iIoKxX4jCeNWOAQrSa0fK","name":"reverseAnimation","brief":"","scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"reverse the given or current animation if none is specified
","params":[{"identifier":"name","optional":true,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FxgY_IaxK0oAaYY3XjU5Q","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oSFgjRJ-s0nqbvc-Cm84r","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3JU81phKJN5D-tf7j0Qsg","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wUQlL4RgB47fzohA2vxhB","name":"setAnimationFrame","brief":"","examples":[{"caption":"","code":"// reset the current animation to the first frame\nthis.setAnimationFrame();"}],"scope":"instance","type":"MethodDoc","description":"force the current animation frame index.
","params":[{"identifier":"index","optional":true,"default":"0","description":"animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"f9DZEcVcpX5YtJnuxcOh9","name":"setCurrentAnimation","brief":"","examples":[{"caption":"","code":" // set \"walk\" animation\n this.setCurrentAnimation(\"walk\");\n\n // set \"walk\" animation if it is not the current animation\n if (this.isCurrentAnimation(\"walk\")) {\n this.setCurrentAnimation(\"walk\");\n }\n\n // set \"eat\" animation, and switch to \"walk\" when complete\n this.setCurrentAnimation(\"eat\", \"walk\");\n\n // set \"die\" animation, and remove the object when finished\n this.setCurrentAnimation(\"die\", () => {\n world.removeChild(this);\n return false; // do not reset to first frame\n });\n\n // set \"attack\" animation, and pause for a short duration\n this.setCurrentAnimation(\"die\", () => {\n this.animationpause = true;\n\n // back to \"standing\" animation after 1 second\n setTimeout(function () {\n this.setCurrentAnimation(\"standing\");\n }, 1000);\n\n return false; // do not reset to first frame\n });"}],"scope":"instance","type":"MethodDoc","description":"set the current animation\nthis will always change the animation & set the frame to zero
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"resetAnim","optional":true,"description":"animation id to switch to when complete, or callback
","dataType":{"tokens":[{"value":"string | Function","kind":"canonical"}],"template":"string | Function"}},{"identifier":"preserve_dt","optional":true,"default":"false","description":"if false will reset the elapsed time counter since last frame
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Q70I0scMrOBwRjAMooMK7","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"ncj1o2QIEsKJ_CPOnL0jL","name":"setRegion","brief":"","examples":[{"caption":"","code":"// change the sprite to \"shadedDark13.png\";\nmySprite.setRegion(mytexture.getRegion(\"shadedDark13.png\"));"}],"scope":"instance","see":["Texture.getRegion"],"type":"MethodDoc","description":"change the current texture atlas region for this sprite
","params":[{"identifier":"region","optional":false,"description":"typically returned through me.Texture.getRegion()
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6c8_4jwXmqFU-F3JdPfbm","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Pqmb0UzIg11ShULgxLA7e","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3FGFcxp_ZIec3Tp_-uvw6","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"wTbNo5vEos0-YU1kv8uml","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"yxXjdHU-iiZD9kBkH99W6","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"yOZVu6L4cwH3vgw5z09xj","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"c5H6Kg8MGLU8dCRkTPP8u","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"1gBhPqadFqxAXfHqfworQ","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Q5Fe66x3A2hbyFzwGpZXn","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AuhnR-QN0u5dGwxjFCykz","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kpJQ-l2ettFQBFHC3ttP3","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this srite (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"O0-B_3PoZGsbAUSpRVB5o","name":"update","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"update function. \nautomatically called by the game manager {@link game}
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the Sprite is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Nrgk5KpynX_Fi8LrxM2yT","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"Na-WBVNy-Tf_yY6nWe0Lh","name":"ImageLayer","brief":"","type":"ClassDoc","description":"a generic Image Layer Object
","params":[],"returns":[],"extends":["Sprite"],"implements":[],"members":[{"id":"MImqR3tCZwQkOLQYO6qPq","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TRucSLMbldcxWxCdkquYJ","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v0hu_7ZqAWfF-zOY1JAwp","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gd6gAmcEOgzVmG7DcHHXn","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wb-1dYtFrw1VEiNKE_aRm","name":"animationpause","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LA02lrXcrSA0kVDKrjmqd","name":"animationspeed","brief":"","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"
animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mqRRQBU8q-q62kNC-Juis","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O6pGzRa0kKM1mj_X0nr1e","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bnTMK8Vud7nfFK2vtyydf","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"akcO1qjxM-qdyJV-PmU6i","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5oDmsq2hnwB-bSfJ4w4As","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L-MCR93abXlF71ynRnMrP","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5A-C0XHtGEWRaQwFB_sR-","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NRbJ-pDB2hWjxYFuWmKE0","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PMb9kri4Bz5Og8QVoy1q7","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sfQsbEr2ZrG6cadcyhmUq","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YXqRyN_z5YCaHEE0fwlMM","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MiKeTiY555jn1ibmQSPuq","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TzZBUBMwlmwZESEjf3WS1","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SYZ9QBWxKXNnAPBTF9g89","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OlIUXPcK5Q0PUvJP_g5VG","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_VCPuri0Zz9XDlShbGGBQ","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"giZX1qLDVbZVLjzs0oTRM","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n6YJYFySkTs-B52hWHAxq","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_1o6Pxk9qp9KpBypBjAYk","name":"isVideo","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if this is a video sprite (e.g. a HTMLVideoElement was passed as as source)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"m95a9e3w-RZ554gzMqy_p","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hiqdZ35APTS6FPriolas1","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Op3wq6nWyKmeeSFzZ0cuW","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qJKtLfArDvz9JGYTOo0oA","name":"offset","brief":"","defaultValue":"<0.0,0.0>","scope":"instance","type":"PropertyDoc","description":"global offset for the position to draw from on the source image.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rQZzdmGaUeySoFT6RRt1u","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b1MOP4bWiQEF2Ru93mY4R","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"95VC_acGRswaYMfbR5tP7","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IzwQhQOa1lDUxatjiOHKU","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VL8TYn-bM4NQGNc5VYwg2","name":"ratio","brief":"","defaultValue":"<1.0,1.0>","scope":"instance","type":"PropertyDoc","description":"Define the image scrolling ratio \nScrolling speed is defined by multiplying the viewport delta position by the specifie...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PcWBBaWD2VS1c1cSV6cyc","name":"repeat","brief":"","defaultValue":"'repeat'","scope":"instance","type":"PropertyDoc","description":"
Define if and how an Image Layer should be repeated. \nBy default, an Image Layer is repeated both vertically and horizo...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NkIMrPAM3Nmfp8Kv_0VE9","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"
right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BwGFQ8SRSec9LjUyTXB-B","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xumDJSenyAROVYsplO9e7","name":"source","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nzL7LH2_4UCWeal1i0XFz","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RjebtLhjp4JBcDlvywlSq","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BRRVDePIxxtKbGo0RWtZl","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wVoohxhrH1r6j_HF2ExVh","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sCjoAvr475LIX1VZ6t2Hi","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F6z6zUdMtLnkXd3hvPwdf","name":"addAnimation","brief":"","examples":[{"caption":"","code":"// walking animation\nthis.addAnimation(\"walk\", [ 0, 1, 2, 3, 4, 5 ]);\n// standing animation\nthis.addAnimation(\"stand\", [ 11, 12 ]);\n// eating animation\nthis.addAnimation(\"eat\", [ 6, 6 ]);\n// rolling animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ]);\n// slower animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ], 200);\n// or get more specific with delay for each frame. Good solution instead of repeating:\nthis.addAnimation(\"turn\", [{ name: 0, delay: 200 }, { name: 1, delay: 100 }])\n// can do this with atlas values as well:\nthis.addAnimation(\"turn\", [{ name: \"turnone\", delay: 200 }, { name: \"turntwo\", delay: 100 }])\n// define an dying animation that stop on the last frame\nthis.addAnimation(\"die\", [{ name: 3, delay: 200 }, { name: 4, delay: 100 }, { name: 5, delay: Infinity }])\n// set the standing animation as default\nthis.setCurrentAnimation(\"stand\");"}],"scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"add an animation \nFor fixed-sized cell sprite sheet, the index list must follow the\nlogic as per the following example...","params":[{"identifier":"name","optional":false,"description":"
animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"index","optional":false,"description":"list of sprite index or name defining the animation. Can also use objects to specify delay for each frame, see below
","dataType":{"tokens":[{"value":"Array | Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1<%2> | %3 | %4"}},{"identifier":"animationspeed","optional":true,"description":"cycling speed for animation in ms
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"frame amount of frame added to the animation (delay between each frame).
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"psRbY5rGiYZI7fUg7liyG","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LXAEBSrskRSy9Wqj8LqXt","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UvzpWqHxNIza6d8AcoD2b","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"sefLiDmnKRoUxvS8ckJwl","name":"constructor","brief":"","examples":[{"caption":"","code":"// create a repetitive background pattern on the X axis using the citycloud image asset\nme.game.world.addChild(new me.ImageLayer(0, 0, {\n image:\"citycloud\",\n repeat :\"repeat-x\"\n}), 1);"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"x coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"ImageLayer properties
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.image","description":"Image reference. See {@link loader.getImage}
","dataType":{"tokens":[{"value":"HTMLImageElement | HTMLCanvasElement | string","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1 | %2 | string"}},{"identifier":"settings.name","optional":true,"default":"\"me.ImageLayer\"","description":"layer name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.z","optional":true,"default":"0","description":"z-index position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.ratio","optional":true,"default":"1.0","description":"Scrolling ratio to be applied. See {@link ImageLayer#ratio}
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"settings.repeat","optional":true,"default":"\"repeat\"","description":"define if and how an Image Layer should be repeated. See {@link ImageLayer#repeat}
","dataType":{"tokens":[{"value":"\"repeat\" | \"repeat-x\" | \"repeat-y\" | \"no-repeat\"","kind":"canonical"},{"value":"\"repeat\"","kind":"canonical"},{"value":"\"repeat-x\"","kind":"canonical"},{"value":"\"repeat-y\"","kind":"canonical"},{"value":"\"no-repeat\"","kind":"canonical"}],"template":"%1 | %2 | %3 | %4"}},{"identifier":"settings.anchorPoint","optional":true,"default":"<0.0,0.0>","description":"Define how the image is anchored to the viewport bound. By default, its upper-left corner is anchored to the viewport boun...","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"Fl_ypBwO0EhZDnVeAfJsY","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"
Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"_92G0hBI6rMX4WZfWtzp2","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iWPsOFRAAJjpiMZm8Y4ei","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"x11yLzpZJk7M8gPf1d0GJ","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"8-BA3NkKdqQcHER4paYKB","name":"flicker","brief":"","examples":[{"caption":"","code":"// make the object flicker for 1 second\n// and then remove it\nthis.flicker(1000, function () {\n world.removeChild(this);\n});"}],"scope":"instance","type":"MethodDoc","description":"make the object flicker
","params":[{"identifier":"duration","optional":false,"description":"expressed in milliseconds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"callback","optional":false,"description":"Function to call when flickering ends
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ImxfBBIwedzdjpZjBrDwy","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xjOQC8BZLyYOGVia81DQK","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rA-B7rYkK2LMt9Sxeyru3","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"i_poxPnMFX33hITd-Dzf2","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Lf1EZ87yjmrhe24v1ZBmj","name":"getCurrentAnimationFrame","brief":"","scope":"instance","type":"MethodDoc","description":"return the current animation frame index.
","params":[],"returns":[{"description":"current animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Kb7jTQpHQRZKpfqGewrNo","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"QbFOan8XKG8l44qckig5A","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"a38gqmcmFj1nm_tcjIkG2","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"4bJgbc0jmvQC45Fk4qGCO","name":"isCurrentAnimation","brief":"","examples":[{"caption":"","code":"if (!this.isCurrentAnimation(\"walk\")) {\n // do something funny...\n}"}],"scope":"instance","type":"MethodDoc","description":"return true if the specified animation is the current one.
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"_SdUjZ461OafF-TRgwixy","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Hox_oQASK-GOY0_b2ubYM","name":"isFlickering","brief":"","scope":"instance","type":"MethodDoc","description":"return the flickering state of the object
","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"sdWk6ra4pwYT4Ny5BTNWi","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XQGJe3mNkJCMuRmLFhaeE","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"YVIXIvsU8QPXoR_18qXkp","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Pzy_rihC4NXdDYY1njfGs","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"z3POniz1aMwqd7JkFN2J_","name":"pause","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"M0KAzTvW46xP9AA-mt5yN","name":"play","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hRFvNRQiNLgIdXH_ArSAB","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"0Se2ElR_fG1K3vpPVSmh9","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"RWrGpCwwuKXqKdTVGs7E3","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"F212vE2iaOFX0yf_YLL_l","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the Image Layer to match the given size
","params":[{"identifier":"w","optional":false,"description":"new width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"IuzUrn5iSq90VHrhdtmu8","name":"reverseAnimation","brief":"","scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"reverse the given or current animation if none is specified
","params":[{"identifier":"name","optional":true,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xLKGmd2a1mlF_kBxjSHaA","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QZ7RpqBkL-_X8lvuLPjo4","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"d0F8mx7TsWGQNSyMwDYwb","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VOH9s244Eq3CAScTKcTXB","name":"setAnimationFrame","brief":"","examples":[{"caption":"","code":"// reset the current animation to the first frame\nthis.setAnimationFrame();"}],"scope":"instance","type":"MethodDoc","description":"force the current animation frame index.
","params":[{"identifier":"index","optional":true,"default":"0","description":"animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_A2Ti-VlSWJj2pXhiubx8","name":"setCurrentAnimation","brief":"","examples":[{"caption":"","code":" // set \"walk\" animation\n this.setCurrentAnimation(\"walk\");\n\n // set \"walk\" animation if it is not the current animation\n if (this.isCurrentAnimation(\"walk\")) {\n this.setCurrentAnimation(\"walk\");\n }\n\n // set \"eat\" animation, and switch to \"walk\" when complete\n this.setCurrentAnimation(\"eat\", \"walk\");\n\n // set \"die\" animation, and remove the object when finished\n this.setCurrentAnimation(\"die\", () => {\n world.removeChild(this);\n return false; // do not reset to first frame\n });\n\n // set \"attack\" animation, and pause for a short duration\n this.setCurrentAnimation(\"die\", () => {\n this.animationpause = true;\n\n // back to \"standing\" animation after 1 second\n setTimeout(function () {\n this.setCurrentAnimation(\"standing\");\n }, 1000);\n\n return false; // do not reset to first frame\n });"}],"scope":"instance","type":"MethodDoc","description":"set the current animation\nthis will always change the animation & set the frame to zero
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"resetAnim","optional":true,"description":"animation id to switch to when complete, or callback
","dataType":{"tokens":[{"value":"string | Function","kind":"canonical"}],"template":"string | Function"}},{"identifier":"preserve_dt","optional":true,"default":"false","description":"if false will reset the elapsed time counter since last frame
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wH82nWCDHUrVjDuOKSmIg","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"oANhOlEgVW6eh8cGclaIe","name":"setRegion","brief":"","examples":[{"caption":"","code":"// change the sprite to \"shadedDark13.png\";\nmySprite.setRegion(mytexture.getRegion(\"shadedDark13.png\"));"}],"scope":"instance","see":["Texture.getRegion"],"type":"MethodDoc","description":"change the current texture atlas region for this sprite
","params":[{"identifier":"region","optional":false,"description":"typically returned through me.Texture.getRegion()
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tdPScpwQDmIgKkcyxP-jm","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JTzMxRy2FcqQyV-Ryl98o","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"fxs6s0C4rTkyXxvc2RR6H","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"KN3wAcrSzncK8U0pH83xK","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Y4lzlcvoH0NbyfCoy-eaI","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3ruuByc_1rI-mMW4KW309","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GBPu8g9o52OnFTkLJVsdq","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"7R4rIHDby94L-xutoAH8z","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_dD6upP88ETIvNVnWf8B6","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"i_AqKdAurffu2BTB2BGz5","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VqMbauxsbP3yQc1-Lj_jk","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this ImageLayer (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"FTNZ0cQJ6LEjQLroEVcEI","name":"update","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"update function. \nautomatically called by the game manager {@link game}
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the Sprite is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"hI9Arb5B3FPIdIAvLUMWf","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"DE0uDZL8WvOsqyuJyqVk7","name":"Light2d","brief":"","see":["stage.lights"],"type":"ClassDoc","description":"A 2D point light.\nNote: this is a very experimental and work in progress feature, that provides a simple spot light effect...","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"xGKbqW-Ggzu6EtWFzX_OO","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"
Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1Yo2qwIqMlFkS2nfbY3CG","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gkIPwXlw4SiY6uj00YaUN","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"chwaVKpUaHodHhhUS_HRq","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WQ0HdQyDhruwO50OfySEv","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KdnWp8SJ9TUwpu3OVCxD0","name":"blendMode","brief":"","defaultValue":"\"lighter\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the default blend mode to be applied when rendering this light
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v6Gl9lx42N_qAPizIXi5q","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mLYKxIn05JnMccUjx7xv7","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OLYAE-B0eidutR4Zl8sMr","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a3DZMTr5Xubr83HBHPOb5","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bfLyS8zPb0i8nNkwauRxU","name":"color","brief":"","defaultValue":"\"#FFF\"","scope":"instance","type":"PropertyDoc","description":"the color of the light
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j4dGahs4nFvOIQMLh-Y1b","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sZy5WJTgmi1QSYCQdzRLa","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Pcm31RofAIYQWuDhYCkb_","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c5hh3kXjMwqek-YhZt-f7","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-2MAC9A0C5q2eq_SEXpLc","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zWgi0oETplNwSIQ61yA3F","name":"intensity","brief":"","defaultValue":"0.7","scope":"instance","type":"PropertyDoc","description":"The intensity of the light
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FhdFSMWimlhKqfYVLO6Ut","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c8UMadj3XiZlLM8AZ7KKV","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hSV0kIVlxVLsbwUWrotSZ","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uHgIwxFsujHZr3gA7-Ssq","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Km6Acg51d8g1rimw5FlzE","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"o05O-fYoMesA8YPm5D9Ce","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kO85ajTwLYWbsck2Yilpz","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"W222ek-zFUKbUWam_PxeY","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T2iljbtMXxFe4O7zB1yoa","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EtXAtasQq0dwvSX4kFcep","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6PbQewB_irHTShiN0EE2N","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7BTSASd308eea41KxLT_o","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"n5iQu7pOB8ZcW9qt5l9xA","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PfJSeXqfLDrvtQIQb_RIK","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"E0ou9JGdOzMD9qD3lIvoT","name":"radiusX","brief":"","scope":"instance","type":"PropertyDoc","description":"The horizontal radius of the light
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"grqdJBDtJcY4q7B7GapcC","name":"radiusY","brief":"","scope":"instance","type":"PropertyDoc","description":"The vertical radius of the light
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RHqrTuOTTJhVAy59X1IA_","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pNn7a8fstXdN_7gxDOwNa","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H_vhcZvD9aWpCdOzaYQ3O","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JZJMO22qVncE-38GWF3wq","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FTzXusoXbPtsNp2sDoyWw","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fBkzyvst3aHg2ELsyXSUI","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UzCI5zL2shs_UA43GS3j9","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P9ihFlDeMIoEJzy6k15T3","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"eXUMLPK1oxhYcDd8gMGeh","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kjqD_dmrGGjucUd1JJSh2","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zUu3_1bGK3us4QnQTf3g9","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"The horizontal position of the light.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"The vertical position of the light.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radiusX","optional":false,"description":"The horizontal radius of the light.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radiusY","optional":true,"default":"radiusX","description":"The vertical radius of the light.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"color","optional":true,"default":"\"#FFF\"","description":"the color of the light
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"intensity","optional":true,"default":"0.7","description":"The intensity of the light.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"0PNFyPjd-3hMzwvWIUNL5","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"yi5y3JSQo7DlGA9cH0kS9","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mtrQtUko6dyPG2qK0Tg0s","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tfBImjDjiieZqft48frET","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"dIsG7Q0SoHe9URD5kUxtt","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tOZhhayrAUAWt-jrWn943","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"a89V4p-_6mBm650z9ffWW","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"fRR79fGYsO7eET2qD6x45","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BlcFWX91HM9ISZ4DU0QWa","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"S02y3_e5uc9UC90-PAyrk","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-3T4iOa3ivZZxsIuA7DzI","name":"getVisibleArea","brief":"","scope":"instance","type":"MethodDoc","description":"returns a geometry representing the visible area of this light
","params":[],"returns":[{"description":"the light visible mask
","dataType":{"tokens":[{"value":"Ellipse","kind":"canonical"},{"value":"Ellipse","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"c4eZSxNrmYKfvlskhNqRg","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"FkdEBYnnV48LfHa9w6w8W","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"RSveLZIL8wswoclJLvu31","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-V6aL6ZiQ1wAlykW54py1","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"XwChg8KOUs9pTDwyfq0-r","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KuBF3UOkm9i86ZJhAr--i","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"3wXovI9J3Gg6zisEvYMMi","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"zRTsWlyrlZweD1QBYLw1P","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"YHScGROdhAbNoFwIM5yxl","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5y5tP2qm-HDF_g0iIYJl5","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4258XZFXI2NcHD6WqWojo","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2GSocfxd8zm9R1TMqD6xa","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QM_A0BeBYhjB2pp518RA6","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"1gb5iAdeJ84UcdH1KB_5j","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"s0Xbp-cEr1FGjNP2pKzR_","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"YAXvmjYxNHXUKARPGggJg","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5mBE7NI5XlxxBjnf9WxRW","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"XAM-mVg-3RVCfOIIPMY33","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RggT9yPiLRCpN_5N-W-KN","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Eep8nxG9zlzK7WZTz5Oty","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0ZrchlFPw7tmP69hw0hM7","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"C0cPl8Nl8-G3ARNE1wszf","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"T8E3JCQORxlN8BG8Oq6bl","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vqeVtrkM5c43v3MvpRZ_W","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"MsIOA0aN6eotT132VDXgZ","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EJCpqym-j6GsZ9wpi-EFv","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this Light2d (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"G0--PrnWqIYf74R07FLTb","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"zxuCELnAszWwP1vRndlhc","name":"Line","type":"ClassDoc","description":"a line segment Object
","params":[{"identifier":"x","description":"origin point of the Line
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","description":"origin point of the Line
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"points","description":"array of vectors defining the Line
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[],"extends":["Polygon"],"implements":[],"members":[{"id":"y39LhpMfstDl1b_-2HoO5","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_uTJTIpkyDosgSlkoLbqN","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"
origin point of the Polygon
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OIMCpoamMvbTQUZMt0Mm8","name":"type","brief":"","defaultValue":"\"Polygon\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SI2COkM1JwdhB5O3WTPKq","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this line segment
","params":[],"returns":[{"description":"new Line
","dataType":{"tokens":[{"value":"Line","kind":"canonical"},{"value":"Line","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"q9MWx3x7fo6TUMQNrBJ7y","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","description":"origin point of the Line
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","description":"origin point of the Line
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"points","description":"array of vectors defining the Line
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[]},{"id":"8O8XoJ7_cuYSst0hKjJNC","name":"contains","brief":"","examples":[{"caption":"","code":"if (line.contains(10, 10)) {\n // do something\n}\n// or\nif (line.contains(myVector2d)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the Line contains the given point
","params":[{"identifier":"x","description":"x coordinate or a vector point to check
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if contains
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"kSoX5jQO8c6dnn5zPdHBD","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
","params":[],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hstaIs-SV_ZOhHTdfBlOn","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"Xu4WGBNJaTCZE1ETXwbXl","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"6zCz0ryUIDvMLvf1HFoaJ","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision edges and normals.\nThis must be called if the points
array...","params":[],"returns":[{"description":"
this instance for objecf chaining
","dataType":{"tokens":[{"value":"Line","kind":"canonical"},{"value":"Line","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SQcBEX6Lrc4LikhdoEO05","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this Polygon (counter-clockwise) by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wzsuQKYuQ7EPYLJfVR9pq","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"Scale this Polygon by the given scalar.
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EMH2xquZ6tP4XRrIyMtqo","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"Scale this Polygon by the given vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2guyDGEvHgw1T4_tE--QB","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the Polygon
","params":[{"identifier":"x","optional":false,"description":"position of the Polygon
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Polygon
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"points","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2> | %3<%4>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ga-DEWaK4BDtcpx4ZKg1z","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"uTYHRLaQHdDxUTm_2CtzT","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Mm_FQ_o4pEnQ3u-kUKPVo","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"OaL3d3KX8p09PrBqB6eYy","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wlP5kupg2rdfGUhaVkc_w","name":"transform","brief":"","scope":"instance","type":"MethodDoc","description":"apply the given transformation matrix to this Polygon
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tp02Tyf785UhNQZ9Qf8Yl","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"yYq3dHgnfJjoHRYwtymXZ","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"amfiSNgMf-LTAnZ0zhOQv","name":"Matrix2d","brief":"","type":"ClassDoc","description":"a Matrix2d Object. \nthe identity matrix and parameters position : \n
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"xnA6BXU1vCPDaqON0DFhS","name":"tx","brief":"","scope":"instance","see":["Matrix2d.translate"],"type":"PropertyDoc","description":"tx component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_g7SK0ZyowNI73ztoIkKx","name":"ty","brief":"","scope":"instance","see":["Matrix2d.translate"],"type":"PropertyDoc","description":"ty component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y3eZ8kbugjPYuhjLxPH8Q","name":"apply","brief":"","scope":"instance","type":"MethodDoc","description":"apply the current transform to the given 2d or 3d vector
","params":[{"identifier":"v","optional":false,"description":"the vector object to be transformed
","dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"result vector object.
","dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"D1cce7QhjNa1VKB-rIpy5","name":"applyInverse","brief":"","scope":"instance","type":"MethodDoc","description":"apply the inverted current transform to the given 2d vector
","params":[{"identifier":"v","optional":false,"description":"the vector object to be transformed
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"result vector object.
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Ls1CFuYUygDrGOqRiER_a","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"Clone the Matrix
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"fZB_8ur8Kx7B8p2U-xW3r","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"args","optional":false,"variadic":true,"description":"an instance of me.Matrix2d or me.Matrix3d to copy from, or individual matrix components (See {@link Matrix2d.setTransform}...","dataType":{"tokens":[{"value":"Matrix2d | Matrix3d | number","kind":"canonical"},{"value":"Matrix2d","kind":"link"},{"value":"Matrix3d","kind":"link"},{"value":"number","kind":"canonical"}],"template":"%1 | %2 | %3"}}],"returns":[],"extends":[],"implements":[]},{"id":"hiFKomZrjfxUL7ZNv5naB","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"
Copies over the values from another me.Matrix2d.
","params":[{"identifier":"m","optional":false,"description":"the matrix object to copy from
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"w8N-c7Y7JTkCHzt3TZvTw","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the two matrices are identical
","params":[{"identifier":"m","optional":false,"description":"the other matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if both are equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"7lKryL4IWTQLcf68GHUHZ","name":"fromMat3d","brief":"","scope":"instance","type":"MethodDoc","description":"Copies over the upper-left 3x3 values from the given me.Matrix3d
","params":[{"identifier":"m","optional":false,"description":"the matrix object to copy from
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"h-26YhOQ8tNrqbZpicYEx","name":"identity","brief":"","scope":"instance","type":"MethodDoc","description":"reset the transformation matrix to the identity matrix (no transformation). \nthe identity matrix and parameters positio...","params":[],"returns":[{"description":"
Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"53FC7r4f2EZjvA51H-6X7","name":"invert","brief":"","scope":"instance","type":"MethodDoc","description":"invert this matrix, causing it to apply the opposite transformation.
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EZJdk-69PmIxw6JNTGnRb","name":"isIdentity","brief":"","scope":"instance","type":"MethodDoc","description":"returns true if the matrix is an identity matrix.
","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"_sp_sKF2v7gYiODq_9MhP","name":"multiply","brief":"","scope":"instance","type":"MethodDoc","description":"multiply both matrix
","params":[{"identifier":"m","optional":false,"description":"the other matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"aWEAcxARjLMQwy-sj3QVQ","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"rotate the matrix (counter-clockwise) by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"Rotation angle in radians.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PD5XePzHNsy-AddNUBebz","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the matrix
","params":[{"identifier":"x","optional":false,"description":"a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SB01S_WWOatGCLNuu4aSL","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"adds a 2D scaling transformation.
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mZ2MI5XdZEr43JgEbwBvI","name":"scaleX","brief":"","scope":"instance","type":"MethodDoc","description":"specifies a 2D scale operation using the [sx, 1] scaling vector
","params":[{"identifier":"x","optional":false,"description":"x scaling vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GKsVB9istgxg5ZVC74gRr","name":"scaleY","brief":"","scope":"instance","type":"MethodDoc","description":"specifies a 2D scale operation using the [1,sy] scaling vector
","params":[{"identifier":"y","optional":false,"description":"y scaling vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wD7fRcM-FcN0jveNEA4AN","name":"setTransform","brief":"","scope":"instance","type":"MethodDoc","description":"set the matrix to the specified value
","params":[{"identifier":"a","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"b","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"c","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"d","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"e","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"f","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"g","optional":true,"default":"0","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":true,"default":"0","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"i","optional":true,"default":"1","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"K6okQYLrIZ7G70Xt5MtDu","name":"toArray","brief":"","scope":"instance","type":"MethodDoc","description":"return an array representation of this Matrix
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Float32Array","kind":"canonical"},{"value":"Float32Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"O52vVqOHkkTDDB5tHUIU9","name":"toString","brief":"","scope":"instance","type":"MethodDoc","description":"convert the object to a string representation
","params":[],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"xv0O0GB_DQkjs8W0fqBAi","name":"transform","brief":"","scope":"instance","type":"MethodDoc","description":"Multiplies the current transformation with the matrix described by the arguments of this method
","params":[{"identifier":"a","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"b","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"c","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"d","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"e","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"f","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"010oiZCOD1kBFR4rQjxr_","name":"translate","brief":"","scope":"instance","type":"MethodDoc","description":"translate the matrix position on the horizontal and vertical axis
","params":[{"identifier":"x","description":"the x coordindates or a vector to translate the matrix by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"the y coordindates to translate the matrix by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"N32Lhfb1N6HS3TIayqeOh","name":"transpose","brief":"","scope":"instance","type":"MethodDoc","description":"Transpose the value of this matrix.
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"4Zb3g1RcpnY8FTEEdqk6T","name":"Matrix3d","brief":"","type":"ClassDoc","description":"a 4x4 Matrix3d Object
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"2YvjoSpnHrdFz0EWTO0bA","name":"tx","brief":"","scope":"instance","type":"PropertyDoc","description":"tx component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"szX5rE3EiFAz7mvo1oEdu","name":"ty","brief":"","scope":"instance","type":"PropertyDoc","description":"ty component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4gHp5-7qgr4qrUaX_QojD","name":"tz","brief":"","scope":"instance","type":"PropertyDoc","description":"ty component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JD_ugYKTIf-uf_x7_ff5u","name":"apply","brief":"","scope":"instance","type":"MethodDoc","description":"apply the current transform to the given 2d or 3d vector
","params":[{"identifier":"v","optional":false,"description":"the vector object to be transformed
","dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"result vector object.
","dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"EkRl6CY0-jDGHQcvwYeE6","name":"applyInverse","brief":"","scope":"instance","type":"MethodDoc","description":"apply the inverted current transform to the given 2d or 3d vector
","params":[{"identifier":"v","optional":false,"description":"the vector object to be transformed
","dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"result vector object.
","dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"HnKuYwAfKfJosAsJiVsZa","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"Clone the Matrix
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rHrnWDNZzcw8Yn2KKrbic","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"args","optional":false,"variadic":true,"description":"An instance of me.Matrix3d to copy from, or individual Matrix components (See {@link Matrix3d.setTransform}). If not argum...","dataType":{"tokens":[{"value":"Matrix3d | number","kind":"canonical"},{"value":"Matrix3d","kind":"link"},{"value":"number","kind":"canonical"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"7Aw8zXNY8pP2tNsk0sRAP","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"
Copies over the values from another me.Matrix3d.
","params":[{"identifier":"m","optional":false,"description":"the matrix object to copy from
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lhn15J3bomwufElwzqkLQ","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the two matrices are identical
","params":[{"identifier":"m","optional":false,"description":"the other matrix
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if both are equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"TYJwaR25A8djkgNsN_8Ya","name":"fromMat2d","brief":"","scope":"instance","type":"MethodDoc","description":"Copies over the upper-left 2x2 values from the given me.Matrix2d
","params":[{"identifier":"m","optional":false,"description":"the matrix object to copy from
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"R48SERfJpfkI8at6ZUxHg","name":"identity","brief":"","scope":"instance","type":"MethodDoc","description":"reset the transformation matrix to the identity matrix (no transformation). \nthe identity matrix and parameters positio...","params":[],"returns":[{"description":"
Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"m5JWfgNYSM9rw16dqba6g","name":"invert","brief":"","scope":"instance","type":"MethodDoc","description":"invert this matrix, causing it to apply the opposite transformation.
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xBk2_sJ7Aqkrj2yLU9DxB","name":"isIdentity","brief":"","scope":"instance","type":"MethodDoc","description":"returns true if the matrix is an identity matrix.
","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Bwc4g1elDAPklBc3Ne9EB","name":"multiply","brief":"","scope":"instance","type":"MethodDoc","description":"multiply both matrix
","params":[{"identifier":"m","optional":false,"description":"Other matrix
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"NdZihJMnKJvuYQPEJo17Y","name":"ortho","brief":"","scope":"instance","type":"MethodDoc","description":"generate an orthogonal projection matrix, with the result replacing the current matrix\n ...","params":[{"identifier":"left","optional":false,"description":"
farthest left on the x-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"right","optional":false,"description":"farthest right on the x-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"bottom","optional":false,"description":"farthest down on the y-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"top","optional":false,"description":"farthest up on the y-axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"near","optional":false,"description":"distance to the near clipping plane along the -Z axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"far","optional":false,"description":"distance to the far clipping plane along the -Z axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wUAJ_3gi6HiJC-9OrR9Fw","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"rotate this matrix (counter-clockwise) by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"Rotation angle in radians.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":false,"description":"the axis to rotate around
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ULbJGrjsNzBKqzkSJWSok","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the matrix
","params":[{"identifier":"x","optional":false,"description":"a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"z","optional":true,"default":"0","description":"a number representing the depth vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZUReJFgqIQWnn1KVvfw3m","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"adds a 2D scaling transformation.
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"s5VnJX8lb1ZgVou0twJ7x","name":"scaleX","brief":"","scope":"instance","type":"MethodDoc","description":"specifies a 2D scale operation using the [sx, 1] scaling vector
","params":[{"identifier":"x","optional":false,"description":"x scaling vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rhbSz4IWlzQ4-DfuEtRPv","name":"scaleY","brief":"","scope":"instance","type":"MethodDoc","description":"specifies a 2D scale operation using the [1,sy] scaling vector
","params":[{"identifier":"y","optional":false,"description":"y scaling vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4a-DfJUrHqGYpqe--jA_s","name":"setTransform","brief":"","scope":"instance","type":"MethodDoc","description":"set the matrix to the specified value
","params":[{"identifier":"m00","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m01","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m02","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m03","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m10","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m11","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m12","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m13","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m20","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m21","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m22","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m23","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m30","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m31","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m32","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m33","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZgyIzOPLcHwIh7uZMHzWJ","name":"toArray","brief":"","scope":"instance","type":"MethodDoc","description":"return an array representation of this Matrix
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Float32Array","kind":"canonical"},{"value":"Float32Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"r5ok1ftovplyqlEh3JidK","name":"toString","brief":"","scope":"instance","type":"MethodDoc","description":"convert the object to a string representation
","params":[],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"fqUG_cnkpzsARYq1aItMb","name":"translate","brief":"","scope":"instance","type":"MethodDoc","description":"translate the matrix position using the given vector
","params":[{"identifier":"x","description":"a number representing the abscissa of the vector, or a vector object
","dataType":{"tokens":[{"value":"number | Vector2d | Vector3d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"a number representing the ordinate of the vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"z","optional":true,"default":"0","description":"a number representing the depth of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"h5d6bBPeV9rajNmQ2gDC-","name":"transpose","brief":"","scope":"instance","type":"MethodDoc","description":"Transpose the value of this matrix.
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"m4ZqkvULjRLUuwyuS0Wz6","name":"NineSliceSprite","brief":"","see":["https://en.wikipedia.org/wiki/9-slice_scaling"],"type":"ClassDoc","description":"A NineSliceSprite is similar to a Sprite, but it uses 9-slice scaling to strech its inner area to fit the size of the Rend...","params":[],"returns":[],"extends":["Sprite"],"implements":[],"members":[{"id":"KyaZ3dwtFXf03PYIPnBa4","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"
Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O9455PI_KZAaKAVgAWkdb","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7QVYUkpavQyBV8-poSUKq","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7-4rsL6_QaDZWiqgt4oWI","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5pFfyD_nUhipxJjUnEB6i","name":"animationpause","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KI0mVm3G8x0wuBiyx9Sr4","name":"animationspeed","brief":"","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"
animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-OJjNg0CkxGiJa6a3v9-s","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Gji0ggZh6h7aSJ9Hmag2A","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rn0V94YAX7vrLoEQ05o9A","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_DVWDgvjYC9jTlLIDNPH8","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6ELDVyKhH2u7Klr82Gemg","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jGx-ckRUCbV-mPENpntqo","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CctoMygPhM1m3C6TuOz8v","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I2VbD8l9xth3I23tZX4b8","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qPRnbDLSbFmR0wYVhhHW8","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ULfaqg3THzp8KWhw-PFtC","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w4msN_GcQbTcW3emW4P8r","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the NineSliceSprite
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NpFvQeOQtcy__zf1g4mNA","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iB4rtMSx_A5hnlIEUQV_R","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gSySTexpM9mlerf5cwMuU","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XjxX7aIGZVH77vMldUuF3","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j4J302-kzG78wfs8Vsvhb","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1HoAbMqR9p8MOlRc13Z6U","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jYv2YZFTFHd4PrwablMwM","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nDnapMs7R7vzkPWl-7g_h","name":"isVideo","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if this is a video sprite (e.g. a HTMLVideoElement was passed as as source)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ovb0ByT1kPPQ8qgSRuBg0","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v0lIFuV24Ypay8w44cJ8t","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F_gTVYg1ycJCXpI-tRYFa","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FLaznoiyymxZTyH5MP1n-","name":"offset","brief":"","defaultValue":"<0.0,0.0>","scope":"instance","type":"PropertyDoc","description":"global offset for the position to draw from on the source image.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nd4jsPno8gRNNZzov7I8u","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TOy1dwDzDB6CS46ojwBPM","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"OMP37DCAFkx9v3JiKUxKA","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4-2_uqTOZlSwU1yPyHg0O","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4Ij2fEw7mxpDN3bVpgtpt","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vlvUizEH_d3bAnARTS3U_","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aw2fpjodCrZvKwZNrpUwP","name":"source","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ei4QIr5LJrwHEyonLsOvE","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uYr7B7oc3oiCp1Aj_b_FS","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fGx5KJwhOfCLpZSVJbNWy","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6CoC006Vs2JkEAxpNsm6B","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9ROihClNKrn1ThBD3YeBH","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the NineSliceSprite
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D5mK37xBxad0SXuaVkGJj","name":"addAnimation","brief":"","examples":[{"caption":"","code":"// walking animation\nthis.addAnimation(\"walk\", [ 0, 1, 2, 3, 4, 5 ]);\n// standing animation\nthis.addAnimation(\"stand\", [ 11, 12 ]);\n// eating animation\nthis.addAnimation(\"eat\", [ 6, 6 ]);\n// rolling animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ]);\n// slower animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ], 200);\n// or get more specific with delay for each frame. Good solution instead of repeating:\nthis.addAnimation(\"turn\", [{ name: 0, delay: 200 }, { name: 1, delay: 100 }])\n// can do this with atlas values as well:\nthis.addAnimation(\"turn\", [{ name: \"turnone\", delay: 200 }, { name: \"turntwo\", delay: 100 }])\n// define an dying animation that stop on the last frame\nthis.addAnimation(\"die\", [{ name: 3, delay: 200 }, { name: 4, delay: 100 }, { name: 5, delay: Infinity }])\n// set the standing animation as default\nthis.setCurrentAnimation(\"stand\");"}],"scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"add an animation \nFor fixed-sized cell sprite sheet, the index list must follow the\nlogic as per the following example...","params":[{"identifier":"name","optional":false,"description":"
animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"index","optional":false,"description":"list of sprite index or name defining the animation. Can also use objects to specify delay for each frame, see below
","dataType":{"tokens":[{"value":"Array | Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1<%2> | %3 | %4"}},{"identifier":"animationspeed","optional":true,"description":"cycling speed for animation in ms
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"frame amount of frame added to the animation (delay between each frame).
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"eEKo4UtnpJev6qrCpo2K4","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"q7lEe5G8lxVPWunUlplTW","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wv-qzqobzuHtOEPWP4K5L","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ViNrs-SH4bY-ZHlASzItW","name":"constructor","brief":"","examples":[{"caption":"","code":"this.panelSprite = new me.NineSliceSprite(0, 0, {\n image : game.texture,\n region : \"grey_panel\",\n width : this.width,\n height : this.height\n});"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinates of the sprite object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinates of the sprite object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"Configuration parameters for the Sprite object
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.width","description":"the width of the Renderable over which the sprite needs to be stretched
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.height","description":"the height of the Renderable over which the sprite needs to be stretched
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.insetx","optional":true,"description":"the width of a corner over which the sprite is unscaled (default is a quarter of the sprite width)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.insety","optional":true,"description":"the height of a corner over which the sprite is unscaled (default is a quarter of the sprite height)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.image","description":"reference to spritesheet image, a texture atlas or to a texture atlas
","dataType":{"tokens":[{"value":"HTMLImageElement | HTMLCanvasElement | TextureAtlas | string","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"TextureAtlas","kind":"link"}],"template":"%1 | %2 | %3 | string"}},{"identifier":"settings.name","optional":true,"default":"\"\"","description":"name of this object
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.region","optional":true,"description":"region name of a specific region to use when using a texture atlas, see {@link TextureAtlas}
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.framewidth","optional":true,"description":"Width of a single frame within the spritesheet
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.frameheight","optional":true,"description":"Height of a single frame within the spritesheet
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.tint","optional":true,"description":"a tint to be applied to this sprite
","dataType":{"tokens":[{"value":"string | Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"string | %1"}},{"identifier":"settings.flipX","optional":true,"description":"flip the sprite on the horizontal axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.flipY","optional":true,"description":"flip the sprite on the vertical axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.anchorPoint","optional":true,"default":"{x:0.5, y:0.5}","description":"Anchor point to draw the frame at (defaults to the center of the frame).
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"NKloYy26YyzaJ_NTgMazd","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"cYf4fne7cLR-uhpylQG_b","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LcPt47O9jkB4ZyR9ou_Nt","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hjwvxyoVg3Rgo3PbsJaLH","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"zKL5kRboZfLs6SGH21g2W","name":"flicker","brief":"","examples":[{"caption":"","code":"// make the object flicker for 1 second\n// and then remove it\nthis.flicker(1000, function () {\n world.removeChild(this);\n});"}],"scope":"instance","type":"MethodDoc","description":"make the object flicker
","params":[{"identifier":"duration","optional":false,"description":"expressed in milliseconds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"callback","optional":false,"description":"Function to call when flickering ends
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QH_niMLpd1qupJIsle0Vh","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ttniwYoDWIp0KTFUJIV3r","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kcyqpOBGafo_t5RLmS8BR","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"HLuHpWyOX6JsgJvQm6_E0","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"colCi4T8GKlgQM5llWXYY","name":"getCurrentAnimationFrame","brief":"","scope":"instance","type":"MethodDoc","description":"return the current animation frame index.
","params":[],"returns":[{"description":"current animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"eZVEFc9lnEPyee4E1gAgl","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"IsWll026zgWss87aur7YR","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EmEzp6ScqTvj9TU4ouL-3","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"RDdRMGVz98ezWcijHWrL3","name":"isCurrentAnimation","brief":"","examples":[{"caption":"","code":"if (!this.isCurrentAnimation(\"walk\")) {\n // do something funny...\n}"}],"scope":"instance","type":"MethodDoc","description":"return true if the specified animation is the current one.
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"tJAkoZnM_UtoIZaLIADsy","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"vPGYAX8BNUzlvfrmoy2-7","name":"isFlickering","brief":"","scope":"instance","type":"MethodDoc","description":"return the flickering state of the object
","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"fo3i9xo5x_Aka4fPpV2oq","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PkgGa8nqd1qe3cQr8e7vO","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"-onmnd7cJbJG8ghhdCnib","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zdq4SA1xE3-avSAZE1JJS","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"8A3s4zDrN54rCr763gh7J","name":"pause","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ybU2dRmrW9JZkAxS38TcS","name":"play","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z5y_T-xe7fSK4cS1u9TxA","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"gB_un5YaUIOrH4nz9Nks4","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"hD_-HBUgr3NFGlSGs4fJG","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"D-1CsEByklCJ4c7Ncx2Cc","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2Ejaph_kz8W-DikvWs81F","name":"reverseAnimation","brief":"","scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"reverse the given or current animation if none is specified
","params":[{"identifier":"name","optional":true,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ITOhl2Sdk_fEgZVjG2TZN","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wwb5C1NVxyOXR3TOVDKzt","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Zq-GQUTEg_YUsHbQGiBJm","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xaI5imEm6iyjBuR_OjPLp","name":"setAnimationFrame","brief":"","examples":[{"caption":"","code":"// reset the current animation to the first frame\nthis.setAnimationFrame();"}],"scope":"instance","type":"MethodDoc","description":"force the current animation frame index.
","params":[{"identifier":"index","optional":true,"default":"0","description":"animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"uns0w_9ot-eOuKOAK9eoH","name":"setCurrentAnimation","brief":"","examples":[{"caption":"","code":" // set \"walk\" animation\n this.setCurrentAnimation(\"walk\");\n\n // set \"walk\" animation if it is not the current animation\n if (this.isCurrentAnimation(\"walk\")) {\n this.setCurrentAnimation(\"walk\");\n }\n\n // set \"eat\" animation, and switch to \"walk\" when complete\n this.setCurrentAnimation(\"eat\", \"walk\");\n\n // set \"die\" animation, and remove the object when finished\n this.setCurrentAnimation(\"die\", () => {\n world.removeChild(this);\n return false; // do not reset to first frame\n });\n\n // set \"attack\" animation, and pause for a short duration\n this.setCurrentAnimation(\"die\", () => {\n this.animationpause = true;\n\n // back to \"standing\" animation after 1 second\n setTimeout(function () {\n this.setCurrentAnimation(\"standing\");\n }, 1000);\n\n return false; // do not reset to first frame\n });"}],"scope":"instance","type":"MethodDoc","description":"set the current animation\nthis will always change the animation & set the frame to zero
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"resetAnim","optional":true,"description":"animation id to switch to when complete, or callback
","dataType":{"tokens":[{"value":"string | Function","kind":"canonical"}],"template":"string | Function"}},{"identifier":"preserve_dt","optional":true,"default":"false","description":"if false will reset the elapsed time counter since last frame
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zTU54JdNwiXVfo_e2J9II","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"PduhEyYwnoZnaIYYHlxak","name":"setRegion","brief":"","examples":[{"caption":"","code":"// change the sprite to \"shadedDark13.png\";\nmySprite.setRegion(mytexture.getRegion(\"shadedDark13.png\"));"}],"scope":"instance","see":["Texture.getRegion"],"type":"MethodDoc","description":"change the current texture atlas region for this sprite
","params":[{"identifier":"region","optional":false,"description":"typically returned through me.Texture.getRegion()
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qKANv6_vcaemHLozPt2az","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DqMdyqs88cw2H1UpVpYea","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xdo1I2CAz17rVuryMGaT3","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"JGCg1Wo57lSDCEOH-Ch2a","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bpphW1DXj8Gu6H0GUh6Tz","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"WMECxS9G9roEPuvQIFeKs","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"CIV3NfuzwMJF8Ep3m1iR8","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4XXim5MZq7Ox0h_VQTJp2","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hoDRVRAkDg3e-tsfmvUSV","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oXSlBVDkjWekt-I7JNdFA","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lKiHESehb4KG4vxwPC-Qm","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this srite (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"kEp8xp42yYkJHwNighnvf","name":"update","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"update function. \nautomatically called by the game manager {@link game}
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the Sprite is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"FIaDlJFqgxGJPGsfs1Yxv","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"FSwPElVBtHJgmg76FC3Ge","name":"ObjectPool","brief":"","see":["{@link pool} the default global instance of ObjectPool"],"type":"ClassDoc","description":"Object pooling - a technique that might speed up your game if used properly. \nIf some of your classes will be instantia...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"vjA7ERknQ57uM0IwR5eyW","name":"exists","brief":"","scope":"instance","type":"MethodDoc","description":"
Check if an object with the provided name is registered
","params":[{"identifier":"name","optional":false,"description":"of the registered object class
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"true if the classname is registered
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"sz9keYOIjmPSSQzj-qzRq","name":"getInstanceCount","brief":"","scope":"instance","type":"MethodDoc","description":"returns the amount of object instance currently in the pool
","params":[],"returns":[{"description":"amount of object instance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"yswGT6LF6qi__wfOShc5W","name":"poolable","brief":"","examples":[{"caption":"","code":"if (!me.pool.poolable(myCherryEntity)) {\n // object was not properly registered\n}"}],"scope":"instance","see":["register"],"type":"MethodDoc","description":"Check if an object is poolable\n(was properly registered with the recycling feature enable)
","params":[{"identifier":"obj","optional":false,"description":"object to be checked
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"true if the object is poolable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"L_49iBkkpN3SDHGB37Fza","name":"pull","brief":"","examples":[{"caption":"","code":"me.pool.register(\"bullet\", BulletEntity, true);\nme.pool.register(\"enemy\", EnemyEntity, true);\n// ...\n// when we need to manually create a new bullet:\nlet bullet = me.pool.pull(\"bullet\", x, y, direction);\n// ...\n// params aren't a fixed number\n// when we need new enemy we can add more params, that the object construct requires:\nlet enemy = me.pool.pull(\"enemy\", x, y, direction, speed, power, life);\n// ...\n// when we want to destroy existing object, the remove\n// function will ensure the object can then be reallocated later\nme.game.world.removeChild(enemy);\nme.game.world.removeChild(bullet);"}],"scope":"instance","type":"MethodDoc","description":"Pull a new instance of the requested object (if added into the object pool)
","params":[{"identifier":"name","optional":false,"description":"as used in {@link pool.register}
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"args","optional":true,"variadic":true,"description":"arguments to be passed when instantiating/reinitializing the object
","dataType":{"tokens":[{"value":"unknown","kind":"canonical"}],"template":"unknown"}}],"returns":[{"description":"the instance of the requested object
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"hAwvzP-EaAtIPrNmzacUU","name":"purge","brief":"","scope":"instance","type":"MethodDoc","description":"purge the object pool from any inactive object \nObject pooling must be enabled for this function to work \nnote: thi...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jZA7v2hE6F3wWRFpgMHlN","name":"push","brief":"","scope":"instance","type":"MethodDoc","description":"
Push back an object instance into the object pool \nObject pooling for the object class must be enabled,\nand object mus...","params":[{"identifier":"obj","optional":false,"description":"
instance to be recycled
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"throwOnError","optional":true,"default":"true","description":"throw an exception if the object cannot be recycled
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"true if the object was successfully recycled in the object pool
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"p_P4s7Ak8G5rkKH2P4uPa","name":"register","brief":"","examples":[{"caption":"","code":"// implement CherryEntity\nclass Cherry extends Sprite {\n onResetEvent() {\n // reset object mutable properties\n this.lifeBar = 100;\n }\n};\n// add our users defined entities in the object pool and enable object recycling\nme.pool.register(\"cherrysprite\", Cherry, true);"}],"scope":"instance","type":"MethodDoc","description":"register an object to the pool. \nPooling must be set to true if more than one such objects will be created. \n(Note...","params":[{"identifier":"className","optional":false,"description":"
as defined in the Name field of the Object Properties (in Tiled)
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"classObj","optional":false,"description":"corresponding Class to be instantiated
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"recycling","optional":true,"default":"false","description":"enables object recycling for the specified class
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"L-W2rgLmte6R4kTCq4Yq-","name":"ObservableVector2d","brief":"","type":"ClassDoc","description":"A Vector2d object that provide notification by executing the given callback when the vector is changed.
","params":[],"returns":[],"extends":["Vector2d"],"implements":[],"members":[{"id":"c4HE1N48LGA2VNlk-ayPx","name":"x","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"x value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mHKo7WmDG1dWhCsDmU5u-","name":"y","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"y value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kXnAoMFUiwGNrKgdR3L_X","name":"abs","brief":"","scope":"instance","type":"MethodDoc","description":"Update this vector values to absolute values
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ovIqM9mIjLMlwjxBWDzzM","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"Add the passed vector to this vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"e6KiegR_phMv-7Sn5eNMz","name":"angle","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle between this vector and the passed one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zwhIScL90UnYRI29U-7Px","name":"ceil","brief":"","scope":"instance","type":"MethodDoc","description":"Ceil the vector values
","params":[],"returns":[{"description":"new me.ObservableVector2d
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"YL9-T5VQpMps9drB_Xzwz","name":"ceilSelf","brief":"","scope":"instance","type":"MethodDoc","description":"Ceil this vector values
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zsA0rnJ21jUz8jffZ1_O4","name":"clamp","brief":"","scope":"instance","type":"MethodDoc","description":"Clamp the vector value within the specified value range
","params":[{"identifier":"low","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"high","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"new me.ObservableVector2d
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"eod4mFYC4xLGlkMOGLuld","name":"clampSelf","brief":"","scope":"instance","type":"MethodDoc","description":"Clamp this vector value within the specified value range
","params":[{"identifier":"low","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"high","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tHg-0TwN_7I27u0nc-04X","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"return a clone copy of this vector
","params":[],"returns":[{"description":"new me.ObservableVector2d
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UA6QiG5fZIktXO3PMAoAG","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"default":"0","description":"x value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"default":"0","description":"y value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"additional required parameters
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.onUpdate","description":"the callback to be executed when the vector is changed
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"settings.scope","optional":true,"description":"the value to use as this when calling onUpdate
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"DmMME9DgikEq_9YgVw946","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"Copy the x,y values of the passed vector to this one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"luUVabzpwu50ZHymtMt4o","name":"cross","brief":"","scope":"instance","type":"MethodDoc","description":"return the cross product of this vector and the passed one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"The cross product.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vhd_JfWNOmMeOqKjArn7e","name":"distance","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance between this vector and the passed one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-C5A_fsi_RUSaG5r8TK7G","name":"div","brief":"","scope":"instance","type":"MethodDoc","description":"Divide this vector values by the passed value
","params":[{"identifier":"n","optional":false,"description":"the value to divide the vector by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QLHW8k3BP7XStRSXsHNGA","name":"dot","brief":"","scope":"instance","type":"MethodDoc","description":"return the dot product of this vector and the passed one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"The dot product.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"YPxHf4Nz4EkoGDH33kH9E","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the two vectors are the same
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"r3b3TSy56_8vbTVsZmVcA","name":"floor","brief":"","scope":"instance","type":"MethodDoc","description":"Floor the vector values
","params":[],"returns":[{"description":"new me.ObservableVector2d
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8UQXtNU2XRAgpo9_iQcyH","name":"floorSelf","brief":"","scope":"instance","type":"MethodDoc","description":"Floor this vector values
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"sDtwzqFZ14spH5I74uhYO","name":"length","brief":"","scope":"instance","type":"MethodDoc","description":"return the length (magnitude) of this vector
","params":[],"returns":[{"description":"the length of this vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"REFKHoO16vyVIh2eSj4ZO","name":"length2","brief":"","scope":"instance","type":"MethodDoc","description":"return the square length of this vector
","params":[],"returns":[{"description":"The length^2 of this vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"K9D0IeiqDzmHMtxrHKnot","name":"lerp","brief":"","scope":"instance","type":"MethodDoc","description":"Linearly interpolate between this vector and the given one.
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"alpha","optional":false,"description":"distance along the line (alpha = 0 will be this vector, and alpha = 1 will be the given one).
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Xy6dGIl9LK25rR8nfvGCU","name":"maxV","brief":"","scope":"instance","type":"MethodDoc","description":"Update this vector with the maximum value between this and the passed vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_bLjHJ-RTCJsDgCzcDFsw","name":"minV","brief":"","scope":"instance","type":"MethodDoc","description":"Update this vector with the minimum value between this and the passed vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"quXb08zbFgtcoWvq0WLxd","name":"moveTowards","brief":"","scope":"instance","type":"MethodDoc","description":"interpolate the position of this vector towards the given one while nsure that the distance never exceeds the given step.
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"step","optional":false,"description":"the maximum step per iteration (Negative values will push the vector away from the target)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8Zk38AbEZQWn0HizPoMBF","name":"negate","brief":"","scope":"instance","type":"MethodDoc","description":"Negate the vector values
","params":[],"returns":[{"description":"new me.ObservableVector2d
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ub1MRrKPmlOOlnq8AFHtp","name":"negateSelf","brief":"","scope":"instance","type":"MethodDoc","description":"Negate this vector values
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3tIKCf1syAc4fl7lIB6CC","name":"normalize","brief":"","scope":"instance","type":"MethodDoc","description":"normalize this vector (scale the vector so that its magnitude is 1)
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5c-dYZMXBaydDGKC4NLu1","name":"perp","brief":"","scope":"instance","type":"MethodDoc","description":"change this vector to be perpendicular to what it was before. \n(Effectively rotates it 90 degrees in a clockwise direct...","params":[],"returns":[{"description":"
Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ixr1mJHThHONZkST7Dv7R","name":"project","brief":"","scope":"instance","type":"MethodDoc","description":"project this vector on to another vector.
","params":[{"identifier":"v","optional":false,"description":"The vector to project onto.
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5pe6LweRVEKhVSoKAeu3i","name":"projectN","brief":"","scope":"instance","type":"MethodDoc","description":"Project this vector onto a vector of unit length. \nThis is slightly more efficient than project
when deali...","params":[{"identifier":"v","optional":false,"description":"
The unit vector to project onto.
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8f80DtSxIRMzBXFvQdzlQ","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this vector (counter-clockwise) by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SzZdr0dK-JYbgUtwobhkv","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"Multiply this vector values by the given scalar
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AQ-BxCB1_-K7dtXhriXEX","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"Multiply this vector values by the passed vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"fb-BPOvltUDv-eMVQnuTm","name":"set","brief":"","scope":"instance","type":"MethodDoc","description":"set the Vector x and y properties to the given values
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"F9DhnMeEIAVeM-JcRkJXG","name":"setCallback","brief":"","scope":"instance","type":"MethodDoc","description":"set the callback to be executed when the vector is changed
","params":[{"identifier":"fn","optional":false,"description":"callback
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"scope","optional":true,"default":"null","description":"scope
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mrW6AHYMODjnZ8Bo3qhAG","name":"setMuted","brief":"","scope":"instance","type":"MethodDoc","description":"set the vector value without triggering the callback
","params":[{"identifier":"x","optional":false,"description":"x value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"y value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GjCvooehjYUqm45oPR5nb","name":"setV","brief":"","scope":"instance","type":"MethodDoc","description":"set the Vector x and y properties using the passed vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"NU3ZTyfm-lUCwOLt116v4","name":"setZero","brief":"","scope":"instance","type":"MethodDoc","description":"set the Vector x and y properties to 0
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UtNJjAV-5H9n3UpU3lZA2","name":"sub","brief":"","scope":"instance","type":"MethodDoc","description":"Substract the passed vector to this vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector2d","kind":"canonical"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ypSkgiIdQY9QhAtlqehc2","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"Convert this vector into 2d coordinate space
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"dXdxAjTJHsItmgJA3LYVd","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"Convert this vector into isometric coordinate space
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Za7fUV9Tn3ODTyet2PFwk","name":"toString","brief":"","scope":"instance","type":"MethodDoc","description":"convert the object to a string representation
","params":[],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"gyVuOa6oLJKUZhgkmnRXz","name":"toVector2d","brief":"","scope":"instance","type":"MethodDoc","description":"return a me.Vector2d
copy of this me.ObservableVector2d
object
","params":[],"returns":[{"description":"new me.Vector2d
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"El331OPyDwxQEIpzb4mpY","name":"ObservableVector3d","brief":"","type":"ClassDoc","description":"A Vector3d object that provide notification by executing the given callback when the vector is changed.
","params":[],"returns":[],"extends":["Vector3d"],"implements":[],"members":[{"id":"Gery3k5_KmcG_x47exW0d","name":"x","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"x value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RcSK5tQcge2RnR7btbCqf","name":"y","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"y value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ztUyvfwDWscYWz_IC1aFT","name":"z","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"z value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iKF1ozf7m0m0CWs2HE7Rt","name":"abs","brief":"","scope":"instance","type":"MethodDoc","description":"Update this vector values to absolute values
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"uRCi_6B9SipChXLrf20Kd","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"Add the passed vector to this vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d | ObservableVector2d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zgBT5q8LjJ6RC57LFh9Qh","name":"angle","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle between this vector and the passed one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"WBHCGnHM3mcHIpuZN-q0P","name":"ceil","brief":"","scope":"instance","type":"MethodDoc","description":"Ceil the vector values
","params":[],"returns":[{"description":"new me.ObservableVector3d
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"HXqkCxJaKDpMrv4ta35Mo","name":"ceilSelf","brief":"","scope":"instance","type":"MethodDoc","description":"Ceil this vector values
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2-kidx_nR4FdMwRRLLq48","name":"clamp","brief":"","scope":"instance","type":"MethodDoc","description":"Clamp the vector value within the specified value range
","params":[{"identifier":"low","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"high","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"new me.ObservableVector3d
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bNFL-ldcZkAYfkRBis9Vu","name":"clampSelf","brief":"","scope":"instance","type":"MethodDoc","description":"Clamp this vector value within the specified value range
","params":[{"identifier":"low","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"high","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"pqkzQgF9VR11Mj6OVE6Ch","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"return a clone copy of this vector
","params":[],"returns":[{"description":"new me.ObservableVector3d
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qTrZjhvE7Py7EiwZ6RELD","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"default":"0","description":"x value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"default":"0","description":"y value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"z","optional":false,"default":"0","description":"z value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"additional required parameters
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.onUpdate","description":"the callback to be executed when the vector is changed
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"settings.scope","optional":true,"description":"the value to use as this when calling onUpdate
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"d3M4vgKZK2uOgYH2ML0QI","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"Copy the components of the given vector into this one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d | ObservableVector2d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9FvfwlKbl_hF00SKNbUox","name":"cross","brief":"","scope":"instance","type":"MethodDoc","description":"calculate the cross product of this vector and the passed one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector3d | ObservableVector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tEKK0cI5gvlNnL2CbXiAX","name":"distance","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance between this vector and the passed one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d | ObservableVector2d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"i4ONKl2g-4ftuEca21JU7","name":"div","brief":"","scope":"instance","type":"MethodDoc","description":"Divide this vector values by the passed value
","params":[{"identifier":"n","optional":false,"description":"the value to divide the vector by
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hfFuhbR3x8aRcIraj9uvf","name":"dot","brief":"","scope":"instance","type":"MethodDoc","description":"return the dot product of this vector and the passed one
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d | ObservableVector2d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[{"description":"The dot product.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-RnKm6AjpFPgZyzF9BgVq","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the two vectors are the same
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d | ObservableVector2d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"T8iCDoralMWwjUcCU5uwG","name":"floor","brief":"","scope":"instance","type":"MethodDoc","description":"Floor the vector values
","params":[],"returns":[{"description":"new me.ObservableVector3d
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3cds3XlZKlbDVBpsJM02z","name":"floorSelf","brief":"","scope":"instance","type":"MethodDoc","description":"Floor this vector values
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"T7wqWjXeWp3cxeLSVhFbm","name":"length","brief":"","scope":"instance","type":"MethodDoc","description":"return the length (magnitude) of this vector
","params":[],"returns":[{"description":"the length of this vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"l1rWRK8kBWarQimuaJl07","name":"length2","brief":"","scope":"instance","type":"MethodDoc","description":"return the square length of this vector
","params":[],"returns":[{"description":"The length^2 of this vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"NqROnHigjKvMj3FXM7ijU","name":"lerp","brief":"","scope":"instance","type":"MethodDoc","description":"Linearly interpolate between this vector and the given one.
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector3d | ObservableVector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"alpha","optional":false,"description":"distance along the line (alpha = 0 will be this vector, and alpha = 1 will be the given one).
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tHVbWgltp1zEnxt70zmSI","name":"maxV","brief":"","scope":"instance","type":"MethodDoc","description":"Update this vector with the maximum value between this and the passed vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d | ObservableVector2d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_BobZXjLyhgNsmKG7Qrzr","name":"minV","brief":"","scope":"instance","type":"MethodDoc","description":"Update this vector with the minimum value between this and the passed vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d | ObservableVector2d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FwC2WHKnlIKGxr05VPPOw","name":"moveTowards","brief":"","scope":"instance","type":"MethodDoc","description":"interpolate the position of this vector on the x and y axis towards the given one while ensure that the distance never exc...","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d | Vector3d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}},{"identifier":"step","optional":false,"description":"
the maximum step per iteration (Negative values will push the vector away from the target)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VvyzyDMn6nsbnx7Tmfvg3","name":"negate","brief":"","scope":"instance","type":"MethodDoc","description":"Negate the vector values
","params":[],"returns":[{"description":"new me.ObservableVector3d
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"N64Iqe7tc-uAZyqus6VRo","name":"negateSelf","brief":"","scope":"instance","type":"MethodDoc","description":"Negate this vector values
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EHuYMgjw4WCX_n1olTS4d","name":"normalize","brief":"","scope":"instance","type":"MethodDoc","description":"normalize this vector (scale the vector so that its magnitude is 1)
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mUFiiW6pANfr2IA6hfdLT","name":"perp","brief":"","scope":"instance","type":"MethodDoc","description":"change this vector to be perpendicular to what it was before. \n(Effectively rotates it 90 degrees in a clockwise direct...","params":[],"returns":[{"description":"
Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DExK_fc9vlD2KTwc2-xMp","name":"project","brief":"","scope":"instance","type":"MethodDoc","description":"project this vector on to another vector.
","params":[{"identifier":"v","optional":false,"description":"The vector to project onto.
","dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KFa3bkkxKNy7_mBM-2tU9","name":"projectN","brief":"","scope":"instance","type":"MethodDoc","description":"Project this vector onto a vector of unit length. \nThis is slightly more efficient than project
when deali...","params":[{"identifier":"v","optional":false,"description":"
The unit vector to project onto.
","dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bCNITWrPK7lorjZnJ3kdX","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this vector (counter-clockwise) by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around (on the same z axis)
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"POhntnQ9-lr_zmmF4rcdL","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"Multiply this vector values by the given scalar
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"z","optional":true,"default":"1","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vuWH_MaxxECW7WODJjSvG","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"Multiply this vector values by the passed vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d | ObservableVector2d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Nr2T_mxSE3U1u2SdgWbrt","name":"set","brief":"","scope":"instance","type":"MethodDoc","description":"set the Vector x and y properties to the given values
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"z","optional":true,"default":"0","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Cg3a8GOcQE58jIGQtoGwo","name":"setCallback","brief":"","scope":"instance","type":"MethodDoc","description":"set the callback to be executed when the vector is changed
","params":[{"identifier":"fn","optional":false,"description":"callback
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"scope","optional":true,"default":"null","description":"scope
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JKG9MT-NmpP92QIVOZ_j9","name":"setMuted","brief":"","scope":"instance","type":"MethodDoc","description":"set the vector value without triggering the callback
","params":[{"identifier":"x","optional":false,"description":"x value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"y value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"z","optional":true,"default":"0","description":"z value of the vector
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EwNRXlVLMGl-XYEPFoJD9","name":"setV","brief":"","scope":"instance","type":"MethodDoc","description":"set the Vector x and y properties using the passed vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VUTPS5gxWuq15oTUqFxvp","name":"setZero","brief":"","scope":"instance","type":"MethodDoc","description":"set the Vector x and y properties to 0
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"eF4eTSw_AsHH-Fk2vYxG-","name":"sub","brief":"","scope":"instance","type":"MethodDoc","description":"Substract the passed vector to this vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d | ObservableVector2d | ObservableVector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"ObservableVector3d","kind":"canonical"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"59CCGVlS8ymC3kW3RMl4o","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"Convert this vector into 2d coordinate space
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZoSmXYTwea5ovP0Wu2NUG","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"Convert this vector into isometric coordinate space
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zURhbgb_37E7CK78Uhb27","name":"toString","brief":"","scope":"instance","type":"MethodDoc","description":"convert the object to a string representation
","params":[],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"G3Tb0Xavahxx2dVORXTW9","name":"toVector3d","brief":"","scope":"instance","type":"MethodDoc","description":"return a me.Vector3d
copy of this me.ObservableVector3d
object
","params":[],"returns":[{"description":"new me.Vector3d
","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"SW_l0owqXO4cwxm2RtIOb","name":"Particle","brief":"","type":"ClassDoc","description":"Single Particle Object.
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"0nwNANdCRs-24bN1zW-1E","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bf5Ua0djAdxiMHvUXE0O5","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mrBaX9m-UG6UdEIcsJWAh","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iFRPAyN3gEze0PHrMAYK4","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8a19q3c2jd9ikivWU9Cqg","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6rUk4_eKJYgX0SIx9Rrz8","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3kMRbKoArlYFH-RVNEFkK","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bnjAl4qH5ndJlJCHpyXb3","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5n6bc40f_p1Rqfcl4cEQ6","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7st8U81P2FZVZ7rgRZOyo","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hgvYwHl9allrvxb8f9opY","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FWtZR6Jb-SiQfrrchCRiQ","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9tBAjI95El_tQF-ZF1sjR","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0ej29dfbc-ppsXF7g566l","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zAVdk4stg9Ji6wg_6RV97","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fqbqlUdRhANnSCxQmeQ-i","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2oEbiQ95FBiToYdb87Kes","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WWTO0MrY1vQrrEzQbpWQx","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P7IiHeboGPySvHsP63VED","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SIxsvcelLsMNkoM9gn7oE","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_84Ex-1BJVFqCuq_HryFT","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kDX37g-ZLPCSRWfogGi0b","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0462OgaA6bI3hXnE_-gWq","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DMSfHL2gVNWwUX5S92Mcc","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4N4N-5TqTTuIuq1OiC9D5","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-gOf3ere_JxNTUY2csJvs","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ukfTJXYwKUzgiSZ6WtYFV","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZoHFg239hmDJKYxF11_3Y","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q6UtCczTCfTd4wUSYy7VF","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V1qDywj3KIYMgidH4j0JU","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"osms9ZjZ9zg_AHkzIH1-S","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tDf2Cf4C9Hdw73Yxc3A0V","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LN7uvjcjt_oIfgz_o007P","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r6FkOfJFcJlTkLWNkwbJ5","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3IhBqYlpRIBut9SsM-YlL","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RYF0-iZ3Mzu6pbXMeFDCD","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EtaUL3b7VgPcNektrtZ6p","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"7zrr_oabH_pMvnYuMbCUj","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-xvy3sLFqyQFOenwGM21i","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DukVUuunkPxq25c3NdBNL","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"emitter","optional":false,"description":"the particle emitter
","dataType":{"tokens":[{"value":"ParticleEmitter","kind":"canonical"},{"value":"ParticleEmitter","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"xmwZpIagfXoQZSSbITvKU","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"s34QhQixwxCjTk-JlM9Zp","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oPPxL0rpo1-Zrg3HO0EMK","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"v42pxYThqMMwrJWuxYFua","name":"draw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#postDraw"],"type":"MethodDoc","description":"Draw this renderable (automatically called by melonJS).\nAll draw operations for renderable are made respectively\nto the po...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"VRyM-woxiro1g48JBPSXE","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"hu8L5-9aUcC9NSPKicVHv","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"IYToRwVD4gemdAG5qvwAn","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xIN21MsYW-aIpmmp-tsSr","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"sATJ0bjogBcEgkkc-dhaC","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jchlTyzhDK3T0T3XTrsl7","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"q-LDZvZbee2t8Or4l91b0","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZrxkHQGOX7o2b1GnpEr9g","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"gAD_ED50HlFL3YhLmnlaK","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"EQKztBdQIRwpzQsy4B0t2","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xlNoMHamBEqIc1myDhxxB","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"wlQQh_FlUGvy3mazb_N8c","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ik8ymz_9V8eMFreHP1OL6","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"i-okXiQuIf9vsnTmqe0Nv","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"b3uBvnIO0o_wCJmwekiYy","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"mdcu1_QDfljjfAUWX9RcA","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vi_anCcZSxyrPTvW56mdf","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"T2MJNFrPaKRSnwTGxqaR0","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"slD6asvikOpzsMzBOL6UA","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4b07LmeLoBJeUVOkyffAu","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VvMywqzGbdsjB2_Cip9rT","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"_x7fvIdrtwNjVC6KEt2oc","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8eZoEUS2PguPiKXyBRMbs","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"z6kW9khZ4Nbjy-TdnwH2o","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"3xC-GT77-vRFDCMvLBGlu","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mYJ09SZOizByxSnOefGq6","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VBpBN8z1GDsv6UbpSZqXW","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"H5JzrkGPdm9xVlp_BGrP2","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"D2shJlY5s2g_AGKFEtlmd","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8mBuySAJs9_PQdzHMBY6q","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Jliyim-8oQJQwd88MXUKP","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"D6uP_si80JNpPslatOOVj","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"L25r0wtb0NUPX57qPNh9a","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"tIo2rgN5QBVgZYueJhRpK","name":"ParticleEmitter","brief":"","type":"ClassDoc","description":"Particle Emitter Object.
","params":[],"returns":[],"extends":["Container"],"implements":[],"members":[{"id":"6CX5LP5vARvz73YibMAku","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ObmTiHMSWPze79n3yOvTR","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yhq2bEYgAgFVUTQRfeOT7","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rKAJA8EnmtAMO7KWqKfuQ","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hvsAorNEmxPc3qvtk2Ghd","name":"autoDepth","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"
Specify if the children z index should automatically be managed by the parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xMHoR4bSM4jKwQq5zsW0X","name":"autoSort","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"Specify if the children list should be automatically sorted when adding a new child
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"75Gh8_POBmnwcU7RU0jBR","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1XzilwgabXMBsXWibMiOz","name":"backgroundColor","brief":"","defaultValue":"(0, 0, 0, 0.0)","examples":[{"caption":"","code":"// add a red background color to this container\nthis.backgroundColor.setColor(255, 0, 0);"}],"scope":"instance","type":"PropertyDoc","description":"
define a background color for this container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FFtC6AxWjBCDpECh4sHfn","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RGZ2MLPZmxIyid_hHLczH","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AYGFnBjsHD1ba301j9RPH","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7Nqlrb0YxBVy4cluu45YB","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Rc16gCwxHjnvpD8vdDt0K","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8-RQ6UkjdbYREzlbH3WyT","name":"clipping","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Specify if the container draw operation should clip his children to its own bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k0CMKPO_T0KApsCqUZ6Zx","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"584FRA_zXbAPt_n6nwMvk","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gTIlHjrrNcCympOSR5s4-","name":"enableChildBoundsUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Specify if the container bounds should automatically take in account\nall child bounds when updated (this is expensive and ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U4suCJlBtfjeIevJLsSat","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"
If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ju6L5jGhPm2ojvGJIvgdV","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XxyZ-XNKzfymsWKs-tZpG","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FMuIYSu0orm_J1rbQvv1B","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"l5rna4VX0UjrBz5WgaK-a","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vHmCcR4j1pWwIKqcYIUuA","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tk1tC_5MaJ3WWX7x1AXcX","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZqLr7VhxO6jbyq2EgGJKK","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rd9a-efEgYtYpLyV1A9SD","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7XrkkWaQUIQy-XGEdE8_k","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WgmMwm_uhEP2m2YSC0uC-","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WbxV4Epve_QGq5sTkjbrh","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wG4zQpkwd045bXDtUP0Y6","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Nf9yVWTH_bLdQ-h5GnFp_","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eyTQyasUgUUkKebbjlwvL","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ICEyKByezNzcbuj72MZ-m","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9Ty4qusdzGfEPUftgkuMn","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wszNdi9C4H0rJhxJJwZaF","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5fv-QPRxJXUfvDVLkAOVC","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"whether the container is the root of the scene
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qPjtrK8S_XxXppnAavTNU","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the current (active) emitter settings
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"f6q0FqN2USMibEFsZsINr","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k2DNsb1M0-qZX-Cb9eBWn","name":"sortOn","brief":"","defaultValue":"\"z\"","scope":"instance","type":"PropertyDoc","description":"
The property of the child object that should be used to sort on this container\nvalue : "x", "y", "...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Nh-N3rD0pFocFOBiw-V71","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JmWc2ZPYRx-DXGZv9_S1n","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sUKXM7kPPC8kGVkyWqAGj","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K1fZjleQgIUBI4hEGEthE","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zQPavsuGjcifhBtS4-whB","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"f1_Kh_fnyd2SbZqrtYonl","name":"addChild","brief":"","scope":"instance","type":"MethodDoc","description":"Add a child to the container \nif auto-sort is disable, the object will be appended at the bottom of the list.\nAdding a...","params":[{"identifier":"child","optional":false,"description":"
Child to be added
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}},{"identifier":"z","optional":true,"description":"forces the z index of the child to the specified value
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the added child
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AwCQ5OR_nQiwcb0QRCaD7","name":"addChildAt","brief":"","scope":"instance","type":"MethodDoc","description":"Add a child to the container at the specified index \n(the list won't be sorted after insertion)
","params":[{"identifier":"child","optional":false,"description":"Child to be added
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}},{"identifier":"index","optional":false,"description":"The index at which to insert the child
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the added child
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UN1gbULAnH6J9KuGjDmUB","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DI-dra2FQ9KAJpgH78F4b","name":"burstParticles","brief":"","scope":"instance","type":"MethodDoc","description":"Launch all particles from emitter and stop (e.g. for explosion)
","params":[{"identifier":"total","optional":true,"description":"number of particles to launch
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"UPPAkSotGFFdo8pi6KRTX","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qLh3PSY2uvHo4_6iPKx8J","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MCQYH-S24dqpNQiDZggzb","name":"constructor","brief":"","examples":[{"caption":"","code":" // Create a particle emitter at position 100, 100\n let emitter = new ParticleEmitter(100, 100, {\n width: 16,\n height : 16,\n tint: \"#f00\",\n totalParticles: 32,\n angle: 0,\n angleVariation: 6.283185307179586,\n maxLife: 5,\n speed: 3\n });\n\n // Add the emitter to the game world\n me.game.world.addChild(emitter);\n\n // Launch all particles one time and stop, like a explosion\n emitter.burstParticles();\n\n // Launch constantly the particles, like a fountain\n emitter.streamParticles();\n\n // At the end, remove emitter from the game world\n // call this in onDestroyEvent function\n me.game.world.removeChild(emitter);"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"x position of the particle emitter
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"y position of the particle emitter
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":true,"default":"ParticleEmitterSettings","description":"the settings for the particle emitter.
","dataType":{"tokens":[{"value":"ParticleEmitterSettings","kind":"canonical"},{"value":"ParticleEmitterSettings","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"THA_0xPPx2XUq56u_EJAL","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"xh2TFKGZrsZ2UN272INiQ","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ric_H-90brl904DotwLGY","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"WvAfDlp5hIffCONXzhdco","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"3Rp1H_Ylgu2ZoZURTw25h","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"04Z2VI7q2nw3tXhr1e2bR","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"aHOgH0qB405agItG0UxHm","name":"forEach","brief":"","examples":[{"caption":"","code":"// iterate through all children of this container\ncontainer.forEach((child) => {\n // do something with the child\n child.doSomething();\n});\ncontainer.forEach((child, index) => { ... });\ncontainer.forEach((child, index, array) => { ... });\ncontainer.forEach((child, index, array) => { ... }, thisArg);"}],"scope":"instance","type":"MethodDoc","description":"The forEach() method executes a provided function once per child element. \nthe callback function is invoked with three...","params":[{"identifier":"callback","optional":false,"description":"
fnction to execute on each element
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"thisArg","optional":true,"description":"value to use as this(i.e reference Object) when executing callback.
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"grdBOkl8ATT48fhQC-FsT","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TqVZ4fIbe_G5GMnC9VkWK","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RhDbFsYBp828QtxyRTW3N","name":"getChildAt","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the Child at the specified index
","params":[{"identifier":"index","optional":false,"description":"The index of the child
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the child at the specified index
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VMZRTSoIGI7uoS5jL5F2A","name":"getChildByGUID","brief":"","scope":"instance","type":"MethodDoc","description":"return the child corresponding to the specified GUID \nnote : avoid calling this function every frame since\nit parses th...","params":[{"identifier":"guid","optional":false,"description":"
child GUID
","dataType":{"tokens":[{"value":"string | RegExp | number | boolean","kind":"canonical"},{"value":"RegExp","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"string | %1 | %2 | boolean"}}],"returns":[{"description":"corresponding child or null
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BXJfN2zfnx9CeB1aebBH7","name":"getChildByName","brief":"","scope":"instance","type":"MethodDoc","description":"returns the list of childs with the specified name \nas defined in Tiled (Name field of the Object Properties) \nnote ...","params":[{"identifier":"name","optional":false,"description":"
child name
","dataType":{"tokens":[{"value":"string | RegExp | number | boolean","kind":"canonical"},{"value":"RegExp","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"string | %1 | %2 | boolean"}}],"returns":[{"description":"Array of children
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"qaqKBW2piigsUOewzo2gc","name":"getChildByProp","brief":"","examples":[{"caption":"","code":" // get the first child object called \"mainPlayer\" in a specific container :\n let ent = myContainer.getChildByProp(\"name\", \"mainPlayer\");\n\n // or query the whole world :\n let ent = container.getChildByProp(\"name\", \"mainPlayer\");\n\n // partial property matches are also allowed by using a RegExp.\n // the following matches \"redCOIN\", \"bluecoin\", \"bagOfCoins\", etc :\n let allCoins = container.getChildByProp(\"name\", /coin/i);\n\n // searching for numbers or other data types :\n let zIndex10 = container.getChildByProp(\"z\", 10);\n let inViewport = container.getChildByProp(\"inViewport\", true);"}],"scope":"instance","type":"MethodDoc","description":"return the child corresponding to the given property and value. \nnote : avoid calling this function every frame since\ni...","params":[{"identifier":"prop","optional":false,"description":"
Property name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"value","optional":false,"description":"Value of the property
","dataType":{"tokens":[{"value":"string | RegExp | number | boolean","kind":"canonical"},{"value":"RegExp","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"string | %1 | %2 | boolean"}}],"returns":[{"description":"Array of childs
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"aB-bGAnsMHNHHlwbA1yd_","name":"getChildByType","brief":"","scope":"instance","type":"MethodDoc","description":"returns the list of childs with the specified class type
","params":[{"identifier":"classType","optional":false,"description":"Class type
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"Array of children
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"DA8HxnIGbuvpK-KRnUKZL","name":"getChildIndex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the index of the given Child
","params":[{"identifier":"child","optional":false,"description":"The child object
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[{"description":"index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"R2Psr0EajwUhCQYOhKPTe","name":"getChildren","brief":"","scope":"instance","type":"MethodDoc","description":"return all child in this container
","params":[],"returns":[{"description":"an array of renderable object
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"PRWPPj5F-eGfDth0h1KLk","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"8j6fcBdKmeuD4EfG7dAjO","name":"getNextChild","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the next child within the container or undefined if none
","params":[{"identifier":"child","optional":false,"description":"The child object
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[{"description":"child
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-geKrt3Tecx7BpUrgAW6J","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"l4Gj8pajsTIG5DLGD440C","name":"getRandomPointX","brief":"","scope":"instance","type":"MethodDoc","description":"returns a random point on the x axis within the bounds of this emitter
","params":[],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oGqHx35xpccBhgMJURFKl","name":"getRandomPointY","brief":"","scope":"instance","type":"MethodDoc","description":"returns a random point on the y axis within the bounds this emitter
","params":[],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Oh_RPMA5t51leU9Uk860v","name":"getRootAncestor","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the instance of the root container (i.e. the current application World container).
","params":[],"returns":[{"description":"root container
","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5tczVdWMFxgIuW0b-IezH","name":"hasChild","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if contains the specified Child
","params":[{"identifier":"child","optional":false,"description":"The child object
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"0P6YruSzcQoVOoSwFx7dV","name":"isAttachedToRoot","brief":"","scope":"instance","type":"MethodDoc","description":"Checks if this container is root or if it's attached to the root container.
","params":[],"returns":[{"description":"true if this container is root or if it's attached to the root container
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"25Kqsf_pvbvjyT35nq4In","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"El8-PJkePIXQls1YuyArB","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"1dtxflgjN9dZNrNcE6wv4","name":"isRunning","brief":"","scope":"instance","type":"MethodDoc","description":"Emitter is of type stream and is launching particles
","params":[],"returns":[{"description":"Emitter is Stream and is launching particles
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"0AnzITNGrXHMRDBUDucJm","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iSQUt3XvIMoDXUk70b4pz","name":"moveDown","brief":"","scope":"instance","type":"MethodDoc","description":"Move the child in the group one step backward (z depth).
","params":[{"identifier":"child","optional":false,"description":"Child to be moved
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"EjvUrKBK4ywzV0l0NYBef","name":"moveToBottom","brief":"","scope":"instance","type":"MethodDoc","description":"Move the specified child the bottom (z depth).
","params":[{"identifier":"child","optional":false,"description":"Child to be moved
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"OISARwAfgP5Co_POLNOBt","name":"moveToTop","brief":"","scope":"instance","type":"MethodDoc","description":"Move the specified child to the top(z depth).
","params":[{"identifier":"child","optional":false,"description":"Child to be moved
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"WbWOlSN49_SPgtdjzCsvn","name":"moveUp","brief":"","scope":"instance","type":"MethodDoc","description":"Move the child in the group one step forward (z depth).
","params":[{"identifier":"child","optional":false,"description":"Child to be moved
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"eVYhs7uGjML6Z3b0X-_97","name":"onChildChange","brief":"","scope":"instance","type":"MethodDoc","description":"a callback to be extended, triggered after a child has been added or removed
","params":[{"identifier":"index","optional":false,"description":"added or removed child index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"459BFMagyjlHjto71_shx","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"2hVoTsG3hSsfKLJYp9AGf","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pzc-iVZIcrOr79Ni2iWOM","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"wuNzl3Iyui8Cex6ZVDc7v","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"hEreNJ9qGVA49RrhhzfZy","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"9GE9mRR7PQgwDCC_DRc6M","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"pWxF-7sGd5gKBs_ngc1fv","name":"removeChild","brief":"","scope":"instance","type":"MethodDoc","description":"Invokes the removeChildNow in a defer, to ensure the child is removed safely after the update & draw stack has complet...","params":[{"identifier":"child","optional":false,"description":"
Child to be removed
","dataType":{"tokens":[{"value":"RendRenderable | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapTexterable","kind":"canonical"},{"value":"RendRenderable","kind":"canonical"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapTexterable","kind":"canonical"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15"}},{"identifier":"keepalive","optional":true,"default":"false","description":"true to prevent calling child.destroy()
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"pj09XmQJhN-swIzC5p57P","name":"removeChildNow","brief":"","scope":"instance","type":"MethodDoc","description":"Removes (and optionally destroys) a child from the container. \n(removal is immediate and unconditional) \nNever use k...","params":[{"identifier":"child","optional":false,"description":"
Child to be removed
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}},{"identifier":"keepalive","optional":true,"default":"False","description":"True to prevent calling child.destroy()
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"iT7yVcr1-1KgLzULtZqie","name":"reset","brief":"","scope":"instance","type":"MethodDoc","description":"Reset the emitter with particle emitter settings.
","params":[{"identifier":"settings","optional":false,"description":"[optional] object with emitter settings. See {@link ParticleEmitterSettings}
","dataType":{"tokens":[{"value":"ParticleEmitterSettings","kind":"canonical"},{"value":"ParticleEmitterSettings","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"o5Qmsz9PhsKvEzWqyV4pQ","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"1WiZ646G1OZUqiPnM0zW6","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lk0JZHS2sKWai79N6ea6-","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"neVA32Do6mnjia5_m5enI","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-hp-wjBWLgKJl9XVzjLCd","name":"setChildsProperty","brief":"","scope":"instance","type":"MethodDoc","description":"Automatically set the specified property of all childs to the given value
","params":[{"identifier":"prop","optional":false,"description":"property name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"value","optional":false,"description":"property value
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"recursive","optional":true,"default":"false","description":"recursively apply the value to child containers if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"BLI6V2QSsos8rv60QB87I","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"26EVx2QDXOVOQyXEJGq1h","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Krjs0BnSV95CgVjx-T_7_","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bm9KAnLMUdZIwavX2Jme-","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"x_x0rFevj8PMCavBv8Smc","name":"sort","brief":"","scope":"instance","type":"MethodDoc","description":"Manually trigger the sort of all the childs in the container
","params":[{"identifier":"recursive","optional":true,"default":"false","description":"recursively sort all containers if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"CwvmV9bm8zmOy_QliJ9lB","name":"stopStream","brief":"Stop the emitter from generating new particles (used only if emitter is Stream)
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6PoLYCwtxwWA92_56Ldtx","name":"streamParticles","brief":"","scope":"instance","type":"MethodDoc","description":"Launch particles from emitter constantly (e.g. for stream)
","params":[{"identifier":"duration","optional":true,"description":"time that the emitter releases particles in ms
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"OzziYTR02svBaIK0w9FH_","name":"swapChildren","brief":"","scope":"instance","type":"MethodDoc","description":"Swaps the position (z-index) of 2 children
","params":[{"identifier":"child","optional":false,"description":"Child to be added
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}},{"identifier":"child2","optional":false,"description":"Child to be added
","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"FUAQD20WI4Vy912yJEA_e","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"78DGuIMwZTIMsNQXFwR-z","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZB3qBMZa6pQMnD2bI8196","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rkz8tPzX9VuUgCn1KIfI3","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GR3SCDT15WxBh5-IqeKg4","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SmMxwIt1Su3LZ1UFNEImF","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BGIEDKpXfkfM38xm4xRbc","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this container.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this container bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jr9lRarP7yxjlUbmXNqTS","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this renderable (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"h8JXtDatVfVQclYsWHPUg","name":"update","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"container update function. \nautomatically called by the application update loop {@link Application}
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the Container is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"oQ8uD2s9_d0Rh3Xo0xbc6","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"BT3kxUSYBYA1ZL_LLodOz","name":"Path2D","brief":"","type":"ClassDoc","description":"a simplified path2d implementation, supporting only one path
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"1xkOo8s4Di8I2pPftlPQ7","name":"arcResolution","brief":"","defaultValue":"5","scope":"instance","type":"PropertyDoc","description":"space between interpolated points for quadratic and bezier curve approx. in pixels.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rFFSGRFjeSFdzX8ZZ_9IM","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"the points defining the current path
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"niNpP9v8uHmK9sAKWLsVk","name":"arc","brief":"","scope":"instance","type":"MethodDoc","description":"adds an arc to the current path which is centered at (x, y) position with the given radius,\nstarting at startAngle and end...","params":[{"identifier":"x","optional":false,"description":"
the horizontal coordinate of the arc's center.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the vertical coordinate of the arc's center.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"description":"the arc's radius. Must be positive.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"startAngle","optional":false,"description":"the angle at which the arc starts in radians, measured from the positive x-axis.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"endAngle","optional":false,"description":"the angle at which the arc ends in radians, measured from the positive x-axis.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"anticlockwise","optional":true,"default":"false","description":"an optional boolean value. If true, draws the arc counter-clockwise between the start and end angles.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"APXL2PyTQf7bi9qYSk1yc","name":"arcTo","brief":"","scope":"instance","type":"MethodDoc","description":"adds a circular arc to the path with the given control points and radius, connected to the previous point by a straight li...","params":[{"identifier":"x1","optional":false,"description":"
the x-axis coordinate of the first control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y1","optional":false,"description":"the y-axis coordinate of the first control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"x2","optional":false,"description":"the x-axis coordinate of the second control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y2","optional":false,"description":"the y-axis coordinate of the second control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"description":"the arc's radius. Must be positive.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"eur47i0w2k3aPOIplnCuc","name":"beginPath","brief":"begin a new path
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Hga-nWa3IuneskmNt-Hi1","name":"bezierCurveTo","brief":"","scope":"instance","type":"MethodDoc","description":"Adds a cubic Bézier curve to the path.
","params":[{"identifier":"cp1X","optional":false,"description":"The x-coordinate of the first control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"cp1Y","optional":false,"description":"The y-coordinate of the first control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"cp2X","optional":false,"description":"The x-coordinate of the second control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"cp2Y","optional":false,"description":"The y-coordinate of the second control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"x","optional":false,"description":"The x-coordinate of the end point of the curve.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"The y-coordinate of the end point of the curve.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"UddCw5hDCoXDR-buXidzx","name":"closePath","brief":"","scope":"instance","type":"MethodDoc","description":"causes the point of the pen to move back to the start of the current path.\nIt tries to draw a straight line from the curre...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sSx-fCN936mvwUIEa19qI","name":"ellipse","brief":"","scope":"instance","type":"MethodDoc","description":"
adds an elliptical arc to the path which is centered at (x, y) position with the radii radiusX and radiusY\nstarting at sta...","params":[{"identifier":"x","optional":false,"description":"
the x-axis (horizontal) coordinate of the ellipse's center.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y-axis (vertical) coordinate of the ellipse's center.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radiusX","optional":false,"description":"the ellipse's major-axis radius. Must be non-negative.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radiusY","optional":false,"description":"the ellipse's minor-axis radius. Must be non-negative.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"rotation","optional":false,"description":"the rotation of the ellipse, expressed in radians.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"startAngle","optional":false,"description":"the angle at which the ellipse starts, measured clockwise from the positive x-axis and expressed in radians.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"endAngle","optional":false,"description":"the angle at which the ellipse ends, measured clockwise from the positive x-axis and expressed in radians.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"anticlockwise","optional":true,"default":"false","description":"an optional boolean value which, if true, draws the ellipse counterclockwise (anticlockwise).
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"uGlbdsnYpj5PMj-31YtvV","name":"lineTo","brief":"","scope":"instance","type":"MethodDoc","description":"connects the last point in the current path to the (x, y) coordinates with a straight line.
","params":[{"identifier":"x","optional":false,"description":"the x-axis coordinate of the line's end point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y-axis coordinate of the line's end point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"KpRpDPiRRoclg6HcsN4cz","name":"moveTo","brief":"","scope":"instance","type":"MethodDoc","description":"moves the starting point of the current path to the (x, y) coordinates.
","params":[{"identifier":"x","optional":false,"description":"the x-axis (horizontal) coordinate of the point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y-axis (vertical) coordinate of the point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"swh2tZdYwhfgfSI29b6FK","name":"parseSVGPath","brief":"","scope":"instance","type":"MethodDoc","description":"Parses an SVG path string and adds the points to the current path.
","params":[{"identifier":"svgPath","optional":false,"description":"The SVG path string to parse.
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"h2Hn6G3Feb-q8TX08gGdS","name":"quadraticCurveTo","brief":"","scope":"instance","type":"MethodDoc","description":"Adds a quadratic Bézier curve to the path.
","params":[{"identifier":"cpX","optional":false,"description":"The x-coordinate of the control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"cpY","optional":false,"description":"The y-coordinate of the control point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"x","optional":false,"description":"The x-coordinate of the end point of the curve.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"The y-coordinate of the end point of the curve.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"FVk6G5zzEtuKQfLFZe9AG","name":"rect","brief":"","scope":"instance","type":"MethodDoc","description":"creates a path for a rectangle at position (x, y) with a size that is determined by width and height.
","params":[{"identifier":"x","optional":false,"description":"the x-axis coordinate of the rectangle's starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y-axis coordinate of the rectangle's starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"the rectangle's width. Positive values are to the right, and negative to the left.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"the rectangle's height. Positive values are down, and negative are up.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"osjyttZfh_IoaCWoDrZ8D","name":"roundRect","brief":"","scope":"instance","type":"MethodDoc","description":"adds an rounded rectangle to the current path.
","params":[{"identifier":"x","optional":false,"description":"the x-axis coordinate of the rectangle's starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y-axis coordinate of the rectangle's starting point.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"the rectangle's width. Positive values are to the right, and negative to the left.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"the rectangle's height. Positive values are down, and negative are up.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"description":"the arc's radius to draw the borders. Must be positive.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"OrkwSdEdR0LuMA9mlNUNj","name":"triangulatePath","brief":"","scope":"instance","type":"MethodDoc","description":"triangulate the shape defined by this path into an array of triangles
","params":[],"returns":[{"description":"an array of vertices representing the triangulated path or shape
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]}]},{"id":"iq9UgtqeUvqZLhtxpiGrU","name":"Point","brief":"","type":"ClassDoc","description":"represents a point in a 2d space
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"svEuWDUvLIpA8gRGH0gxU","name":"type","brief":"","defaultValue":"\"Point\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xQnD2Mq16v6JPbXZYHB9a","name":"x","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"the position of the point on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AszG8ALKBmXWs7ha40eQu","name":"y","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"the position of the point on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-9F1NSJzfIQJNKzhRo-z4","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this Point
","params":[],"returns":[{"description":"new Point
","dataType":{"tokens":[{"value":"Point","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gKHNIj8bua_VZqh95NwwL","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"return true if this point is equal to the given point
","params":[{"identifier":"x","optional":false,"variadic":true,"dataType":{"tokens":[{"value":"number | Point | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Point","kind":"link"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"TLu_RNHQnyXFLf7MZgY_7","name":"set","brief":"","scope":"instance","type":"MethodDoc","description":"set the Point x and y properties to the given values
","params":[{"identifier":"x","optional":false,"default":"0","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"default":"0","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Point","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"hdr9b47jdIpyEiueCPmv1","name":"Pointer","brief":"","type":"ClassDoc","description":"a pointer object, representing a single finger on a touch enabled device.
","params":[],"returns":[],"extends":["Bounds"],"implements":[],"members":[{"id":"e7vD77q1X51vo6bP_cVHC","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wmxa_zYSLmNZ6dXy5J7ci","name":"button","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button"],"type":"PropertyDoc","description":"the button property indicates which button was pressed on the mouse to trigger the event.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N-TXdzJh7PngjT6GxszNu","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"return the center position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZwlWe1gXmbDROrRtMDdkR","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the x axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"efmVGpRoWQh4dC-3XdL_h","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the y axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vymyq6eOwq4owLefSb7kt","name":"clientX","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX"],"type":"PropertyDoc","description":"the horizontal coordinate within the application's client area at which the event occurred
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D73nlttX75-5M2OAo9ZZV","name":"clientY","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY"],"type":"PropertyDoc","description":"the vertical coordinate within the application's client area at which the event occurred
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"q-4h2YYcCFi1uuOll1iKh","name":"deltaMode","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode"],"type":"PropertyDoc","description":"an unsigned long representing the unit of the delta values scroll amount
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sTxkyQnNnurV98q8bGplo","name":"deltaX","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaX"],"type":"PropertyDoc","description":"a double representing the horizontal scroll amount in the Wheel Event deltaMode unit.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ao8noNqP2B8PsULS4RN5b","name":"deltaY","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaY"],"type":"PropertyDoc","description":"a double representing the vertical scroll amount in the Wheel Event deltaMode unit.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C_MnaqG-TeGXk9bozRcNr","name":"deltaZ","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaZ"],"type":"PropertyDoc","description":"a double representing the scroll amount in the z-axis, in the Wheel Event deltaMode unit.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ttBsKEPZ86rakVloSUqGZ","name":"event","brief":"","access":"public","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent","https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent","https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent"],"type":"PropertyDoc","description":"the originating Event Object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CmD4vYb-t8GMCW0JCM53u","name":"gameLocalX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event X coordinate relative to the holding container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SX-3bTcLUdoxAaoJcG6Aq","name":"gameLocalY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event Y coordinate relative to the holding container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8YbrOx9Te-IrBcUnfqVQd","name":"gameScreenX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event X coordinate relative to the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JVGfytpZvoFHmsZFyM4fJ","name":"gameScreenY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event Y coordinate relative to the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I3lYqByu-HSmKi5SxQ2v9","name":"gameWorldX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event X coordinate relative to the map
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kI0NgudZgPhHs7RyTsAuH","name":"gameWorldY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event Y coordinate relative to the map
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p9UgDTmlJXRRO2m6N8IhR","name":"gameX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event normalized X coordinate within the game canvas itself \n
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ns1HwzOqtUxGWquDQN9aX","name":"gameY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event normalized Y coordinate within the game canvas itself \n
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LA2u-N1MFySShOsoYw6RG","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q4l7MqymCJSmpZuLtWUiE","name":"isNormalized","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if not originally a pointer event
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kiFjyKcumcWjGfg2qzzL5","name":"isPrimary","brief":"","access":"public","defaultValue":"false","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary"],"type":"PropertyDoc","description":"indicates whether or not the pointer device that created the event is the primary pointer.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yjGjgvtcMDO5lMZoqINBF","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xwOPwVtU2Wfgcl9nuQq_7","name":"LEFT","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"constant for left button
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p5drFvDErviMmktJTZeFB","name":"locked","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if the pointer is currently locked
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pjt5X-5y8pPOh9-ucRMjn","name":"MIDDLE","brief":"","access":"public","defaultValue":"1","scope":"instance","type":"PropertyDoc","description":"constant for middle button
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0jzuKMMLDgZ3gLTBuTCyW","name":"movementX","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementX"],"type":"PropertyDoc","description":"the difference in the X coordinate of the pointer since the previous move event
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CjiPkE2SL0_Fuf808nA4v","name":"movementY","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementY"],"type":"PropertyDoc","description":"the difference in the Y coordinate of the pointer since the previous move event
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5IbeIoT_aVIP_shzL183X","name":"pageX","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/pageX"],"type":"PropertyDoc","description":"the horizontal coordinate at which the event occurred, relative to the left edge of the entire document.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uYbA9yAkCmao6leR6MDGh","name":"pageY","brief":"","access":"public","defaultValue":"0","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/pageY"],"type":"PropertyDoc","description":"the vertical coordinate at which the event occurred, relative to the left edge of the entire document.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C8PVmTyw1FWVBqyE2J4Mo","name":"pointerId","brief":"","access":"public","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId"],"type":"PropertyDoc","description":"The unique identifier of the contact for a touch, mouse or pen
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H0J36OE78aYHZOQGt4pLd","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Rg1DA4pp3nmZoNOfsD00N","name":"RIGHT","brief":"","access":"public","defaultValue":"2","scope":"instance","type":"PropertyDoc","description":"constant for right button
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"woERcAIM02J-XH38Jux01","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iGv0duHTA_Zsn_C6-ToS_","name":"type","brief":"","access":"public","scope":"instance","see":["https://developer.mozilla.org/en-US/docs/Web/API/Event/type"],"type":"PropertyDoc","description":"a string containing the event's type.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tHAQKPamDOsYEsKBcv5Ly","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yzGl_PdNhKl_5lTs11qeI","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"x position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PdFVPoDc-79Ip_MUAO3SE","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"y position of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2-_RbAhOmZ48aH2Inkej6","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"add the given vertices to the bounds definition.
","params":[{"identifier":"vertices","optional":false,"description":"an array of Vector2d or Point
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2> | %3<%4>"}},{"identifier":"clear","optional":true,"default":"false","description":"either to reset the bounds before adding the new vertices
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"YyJlEDq0lvhlsGOGzOzw2","name":"addBounds","brief":"","scope":"instance","type":"MethodDoc","description":"add the given bounds to the bounds definition.
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}},{"identifier":"clear","optional":true,"default":"false","description":"either to reset the bounds before adding the new vertices
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"sZBYHTcRddBibGmoE_DY-","name":"addFrame","brief":"","scope":"instance","type":"MethodDoc","description":"add the given quad coordinates to this bound definition, multiplied by the given matrix
","params":[{"identifier":"x0","optional":false,"description":"left X coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y0","optional":false,"description":"top Y coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"x1","optional":false,"description":"right X coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y1","optional":false,"description":"bottom y coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m","optional":true,"description":"an optional transform to apply to the given frame coordinates
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"SmNRcn_oeWjUQC6o7RvUe","name":"addPoint","brief":"","scope":"instance","type":"MethodDoc","description":"add the given point to the bounds definition.
","params":[{"identifier":"point","optional":false,"description":"the vector or point to be added to the bounds
","dataType":{"tokens":[{"value":"Vector2d | Point","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Point","kind":"link"}],"template":"%1 | %2"}},{"identifier":"m","optional":true,"description":"an optional transform to apply to the given point (if the given point is a Vector2d)
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"5UMrmeR7b12UnUhks54AE","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the bounds position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this bounds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this bounds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"34u-62_Q8VBZmnevxTa_3","name":"clear","brief":"reset the bound
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jhMT2AE3msVfAMNA30NlR","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this bounds
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"N9lDuzSUVLcYYndl5FPJ1","name":"contains","brief":"","examples":[{"caption":"","code":"if (bounds.contains(10, 10)) {\n // do something\n}\n// or\nif (bounds.contains(myVector2d)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the bounds contains the given point.
","params":[{"identifier":"x","description":"x coordinate or a vector point to check
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the bounds contain the point, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"TWW5LAf8QlMZOI4zuN09x","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this bounds are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"3Mg91WopvWm60d05pBaq-","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the two bounds intersect.
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Bounds | Rect","kind":"canonical"},{"value":"Bounds","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"True if the bounds overlap, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"h6Yk_yJAe7Wl7rtupPiaX","name":"setMinMax","brief":"","scope":"instance","type":"MethodDoc","description":"sets the bounds to the given min and max value
","params":[{"identifier":"minX","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"minY","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxX","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxY","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"fIEE4ilEBMvu28MLDXZe8","name":"shift","brief":"","examples":[{"caption":"","code":"bounds.shift(10, 10);\n// or\nbounds.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the bounds to the given x, y position.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"4UHIdRVpZHRzeczPqCXrV","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this bounds.
","params":[],"returns":[{"description":"a new Polygon that represents this bounds.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BYgHJfsy81TmGpIUZI-Of","name":"translate","brief":"","examples":[{"caption":"","code":"bounds.translate(10, 10);\n// or\nbounds.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Translates the bounds by the given point
","params":[{"identifier":"x","description":"x coordinate or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"OsOAiztmO9YkpVJfi3YxI","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"Updates bounds using the given vertices
","params":[{"identifier":"vertices","optional":false,"description":"an array of Vector2d or Point
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2> | %3<%4>"}}],"returns":[],"extends":[],"implements":[]},{"id":"0VORQu5jj9PXmCQ4QSFlz","name":"set","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"initialize the Pointer object using the given Event Object
","params":[{"identifier":"event","optional":false,"description":"the original Event object
","dataType":{"tokens":[{"value":"Event","kind":"canonical"},{"value":"Event","kind":"canonical"}],"template":"%1"}},{"identifier":"pageX","optional":true,"default":"0","description":"the horizontal coordinate at which the event occurred, relative to the left edge of the entire document
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"pageY","optional":true,"default":"0","description":"the vertical coordinate at which the event occurred, relative to the left edge of the entire document
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"clientX","optional":true,"default":"0","description":"the horizontal coordinate within the application's client area at which the event occurred
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"clientY","optional":true,"default":"0","description":"the vertical coordinate within the application's client area at which the event occurred
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"pointerId","optional":true,"default":"1","description":"the Pointer, Touch or Mouse event Id (1)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"0H_j7Rq-c5jKQhk5mkJah","name":"Polygon","brief":"","type":"ClassDoc","description":"a polygon Object. \nPlease do note that melonJS implements a simple Axis-Aligned Boxes collision algorithm, which requir...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Em0PQuxKSVSEpLAFnri80","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"
Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K8ueu92FuivYVxCuv0_IW","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"
origin point of the Polygon
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cCjk5sxBjtNU2S7I4hNsU","name":"type","brief":"","defaultValue":"\"Polygon\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"m8C6QKlbCn27a8Utkhwqh","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this Polygon
","params":[],"returns":[{"description":"new Polygon
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SSgA1uu-LAE5KhXEoaw58","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":true,"default":"0","description":"origin point of the Polygon
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"0","description":"origin point of the Polygon
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"points","optional":false,"description":"array of vector defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[],"extends":[],"implements":[]},{"id":"Jo7ko1mvuBjSBRB10WsIQ","name":"contains","brief":"","examples":[{"caption":"","code":"if (polygon.contains(10, 10)) {\n // do something\n}\n// or\nif (polygon.contains(myVector2d)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the polygon contains the given point. \n(Note: it is highly recommended to first do a hit test on the c...","params":[{"identifier":"x","optional":false,"variadic":true,"description":"
x coordinate or a vector point to check
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the polygon contain the point, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ynGMyejLdDwbeUKk0ftzD","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
","params":[],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5ayl3A7jc_preSZb4tk1A","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"H-IWKAAUndnvq2IstKeca","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Nwh1VaVRMaINwow5hXH6_","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RiyxdyEHWj9L5SW_V5311","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this Polygon (counter-clockwise) by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UGLQAdDXTRa59rLghahSF","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"Scale this Polygon by the given scalar.
","params":[{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BkFKz3C6GqEjYAKmUGgWw","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"Scale this Polygon by the given vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gLFyqPk2r4-qrLl0fQ25s","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the Polygon
","params":[{"identifier":"x","optional":false,"description":"position of the Polygon
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Polygon
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"points","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2> | %3<%4>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Lg8vJSiwH3hx11NETCDGE","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FVItw4f96q0_Dhar8TOn9","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"_65k6622Og8EpC2mBHPJh","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"NtQTDGzQev0m5-YZWaxGG","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"D72T27b5Q_9GO8K3lsrIi","name":"transform","brief":"","scope":"instance","type":"MethodDoc","description":"apply the given transformation matrix to this Polygon
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qbMjc-TXN6pOG6QyUUaZv","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"YBYFeoFeMC8jM27NUwYPN","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"nWfv4UUJJaPq6Tc-EbKId","name":"PrimitiveCompositor","type":"ClassDoc","description":"A WebGL Compositor object. This class handles all of the WebGL state \nPushes texture regions or shape geometry into Web...","params":[],"returns":[],"extends":["Compositor"],"implements":[],"members":[{"id":"XGWHivHihoM87OcSVnSXG","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"
an array of vertex attribute properties
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cJORTSD7IfzAFCbLZXxDN","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the shader currently used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sOo-zzEISVwJftxh8mHlr","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the default shader created by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lHwcfyc6CQcc_2ECi1WHm","name":"mode","brief":"","defaultValue":"gl.TRIANGLES","scope":"instance","type":"PropertyDoc","description":"primitive type to render (gl.POINTS, gl.LINE_STRIP, gl.LINE_LOOP, gl.LINES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN, gl.TRIANGL...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"31gpByR3YJuBsMKAWBCUY","name":"vertexByteSize","brief":"","defaultValue":"0","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"
the size of a single vertex in bytes\n(will automatically be calculated as attributes definitions are added)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8BXKGKSCy4SM-kLUVZ0he","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"the vertex data buffer used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y0zL2XsZrliaSkKS9mJE6","name":"vertexSize","brief":"","defaultValue":"0","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"the size of a single vertex in floats\n(will automatically be calculated as attributes definitions are added)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hsweblFXKu7sSnTO7Hv0K","name":"addAttribute","brief":"","scope":"instance","type":"MethodDoc","description":"add vertex attribute property definition to the compositor
","params":[{"identifier":"name","optional":false,"description":"name of the attribute in the vertex shader
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"size","optional":false,"description":"number of components per vertex attribute. Must be 1, 2, 3, or 4.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"type","optional":false,"description":"data type of each component in the array
","dataType":{"tokens":[{"value":"GLenum","kind":"canonical"},{"value":"GLenum","kind":"canonical"}],"template":"%1"}},{"identifier":"normalized","optional":false,"description":"whether integer data values should be normalized into a certain range when being cast to a float
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"offset","optional":false,"description":"offset in bytes of the first component in the vertex attribute array
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"vL37rMVAMkOM-isHf3MN1","name":"bind","brief":"called by the WebGL renderer when a compositor become the current one
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T4e6fQMazyz-vC7vR92Gx","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"A45V7am6KgeZHqO8oNql8","name":"drawVertices","brief":"","scope":"instance","type":"MethodDoc","description":"Draw an array of vertices
","params":[{"identifier":"mode","optional":false,"description":"primitive type to render (gl.POINTS, gl.LINE_STRIP, gl.LINE_LOOP, gl.LINES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN, gl.TRIANGL...","dataType":{"tokens":[{"value":"GLenum","kind":"canonical"},{"value":"GLenum","kind":"canonical"}],"template":"%1"}},{"identifier":"verts","optional":false,"description":"
an array of vertices
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2>"}},{"identifier":"vertexCount","optional":true,"default":"verts.length","description":"amount of points defined in the points array
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"gZyJOTKwqBWBj5eKAk_zz","name":"flush","brief":"","scope":"instance","type":"MethodDoc","description":"Flush batched vertex data to the GPU
","params":[{"identifier":"mode","optional":true,"default":"gl.TRIANGLES","description":"the GL drawing mode
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"74nUS4eopO9LDfXot-1qH","name":"setProjection","brief":"","scope":"instance","type":"MethodDoc","description":"set/change the current projection matrix
","params":[{"identifier":"matrix","optional":false,"description":"the new projection matrix
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"XD4qtOWwQ3ADx146xcbEs","name":"useShader","brief":"","scope":"instance","see":["GLShader"],"type":"MethodDoc","description":"Select the shader to use for compositing
","params":[{"identifier":"shader","optional":false,"description":"a reference to a GLShader instance
","dataType":{"tokens":[{"value":"GLShader","kind":"canonical"},{"value":"GLShader","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"40ATkXJZxfe4wHQn5eoIn","name":"QuadCompositor","type":"ClassDoc","description":"A WebGL Compositor object. This class handles all of the WebGL state \nPushes texture regions or shape geometry into Web...","params":[],"returns":[],"extends":["Compositor"],"implements":[],"members":[{"id":"FMCN1tvb_5iawmjZ-Vqo_","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"
an array of vertex attribute properties
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CDvsItIoq5NI1Kw9cPxvZ","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the shader currently used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b11sajcwNrMZ98WuUxEqL","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the default shader created by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UIKCREgzo1VGoygC-yT-1","name":"mode","brief":"","defaultValue":"gl.TRIANGLES","scope":"instance","type":"PropertyDoc","description":"primitive type to render (gl.POINTS, gl.LINE_STRIP, gl.LINE_LOOP, gl.LINES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN, gl.TRIANGL...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e_pqxbuaJpw76hqiD-F4b","name":"vertexByteSize","brief":"","defaultValue":"0","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"
the size of a single vertex in bytes\n(will automatically be calculated as attributes definitions are added)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pjZuVY53mnN3-813_ogEC","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"the vertex data buffer used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B7cpKAJTSHVxCWURVmGXT","name":"vertexSize","brief":"","defaultValue":"0","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"the size of a single vertex in floats\n(will automatically be calculated as attributes definitions are added)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3cnGhnkkWop7xJUQ2rqwV","name":"addAttribute","brief":"","scope":"instance","type":"MethodDoc","description":"add vertex attribute property definition to the compositor
","params":[{"identifier":"name","optional":false,"description":"name of the attribute in the vertex shader
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"size","optional":false,"description":"number of components per vertex attribute. Must be 1, 2, 3, or 4.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"type","optional":false,"description":"data type of each component in the array
","dataType":{"tokens":[{"value":"GLenum","kind":"canonical"},{"value":"GLenum","kind":"canonical"}],"template":"%1"}},{"identifier":"normalized","optional":false,"description":"whether integer data values should be normalized into a certain range when being cast to a float
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"offset","optional":false,"description":"offset in bytes of the first component in the vertex attribute array
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"n1kYqvU_c62CVHN-h9Kqd","name":"addQuad","brief":"","scope":"instance","type":"MethodDoc","description":"Add a textured quad
","params":[{"identifier":"texture","optional":false,"description":"Source texture atlas
","dataType":{"tokens":[{"value":"TextureAtlas","kind":"canonical"},{"value":"TextureAtlas","kind":"link"}],"template":"%1"}},{"identifier":"x","optional":false,"description":"Destination x-coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Destination y-coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"Destination width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"Destination height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"u0","optional":false,"description":"Texture UV (u0) value.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v0","optional":false,"description":"Texture UV (v0) value.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"u1","optional":false,"description":"Texture UV (u1) value.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v1","optional":false,"description":"Texture UV (v1) value.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tint","optional":false,"description":"tint color to be applied to the texture in UINT32 (argb) format
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"reupload","optional":false,"default":"false","description":"Force the texture to be reuploaded even if already bound
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"E4X92ua9uNXb41mNxIUfA","name":"bind","brief":"called by the WebGL renderer when a compositor become the current one
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RTg3hiDGZW07fDK9CsHlq","name":"bindTexture2D","brief":"","scope":"instance","type":"MethodDoc","description":"assign the given WebGL texture to the current batch
","params":[{"identifier":"texture","optional":false,"description":"a WebGL texture
","dataType":{"tokens":[{"value":"WebGLTexture","kind":"canonical"},{"value":"WebGLTexture","kind":"canonical"}],"template":"%1"}},{"identifier":"unit","optional":false,"description":"Texture unit to which the given texture is bound
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"ec7AknEenbLnpJd748OE_","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"n5PfAoyLIjY8ioHSe-47T","name":"createTexture2D","brief":"","scope":"instance","type":"MethodDoc","description":"Create a WebGL texture from an image
","params":[{"identifier":"unit","optional":false,"description":"Destination texture unit
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"pixels","optional":true,"default":"null","description":"Source image
","dataType":{"tokens":[{"value":"Image | HTMLCanvasElement | ImageData | Array | Array","kind":"canonical"},{"value":"Image","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"ImageData","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Uint8Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Float32Array","kind":"canonical"}],"template":"%1 | %2 | %3 | %4<%5> | %6<%7>"}},{"identifier":"filter","optional":false,"description":"gl.LINEAR or gl.NEAREST
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"repeat","optional":true,"default":"\"no-repeat\"","description":"Image repeat behavior (see {@link ImageLayer#repeat})
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"w","optional":true,"default":"pixels.width","description":"Source image width (Only use with UInt8Array[] or Float32Array[] source image)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":true,"default":"pixels.height","description":"Source image height (Only use with UInt8Array[] or Float32Array[] source image)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"premultipliedAlpha","optional":true,"default":"true","description":"Multiplies the alpha channel into the other color channels
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"mipmap","optional":true,"default":"true","description":"Whether mipmap levels should be generated for this texture
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"a WebGL texture
","dataType":{"tokens":[{"value":"WebGLTexture","kind":"canonical"},{"value":"WebGLTexture","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9vmLhx7dNJpdgj2yIoTMm","name":"deleteTexture2D","brief":"","scope":"instance","type":"MethodDoc","description":"delete the given WebGL texture
","params":[{"identifier":"texture","optional":true,"description":"a WebGL texture to delete
","dataType":{"tokens":[{"value":"WebGLTexture","kind":"canonical"},{"value":"WebGLTexture","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"_bCaPmresi92L22C8dwc5","name":"flush","brief":"","scope":"instance","type":"MethodDoc","description":"Flush batched vertex data to the GPU
","params":[{"identifier":"mode","optional":true,"default":"gl.TRIANGLES","description":"the GL drawing mode
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"hjTJmaTRE5F0EoTr-O07A","name":"getTexture2D","brief":"","scope":"instance","type":"MethodDoc","description":"returns the WebGL texture associated to the given texture unit
","params":[{"identifier":"unit","optional":false,"description":"Texture unit to which a texture is bound
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"texture a WebGL texture
","dataType":{"tokens":[{"value":"WebGLTexture","kind":"canonical"},{"value":"WebGLTexture","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KbzjVT5rVTvnrIW692pTr","name":"setProjection","brief":"","scope":"instance","type":"MethodDoc","description":"set/change the current projection matrix
","params":[{"identifier":"matrix","optional":false,"description":"the new projection matrix
","dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"nmxLI_G4yjBkfHJwJFJDi","name":"unbindTexture2D","brief":"","scope":"instance","type":"MethodDoc","description":"unbind the given WebGL texture, forcing it to be reuploaded
","params":[{"identifier":"texture","optional":true,"description":"a WebGL texture
","dataType":{"tokens":[{"value":"WebGLTexture","kind":"canonical"},{"value":"WebGLTexture","kind":"canonical"}],"template":"%1"}},{"identifier":"unit","optional":true,"description":"a WebGL texture
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"unit the unit number that was associated with the given texture
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PAC9OjMa5DgibJU4ntLWq","name":"useShader","brief":"","scope":"instance","see":["GLShader"],"type":"MethodDoc","description":"Select the shader to use for compositing
","params":[{"identifier":"shader","optional":false,"description":"a reference to a GLShader instance
","dataType":{"tokens":[{"value":"GLShader","kind":"canonical"},{"value":"GLShader","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"mK4tGT2YIX2NIjekq35W-","name":"QuadTree","brief":"","see":["game.world.broadphase"],"type":"ClassDoc","description":"a QuadTree implementation in JavaScript, a 2d spatial subdivision algorithm.
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"u4b48fZCNhnxtvHmtiOEp","name":"clear","brief":"","scope":"instance","type":"MethodDoc","description":"clear the quadtree
","params":[{"identifier":"bounds","optional":true,"default":"this.bounds","description":"the bounds to be cleared
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"-8ujraafbanSPBFn-f6BR","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"world","optional":false,"description":"the physic world this QuadTree belongs to
","dataType":{"tokens":[{"value":"World","kind":"canonical"},{"value":"World","kind":"link"}],"template":"%1"}},{"identifier":"bounds","optional":false,"description":"bounds of the node
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}},{"identifier":"max_objects","optional":true,"default":"4","description":"max objects a node can hold before splitting into 4 subnodes
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"max_levels","optional":true,"default":"4","description":"total max levels inside root Quadtree
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"level","optional":true,"default":"0","description":"deepth level, required for subnodes
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"gLUjzXIHeNujuDuSlsy1b","name":"hasChildren","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the node has any children
","params":[],"returns":[{"description":"true if the node has any children
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"F1g2tiaOsKHWs_aPO1gNY","name":"insert","brief":"","scope":"instance","type":"MethodDoc","description":"Insert the given object into the node. If the node\nexceeds the capacity, it will split and add all\nobjects to their corres...","params":[{"identifier":"item","optional":false,"description":"
object to be added
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"fujCcWj9pJM3k6okGLyM6","name":"insertContainer","brief":"","scope":"instance","type":"MethodDoc","description":"Insert the given object container into the node.
","params":[{"identifier":"container","optional":false,"description":"group of objects to be added
","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"rx7LCr_hGCEEIjwbnjFRy","name":"isPrunable","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the node is prunable
","params":[],"returns":[{"description":"true if the node is prunable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"h7cVJio13d5iFuU55bFNB","name":"remove","brief":"","scope":"instance","type":"MethodDoc","description":"Remove the given item from the quadtree.\n(this function won't recalculate the impacted node)
","params":[{"identifier":"item","optional":false,"description":"object to be removed
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"true if the item was found and removed.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"XEAJC3haeKaOk9JoqH5xn","name":"retrieve","brief":"","scope":"instance","type":"MethodDoc","description":"Return all objects that could collide with the given object
","params":[{"identifier":"item","optional":false,"description":"object to be checked against
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"fn","optional":true,"description":"a sorting function for the returned array
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"array with all detected objects
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"-nGyPo2L83UniO_KlhGeB","name":"Rect","brief":"","type":"ClassDoc","description":"a rectangle Object
","params":[],"returns":[],"extends":["Polygon"],"implements":[],"members":[{"id":"-jTdNQmMP9lkl9h3IKl6k","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FyNXu7nD5rKjYjMbiENIJ","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i4e1mxD2h_YNR3GfMK66o","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XkLtIvP3WByvwusSQcHvi","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AxxxLMOsBrY5tzDm3hr3n","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2PphGfEI9A7J7qVQpnXVz","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8ap35Dnj474e5b-4wVRQg","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"
origin point of the Polygon
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j94qTN96Ki82V7yKfYEWR","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6w2PRG1X17UdkfnwIN5hc","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JCKrQEqsdcy3AoXh6h7cq","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8DKfTeQ-UZL-EJcdpHf9C","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7Jh_IzaKGdzWY1tkZxApw","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FLDrcgNqDFGPnNQRBau_R","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ynBeOen2uYKYS8egRKmdA","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"h6u5gfVFrox4igBhqWxO6","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"gjVql5binB0mAUDxgkzcq","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Ye6k6ncfE_Bhx9kjsaCfw","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"kZsomiNxNpGtD06OoFIoX","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
","params":[],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"g0P0AOLzwLTiJlUw40VcV","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"iRX9xEDk7kMUL0ZKM7lEC","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"GNXwq1FiGEAxkA2KJvlVF","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"sVTpWe2IsdHrpBKGR8IZA","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"hvofkH4wMVFCPnRZCD37k","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LurZCGySmrZaJHFSvtadU","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"16nJcK5T91Kz0EU-4CYzF","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this Polygon (counter-clockwise) by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5vHN1lvDFj69aqWQ02RI5","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the rectangle
","params":[{"identifier":"x","optional":false,"description":"a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"064REJiEFT6SjME2RMU-a","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"Scale this Polygon by the given vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0HjmsqIs7HWI8TuiiHpkc","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"k4wrFOYypUwwD5jPBsNEg","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vDd2vkliRPuh_bRqjcoHg","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"C2ZnjfBqGNnTkOUVL3jDM","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LvVwvge4-jULaHE7hxoxX","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6iYBPpmhejrQqkDjtPOKq","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"cuK5ZzrjeCrUxOQ_irCdR","name":"transform","brief":"","scope":"instance","type":"MethodDoc","description":"apply the given transformation matrix to this Polygon
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2o3JSkXjRwZEeajzn74FH","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LLe02fjgjv65i1u0AG3dd","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TkMvrjVojSD5YNTSgMvZy","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"7CA_3rxJ-6nw6Amxd7hlY","name":"Renderable","brief":"","type":"ClassDoc","description":"A base class for renderable objects.
","params":[],"returns":[],"extends":["Rect"],"implements":[],"members":[{"id":"-CRJERTyzdpoKSDyRMFDP","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O8xMm5OLxDdrv0DRrF320","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9jSB0DappVbC5bvYKXUpb","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XQyEqAOMZYRVMU35X9mnx","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GKBbesaQl4fC5tqsqFsUN","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yG89n5R4nLIKKeVGY2842","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6nCw5IxeMrsBowU-SBRtU","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2t_LbjboeyiGOsZUQXSWa","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bRRD7vy9BzgOjcgxymgbL","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MyjMNymFJIZj_PQ0-oKOU","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cYvRprNGcezd3qvn1vH21","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nOLxCjzS7i-QIAMLwdkkX","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FJzOSAEcXsHPb1tRDWjiZ","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CcnQPIoS72_KXdNyC_f7D","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VAK_d56izknKRZRSRGwU2","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a8hrNGj50yb_x0cgF7XV5","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lvIoLhjM0M0e4dMVyJw7M","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9Ha1Eu83MOTZsXEiK_QBT","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uSAiDpe5LM5kKhYkDFyOc","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WqxlJF5yty_EKWCOCPp8e","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"atqmQO16FeVwGCuV-oGxA","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TQUmahmdm1-7ZxD244wZU","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DDSCVCVotL-RcsPHmHAsT","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YLqvqsr0p0sAYkr7za1Vt","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"86Wmi-PyYCa0dVkPWLng_","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xk7L5G9utem8rOXoDSXat","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0yUyzkOf-R8e3JqB_TCAt","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"84thQqiFpWt-_N41Baxti","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"saIaUDgAQgWMbIO_NpP_9","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yhZcoI_2JP9xN1W_Z7ZpN","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Rj3hSp1mtTPHOO0_2cqct","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZwqV9U-oUCXq0ZVptP0xF","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rnNzy53sNjum3XCntGrMc","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zDhXVhzZYN8Fut6b_2wHE","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6jzwYSgdmDDqbtgxc6srj","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kQqIgjqa1pFS6n467BrLo","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"24FtPn60e4RrDW1p2hj2X","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FQKQHgNop9y9i001F-0VG","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TmGV9KQTXsl0uJhuhltI2","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Cam7J91xAitrxOhMllmZW","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"position of the renderable object (accessible through inherited pos.x property)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the renderable object (accessible through inherited pos.y property)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"object width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"object height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"CtMC5YUd8Lmoog6_K30RF","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Qe_ub5zMUON2p5htuUxhQ","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"HD8o94hm4VzaFT28hknwJ","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0LY4BKZYk4Oicc6tZHDyp","name":"draw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#postDraw"],"type":"MethodDoc","description":"Draw this renderable (automatically called by melonJS).\nAll draw operations for renderable are made respectively\nto the po...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"VGheO1ae6qWnwhCUGl3GG","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"qq7J5QKar234tdPTs7zSH","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XDXDWdc0XqwCv-qBwoDKe","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"aoAmXeR6hh90Wcqq8B7rC","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"l7VF6I0ocCigttZvIYKlt","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"73JAwLZ6PP2m4j-rmMgnV","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"KzH-tT_K3GUZZvQCA99iT","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Ozo0vY4-r2zM8JHjTnLk1","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"_XW04r8bFay5CrtQMFsw6","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"S9rhxLWiQAIo98hm8OisP","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"yZwo_dQ01CXfF_TSjVzjQ","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"dJIfiXuS5VeZKLAP1evK7","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ey2v1Z-u3e1ZOnl6ElxH-","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"0DTn97Pg-7FP4hR45E0UW","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"_SyjkiXiy6QTCYwxI8Eaf","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"GqR5vnBxTHqK68RU1K31V","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TKSKRVJscp2E8Xtv5exiQ","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"cqNSd7tJSauHxLTSvNJ1R","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"HPKGb-MEesU5ilYiLo1ME","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AMX4EFrESxQsq2jFJO8kx","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tVdDvZ9GEzhG1N5wqRiDv","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"5rQlyHwQreo_hqPCqHeLY","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"IgSFcpUWtgYnKmcAwRuTG","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"d5wIQEaAVvT15BZE9HLxd","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"t0PqDKt0rbKt20q8yAFYS","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"p7Pa7lyGS343FtSbMxI5T","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Yydwi7-rPBKU5TbFT68Xd","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"taoiNPxBDCjrUOES7jhcG","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oS0SWY0WuQ1i4-RU3T-Tu","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ytltEhrDZGh0EIXoG1wa6","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5lmsrOe9_H9gAzQQ-pzRY","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"SSJ7vkR9XjUTazXIMdUL0","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"081srGoajzDzRq09ALV3T","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"_L69pYBJMlQiZW-e2eU40","name":"Renderer","brief":"","type":"ClassDoc","description":"a base renderer object
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"uXtsdn0OnnSOc6OSQW0Pi","name":"getHeight","brief":"","access":"public","deprecated":"since 15.12.0","see":["height"],"type":"ClassDoc","description":"return the height of the system Canvas
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"haOGwuuxMkm3uOLveUrBs","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"_3Suq6PxoW78he4eaOSCZ","name":"getWidth","brief":"","access":"public","deprecated":"since 15.12.0","see":["width"],"type":"ClassDoc","description":"return the width of the system Canvas
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"SjwVrgonQVEK35F09wgw6","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"fwTapuMa6XMHTYm5046El","name":"Texture","brief":"","access":"public","deprecated":"since 10.4.0","see":["TextureAtlas"],"type":"ClassDoc","description":"Alias of {@link TextureAtlas}
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"NgPzHKjJA3eNIhs-LoDlH","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"rEprRDS8yodkGfylgkEmc","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"the default method to sort object ("sorting", "z-buffer")
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MiTcPSlte6zFM6sbY78d_","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the requested video size ratio
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vvZZBZkDA19kvJ5jswfYr","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"return the height of the canvas which this renderer draws to
","params":[],"returns":[{"description":"height of the system Canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"OrYfJmeuvlOrW7zp62pLY","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"true if the current rendering context is valid
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bb78bw6tE76Q2beINCScn","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"The Path2D instance used by the renderer to draw primitives
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ahPM0yl2fVvPk1YggFr9I","name":"renderTarget","brief":"","scope":"instance","type":"PropertyDoc","description":"The renderer renderTarget
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6nhwtiU5YdbywkQy6yB0y","name":"scaleRatio","brief":"","defaultValue":"<1,1>","scope":"instance","type":"PropertyDoc","description":"the scaling ratio to be applied to the main canvas
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rx2jFrQ-5lrpeDAZqkUHL","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The given constructor options
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c_s43bEYsT2oIC7P6PwHg","name":"type","brief":"","defaultValue":"\"Generic\"","scope":"instance","type":"PropertyDoc","description":"The renderer type : Canvas, WebGL, etc...\n(override this property with a specific value when implementing a custom rendere...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HqV6bZT27OlunirALwrsD","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"
return the width of the canvas which this renderer draws to
","params":[],"returns":[{"description":"width of the system Canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TVqDus0kF_nyiQ9wfudf3","name":"clear","brief":"prepare the framebuffer for drawing a new frame
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gab9GpuM5ttqAOzxRalc5","name":"clearMask","brief":"","scope":"instance","see":["Renderer#setMask"],"type":"MethodDoc","description":"disable (remove) the rendering mask set through setMask.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LfSXF2J6Lc9EJ3aLeQ259","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"clear the rendering tint set through setTint.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pWXoklNXNNyW7XwPPnHcX","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"options","optional":true,"description":"optional parameters for the renderer
","dataType":{"tokens":[{"value":"Application.Settings","kind":"canonical"},{"value":"Application.Settings","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"ZIeZJiv1eSNIWDK5_uSqc","name":"fill","brief":"","scope":"instance","type":"MethodDoc","description":"fill the given shape
","params":[{"identifier":"shape","optional":false,"description":"a shape object to fill
","dataType":{"tokens":[{"value":"Rect | RoundRect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"RoundRect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[],"extends":[],"implements":[]},{"id":"aMNpMYKexedkvk8GtaDbp","name":"flush","brief":"render the main framebuffer on screen
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dyDFmUOy2_Lpw01yaJu9f","name":"getBlendMode","brief":"","scope":"instance","type":"MethodDoc","description":"returns the current blend mode for this renderer
","params":[],"returns":[{"description":"blend mode
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"yHNS9k1Fl4F0VlDubQ3iA","name":"getCanvas","brief":"","scope":"instance","type":"MethodDoc","description":"return a reference to the current render target corresponding canvas which this renderer draws to
","params":[],"returns":[{"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PgUNOIV5BtHZB4DvkM2X_","name":"getColor","brief":"","scope":"instance","type":"MethodDoc","description":"get the current fill & stroke style color.
","params":[],"returns":[{"description":"current global color
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"l7lB9rl0N7wmpk11dDyH9","name":"getContext","brief":"","scope":"instance","type":"MethodDoc","description":"return a reference to the current render target corresponding Context
","params":[],"returns":[{"dataType":{"tokens":[{"value":"CanvasRenderingContext2D | WebGLRenderingContext","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"gXV03-O5_MMR6WCElJJ1i","name":"getScreenCanvas","brief":"","deprecated":"since 13.1.0","scope":"instance","see":["getCanvas();"],"type":"MethodDoc","description":"return a reference to the screen canvas
","params":[],"returns":[{"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ViUs0d09tEBqZPESqrHwf","name":"getScreenContext","brief":"","deprecated":"since 13.1.0","scope":"instance","see":["getContext();"],"type":"MethodDoc","description":"return a reference to the screen canvas corresponding 2d Context \n(will return buffered context if double buffering is ...","params":[],"returns":[{"dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nxVro-7BRhqKNAEHDaxPv","name":"globalAlpha","brief":"","scope":"instance","type":"MethodDoc","description":"
return the current global alpha
","params":[],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qtoObovjdN8FNTkEfg_yF","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if the given rect or bounds overlaps with the renderer screen coordinates
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Rect | Bounds","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Bounds","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"yMwbf_xxvjVHUZjNsPX-y","name":"reset","brief":"Reset context state
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i-fRO2I3J8X5lxaMjtz_F","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resizes the system canvas
","params":[{"identifier":"width","optional":false,"description":"new width of the canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"new height of the canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"oS9s9QpW9OXd9EP9S0LLw","name":"setAntiAlias","brief":"","scope":"instance","type":"MethodDoc","description":"enable/disable image smoothing (scaling interpolation) for the current render target
","params":[{"identifier":"enable","optional":true,"default":"false","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"GLeWHF6OPP_NsmzyMXBFo","name":"setMask","brief":"","scope":"instance","type":"MethodDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[{"identifier":"mask","optional":true,"description":"
the shape defining the mask to be applied
","dataType":{"tokens":[{"value":"Rect | RoundRect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"RoundRect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}},{"identifier":"invert","optional":true,"default":"false","description":"either the given shape should define what is visible (default) or the opposite
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"EZ4CBgXfiitogD55lAeoV","name":"setProjection","brief":"","scope":"instance","type":"MethodDoc","description":"set/change the current projection matrix (WebGL only)
","params":[{"identifier":"matrix","optional":false,"dataType":{"tokens":[{"value":"Matrix3d","kind":"canonical"},{"value":"Matrix3d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"ZMQ3oUznBTZXQuozBu_an","name":"setTint","brief":"","scope":"instance","type":"MethodDoc","description":"set a coloring tint for sprite based renderables
","params":[{"identifier":"tint","optional":false,"description":"the tint color
","dataType":{"tokens":[{"value":"Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1"}},{"identifier":"alpha","optional":true,"description":"an alpha value to be applied to the tint
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"-UBL9iEWjhAunjHYl-brL","name":"stroke","brief":"","scope":"instance","type":"MethodDoc","description":"stroke the given shape
","params":[{"identifier":"shape","optional":false,"description":"a shape object to stroke
","dataType":{"tokens":[{"value":"Rect | RoundRect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"RoundRect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}},{"identifier":"fill","optional":true,"default":"false","description":"fill the shape with the current color if true
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"oL312RyTcgjqn1y9t_aSL","name":"tint","brief":"","scope":"instance","type":"MethodDoc","description":"tint the given image or canvas using the given color
","params":[{"identifier":"src","optional":false,"description":"the source image to be tinted
","dataType":{"tokens":[{"value":"HTMLImageElement | HTMLCanvasElement | OffscreenCanvas","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"OffscreenCanvas","kind":"canonical"}],"template":"%1 | %2 | %3"}},{"identifier":"color","optional":false,"description":"the color that will be used to tint the image
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"mode","optional":true,"default":"\"multiply\"","description":"the composition mode used to tint the image
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"a new canvas or offscreencanvas (if supported) element representing the tinted image
","dataType":{"tokens":[{"value":"HTMLCanvasElement | OffscreenCanvas","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"OffscreenCanvas","kind":"canonical"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"J0Mx2Ac27Wv26MoJjyRLV","name":"toBlob","brief":"","examples":[{"caption":"","code":"renderer.convertToBlob().then((blob) => console.log(blob));"}],"scope":"instance","type":"MethodDoc","description":"creates a Blob object representing the last rendered frame
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning a Blob object representing the last rendered frame
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"HWLNlVpY9vKi8942Xm2h1","name":"toDataURL","brief":"","examples":[{"caption":"","code":"renderer.toDataURL().then((dataURL) => console.log(dataURL));"}],"scope":"instance","type":"MethodDoc","description":"returns a data URL containing a representation of the last frame rendered
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning a string containing the requested data URL.
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"VFeJ7O__rCbbArcpBiHR2","name":"toImageBitmap","brief":"","examples":[{"caption":"","code":"renderer.transferToImageBitmap().then((image) => console.log(image));"}],"scope":"instance","type":"MethodDoc","description":"creates an ImageBitmap object of the last frame rendered\n(not supported by standard Canvas)
","params":[{"identifier":"type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"quality","optional":true,"description":"A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support loss...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"
A Promise returning an ImageBitmap.
","dataType":{"tokens":[{"value":"Promise","kind":"canonical"},{"value":"Promise","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"MX2IMtwOQgL35aVzX0RVV","name":"ResponseObject","brief":"","access":"public","type":"ClassDoc","description":"An object representing the result of an intersection.
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"1-VKw9iLS-fttp-0Y-o7d","name":"a","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The first object participating in the intersection
"},{"id":"bL2CjufDSp-GP1V4k0mJ9","name":"aInB","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Whether the first object is entirely inside the second
"},{"id":"wWQH5tCxbIkMnqZksiKzY","name":"b","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The second object participating in the intersection
"},{"id":"op3PlhKQRO5J2jfzmKPp2","name":"bInA","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Whether the second object is entirely inside the first
"},{"id":"v4CtSFEIlptVLjfBjJVkL","name":"indexShapeA","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The index of the colliding shape for the object a body
"},{"id":"Lh0zblsN2MtUdcSTHJhIe","name":"indexShapeB","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The index of the colliding shape for the object b body
"},{"id":"Lp3tNTSMLHaDUEFOaIAc0","name":"overlap","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Magnitude of the overlap on the shortest colliding axis
"},{"id":"rkYG_gI2c6fwcgTG5jfxV","name":"overlapN","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The shortest colliding axis (unit-vector)
"},{"id":"wZX37r4dzJsgB6gpojJig","name":"overlapV","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The overlap vector (i.e. overlapN.scale(overlap, overlap)
). If this vector is subtracted from the position of..."},{"id":"b6fuYOknCvTgzmH0pX_4v","name":"clear","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"
Set some values of the response back to their defaults. \nCall this between tests if you are going to reuse a single this object for chaining
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]}]},{"id":"p_KLaMr2WTg9DCNWDjwom","name":"RoundRect","brief":"","type":"ClassDoc","description":"a rectangle object with rounded corners
","params":[],"returns":[],"extends":["Rect"],"implements":[],"members":[{"id":"E1rouGMEya7YGBpD6RtSI","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QsTTJZAX3GDWL_0Rkox71","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TxLzuwTYL9GInQCkPBwB7","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I4i-9jHNilNC9KiSuo2TF","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r5EmYGGZB7RAlGrqkPcE4","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Jjrx28nTlLY_TMwtjChI-","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Qr2-VQzOrwyZElUippn_Q","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"
origin point of the Polygon
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qgdioX5iE8LoT5-ZPKZjU","name":"radius","brief":"","defaultValue":"20","scope":"instance","type":"PropertyDoc","description":"the radius of the rounded corner
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eyitnsfd2kVIp-YExXPIe","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YtG084HtMcAkD1JDgeN4w","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nISVSAG1iXwBO2mR2C8lz","name":"type","brief":"","defaultValue":"\"RoundRect\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"28OJewW4PVnHoLnnJ0urO","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CtZgHeB9O4xxq8IocB70N","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6aoX62lgLy5c-LRdKuxkj","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this RoundRect
","params":[],"returns":[{"description":"new RoundRect
","dataType":{"tokens":[{"value":"RoundRect","kind":"canonical"},{"value":"RoundRect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MkT9AgbhQ1UsmbA8hBV92","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"position of the rounded rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the rounded rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"the rectangle width
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"the rectangle height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":true,"default":"20","description":"the radius of the rounded corner
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"hQhPpXM8Nc-ONBfhYDYEi","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rounded rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a Rect to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rounded rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"hBU-I5c01Bfpsq-55SwuJ","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position, size and radius of the given rounded rectangle into this one
","params":[{"identifier":"rrect","optional":false,"description":"source rounded rectangle
","dataType":{"tokens":[{"value":"RoundRect","kind":"canonical"},{"value":"RoundRect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"RoundRect","kind":"canonical"},{"value":"RoundRect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wg-Jkv3jO6xBK3GEWKJKS","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this RoundRect is identical to the specified one
","params":[{"identifier":"rrect","optional":false,"dataType":{"tokens":[{"value":"RoundRect","kind":"canonical"},{"value":"RoundRect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"q85XKaM3Xge1V140gPYMg","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
","params":[],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ma-Y-XoBZhyWV3WK3Ypoh","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"5ZQ1Wm9jMNJBuwpkWPzBa","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"6YBma8xOEROKiMlw_URAr","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ugLjZSfpHIkKcbKXpulZk","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"WR4X40roIzNgNi8aqVooL","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"G1ug0l-HyrP9oG3jWJsB7","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GGZpzDiUcxP3DcGeSxNud","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this Polygon (counter-clockwise) by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"uCo6Ehjc7oZMPnXyUuvTl","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the rectangle
","params":[{"identifier":"x","optional":false,"description":"a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xLg_njkRi-TY8i-l97CmN","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"Scale this Polygon by the given vector
","params":[{"identifier":"v","optional":false,"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EgHL5shodYhOtWX9KituS","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Oqr1qN6DnpywbSh0YUK6W","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JEhlqie0vGWN0kqzWeRQK","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"ewoSFIok73bysD-op16wW","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Du5ntVAtaYiyyYl3liZVC","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZQxpjUmvZdhz0WBozCL9g","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Rma37uRLHWgktoPew5EBQ","name":"transform","brief":"","scope":"instance","type":"MethodDoc","description":"apply the given transformation matrix to this Polygon
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XAENJDVxKbMDW-iDsPnve","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"g29RLMDMQVdjsFl5Ox51T","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-Ev3XkDG5p_mHhUUuGF02","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"zXX7HBuhMZaNSETEF9S2d","name":"Sprite","brief":"","type":"ClassDoc","description":"An object to display a fixed or animated sprite on screen.
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"KSIuGGpzCCKBR2Mq0hTQm","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2w3BS8d7HiGNWsYLisbIH","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vHse5NfpYTwD7u9Tw92vt","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wpmJqtcPC7POTANgojcWf","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fv0amr5F4Xu0Sy65dYmLX","name":"animationpause","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Uf4YJUqtYnY5zKyG5Gzsi","name":"animationspeed","brief":"","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"
animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H_lvIBoFUgE98x7VBU4li","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ts3toix0T0tyRJKoQtjUj","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kDLRMSyWGUZlKJIoelpfA","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MehqJ4Cu3bSJgFbSR_YOI","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1xUPKIiSw5KqrGtwZS7JV","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NpDdmQGewuAJmZspolYDv","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7DFyGPXN_JLkpfpHNnd8B","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GQYZungUCzvqV2UUiaNjp","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L8zDyUx9DD062nhX2ofRa","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"upRVyHtjDvPnqAVQhEDjw","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8wslDB5UGAxHMeTOiRxbp","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GoYWl_9JaDr-TErPxv5EW","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eic9Qb6v2eh71AmRAnavg","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XKIku-aD2L4l1ybKZ_Ww2","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"leS-BRonOFgodZF-FL4ic","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mKBTdv8UMwu5pE_aEH72E","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hxturYExxNkVfYowqlT6Q","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ofdTL2RjDl1WjU9Wz5zME","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nrbLLacs77anUCJ-gR6iM","name":"isVideo","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if this is a video sprite (e.g. a HTMLVideoElement was passed as as source)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N7mjPDxMGdIPl7f_4d23U","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JmHZrDhYYFzN4z_9WrdJ_","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YNFyflIUuLyYw0G3l5NOA","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YmgZNwYPUS1M4pfEv4oFy","name":"offset","brief":"","defaultValue":"<0.0,0.0>","scope":"instance","type":"PropertyDoc","description":"global offset for the position to draw from on the source image.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bhWdpdmVMs3HOowu3h64R","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZUzOwUifli0JuDZ3ixfB0","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2u0ZhFpixmleGYxu1COyX","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0aycxtsEvO1LmRK0PdzKk","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s9IHK9NDZa-yzbQXoLXi4","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HXYrLwQR-Hqd0JrXRKmqa","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OqGRR-ZHBwDbtN31przZn","name":"source","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1gOStS4ADOsC-KL37KLVX","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r9jZd9XiunVfyxxjswO4K","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"og5XXTCn-AcrReTaW5_wX","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9w357e7R4sTYo_kP87tfh","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"clUVTT0unvaVSuyRx41tN","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XZPID4elxPSTfi9KDDTKh","name":"addAnimation","brief":"","examples":[{"caption":"","code":"// walking animation\nthis.addAnimation(\"walk\", [ 0, 1, 2, 3, 4, 5 ]);\n// standing animation\nthis.addAnimation(\"stand\", [ 11, 12 ]);\n// eating animation\nthis.addAnimation(\"eat\", [ 6, 6 ]);\n// rolling animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ]);\n// slower animation\nthis.addAnimation(\"roll\", [ 7, 8, 9, 10 ], 200);\n// or get more specific with delay for each frame. Good solution instead of repeating:\nthis.addAnimation(\"turn\", [{ name: 0, delay: 200 }, { name: 1, delay: 100 }])\n// can do this with atlas values as well:\nthis.addAnimation(\"turn\", [{ name: \"turnone\", delay: 200 }, { name: \"turntwo\", delay: 100 }])\n// define an dying animation that stop on the last frame\nthis.addAnimation(\"die\", [{ name: 3, delay: 200 }, { name: 4, delay: 100 }, { name: 5, delay: Infinity }])\n// set the standing animation as default\nthis.setCurrentAnimation(\"stand\");"}],"scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"add an animation \nFor fixed-sized cell sprite sheet, the index list must follow the\nlogic as per the following example...","params":[{"identifier":"name","optional":false,"description":"
animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"index","optional":false,"description":"list of sprite index or name defining the animation. Can also use objects to specify delay for each frame, see below
","dataType":{"tokens":[{"value":"Array | Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1<%2> | %3 | %4"}},{"identifier":"animationspeed","optional":true,"description":"cycling speed for animation in ms
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"frame amount of frame added to the animation (delay between each frame).
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AO11WSotimzvEuBSXmQZd","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"koZUAc0YNPgs6_ts-5LBd","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Z7trYeJdtjyXIBM-EuZ_Y","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SmtylAL8gLDKQQrxHaugV","name":"constructor","brief":"","examples":[{"caption":"","code":" // create a single sprite from a standalone image, with anchor in the center\n let sprite = new me.Sprite(0, 0, {\n image : \"PlayerTexture\",\n framewidth : 64,\n frameheight : 64,\n anchorPoint : new me.Vector2d(0.5, 0.5)\n });\n\n // create a single sprite from a packed texture\n mytexture = new me.TextureAtlas(\n me.loader.getJSON(\"texture\"),\n me.loader.getImage(\"texture\")\n );\n let sprite = new me.Sprite(0, 0, {\n image : mytexture,\n region : \"npc2.png\",\n });\n\n // create a video sprite\n let videoSprite = new me.Sprite(0, 0, {\n image : me.loader.getVideo(\"bigbunny\"),\n anchorPoint : new me.Vector2d(0.5, 0.5)\n });\n // scale the video sprite\n videoSprite.currentTransform.scale(2);\n // start playing the video (if video is preloaded with `autoplay` set to false)\n videoSprite.play();"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinates of the sprite object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinates of the sprite object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"Configuration parameters for the Sprite object
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.image","description":"reference to spritesheet image, a texture atlas, a video element, or to a texture atlas
","dataType":{"tokens":[{"value":"HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | TextureAtlas | string","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLVideoElement","kind":"canonical"},{"value":"TextureAtlas","kind":"link"}],"template":"%1 | %2 | %3 | %4 | string"}},{"identifier":"settings.name","optional":true,"default":"\"\"","description":"name of this object
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.region","optional":true,"description":"region name of a specific region to use when using a texture atlas, see {@link TextureAtlas}
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.framewidth","optional":true,"description":"Width of a single frame within the spritesheet
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.frameheight","optional":true,"description":"Height of a single frame within the spritesheet
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.tint","optional":true,"description":"a tint to be applied to this sprite
","dataType":{"tokens":[{"value":"string | Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"string | %1"}},{"identifier":"settings.flipX","optional":true,"description":"flip the sprite on the horizontal axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.flipY","optional":true,"description":"flip the sprite on the vertical axis
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.anchorPoint","optional":true,"default":"{x:0.5, y:0.5}","description":"Anchor point to draw the frame at (defaults to the center of the frame).
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"0QGQVzhsIq9CGS1UEsRGA","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"-qkaslrYKQadInJB9gSVD","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MRZ_99cJ1wbFJjg5SHzjI","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0TREz3ry2cRZPNF5xw4NN","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ApQC7To2XDn10fvZTJyZD","name":"flicker","brief":"","examples":[{"caption":"","code":"// make the object flicker for 1 second\n// and then remove it\nthis.flicker(1000, function () {\n world.removeChild(this);\n});"}],"scope":"instance","type":"MethodDoc","description":"make the object flicker
","params":[{"identifier":"duration","optional":false,"description":"expressed in milliseconds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"callback","optional":false,"description":"Function to call when flickering ends
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TNMfE-mzWDiCPIaD_512T","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"22OjKsolCQCNVTEdSYTeF","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BZT3SUWfKiMC_4sb65lMr","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"eYxfYH5NUcaxLGwCislmr","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iYdm6ng9oNSStJDZYrplI","name":"getCurrentAnimationFrame","brief":"","scope":"instance","type":"MethodDoc","description":"return the current animation frame index.
","params":[],"returns":[{"description":"current animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5eRwSt2CodEKXGrVUczB8","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"UYcXG9w6lqxlb-hE7ouEu","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_t9FDrPnlHSu7XZ5wJotZ","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"tkiq-w4P6oGQw-Ov_EWeb","name":"isCurrentAnimation","brief":"","examples":[{"caption":"","code":"if (!this.isCurrentAnimation(\"walk\")) {\n // do something funny...\n}"}],"scope":"instance","type":"MethodDoc","description":"return true if the specified animation is the current one.
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"VDFBQVRAyONtSsjWE6sXd","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"l_MQJvrObG45YwL4Z9IaX","name":"isFlickering","brief":"","scope":"instance","type":"MethodDoc","description":"return the flickering state of the object
","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"hAgug8ORMU279lkq7eBLy","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"k6ZQVDkJ7RxPIDQAVZqIp","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"U7yk66Gmk65ejv1ZdC_6C","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AkeGVsMDq83zQvnEvbvQ2","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"3oAI3N_COVhN7XJ_uiJyd","name":"pause","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U6r33RinnvYFzfuV9qcfO","name":"play","brief":"play or resume the current animation or video
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BnRv004wlfJZm6S_EsGx5","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"ln1f-lYH_nDMM8Y6gjS2W","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"b_mWLkV5ZJH5SRYNTVF6G","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"H2rWEYzBX4k1Qks6bpkix","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rbd6F0jmrvE2X_xZuQLbd","name":"reverseAnimation","brief":"","scope":"instance","see":["Sprite#animationspeed"],"type":"MethodDoc","description":"reverse the given or current animation if none is specified
","params":[{"identifier":"name","optional":true,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Um1uejEnsnXywJQC7DtQm","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nYi6BGzQOebYupo7p5YOw","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qvB6zstAIVFM9nnTmSu6z","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0-h6mOqvaBJsH6R75w2h0","name":"setAnimationFrame","brief":"","examples":[{"caption":"","code":"// reset the current animation to the first frame\nthis.setAnimationFrame();"}],"scope":"instance","type":"MethodDoc","description":"force the current animation frame index.
","params":[{"identifier":"index","optional":true,"default":"0","description":"animation frame index
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"QsIp9lDf-_Lz2rxu8_uvy","name":"setCurrentAnimation","brief":"","examples":[{"caption":"","code":" // set \"walk\" animation\n this.setCurrentAnimation(\"walk\");\n\n // set \"walk\" animation if it is not the current animation\n if (this.isCurrentAnimation(\"walk\")) {\n this.setCurrentAnimation(\"walk\");\n }\n\n // set \"eat\" animation, and switch to \"walk\" when complete\n this.setCurrentAnimation(\"eat\", \"walk\");\n\n // set \"die\" animation, and remove the object when finished\n this.setCurrentAnimation(\"die\", () => {\n world.removeChild(this);\n return false; // do not reset to first frame\n });\n\n // set \"attack\" animation, and pause for a short duration\n this.setCurrentAnimation(\"die\", () => {\n this.animationpause = true;\n\n // back to \"standing\" animation after 1 second\n setTimeout(function () {\n this.setCurrentAnimation(\"standing\");\n }, 1000);\n\n return false; // do not reset to first frame\n });"}],"scope":"instance","type":"MethodDoc","description":"set the current animation\nthis will always change the animation & set the frame to zero
","params":[{"identifier":"name","optional":false,"description":"animation id
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"resetAnim","optional":true,"description":"animation id to switch to when complete, or callback
","dataType":{"tokens":[{"value":"string | Function","kind":"canonical"}],"template":"string | Function"}},{"identifier":"preserve_dt","optional":true,"default":"false","description":"if false will reset the elapsed time counter since last frame
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rpdqqtwDzC1lWeFsk68Cp","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"gvgarTzW8szSwHof261q9","name":"setRegion","brief":"","examples":[{"caption":"","code":"// change the sprite to \"shadedDark13.png\";\nmySprite.setRegion(mytexture.getRegion(\"shadedDark13.png\"));"}],"scope":"instance","see":["Texture.getRegion"],"type":"MethodDoc","description":"change the current texture atlas region for this sprite
","params":[{"identifier":"region","optional":false,"description":"typically returned through me.Texture.getRegion()
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RT2WkncZ6Lw5qFpcKFcIA","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ePbqV9bjeZKnm2wv23fyu","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"G6uS6gDRyrce8tV0UeA32","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"VOxnpJaAU7abte4NPqnYd","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hdJMoSMiZiCe9WFsEn13u","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"CngMkQ1SnkT9LHBBU9fyx","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AaggaFFkB_JWwlIEwFipF","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"f7BaWsHvJdhbOEzav9sOK","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iyVlBEVzA9uZs7SbJr0MB","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"t7LWeg2Q0bevA4WIzLD37","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"B6z9_k9dJiMf14yf5dOsG","name":"draw","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"draw this srite (automatically called by melonJS)
","params":[{"identifier":"renderer","optional":false,"description":"a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Li_s8W4ZuI9dRKKXDgpUi","name":"update","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"update function. \nautomatically called by the game manager {@link game}
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the Sprite is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"e3oYPBUQfwfRduI5juPGf","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"bfjfDlyuMAPdCcL5PYsN5","name":"Stage","brief":"","see":["state"],"type":"ClassDoc","description":"a default "Stage" object.\nevery "stage" object (title screen, credits, ingame, etc...) to be managed\nt...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Q_H9McPuEMMrLTwgaR1Cx","name":"ambientLight","brief":"","access":"public","defaultValue":"\"#000000\"","scope":"instance","see":["Light2d"],"type":"PropertyDoc","description":"
an ambient light that will be added to the stage rendering
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JPLiJUPR54v_vAA3v0C7G","name":"cameras","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The list of active cameras in this stage.\nCameras will be renderered based on this order defined in this list.\nOnly the &q...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0QWgpd91GhTqKqWu3gjp8","name":"lights","brief":"","access":"public","examples":[{"caption":"","code":"// create a white spot light\nlet whiteLight = new me.Light2d(0, 0, 140, \"#fff\", 0.7);\n// and add the light to this current stage\nthis.lights.set(\"whiteLight\", whiteLight);\n// set a dark ambient light\nthis.ambientLight.parseCSS(\"#1117\");\n// make the light follow the mouse\nme.input.registerPointerEvent(\"pointermove\", me.game.viewport, (event) => {\n whiteLight.centerOn(event.gameX, event.gameY);\n});"}],"scope":"instance","see":["Light2d","Stage.ambientLight"],"type":"PropertyDoc","description":"
The list of active lights in this stage.\n(Note: Canvas Renderering mode will only properly support one light per stage)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"m7DKoHWEdgOYJQhwuFEKP","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The given constructor options
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9Uf8zCRT9NDEqOua97xG9","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"settings","optional":true,"description":"The stage` parameters
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.cameras","optional":true,"default":"[new me.Camera2d()]","description":"a list of cameras (experimental)
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1<%2>"}},{"identifier":"settings.onResetEvent","optional":true,"description":"called by the state manager when reseting the object
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"settings.onDestroyEvent","optional":true,"description":"called by the state manager before switching to another state
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"blhahg_IelgWuioYFvaCJ","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"onDestroyEvent function \ncalled by the state manager before switching to another state
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D-n-V50qC8-fL0VCMsosY","name":"onResetEvent","brief":"","scope":"instance","see":["state#change"],"type":"MethodDoc","description":"onResetEvent function \ncalled by the state manager when reseting the object\nthis is typically where you will load a lev...","params":[{"identifier":"args","optional":true,"description":"
optional arguments passed when switching state
","dataType":{"tokens":[{"value":"unknown","kind":"canonical"}],"template":"unknown"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"uKNERVQj_4RUws0lUvKji","name":"Text","brief":"","type":"ClassDoc","description":"a generic system font object.
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"kSv8QjiD1KDWFpcvevi3J","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"q8qvGJqYd8ZNIIwFh70Zz","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FmoxVfQVkICyw6EEY9MSj","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7bP6fp4enD22twtDTPh7l","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q5MgbNveF7xo4c-UQPgGf","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"
When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ztyZlePkueGPWIp90rALB","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SX4LXU-e62HkvM7VbM-OO","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1Z0FVB-8RS-C36vyg6fO-","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-CcGUVi_mEWp1f5jC7amP","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iH4GCTILMgVYzgBF806Wb","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4kZ4C2WCAUGRBlOtWJr30","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P6Es5x58gIkoOwfiFKHQf","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rrN8ajNZx9hQh3bFZa6an","name":"fillStyle","brief":"","defaultValue":"black","scope":"instance","type":"PropertyDoc","description":"defines the color used to draw the font.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"m16pSucAmKnR-6VtrGran","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CvAOV1oVqCqEY5qv8pLXI","name":"fontSize","brief":"","defaultValue":"10","scope":"instance","type":"PropertyDoc","description":"
the font size (in px)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6xkpjb8WwKxSxc4evtItA","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NKO1Ega_lh37XDaydCJsd","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zeoz_HvpPfJ5ZFbDVOx2k","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"W0qum4Fok1TV_SqrwTkIz","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pn8E1jHVnhidewM3jbRgm","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oI3q1lu6U-GBMD0Vjmls4","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bTlQYx_RVngNTZndH5msi","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jhwVDUOsRLqZlbcnUm7Es","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KRzOuOrVSAlO0fQTu3cPw","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BH3tPG68s_rHjYHVqp9HY","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NRvOut3A8Y8coYgA4vtfG","name":"lineHeight","brief":"","defaultValue":"1.0","scope":"instance","type":"PropertyDoc","description":"Set the line spacing height (when displaying multi-line strings). \nCurrent font height will be multiplied with this va...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"el5cRRF1tn4vGXOc26a9A","name":"lineWidth","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"
sets the current line width, in pixels, when drawing stroke
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HUMER_ETx7eYGRRiw4t5O","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UeGoR-FGtGUyqcnXPnrlC","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6W9ANnMFFRn41C1laGwL4","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AUXRvm8kWnHa5BiBNd-Iq","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"F80OcdNCUTtCjNrAy6HH-","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j6jQ8J6IkRw-uH7YApCf6","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ytnf2g8kt6mRZaHWqVY5h","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IgoC7Oia2aRxeAYnjmNOp","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z3L_MkhkPtxNCfdV5TLKR","name":"strokeStyle","brief":"","defaultValue":"black","scope":"instance","type":"PropertyDoc","description":"
defines the color used to draw the font stroke.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HF9NCdjVVSSh52T-Uu5F0","name":"textAlign","brief":"","defaultValue":"\"left\"","scope":"instance","type":"PropertyDoc","description":"Set the default text alignment (or justification), \npossible values are "left", "right", and "...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aV7c-QPFYtzvMEYJiMTSb","name":"textBaseline","brief":"","defaultValue":"\"top\"","scope":"instance","type":"PropertyDoc","description":"
Set the text baseline (e.g. the Y-coordinate for the draw operation), \npossible values are "top", "hang...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5TfdQRMPlNiCrFgq6HQe-","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"
define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VrNfLl3tKm4sAkvkx5s7P","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fjQB-1dhUJ9xH1IOE4qRB","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q5DMB0FnVgIE9rUxlABSy","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n3hdwnHtS6e3FBqCsYuCT","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0VAk6xTMzy_nsgdpWc7eU","name":"wordWrapWidth","brief":"","defaultValue":"-1","scope":"instance","type":"PropertyDoc","description":"the maximum length in CSS pixel for a single segment of text.\n(use -1 to disable word wrapping)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QoR7f89M0W9HYorVu0FLE","name":"_text","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"the text to be displayed
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"E0_oFEkdnOWU6vpdCoynd","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BMUhm4_FiA85AWDev31Qn","name":"bold","brief":"","scope":"instance","type":"MethodDoc","description":"make the font bold
","params":[],"returns":[{"description":"this object for chaining
","dataType":{"tokens":[{"value":"Text","kind":"canonical"},{"value":"Text","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ggmWbEhF72pZeW-FuCLA2","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3L_cTtNmN6vID2OPnY3eY","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"u-KRPZ7cRE-YyAnfQLkub","name":"constructor","brief":"","examples":[{"caption":"","code":"let font = new me.Text(0, 0, {font: \"Arial\", size: 8, fillStyle: this.color});"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"position of the text object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the text object
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings","optional":false,"description":"the text configuration
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"settings.font","description":"a CSS family font name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.size","description":"size, or size + suffix (px, em, pt)
","dataType":{"tokens":[{"value":"number | string","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1 | string"}},{"identifier":"settings.fillStyle","optional":true,"default":"\"#000000\"","description":"a CSS color value
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"settings.strokeStyle","optional":true,"default":"\"#000000\"","description":"a CSS color value
","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}},{"identifier":"settings.lineWidth","optional":true,"default":"0","description":"line width, in pixels, when drawing stroke
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.textAlign","optional":true,"default":"\"left\"","description":"horizontal text alignment
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.textBaseline","optional":true,"default":"\"top\"","description":"the text baseline
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.lineHeight","optional":true,"default":"1.0","description":"line spacing height
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.anchorPoint","optional":true,"default":"{x:0.0, y:0.0}","description":"anchor point to draw the text at
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}},{"identifier":"settings.wordWrapWidth","optional":true,"description":"the maximum length in CSS pixel for a single segment of text
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.text","optional":true,"default":"\"\"","description":"a string, or an array of strings
","dataType":{"tokens":[{"value":"string | Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"string | %1"}}],"returns":[],"extends":[],"implements":[]},{"id":"T4IT6M_AoP1uSJBzz2NbF","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"AcBZGuhNyKmvJRj19pAF8","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"T2wwnB3L8_B_L9JRRrqE4","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oyb1Xnl824GXVw6DsmqMB","name":"draw","brief":"","scope":"instance","type":"MethodDoc","description":"draw a text at the specified coord
","params":[{"identifier":"renderer","optional":false,"description":"Reference to the destination renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"text","optional":true,"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"x","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"G66a1zTT-sjargc0bYwWG","name":"drawStroke","brief":"","deprecated":"since 15.0.0","scope":"instance","type":"MethodDoc","description":"draw a stroke text at the specified coord, as defined by the lineWidth
and fillStroke
properties...","params":[{"identifier":"renderer","optional":false,"description":"
Reference to the destination renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"text","optional":false,"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"x","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"nBmWPJ2EUJxYAXedu9Y2a","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"gEpijeU_CRlW3UmG7B2Yp","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Iv03fNMgJWET4r2bo2Yi2","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"K6OquKqMow1Vr_EnydWyM","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UNxbAqMvowHeeBdKFOb0E","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bBZDgkdw9ox1bnE1TxzDk","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"pUIsyxoB-ZQfZ5JMYdeEE","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2Dm5UjlP3q4CdCEfPwlKI","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"4whT7JJ-xS2icD1Xq8J7F","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"5jF9RcO9McScyr-9YakWP","name":"italic","brief":"","scope":"instance","type":"MethodDoc","description":"make the font italic
","params":[],"returns":[{"description":"this object for chaining
","dataType":{"tokens":[{"value":"Text","kind":"canonical"},{"value":"Text","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GJKdVSaTilfIroya3LVZg","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vJcQYlt3_mVppvOlcI_gY","name":"measureText","brief":"","scope":"instance","type":"MethodDoc","description":"measure the given text size in pixels
","params":[{"identifier":"renderer","optional":false,"description":"reference to the active renderer
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"text","optional":true,"description":"the text to be measured
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"a TextMetrics object defining the dimensions of the given piece of text
","dataType":{"tokens":[{"value":"TextMetrics","kind":"canonical"},{"value":"TextMetrics","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"dWVJQtzm9puKtuHMkJGoe","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"UwcAX5jUPjwa4MTIlU_J7","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dnjYnZNxSregzZL3m-u6_","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"LFlS0J1mj1nbvWXz3TS9s","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"i18g-gMt4EfEykeEfHIbB","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"qR9Wr9bUYNiThUmwW08HJ","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hw2tHld-kEvvV-MG6h4X2","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PXQL55fC4aDElZS7O2RsD","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lj-nh_toQJwjNgZl5b2FC","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Q5eHAYHZnu0E5bn1s-XCt","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"310BS5XygVlPRoHjw1pB7","name":"setFont","brief":"","examples":[{"caption":"","code":"font.setFont(\"Arial\", 20);\nfont.setFont(\"Arial\", \"1.5em\");"}],"scope":"instance","type":"MethodDoc","description":"set the font family and size
","params":[{"identifier":"font","optional":false,"description":"a CSS font name
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"size","optional":true,"default":"10","description":"size in px, or size + suffix (px, em, pt)
","dataType":{"tokens":[{"value":"number | string","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1 | string"}}],"returns":[{"description":"this object for chaining
","dataType":{"tokens":[{"value":"Text","kind":"canonical"},{"value":"Text","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"A5DT_lMdomrAG0uXO_dTY","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"smJGmPlZ_yMBdsnSRmYCg","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wLASDNFmZeM8xwuqLLPi-","name":"setText","brief":"","scope":"instance","type":"MethodDoc","description":"change the text to be displayed
","params":[{"identifier":"value","optional":false,"default":"\"\"","description":"a string, or an array of strings
","dataType":{"tokens":[{"value":"number | string | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1 | string | %2"}}],"returns":[{"description":"this object for chaining
","dataType":{"tokens":[{"value":"Text","kind":"canonical"},{"value":"Text","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"p0zXpiY6gmAi8QEMkXUaW","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mbh2InunY_q9JTPj8N4t6","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"C-Bk9fuZKODeZjbkSfCbx","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-pXtAtIUOu9nl4yrCA61x","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iI3BujGQpkuNa0OG0Jsr9","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5I3PS3-1mXPySH1hn0gGV","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"a6hMVikbTXsaNSTh1Wt0L","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vJk038Q5wQVIUS0T45Vgu","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6b5pQVnb6mGvC1cwElJXJ","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"JlG7MfLRxmDy4Xd8IhbM7","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"yZhcyoZGHtIwRSDZ2CKgq","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"1hIoN0AOaIad6y-Zoc_dX","name":"TextMetrics","brief":"","type":"ClassDoc","description":"a Text Metrics object that contains helper for text manipulation
","params":[],"returns":[],"extends":["Bounds"],"implements":[],"members":[{"id":"WyLHf9MpXcMjHiAeHVaI2","name":"ancestor","brief":"","access":"public","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this TextMetrics object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SPS0DdJZBqjdJ-q78sxFd","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Bg7H-SqGJz0jIvIsGXHaV","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"return the center position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_nBindc45uzWCipRbkbuf","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the x axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Jqda73MyFAzMb8kmiyX4C","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the y axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BCv6p8f6BVDFuqNuK-8dN","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YHIEqnBXSHP7gUzIK-8CA","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FIiYQQZn7Xj2iegB1520J","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7yf7XdF3AUJQiFtRYdl3Z","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g8CPFOpkgtL2gmnuWJZLR","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"the object type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iy0Rl1mO--Fvfj6SOChQH","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bWVDYWUdtJfoDkcprz05u","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"x position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Fhds2XWM9CbDc7eT-sTrv","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"y position of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NaweG6uzwOsvjqeclsnic","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"add the given vertices to the bounds definition.
","params":[{"identifier":"vertices","optional":false,"description":"an array of Vector2d or Point
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2> | %3<%4>"}},{"identifier":"clear","optional":true,"default":"false","description":"either to reset the bounds before adding the new vertices
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"P0PsDl3syJcb81lp4Ko32","name":"addBounds","brief":"","scope":"instance","type":"MethodDoc","description":"add the given bounds to the bounds definition.
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}},{"identifier":"clear","optional":true,"default":"false","description":"either to reset the bounds before adding the new vertices
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"A9HGT69rl7mS3RZRjV4NW","name":"addFrame","brief":"","scope":"instance","type":"MethodDoc","description":"add the given quad coordinates to this bound definition, multiplied by the given matrix
","params":[{"identifier":"x0","optional":false,"description":"left X coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y0","optional":false,"description":"top Y coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"x1","optional":false,"description":"right X coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y1","optional":false,"description":"bottom y coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m","optional":true,"description":"an optional transform to apply to the given frame coordinates
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"X47hruuSVW4kxALE1LKnb","name":"addPoint","brief":"","scope":"instance","type":"MethodDoc","description":"add the given point to the bounds definition.
","params":[{"identifier":"point","optional":false,"description":"the vector or point to be added to the bounds
","dataType":{"tokens":[{"value":"Vector2d | Point","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Point","kind":"link"}],"template":"%1 | %2"}},{"identifier":"m","optional":true,"description":"an optional transform to apply to the given point (if the given point is a Vector2d)
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"beHtrnql523qW7EeFHxfz","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the bounds position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this bounds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this bounds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"9FLYFkHdbJ3vX24m4iJut","name":"clear","brief":"reset the bound
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P3khDlAvPd8YUhpIaYfdy","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this bounds
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"x-gJXbwA6hlCLChY0QzIk","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"ancestor","optional":false,"description":"the parent object that contains this TextMetrics object
","dataType":{"tokens":[{"value":"Text | BitmapText","kind":"canonical"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"jJa4yo0aXE-C7o4OzS7w0","name":"contains","brief":"","examples":[{"caption":"","code":"if (bounds.contains(10, 10)) {\n // do something\n}\n// or\nif (bounds.contains(myVector2d)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the bounds contains the given point.
","params":[{"identifier":"x","description":"x coordinate or a vector point to check
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the bounds contain the point, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ShmgCmag5UAUaXvzYzcS7","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this bounds are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"XnzePxNEGVX6WvDO9G2V2","name":"lineHeight","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the height of a segment of inline text in CSS pixels.
","params":[],"returns":[{"description":"the height of a segment of inline text in CSS pixels.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"B8og-R4FJPRvM_tbkEgKx","name":"lineWidth","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the width of the given segment of inline text in CSS pixels.
","params":[{"identifier":"text","optional":false,"description":"the text to be measured
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"context","optional":true,"description":"reference to an active 2d context for canvas rendering
","dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the width of the given segment of inline text in CSS pixels.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"K0pOLB3dACnyXGL6vSKP1","name":"measureText","brief":"","scope":"instance","type":"MethodDoc","description":"measure the given text size in CSS pixels
","params":[{"identifier":"text","optional":false,"description":"the text to be measured
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"context","optional":true,"description":"reference to an active 2d context for canvas rendering
","dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this
","dataType":{"tokens":[{"value":"TextMetrics","kind":"canonical"},{"value":"TextMetrics","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wVAddJ9IXVK2Rofnew4-k","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the two bounds intersect.
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Bounds | Rect","kind":"canonical"},{"value":"Bounds","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"True if the bounds overlap, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ATp56hFaEdF54JRYhsNCK","name":"setMinMax","brief":"","scope":"instance","type":"MethodDoc","description":"sets the bounds to the given min and max value
","params":[{"identifier":"minX","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"minY","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxX","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxY","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"kfoX2vU-5yb1FIAdfcHmf","name":"shift","brief":"","examples":[{"caption":"","code":"bounds.shift(10, 10);\n// or\nbounds.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the bounds to the given x, y position.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"zFBwOu1uhtWGGET9OcTnr","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this bounds.
","params":[],"returns":[{"description":"a new Polygon that represents this bounds.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"WL-YBOM8ivevJg7Sy4nUm","name":"translate","brief":"","examples":[{"caption":"","code":"bounds.translate(10, 10);\n// or\nbounds.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Translates the bounds by the given point
","params":[{"identifier":"x","description":"x coordinate or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Vced8IdNCUVNKQ3nmxSVC","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"Updates bounds using the given vertices
","params":[{"identifier":"vertices","optional":false,"description":"an array of Vector2d or Point
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2> | %3<%4>"}}],"returns":[],"extends":[],"implements":[]},{"id":"r4mxtoD6RBCaubkd3trgh","name":"wordWrap","brief":"","scope":"instance","type":"MethodDoc","description":"wrap the given text based on the given width
","params":[{"identifier":"text","optional":false,"description":"the text to be wrapped
","dataType":{"tokens":[{"value":"string | Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"string | %1"}},{"identifier":"width","optional":false,"description":"maximum width of one segment of text in css pixel
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"context","optional":true,"description":"reference to an active 2d context for canvas rendering
","dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"an array of string representing wrapped text
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"HovuEuzb0NN0tdA6-d1z6","name":"TextureAtlas","brief":"","type":"ClassDoc","description":"A Texture atlas class, currently supports :
\n\n[TexturePacker]{@link http://www.codeandweb.com/texturepacke...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"wu1RMtrNKqO7F0_fuR_wm","name":"addRegion","brief":"","scope":"instance","type":"MethodDoc","description":"add a region to the atlas
","params":[{"identifier":"name","optional":false,"description":"region mame
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"x","optional":false,"description":"x origin of the region
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"y origin of the region
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the region
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"height of the region
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the created region
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"u9u7sgXwhL2EasldyfVQ2","name":"addUVs","brief":"","scope":"instance","type":"MethodDoc","description":"add uvs mapping for the given region
","params":[{"identifier":"atlas","optional":false,"description":"the atlas dictionnary where the region is define
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"name","optional":false,"description":"region (or frame) name
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"w","optional":false,"description":"the width of the region
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"the height of the region
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the created region UVs
","dataType":{"tokens":[{"value":"Float32Array","kind":"canonical"},{"value":"Float32Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"IJ--0TOrawfX0qG2AGXZl","name":"constructor","brief":"","examples":[{"caption":"","code":" // create a texture atlas from a JSON Object\n game.texture = new me.TextureAtlas(\n me.loader.getJSON(\"texture\")\n );\n\n // create a texture atlas from a multipack JSON Object\n game.texture = new me.TextureAtlas([\n me.loader.getJSON(\"texture-0\"),\n me.loader.getJSON(\"texture-1\"),\n me.loader.getJSON(\"texture-2\")\n ]);\n\n // create a texture atlas for a spritesheet with an anchorPoint in the center of each frame\n game.texture = new me.TextureAtlas(\n {\n framewidth : 32,\n frameheight : 32,\n anchorPoint : new me.Vector2d(0.5, 0.5)\n },\n me.loader.getImage(\"spritesheet\")"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"atlases","optional":false,"description":"atlas information. See {@link loader.getJSON}
","dataType":{"tokens":[{"value":"object | Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"object | %1"}},{"identifier":"src","optional":true,"default":"atlas.meta.image","description":"Image source
","dataType":{"tokens":[{"value":"HTMLImageElement | HTMLCanvasElement | string | Array | Array | Array","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"%1 | %2 | string | %3<%4> | %5<%6> | %7"}},{"identifier":"cache","optional":true,"default":"false","description":"Use true to skip caching this Texture
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"XhNYdrL2ET0cO3r6x-0fy","name":"createAnimationFromName","brief":"","examples":[{"caption":"","code":" // create a new texture object under the `game` namespace\n game.texture = new me.TextureAtlas(\n me.loader.getJSON(\"texture\"),\n me.loader.getImage(\"texture\")\n );\n\n // create a new Animated Sprite\n let sprite = game.texture.createAnimationFromName([\n \"walk0001.png\", \"walk0002.png\", \"walk0003.png\",\n \"walk0004.png\", \"walk0005.png\", \"walk0006.png\",\n \"walk0007.png\", \"walk0008.png\", \"walk0009.png\",\n \"walk0010.png\", \"walk0011.png\"\n ]);\n\n // define an additional basic walking animation\n sprite.addAnimation (\"simple_walk\", [0,2,1]);\n // you can also use frame name to define your animation\n sprite.addAnimation (\"speed_walk\", [\"walk0007.png\", \"walk0008.png\", \"walk0009.png\", \"walk0010.png\"]);\n // set the default animation\n sprite.setCurrentAnimation(\"simple_walk\");\n // set the renderable position to bottom center\n sprite.anchorPoint.set(0.5, 1.0);"}],"scope":"instance","type":"MethodDoc","description":"Create an animation object using the first region found using all specified names
","params":[{"identifier":"names","optional":true,"description":"list of names for each sprite (if not specified all defined names/entries in the atlas will be added)\n(when manually creat...","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1 | %3<%2>"}},{"identifier":"settings","optional":true,"description":"Additional settings passed to the {@link Sprite} contructor
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"dataType":{"tokens":[{"value":"Sprite","kind":"canonical"},{"value":"Sprite","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oaSlVJVkYLf8FCZSWuQxW","name":"createSpriteFromName","brief":"","examples":[{"caption":"","code":"// create a new texture object under the `game` namespace\ngame.texture = new me.TextureAtlas(\n me.loader.getJSON(\"texture\"),\n me.loader.getImage(\"texture\")\n);\n...\n...\n// create a new \"coin\" sprite\nlet sprite = game.texture.createSpriteFromName(\"coin.png\");\n// set the renderable position to bottom center\nsprite.anchorPoint.set(0.5, 1.0);\n...\n...\n// create a 9-slice sprite\nlet dialogPanel = game.texture.createSpriteFromName(\n \"rpg_dialo.png\",\n // width & height are mandatory for 9-slice sprites\n { width: this.width, height: this.height },\n true\n);"}],"scope":"instance","type":"MethodDoc","description":"Create a sprite object using the first region found using the specified name
","params":[{"identifier":"name","optional":false,"description":"name of the sprite
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings","optional":true,"description":"Additional settings passed to the {@link Sprite} contructor
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"nineSlice","optional":true,"default":"false","description":"if true returns a 9-slice sprite
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"dataType":{"tokens":[{"value":"Sprite | NineSliceSprite","kind":"canonical"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"V9yenNCoyAkUO-sCi9I1d","name":"getAtlas","brief":"","scope":"instance","type":"MethodDoc","description":"return the default or specified atlas dictionnary
","params":[{"identifier":"name","optional":true,"description":"atlas name in case of multipack textures
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"Be3-Fhz-gP_Ry33tpmGuU","name":"getFormat","brief":"","scope":"instance","type":"MethodDoc","description":"return the format of the atlas dictionnary
","params":[],"returns":[{"description":"will return "texturepacker", or "ShoeBox", or "melonJS", or "Spritesheet (fixed cell si...","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"nNWoAGLHEIjmOYELYw6SA","name":"getRegion","brief":"","scope":"instance","type":"MethodDoc","description":"
return a normalized region (or frame) information for the specified sprite name
","params":[{"identifier":"name","optional":false,"description":"name of the sprite
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"atlas","optional":true,"description":"name of a specific atlas where to search for the region
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"sydV7LObsNSzc7cHmO9jn","name":"getTexture","brief":"","scope":"instance","type":"MethodDoc","description":"return the source texture for the given region (or default one if none specified)
","params":[{"identifier":"region","optional":true,"description":"region name in case of multipack textures
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"dataType":{"tokens":[{"value":"HTMLImageElement | HTMLCanvasElement","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1 | %2"}}],"extends":[],"implements":[]},{"id":"fbQW1Y1uTiLYF0Hd19iyZ","name":"getUVs","brief":"","scope":"instance","type":"MethodDoc","description":"return the uvs mapping for the given region
","params":[{"identifier":"name","optional":false,"description":"region (or frame) name
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"region Uvs
","dataType":{"tokens":[{"value":"Float32Array","kind":"canonical"},{"value":"Float32Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"BgVoZS-O44Vy7WeXaLMu-","name":"Tile","brief":"","type":"ClassDoc","description":"a basic tile object
","params":[],"returns":[],"extends":["Bounds"],"implements":[],"members":[{"id":"Q5uYxwSwvXK8QGyF-sRgA","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LMOOEYP2tIV3NMoKXFbtg","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"return the center position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RF5qYCF_ag_m68WKhN7Df","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the x axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"f8qb-ZHFgGS0GHhgGgzvu","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the y axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1k6_5uMKt0Be0YSFFgX6v","name":"flipped","brief":"","scope":"instance","type":"PropertyDoc","description":"Global flag that indicates if the tile is flipped
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xfp6lSx8jIlN1kThGRsu-","name":"flippedAD","brief":"","scope":"instance","type":"PropertyDoc","description":"True if the tile is flipped anti-diagonally
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rQ_CkcW76q0fySjnr1O-9","name":"flippedX","brief":"","scope":"instance","type":"PropertyDoc","description":"True if the tile is flipped horizontally
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"upip_l-e5qtoSAJeRay2C","name":"flippedY","brief":"","scope":"instance","type":"PropertyDoc","description":"True if the tile is flipped vertically
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"recssgQ1P8HbYkHXxQEIg","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ukuCed8q_3geMI3f3SXgc","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qqb8glFhI8leREGPiBaIg","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"G1PzDz6vEYb4l149XewNr","name":"tileId","brief":"","scope":"instance","type":"PropertyDoc","description":"tileId
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aKh4diGFv7X_HHMAvmmUl","name":"tileset","brief":"","scope":"instance","type":"PropertyDoc","description":"tileset
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mmhHUQ-uUrPSCM9_QwFs1","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kot5xSFXhozy4WfEKJwMu","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"the object type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Adoztcfx74SSNIv-HkjHd","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z34JFpz6-xIy1uS4_3imo","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"x position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NQ280hTpKYIsOI9i8iYA8","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"y position of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vsenOT_ZxtWQF46PFh-pC","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"add the given vertices to the bounds definition.
","params":[{"identifier":"vertices","optional":false,"description":"an array of Vector2d or Point
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2> | %3<%4>"}},{"identifier":"clear","optional":true,"default":"false","description":"either to reset the bounds before adding the new vertices
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"xtVtIDuTedjp5QUR-FzhT","name":"addBounds","brief":"","scope":"instance","type":"MethodDoc","description":"add the given bounds to the bounds definition.
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}},{"identifier":"clear","optional":true,"default":"false","description":"either to reset the bounds before adding the new vertices
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"hSzNWr9MJ68fIXCsXR6kd","name":"addFrame","brief":"","scope":"instance","type":"MethodDoc","description":"add the given quad coordinates to this bound definition, multiplied by the given matrix
","params":[{"identifier":"x0","optional":false,"description":"left X coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y0","optional":false,"description":"top Y coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"x1","optional":false,"description":"right X coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y1","optional":false,"description":"bottom y coordinates of the quad
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"m","optional":true,"description":"an optional transform to apply to the given frame coordinates
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"nLmGL0do4flQKdeO_QHbz","name":"addPoint","brief":"","scope":"instance","type":"MethodDoc","description":"add the given point to the bounds definition.
","params":[{"identifier":"point","optional":false,"description":"the vector or point to be added to the bounds
","dataType":{"tokens":[{"value":"Vector2d | Point","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Point","kind":"link"}],"template":"%1 | %2"}},{"identifier":"m","optional":true,"description":"an optional transform to apply to the given point (if the given point is a Vector2d)
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"pxoJ4YhQWg2QelcFgY6pD","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the bounds position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this bounds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this bounds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"rRDBb923L5YA2P-QPKYwf","name":"clear","brief":"reset the bound
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Oy0vex_gdFtDpjtrprlQF","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this bounds
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GLWlmvrct2m2tQpbSefsM","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"x index of the Tile in the map
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"y index of the Tile in the map
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"gid","optional":false,"description":"tile gid
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tileset","optional":false,"description":"the corresponding tileset object
","dataType":{"tokens":[{"value":"TMXTileset","kind":"canonical"},{"value":"TMXTileset","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"DOMJNPnM32eJWLGuNTlvg","name":"contains","brief":"","examples":[{"caption":"","code":"if (bounds.contains(10, 10)) {\n // do something\n}\n// or\nif (bounds.contains(myVector2d)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the bounds contains the given point.
","params":[{"identifier":"x","description":"x coordinate or a vector point to check
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the bounds contain the point, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"AFFvDatB3LRVH4bOBG5Q1","name":"getRenderable","brief":"","scope":"instance","type":"MethodDoc","description":"return a renderable object for this Tile object
","params":[{"identifier":"settings","optional":true,"description":"see {@link Sprite}
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"a me.Sprite object
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"U1oHENZA-NJ7_fJIbr1kK","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this bounds are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"0ScCIQwM33tbWksv2_XAh","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the two bounds intersect.
","params":[{"identifier":"bounds","optional":false,"dataType":{"tokens":[{"value":"Bounds | Rect","kind":"canonical"},{"value":"Bounds","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"True if the bounds overlap, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"QItrdiX70hSFTLeEdoC2M","name":"setMinMax","brief":"","scope":"instance","type":"MethodDoc","description":"sets the bounds to the given min and max value
","params":[{"identifier":"minX","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"minY","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxX","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"maxY","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"X51f0lENizkT6HyPKmAZn","name":"shift","brief":"","examples":[{"caption":"","code":"bounds.shift(10, 10);\n// or\nbounds.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the bounds to the given x, y position.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"amGCR06fA5ymLi7QHVsSE","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this bounds.
","params":[],"returns":[{"description":"a new Polygon that represents this bounds.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0ENm4jGyCcJJ-pSa7J_94","name":"translate","brief":"","examples":[{"caption":"","code":"bounds.translate(10, 10);\n// or\nbounds.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Translates the bounds by the given point
","params":[{"identifier":"x","description":"x coordinate or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"SVaAyEmgYlb0wbzel68T8","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"Updates bounds using the given vertices
","params":[{"identifier":"vertices","optional":false,"description":"an array of Vector2d or Point
","dataType":{"tokens":[{"value":"Array | Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Array","kind":"canonical"},{"value":"Point","kind":"link"}],"template":"%1<%2> | %3<%4>"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"vkCxXM0oDtIVDc4Zymqhl","name":"Timer","brief":"","see":["{@link timer} the default global timer instance"],"type":"ClassDoc","description":"a Timer class to manage timing related function (FPS, Game Tick, Time...)
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"96oKhsTmLkB_pqsT3gvDA","name":"fps","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Last measured fps rate. \nThis feature is disabled by default, unless the debugPanel is enabled/visible.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_kDBlI4Ovj_rVEuDyt8dW","name":"interpolation","brief":"","defaultValue":"false","scope":"instance","see":["tick"],"type":"PropertyDoc","description":"Enable/disable frame interpolation
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gYoTfO6tgirWWP_dTWEq_","name":"maxfps","brief":"","access":"public","defaultValue":"60","scope":"instance","see":["tick"],"type":"PropertyDoc","description":"Set the maximum target display frame per second
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7I47hwtMj4fB4Sj5Wz0r2","name":"tick","brief":"","access":"public","defaultValue":"1","scope":"instance","see":["interpolation"],"type":"PropertyDoc","description":"Last game tick value. \nUse this value to scale velocities during frame drops due to slow hardware or when setting an F...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LhdhBK5FkzHru9MM1w38O","name":"clearInterval","brief":"","scope":"instance","type":"MethodDoc","description":"
cancels the timed, repeating action which was previously established by a call to setInterval().
","params":[{"identifier":"intervalID","optional":false,"description":"ID of the interval to be cleared
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"V3QvtZ5ruxG1NqCLTFors","name":"clearTimeout","brief":"","scope":"instance","type":"MethodDoc","description":"Cancels a timeout previously established by calling setTimeout().
","params":[{"identifier":"timeoutID","optional":false,"description":"ID of the timeout to be cancelled
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"d7LWN1E3kBOtSN3SssDks","name":"getDelta","brief":"","scope":"instance","type":"MethodDoc","description":"Return elapsed time in milliseconds since the last update
","params":[],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XTBayTJpyaxXqthTRgu-U","name":"getTime","brief":"","scope":"instance","type":"MethodDoc","description":"Return the current timestamp in milliseconds \nsince the game has started or since linux epoch (based on browser suppor...","params":[],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SgRIz2OeDfwZG_NmzUKds","name":"setInterval","brief":"","examples":[{"caption":"","code":"// set a timer to call \"myFunction\" every 1000ms\nme.timer.setInterval(myFunction, 1000);\n// set a timer to call \"myFunction\" every 1000ms (respecting the pause state) and passing param1 and param2\nme.timer.setInterval(myFunction, 1000, true, param1, param2);"}],"scope":"instance","type":"MethodDoc","description":"
Calls a function continously at the specified interval. See setTimeout to call function a single time.
","params":[{"identifier":"fn","optional":false,"description":"the function to execute
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"delay","optional":false,"description":"the number of milliseconds (thousandths of a second) on how often to execute the function
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"pauseable","optional":true,"default":"true","description":"respects the pause state of the engine.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"args","optional":false,"variadic":true,"description":"optional parameters which are passed through to the function specified by fn once the timer expires.
","dataType":{"tokens":[{"value":"unknown","kind":"canonical"}],"template":"unknown"}}],"returns":[{"description":"a numeric, non-zero value which identifies the timer created by the call to setInterval(), which can be used later with me...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kyMjK2iI4RLHXcJc41jgd","name":"setTimeout","brief":"","examples":[{"caption":"","code":"// set a timer to call \"myFunction\" after 1000ms\nme.timer.setTimeout(myFunction, 1000);\n// set a timer to call \"myFunction\" after 1000ms (respecting the pause state) and passing param1 and param2\nme.timer.setTimeout(myFunction, 1000, true, param1, param2);"}],"scope":"instance","type":"MethodDoc","description":"
Calls a function once after a specified delay. See me.timer.setInterval to repeativly call a function.
","params":[{"identifier":"fn","optional":false,"description":"the function you want to execute after delay milliseconds.
","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"delay","optional":false,"description":"the number of milliseconds (thousandths of a second) that the function call should be delayed by.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"pauseable","optional":true,"default":"true","description":"respects the pause state of the engine.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"args","optional":false,"variadic":true,"description":"optional parameters which are passed through to the function specified by fn once the timer expires.
","dataType":{"tokens":[{"value":"unknown","kind":"canonical"}],"template":"unknown"}}],"returns":[{"description":"a positive integer value which identifies the timer created by the call to setTimeout(), which can be used later with me.t...","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"pb-Ef9lcvfLwtHD2tJBQM","name":"TMXHexagonalRenderer","brief":"","type":"ClassDoc","description":"
an Hexagonal Map Renderder
","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"wvF3YIWzSUwza5EQNjxlS","name":"canRender","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the renderer can render the specified map or layer
","params":[{"identifier":"component","optional":false,"description":"TMX Map or Layer
","dataType":{"tokens":[{"value":"TMXTileMap | TMXLayer","kind":"canonical"},{"value":"TMXTileMap","kind":"link"},{"value":"TMXLayer","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"c1oSoz_Ngl5FAh-vOfD1x","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"map","optional":false,"description":"the TMX map
","dataType":{"tokens":[{"value":"TMXTileMap","kind":"canonical"},{"value":"TMXTileMap","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"cCESo9CI_A48l7fm2drNo","name":"drawTile","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given tile at the specified layer
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"x","optional":false,"description":"X coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tile","optional":false,"description":"the tile object to draw
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"5xu8LIvasad3-VmOCTUQG","name":"drawTileLayer","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given TMX Layer for the given area
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"layer","optional":false,"description":"a TMX Layer object
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}},{"identifier":"rect","optional":false,"description":"the area of the layer to draw
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Usdpd7Hg0QB58dLFamDWz","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"return the bounding rect for this map renderer
","params":[{"identifier":"layer","optional":true,"description":"calculate the bounding rect for a specific layer (will return a new bounds object)
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iuekGuxg9IemvkzC_7U0F","name":"pixelToTileCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the tile position corresponding to the specified pixel
","params":[{"identifier":"x","optional":false,"description":"X coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MCL2LPw5FEnJVCNySTuGv","name":"tileToPixelCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the pixel position corresponding of the specified tile
","params":[{"identifier":"col","optional":false,"description":"tile horizontal position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"row","optional":false,"description":"tile vertical position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"vEtRXB013-IuCO4nzdFn9","name":"TMXIsometricRenderer","brief":"","type":"ClassDoc","description":"an Isometric Map Renderder
","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"uoXkr2_GvP_bmNwLIfN6t","name":"canRender","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the renderer can render the specified map or layer
","params":[{"identifier":"component","optional":false,"description":"TMX Map or Layer
","dataType":{"tokens":[{"value":"TMXTileMap | TMXLayer","kind":"canonical"},{"value":"TMXTileMap","kind":"link"},{"value":"TMXLayer","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"rynoURl58zpzHnvdAz2uN","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"map","optional":false,"description":"the TMX map
","dataType":{"tokens":[{"value":"TMXTileMap","kind":"canonical"},{"value":"TMXTileMap","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"usep_ubNLj0boUzs4S4yV","name":"drawTile","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given tile at the specified layer
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"x","optional":false,"description":"X coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tile","optional":false,"description":"the tile object to draw
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"mikCvMrWEOJGtMCHv8ePL","name":"drawTileLayer","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given TMX Layer for the given area
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"layer","optional":false,"description":"a TMX Layer object
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}},{"identifier":"rect","optional":false,"description":"the area of the layer to draw
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"1zVsv-4wcZOh9hHrQXyMD","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"return the bounding rect for this map renderer
","params":[{"identifier":"layer","optional":true,"description":"calculate the bounding rect for a specific layer (will return a new bounds object)
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hb8sSC3hlNSVhzPzs9yye","name":"pixelToTileCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the tile position corresponding to the specified pixel
","params":[{"identifier":"x","optional":false,"description":"X coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Xc6bsb_vazc2EfXNEr4eK","name":"tileToPixelCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the pixel position corresponding of the specified tile
","params":[{"identifier":"col","optional":false,"description":"tile horizontal position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"row","optional":false,"description":"tile vertical position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"o-pgeYJugugsPeP3fNqle","name":"TMXLayer","brief":"","type":"ClassDoc","description":"a TMX Tile Layer Object\nTiled QT 0.7.x format
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"ATeaw33JCRSxs9-NsAolL","name":"alpha","brief":"","defaultValue":"1.0","scope":"instance","see":["Renderable#setOpacity","Renderable#getOpacity"],"type":"PropertyDoc","description":"Define the renderable opacity \nSet to zero if you do not wish an object to be drawn
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"o_hMFxQNAvL049nuTIrM4","name":"alwaysUpdate","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object will always update, even when outside of the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gtEzsJDHcKrkGdAuwIdRJ","name":"ancestor","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"a reference to the parent object that contains this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"klphi4lAU0sA_MsL7a9Lo","name":"anchorPoint","brief":"","defaultValue":"<0.5,0.5>","scope":"instance","type":"PropertyDoc","description":"The anchor point is used for attachment behavior, and/or when applying transformations. \nThe coordinate system places t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Vf-kXxSMsGWFOFvlKC1Nk","name":"animatedTilesets","brief":"","scope":"instance","type":"PropertyDoc","description":"
All animated tilesets in this layer
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pjLkOF7ZSfdvL74rFBeeH","name":"autoTransform","brief":"","defaultValue":"true","examples":[{"caption":"","code":"// enable \"automatic\" transformation when the object is activated\nonActivateEvent: function () {\n // reset the transformation matrix\n this.currentTransform.identity();\n // ensure the anchor point is the renderable center\n this.anchorPoint.set(0.5, 0.5);\n // enable auto transform\n this.autoTransform = true;\n ....\n}"}],"scope":"instance","type":"PropertyDoc","description":"When enabled, an object container will automatically apply\nany defined transformation before calling the child draw method...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V7o6yCN0pDr8mqcSpGpsG","name":"blendMode","brief":"","defaultValue":"\"normal\"","scope":"instance","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"
the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P86KoRiYun8FcrF3Wsk-5","name":"body","brief":"","examples":[{"caption":"","code":" // define a new Player Class\n class PlayerEntity extends me.Sprite {\n // constructor\n constructor(x, y, settings) {\n // call the parent constructor\n super(x, y , settings);\n\n // define a basic walking animation\n this.addAnimation(\"walk\", [...]);\n // define a standing animation (using the first frame)\n this.addAnimation(\"stand\", [...]);\n // set the standing animation as default\n this.setCurrentAnimation(\"stand\");\n\n // add a physic body\n this.body = new me.Body(this);\n // add a default collision shape\n this.body.addShape(new me.Rect(0, 0, this.width, this.height));\n // configure max speed, friction, and initial force to be applied\n this.body.setMaxVelocity(3, 15);\n this.body.setFriction(0.4, 0);\n this.body.force.set(3, 0);\n this.isKinematic = false;\n\n // set the display to follow our position on both axis\n me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH);\n }\n\n ...\n\n }"}],"scope":"instance","type":"PropertyDoc","description":"the renderable physic body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pReJ_i8Sa4ctriEgSDc4B","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aoA262dR0S2ZX2yRp76zq","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MTVvAUtAxbCO2wRe5Ex8_","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6ZnIlGq4OjHZSM_NALY0F","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"the layer class
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gUx7fqo8Uuj95bmuBHm0v","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fmri9poG1XHq31aW4C9hm","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ebz_F5NjX9Gvy7TtmVP-E","name":"floating","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"If true, this renderable will be rendered using screen coordinates,\nas opposed to world coordinates. Use this, for example...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"A2GYX99u2dbDxD26HPcmN","name":"GUID","brief":"","scope":"instance","type":"PropertyDoc","description":"
(G)ame (U)nique (Id)entifier" \na GUID will be allocated for any renderable object added \nto an object contain...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1zH6zTPmXFc7pLPj6kqZ1","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1jPsYqKDwF4XCFEWE4Wuw","name":"inViewport","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether the renderable object is visible and within the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4QSVK31w2JXN5OmD6crM-","name":"isAnimated","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Layer contains tileset animations
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e8f6horFeesXkukAP640c","name":"isDirty","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"when true the renderable will be redrawn during the next update cycle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I8P0_FkS4UhtONBa7yXMU","name":"isFlippedX","brief":"","access":"public","scope":"instance","see":["Renderable#flipX"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3DCwaC3Gwy5cEqvIcIzQd","name":"isFlippedY","brief":"","access":"public","scope":"instance","see":["Renderable#flipY"],"type":"PropertyDoc","description":"returns true if this renderable is flipped on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nlc5swa5k4jI-qcdI88UO","name":"isFloating","brief":"","scope":"instance","see":["Renderable#floating"],"type":"PropertyDoc","description":"Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z1lUhXTiZx54Q0cXU3TwJ","name":"isKinematic","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"If true then physic collision and input events will not impact this renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p6Do1nlGDnOGAkm-RN5rg","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-IYHP8_J5dsB85T53XMKG","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D8U3-U2iuiMdqUUE7h84w","name":"mask","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// apply a mask in the shape of a Star\nmyNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [\n // draw a star\n {x: 0, y: 0},\n {x: 14, y: 30},\n {x: 47, y: 35},\n {x: 23, y: 57},\n {x: 44, y: 90},\n {x: 0, y: 62},\n {x: -44, y: 90},\n {x: -23, y: 57},\n {x: -47, y: 35},\n {x: -14, y: 30}\n]);"}],"scope":"instance","type":"PropertyDoc","description":"A mask limits rendering elements to the shape and position of the given mask object.\nSo, if the renderable is larger than ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7cMuVm7SjVwBTMlas_nL3","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s7dgjrc7aYbbXyTR4_MLN","name":"onVisibilityChange","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"this.onVisibilityChange = function(inViewport) {\n if (inViewport === true) {\n console.log(\"object has entered the in a camera viewport!\");\n }\n};"}],"scope":"instance","type":"PropertyDoc","description":"an event handler that is called when the renderable leave or enter a camera viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lvdCJaItK9XjubwczjEDR","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"returns the parent application (or game) to which this renderable is attached to
","params":[],"returns":[{"description":"the parent application or undefined if not attached to any container/app
","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mec2uET1AmCzfpGYQn-C-","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"Array of points defining the Polygon \nNote: If you manually change points
, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pTxOdGkOnW_mchKUvHi6Y","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EMUOXaBz1OMfiYQhjfM92","name":"renderorder","brief":"","defaultValue":"\"right-down\"","scope":"instance","type":"PropertyDoc","description":"the order in which tiles on orthogonal tile layers are rendered.\n(valid values are "left-down", "left-up&qu...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"o_9cHFSV3zbjuUU0SfVmm","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"
right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"R6xeDonZGtQdRyiv8SK4o","name":"shader","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"(Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL onl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lH4LHou6nTvhOEk0dHzzB","name":"tilesets","brief":"","scope":"instance","type":"PropertyDoc","description":"
The Layer corresponding Tilesets
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ccng-G1TCrC4URbyhhoH5","name":"tint","brief":"","defaultValue":"(255, 255, 255)","examples":[{"caption":"","code":"// add a red tint to this renderable\nthis.tint.setColor(255, 128, 128);\n// remove the tint\nthis.tint.setColor(255, 255, 255);"}],"scope":"instance","type":"PropertyDoc","description":"define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QtXZntJ8epp763dfsuZHB","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WGApPZJ6pDoQAWJAvkzAG","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DdXiDiLgFx_cpCyiANJVN","name":"updateWhenPaused","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Whether to update this object when the game is paused.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sD7hF2ZzLXsv1OHfXouXw","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7Hf_26WHOrUSmCeJ68iHp","name":"x","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Horizontal layer offset in tiles
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j7FPQ6xvfAjcVZ7qrMWeu","name":"y","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Vertical layer offset in tiles
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-kXECUG5aOJfuPX4TFdTx","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the angle to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"angle in radians
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Rt2YlQ3IxJTMJytNmkud7","name":"cellAt","brief":"","examples":[{"caption":"","code":"// return the first tile at offset 0, 0\nlet tile = layer.cellAt(0, 0);"}],"scope":"instance","type":"MethodDoc","description":"Return the Tile object at the specified tile coordinates
","params":[{"identifier":"x","optional":false,"description":"x position of the tile (in Tile unit)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"x position of the tile (in Tile unit)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"boundsCheck","optional":true,"default":"true","description":"check first if within the layer bounds
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"corresponding tile or null if there is no defined tile at the position or if outside of the layer bounds
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lwjxZhj_MzcDYdPGb3IIg","name":"centerOn","brief":"","scope":"instance","type":"MethodDoc","description":"center the rectangle position around the given coordinates
","params":[{"identifier":"x","optional":false,"description":"the x coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinate around which to center this rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oT-JKoPlmV1uA8CwvzMMj","name":"clearTile","brief":"","examples":[{"caption":"","code":"me.game.world.getChildByType(me.TMXLayer).forEach(function(layer) {\n // clear all tiles at the given x,y coordinates\n layer.clearTile(x, y);\n});"}],"scope":"instance","type":"MethodDoc","description":"clear the tile at the specified position
","params":[{"identifier":"x","optional":false,"description":"X coordinate (in map coordinates: row/column)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate (in map coordinates: row/column)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"YZ_Sb8UEwf975sDtiKeP2","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"clone this rectangle
","params":[],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5r1gnVSkmsYIQKFKRD21a","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"map","optional":false,"description":"layer data in JSON format ({@link http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#layer})
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"data","optional":false,"description":"layer data in JSON format ({@link http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#layer})
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"tilewidth","optional":false,"description":"width of each tile in pixels
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tileheight","optional":false,"description":"height of each tile in pixels
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"orientation","optional":false,"description":""isometric" or "orthogonal"
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"tilesets","optional":false,"description":"tileset as defined in Tiled
","dataType":{"tokens":[{"value":"TMXTilesetGroup","kind":"canonical"},{"value":"TMXTilesetGroup","kind":"link"}],"template":"%1"}},{"identifier":"z","optional":false,"description":"z-index position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"0_zRf1bO8Fz8cpS_GsARf","name":"contains","brief":"","examples":[{"caption":"","code":"if (rect.contains(10, 10)) {\n // do something\n}\n// or\nif (rect.contains(myVector2d)) {\n // do something\n}\nif (rect.contains(myRect)) {\n // do something\n}"}],"scope":"instance","type":"MethodDoc","description":"Returns true if the rectangle contains the given point or rectangle
","params":[{"identifier":"x","description":"x coordinate or a vector point, or a rectangle to test
","dataType":{"tokens":[{"value":"number | Vector2d | Rect","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Rect","kind":"link"}],"template":"%1 | %2 | %3"}},{"identifier":"y","optional":true,"description":"y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"True if the rectangle contain the given point or rectangle, otherwise false
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"1KIpke8PimAN_7F-Uq2n_","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"copy the position and size of the given rectangle into this one
","params":[{"identifier":"rect","optional":false,"description":"Source rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"new rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"86DJ-KzcXCp-X4iJg3e84","name":"distanceTo","brief":"","scope":"instance","type":"MethodDoc","description":"return the distance to the specified target
","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"distance
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5XHJF_LHj-0G_FyR1YwYg","name":"draw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#postDraw"],"type":"MethodDoc","description":"Draw this renderable (automatically called by melonJS).\nAll draw operations for renderable are made respectively\nto the po...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer instance
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"viewport","optional":true,"description":"the viewport to (re)draw
","dataType":{"tokens":[{"value":"Camera2d","kind":"canonical"},{"value":"Camera2d","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"rWqdMFfiLv8iApTAe2sfw","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is identical to the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if equals
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"_mqWfWs40RUb85w2NZBHu","name":"flipX","brief":"","scope":"instance","see":["Matrix2d#scaleX"],"type":"MethodDoc","description":"flip the renderable on the horizontal axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bZTg_VuLLU-TEcwF75wrT","name":"flipY","brief":"","scope":"instance","see":["Matrix2d#scaleY"],"type":"MethodDoc","description":"flip the renderable on the vertical axis (around the center of the renderable)
","params":[{"identifier":"flip","optional":true,"default":"true","description":"true
to flip this renderable.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"GI740gXqpTrMSjmz3vDuv","name":"getAbsolutePosition","brief":"","scope":"instance","type":"MethodDoc","description":"return the renderable absolute position in the game world
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0678etjU9H_EQBpubS7Yb","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"returns the bounding box for this renderable
","params":[],"returns":[{"description":"bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4PqP-3tyd40AA_y8kch2j","name":"getIndices","brief":"","scope":"instance","type":"MethodDoc","description":"returns a list of indices for all triangles defined in this polygon
","params":[],"returns":[{"description":"an array of vertex indices for all triangles forming this polygon.
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"gQOYuSEKleUOk9_Uvrmmp","name":"getOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"get the renderable alpha channel value
","params":[],"returns":[{"description":"current opacity value between 0 and 1
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_b0fy7VnANdqTw39u8HVV","name":"getRenderer","brief":"","scope":"instance","type":"MethodDoc","description":"Return the layer current renderer object
","params":[],"returns":[{"description":"renderer
","dataType":{"tokens":[{"value":"TMXRenderer","kind":"canonical"},{"value":"TMXRenderer","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9LW6Om5MxT5i90bggtdf1","name":"getTile","brief":"","examples":[{"caption":"","code":"// get the TMX Map Layer called \"Front layer\"\nlet layer = me.game.world.getChildByName(\"Front Layer\")[0];\n// get the tile object corresponding to the latest pointer position\nlet tile = layer.getTile(me.input.pointer.x, me.input.pointer.y);"}],"scope":"instance","type":"MethodDoc","description":"Return the Tile object at the specified position
","params":[{"identifier":"x","optional":false,"description":"X coordinate (in world/pixels coordinates)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate (in world/pixels coordinates)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"corresponding tile or null if there is no defined tile at the coordinate or if outside of the layer bounds
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"uVXD7csHuguuWPgGsJTK5","name":"getTileById","brief":"","scope":"instance","type":"MethodDoc","description":"return a new the Tile object corresponding to the given tile id
","params":[{"identifier":"tileId","optional":false,"description":"tileId
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"x","optional":false,"description":"X coordinate (in world/pixels coordinates)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate (in world/pixels coordinates)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the tile object
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9v-MnA9kRvc9RXrLXmWlL","name":"getTileId","brief":"","scope":"instance","type":"MethodDoc","description":"Return the TileId of the Tile at the specified position
","params":[{"identifier":"x","optional":false,"description":"X coordinate (in world/pixels coordinates)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate (in world/pixels coordinates)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"TileId or null if there is no Tile at the given position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"aNDgNhbm9Et6LI009B0-b","name":"isConvex","brief":"","scope":"instance","type":"MethodDoc","description":"Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
","params":[],"returns":[{"description":"true if the vertices are convex, false if not, null if not computable
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"3kjwJamdEZ8uX3agfNH_T","name":"isFinite","brief":"","scope":"instance","type":"MethodDoc","description":"determines whether all coordinates of this rectangle are finite numbers.
","params":[],"returns":[{"description":"false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"BcBA0HVeYmnBQ6LMFj0C3","name":"lookAt","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable towards the given target.
","params":[{"identifier":"target","optional":false,"description":"the renderable or position to look at
","dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RBMq0vzT-SDlwDXeuYm50","name":"onCollision","brief":"","examples":[{"caption":"","code":"// colision handler\nonCollision(response) {\n if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) {\n // makes the other object solid, by substracting the overlap vector to the current position\n this.pos.sub(response.overlapV);\n this.hurt();\n // not solid\n return false;\n }\n // Make the object solid\n return true;\n},"}],"scope":"instance","type":"MethodDoc","description":"onCollision callback, triggered in case of collision,\nwhen this renderable body is colliding with another one
","params":[{"identifier":"response","optional":false,"description":"the collision response object
","dataType":{"tokens":[{"value":"ResponseObject","kind":"canonical"},{"value":"ResponseObject","kind":"link"}],"template":"%1"}},{"identifier":"other","optional":false,"description":"the other renderable touching this one (a reference to response.a or response.b)
","dataType":{"tokens":[{"value":"Renderable | Container | Entity | Sprite | NineSliceSprite","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Container","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"NineSliceSprite","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}}],"returns":[{"description":"true if the object should respond to the collision (its position and velocity will be corrected)
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"QiWAX_DDs4AEyHS5ATpPZ","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"deHsvw--62Q8zx02YrKa-","name":"overlaps","brief":"","scope":"instance","type":"MethodDoc","description":"check if this rectangle is intersecting with the specified one
","params":[{"identifier":"rect","optional":false,"dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"true if overlaps
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"8NN_dA9U-yCgNSNHI0EX6","name":"postDraw","brief":"","scope":"instance","see":["Renderable#preDraw","Renderable#draw"],"type":"MethodDoc","description":"restore the rendering context after drawing (automatically called by melonJS).
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"NPREO5ndUpZv5BJsex-5T","name":"preDraw","brief":"","scope":"instance","see":["Renderable#draw","Renderable#postDraw"],"type":"MethodDoc","description":"Prepare the rendering context before drawing (automatically called by melonJS).\nThis will apply any defined transforms, an...","params":[{"identifier":"renderer","optional":false,"description":"
a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}}],"returns":[],"extends":[],"implements":[]},{"id":"VamKZ0LCPp7XETNRBlc-1","name":"recalc","brief":"","scope":"instance","type":"MethodDoc","description":"Computes the calculated collision polygon.\nThis must be called if the points
array, an...","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Jva3YLX3gsSghSpcWIEvV","name":"resize","brief":"","scope":"instance","type":"MethodDoc","description":"resize the rectangle
","params":[{"identifier":"w","optional":false,"description":"new width of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"new height of the rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MihM0JSru2DYMaB4UUxea","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"Rotate this renderable by the specified angle (in radians).
","params":[{"identifier":"angle","optional":false,"description":"The angle to rotate (in radians)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional point to rotate around
","dataType":{"tokens":[{"value":"Vector2d | ObservableVector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jS_lReHS2x42us7QaUS3u","name":"scale","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point. Scaling actually applies changes\nto the currentTransform member wich is use...","params":[{"identifier":"x","optional":false,"description":"
a number representing the abscissa of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"x","description":"a number representing the ordinate of the scaling vector.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"CsQoA_ZZ_ELSv3NwEWuAz","name":"scaleV","brief":"","scope":"instance","type":"MethodDoc","description":"scale the renderable around his anchor point
","params":[{"identifier":"v","optional":false,"description":"scaling vector
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8c1JRpOTlrYLKCrTKNTCW","name":"setOpacity","brief":"","scope":"instance","type":"MethodDoc","description":"set the renderable alpha channel value
","params":[{"identifier":"alpha","optional":false,"description":"opacity value between 0.0 and 1.0
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"_Pw-o5ynwcJD7inIgI0Vn","name":"setRenderer","brief":"","examples":[{"caption":"","code":"// use the parent map default renderer\nlet layer = new me.TMXLayer(...);\nlayer.setRenderer(map.getRenderer());"}],"scope":"instance","type":"MethodDoc","description":"Set the TMX renderer for this layer object
","params":[{"identifier":"renderer","optional":false,"dataType":{"tokens":[{"value":"TMXRenderer","kind":"canonical"},{"value":"TMXRenderer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"04lpz_ezKudT6OP_wDiId","name":"setShape","brief":"","scope":"instance","type":"MethodDoc","description":"set new value to the rectangle shape
","params":[{"identifier":"x","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"position of the Rectangle
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"width of the rectangle, or an array of vector defining the rectangle
","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %3<%2>"}},{"identifier":"h","optional":true,"description":"height of the rectangle, if a numeral width parameter is specified
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"this rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3hx6zhrX2KXQ6zkWHfuBx","name":"setTile","brief":"","scope":"instance","type":"MethodDoc","description":"assign the given Tile object to the specified position
","params":[{"identifier":"tile","optional":false,"description":"the tile object to be assigned
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}},{"identifier":"x","optional":false,"description":"x coordinate (in world/pixels coordinates)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"y coordinate (in world/pixels coordinates)
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"the tile object
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DtW4MpIkVdOFKTfq8lAkq","name":"setVertices","brief":"","scope":"instance","type":"MethodDoc","description":"set the vertices defining this Polygon
","params":[{"identifier":"vertices","optional":false,"description":"array of vector or vertice defining the Polygon
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"this instance for objecf chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FlrnWtm9MToG91jAVZjry","name":"shift","brief":"","examples":[{"caption":"","code":"polygon.shift(10, 10);\n// or\npolygon.shift(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"Shifts the Polygon to the given position vector.
","params":[{"identifier":"x","description":"x coordinate or a vector point to shift to
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"utLMAJFZ3JUdChYX7Ym7x","name":"to2d","brief":"","scope":"instance","type":"MethodDoc","description":"apply a 2d projection to this shapen
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hDJqjoA8AeCbJJ8Lqmy0a","name":"toIso","brief":"","scope":"instance","type":"MethodDoc","description":"apply an isometric projection to this shape
","params":[],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XdntZXew4uskC2syMnbdO","name":"toPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"Returns a polygon whose edges are the same as this box.
","params":[],"returns":[{"description":"a new Polygon that represents this rectangle.
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kI7ZgdUfaMRrcjHaTFAjl","name":"transform","brief":"","scope":"instance","see":["Renderable#currentTransform"],"type":"MethodDoc","description":"multiply the renderable currentTransform with the given matrix
","params":[{"identifier":"m","optional":false,"description":"the transformation matrix
","dataType":{"tokens":[{"value":"Matrix2d","kind":"canonical"},{"value":"Matrix2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Renderable","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jOUoQ6aZq4fPKG5HkcYAA","name":"translate","brief":"","examples":[{"caption":"","code":"polygon.translate(10, 10);\n// or\npolygon.translate(myVector2d);"}],"scope":"instance","type":"MethodDoc","description":"translate the Polygon by the specified offset
","params":[{"identifier":"x","description":"x offset or a vector point to translate by
","dataType":{"tokens":[{"value":"number | Vector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1 | %2"}},{"identifier":"y","optional":true,"description":"y offset
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"Reference to this object for method chaining
","dataType":{"tokens":[{"value":"Polygon","kind":"canonical"},{"value":"Polygon","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PIDgMbmK26GKvVMB_P90i","name":"union","brief":"","scope":"instance","type":"MethodDoc","description":"merge this rectangle with another one
","params":[{"identifier":"rect","optional":false,"description":"other rectangle to union with
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"the union(ed) rectangle
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"j6kks9knPU1tsAgnTzSLH","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"update function (automatically called by melonJS).
","params":[{"identifier":"dt","optional":false,"description":"time since the last update in milliseconds.
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"true if the renderable is dirty
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"s2_V_0ZpP9LoHNJ2V4do5","name":"updateBounds","brief":"","scope":"instance","type":"MethodDoc","description":"update the bounding box for this shape.
","params":[{"identifier":"absolute","optional":true,"default":"true","description":"update the bounds size and position in (world) absolute coordinates
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"this shape bounding box Rectangle object
","dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ggGkAxutvRY9i36IToGro","name":"onAnchorUpdate","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"called when the anchor point value is changed
","params":[{"identifier":"x","optional":false,"description":"the new X value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the new Y value to be set for the anchor
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"6dvSJOku37BDG99pv1rqk","name":"TMXOrthogonalRenderer","brief":"","type":"ClassDoc","description":"an Orthogonal Map Renderder
","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"dGYLlN2FzwT91X1PpEe-Q","name":"canRender","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the renderer can render the specified map or layer
","params":[{"identifier":"component","optional":false,"description":"TMX Map or Layer
","dataType":{"tokens":[{"value":"TMXTileMap | TMXLayer","kind":"canonical"},{"value":"TMXTileMap","kind":"link"},{"value":"TMXLayer","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"X0jgWpV2TqH4J6qHjbyYs","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"map","optional":false,"description":"the TMX map
","dataType":{"tokens":[{"value":"TMXTileMap","kind":"canonical"},{"value":"TMXTileMap","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"6KLFMkSNLMdK79fRdbghQ","name":"drawTile","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given tile at the specified layer
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"x","optional":false,"description":"X coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tile","optional":false,"description":"the tile object to draw
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Zu1L6JfZ_RevnTkC5H9Si","name":"drawTileLayer","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given TMX Layer for the given area
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"layer","optional":false,"description":"a TMX Layer object
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}},{"identifier":"rect","optional":false,"description":"the area of the layer to draw
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"XsGT8riDcFxqnqbjNeeYI","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"return the bounding rect for this map renderer
","params":[{"identifier":"layer","optional":true,"description":"calculate the bounding rect for a specific layer (will return a new bounds object)
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"R2guZSh8XkTUTVKV5DO2w","name":"pixelToTileCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the tile position corresponding to the specified pixel
","params":[{"identifier":"x","optional":false,"description":"X coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MKWXpFzswa-wtQn1rNxog","name":"tileToPixelCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the pixel position corresponding of the specified tile
","params":[{"identifier":"col","optional":false,"description":"tile horizontal position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"row","optional":false,"description":"tile vertical position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"gQnpfLpAu1ZlKvVnNxtzW","name":"TMXRenderer","brief":"","type":"ClassDoc","description":"The map renderer base class
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"pDy2inrSrQFJ8XrfqVMJe","name":"canRender","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the renderer can render the specified map or layer
","params":[{"identifier":"component","optional":false,"description":"TMX Map or Layer
","dataType":{"tokens":[{"value":"TMXTileMap | TMXLayer","kind":"canonical"},{"value":"TMXTileMap","kind":"link"},{"value":"TMXLayer","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"kiqdMPoPOYaByMJfCqdd5","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"cols","optional":false,"description":"width of the tilemap in tiles
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"rows","optional":false,"description":"height of the tilemap in tiles
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tilewidth","optional":false,"description":"width of each tile in pixels
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tileheight","optional":false,"description":"height of each tile in pixels
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"aPYFYziisu6ave2fxF6B_","name":"drawTile","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given tile at the specified layer
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"x","optional":false,"description":"X coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tile","optional":false,"description":"the tile object to draw
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"xNnoNso65jmV-QqAmFAiN","name":"drawTileLayer","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given TMX Layer for the given area
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"layer","optional":false,"description":"a TMX Layer object
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}},{"identifier":"rect","optional":false,"description":"the area of the layer to draw
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"SGlBJCl_3A3xrUyuyen3u","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"return the bounding rect for this map renderer
","params":[{"identifier":"layer","optional":true,"description":"calculate the bounding rect for a specific layer (will return a new bounds object)
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"uV_TAJvKxiHAkGG6xftBq","name":"pixelToTileCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the tile position corresponding to the specified pixel
","params":[{"identifier":"x","optional":false,"description":"X coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"27lb6ImiUDPba2f6BmfVT","name":"tileToPixelCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the pixel position corresponding of the specified tile
","params":[{"identifier":"col","optional":false,"description":"tile horizontal position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"row","optional":false,"description":"tile vertical position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"cMhhhuRPkQTLpfLngNJi7","name":"TMXStaggeredRenderer","type":"ClassDoc","description":"a Staggered Map Renderder
","params":[],"returns":[],"extends":["TMXHexagonalRenderer"],"implements":[],"members":[{"id":"Id4L14rRP3qhidhLNp68F","name":"canRender","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the renderer can render the specified map or layer
","params":[{"identifier":"component","optional":false,"description":"TMX Map or Layer
","dataType":{"tokens":[{"value":"TMXTileMap | TMXLayer","kind":"canonical"},{"value":"TMXTileMap","kind":"link"},{"value":"TMXLayer","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"yDbjq0mvwO4s6me-lTUeW","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"kl-IDWYrhYKjp9viexyTn","name":"drawTile","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given tile at the specified layer
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"x","optional":false,"description":"X coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate where to draw the tile
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"tile","optional":false,"description":"the tile object to draw
","dataType":{"tokens":[{"value":"Tile","kind":"canonical"},{"value":"Tile","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"TwS_mjPvn1K-HkgTp2vxr","name":"drawTileLayer","brief":"","scope":"instance","type":"MethodDoc","description":"draw the given TMX Layer for the given area
","params":[{"identifier":"renderer","optional":false,"description":"a renderer object
","dataType":{"tokens":[{"value":"CanvasRenderer | WebGLRenderer","kind":"canonical"},{"value":"CanvasRenderer","kind":"link"},{"value":"WebGLRenderer","kind":"link"}],"template":"%1 | %2"}},{"identifier":"layer","optional":false,"description":"a TMX Layer object
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}},{"identifier":"rect","optional":false,"description":"the area of the layer to draw
","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Ridp5LzBc6RaLfmyH0rOr","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"return the bounding rect for this map renderer
","params":[{"identifier":"layer","optional":true,"description":"calculate the bounding rect for a specific layer (will return a new bounds object)
","dataType":{"tokens":[{"value":"TMXLayer","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DwQ7U9nB-gMiQ6VLzPw1O","name":"pixelToTileCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the tile position corresponding to the specified pixel
","params":[{"identifier":"x","optional":false,"description":"X coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"Y coordinate
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rLNIzr1blW3dtJ6LZT4YP","name":"tileToPixelCoords","brief":"","scope":"instance","type":"MethodDoc","description":"return the pixel position corresponding of the specified tile
","params":[{"identifier":"col","optional":false,"description":"tile horizontal position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"row","optional":false,"description":"tile vertical position
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"v","optional":true,"description":"an optional vector object where to put the return values
","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"XTk9A9C690u_KOmhj8dH7","name":"TMXTileMap","brief":"","type":"ClassDoc","description":"a TMX Tile Map Object\nTiled QT +0.7.x format
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"k37rwSZSHckwm6bDTz_4L","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"The map class.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s4KJscDGtO8YLEZL612zB","name":"cols","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"width of the tilemap in tiles
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3ntowEhC197SgbMzLxcQx","name":"infinite","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"is the map an infinite map
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TCZ22s4MZieHEAnropH2j","name":"name","brief":"","scope":"instance","type":"PropertyDoc","description":"name of the tilemap
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y8jrzOYIj_72a1PBnQ0Av","name":"orientation","brief":"","defaultValue":"\"orthogonal\"","scope":"instance","type":"PropertyDoc","description":"the map orientation type. melonJS supports “orthogonal”, “isometric”, “staggered” and “hexagonal”.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cKXQODCtLX64Bq9XCoh9g","name":"renderorder","brief":"","defaultValue":"\"right-down\"","scope":"instance","type":"PropertyDoc","description":"the order in which tiles on orthogonal tile layers are rendered.\n(valid values are "left-down", "left-up&qu...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3W37wpDmXWQ19GzvtyqnQ","name":"rows","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"
height of the tilemap in tiles
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9sJQcJJ-sLVRO7889MaCF","name":"tiledversion","brief":"","scope":"instance","type":"PropertyDoc","description":"The Tiled version used to save the file (since Tiled 1.0.1).
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RcSncwmHPI0W5dj1X1T7F","name":"tileheight","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"Tile height
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FA5USiJIqNaGbJSqaitpc","name":"tilewidth","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"Tile width
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DcJ77ggtJvySfNNcQLxCB","name":"version","brief":"","scope":"instance","type":"PropertyDoc","description":"the TMX format version
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n9dgt0G6Ki39L75Qzdsqt","name":"addTo","brief":"","examples":[{"caption":"","code":"// create a new level object based on the TMX JSON object\nlet level = new me.TMXTileMap(levelId, me.loader.getTMX(levelId));\n// add the level to the game world container\nlevel.addTo(me.game.world, true, true);"}],"scope":"instance","type":"MethodDoc","description":"add all the map layers and objects to the given container.\nnote : this will not automatically update the camera viewport
","params":[{"identifier":"container","optional":false,"description":"target container
","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}},{"identifier":"flatten","optional":true,"default":"true","description":"if true, flatten all objects into the given container, else a