","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":"oIwznyvWDxu-4Q00FRJkW","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":"neCbfXQGgDTQ8jDkm_Vp-","name":"file","brief":"","defaultValue":"undefined","readonly":true,"scope":"static","type":"NSDoc","description":"a collection of file utility functions
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"EIQyKFVWcF3E5P8ff-Pk7","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":"MLtRMd5jqSFWH4kNyl80k","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":"-X_MDHFybu6C_YPcCVbpa","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":"fIOyJExegavGHfF4MGVXZ","name":"function","brief":"","scope":"static","type":"NSDoc","description":"a collection of utility functions
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"NuaDVD3g0CV5yjy32eBh9","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":"eicciUDRcW07yNiPra_M9","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":"1r8q5k8zj7GWrf9YO3_l8","name":"string","brief":"","scope":"static","type":"NSDoc","description":"a collection of string utility functions
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"dDmnuycFAWpAsOIdXbfyv","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":"iuOukMV6ljxhLzicfwgKQ","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":"g90h7czg3tgbH0MgHoe0A","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":"rrfZBdeqIRwqkUAYng24U","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":"kBL6LEuG0WuLrFd9EtmUV","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":"wVsY-sq5--vxrd_HEs4jh","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":"first","optional":false,"description":"First version string to compare
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"second","optional":false,"description":"second version string to compare
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"comparison result < 0 : first < second \n0 : first == second \n> 0 : first > second
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rmZuO5iIezyWJWYPltCUW","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":"w8zkkHRcG5T5DIpAk48Dp","name":"debug","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"display the debug panel (if preloaded)
"},{"id":"0AzO1ikjVtFAmsw5VXDdB","name":"debugToggleKey","brief":"","access":"public","defaultValue":"\"s\"","scope":"static","type":"PropertyDoc","description":"show/hide the debug panel (if preloaded)
"},{"id":"-JhAXeeAaKWO_k-Fi8DDm","name":"hitbox","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"draw the hitbox in the debug panel (if enabled)
"},{"id":"hAAfMb46W2irZLv_evopm","name":"quadtree","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"draw the quadtree in the debug panel (if enabled)
"},{"id":"zb1C0dTn5DKgs1n37w5la","name":"velocity","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"draw the entities velocity in the debug panel (if enabled)
"},{"id":"2BLtiPNpopMz0C1IF45ev","name":"webgl","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"force the renderer to WebGL
"}]}]},{"id":"2FUb8CdxODntwvHsGhCkT","name":"video","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"McAInNFMNzkmrTYwYgXL0","name":"renderer","brief":"","defaultValue":"undefined","type":"PropertyDoc","description":"A reference to the active Canvas or WebGL active renderer renderer
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IaxXGw4lyftAX3twwN62p","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":"Vz4YRNZTH3EGWCS2cyOf_","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":"KCHTpEzx160qXxLmBY3wX","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":"fIMRXfumW4AQcbVE4Wl4p","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":"F1oOn4lka7rVUl36_Ko-p","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":"zmsdzRvLvJd7czYSFkBrm","name":"antiAlias","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"whether to enable or not video scaling interpolation
"},{"id":"Q6Lz1SljDzgUStnillGxM","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":"3Iil6VoEUQ8RH8_6nLZrH","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":"VqDSBUhu1jp85zFR5jzzQ","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":"nVjJEpNW5F3PkFbPjvKv1","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":"rXGup0FryNK60YGJfeDdu","name":"preferWebGL1","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"
if true the renderer will only use WebGL 1
"},{"id":"P7N7h6ssugmf5J5DuunPg","name":"renderer","brief":"","access":"public","defaultValue":"AUTO","scope":"static","type":"PropertyDoc","description":"renderer to use (CANVAS, WEBGL, AUTO), or a custom renderer class
"},{"id":"7GfG9IztmN3Z4GsgmW6Hz","name":"scale","brief":"","access":"public","defaultValue":"1.0","scope":"static","type":"PropertyDoc","description":"enable scaling of the canvas ('auto' for automatic scaling)
"},{"id":"ce1X2VK6iXfh2nXqZok8W","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":"GdQsF5gV6oDYTdoAdgJEy","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":"o1_kz0fiwuewSjZLSQ7U8","name":"transparent","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"
whether to allow transparent pixels in the front buffer (screen).
"}]},{"id":"RJyOfizPnVlK1ElYBBs4W","name":"isInitialized","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true when this app instance has been initialized
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vg48zyLYiRN1WrAn33kGz","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":"jl7Ozi6L_rIJWQP1CdQ0B","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":"ul1c0cq97Qr1a5uSDgwfI","name":"parentElement","brief":"","scope":"instance","type":"PropertyDoc","description":"
the parent HTML element holding the main canvas of this application
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H8WkqAIP9Tm9_iL1n-EHx","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":"qJYyQX9mpi0fBOIPS6Ifo","name":"renderer","brief":"","scope":"instance","type":"PropertyDoc","description":"a reference to the active Canvas or WebGL active renderer renderer
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5QeJ8mwRiw25cgeYn_e49","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":"jTMFkV_1YVAJfMP4eqKxZ","name":"settings","brief":"","scope":"instance","type":"PropertyDoc","description":"the given settings used when creating this application
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5XAiBW_2FcWZg2v6QVmAr","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":"1w2Cbd-NVmILJjX9QbWFj","name":"stopOnBlur","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"
Specify whether to stop this app when losing focus
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Sr0iDxmVECpWHNpgqePlT","name":"viewport","brief":"","scope":"instance","type":"PropertyDoc","description":"the active stage "default" camera
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PKB2R4gTCLfZ9R4noYFkj","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":"F6EiKeEFtr1lW_bEd8W-g","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":"LfoNZ_0iUU9ChknqHqa6T","name":"draw","brief":"draw the active scene/stage associated to this game
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vqcqYB6ZkNJ1x-mY7DNZF","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":"dVXRw1nJGtVQFa_bzRC0f","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":"JJxkyPUeo289eTPZDJ6Jy","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":"K8XdPxTLSPozD8qeQhIZW","name":"repaint","brief":"
force the redraw (not update) of all objects
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GNRohFAZlXm2FJ088GGon","name":"reset","brief":"","scope":"instance","type":"MethodDoc","description":"reset the game Object manager\ndestroy all current objects
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wLS3l0WqGd-J4VkoWgCdR","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":"q-ODQDT8KLH30jIJA6CK2","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":"dKZ0_nMEwcq0As9InbI_s","name":"BitmapText","brief":"","type":"ClassDoc","description":"a bitmap font object
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"aPFUMmeWLr9bLXNa5hMAu","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":"N31zbDcmm8EQXIhu2og1o","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":"Lu5eQik-DzvHPeiir5K28","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":"x-Q6K4B_vA_jve3IuQ0cs","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":"QACTHGa-X3kTDtMWMaCRO","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":"w40Ev8ilC2TTWPGQUozck","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":"kxIPFaaxHdbO6r2oMHR5G","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":"kHJPJf38GSG0mOEOpcjdV","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uqK5_fM5OPXQ_0jqNhWNj","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6m9XV9xPigSMotfJ8Lv-D","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8Fju7Cy64vgOMfwneHV57","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dEKZPw7HS3JHUs0fhO7pf","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IDq9wVhu8Df0JnPm-bJDG","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":"g4fnN-VM6I2retVvy78Go","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":"qUWZJNkHfQa7JE-sGqpGK","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":"kN_62MXkTgkMCKjvlqtA-","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VRpA4IyGca-H3LUDbEaBz","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":"xCygKDxHiOu_J60u_y-iS","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":"Qz4s85NMGhan3yWM8b0ai","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":"DiJHH2WDMozCPS2OKsWFw","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":"40yKIFHRx6A0Pj7z8L8l4","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":"-dEldto-zjCq1DBD-WwTg","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":"d2a3BRR_Px0y6y4zR6i2h","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DoWoS1EH7RpXeWFwOA5cd","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T4IEOxcYGMR5ks0r8pTwN","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":"Occkm7kOMWLglctKgentD","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":"Asc2tQVUF2yop-AarBhwt","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7icojiMBH5AVAhZhOZt4j","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":"037haSU0wzjHiSBXlPrAc","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":"QH0FaIktlW9z2Tv510Ef7","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U2s0ZxDGIEU6Y_LQ6b_Ke","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9LWq61Z88SY918WBQ1Ed2","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":"ZojWGn_3yuO3uqPW67pJR","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":"T6mZCHgLMWMmOzTG-HlTP","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":"l75syNyS2xAR2TBUsjFYL","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":"EyeRMzXP3iz_iLPFc142p","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TBhjIZgkhRMKpPeYkTIle","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yFfo38rB-nziikrTB_3U3","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":"BrQ-rV7naw7j7L-01PzFM","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5B1uWx3dlDWFMek-QAhp7","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":"ay03oleezEYFc8o_DmuiP","name":"_text","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"the text to be displayed
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QI3g9jJiwHGgUE0srEWbF","name":"fontData","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"font data
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y5RoTA19u-SqrwwrO9BD2","name":"fontImage","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"font image
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TyVnRIDOdfjnkYDqSXGGA","name":"fontScale","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"scaled font size
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HTvZW0b5oa-RH8l0_sG2m","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":"zWKr67K7foTivtbxGe4DC","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":"qs-FLtU_rI-IibS64RUH6","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":"FrzWyjijMF7eiQG_i46Un","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":"CIP7bMgh-sgPrfDcVbdv9","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":"tUWNKNlvelgBWBYqhCH3z","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":"WZizS-5i9xFbOF6IMfHO-","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":"ysobVSugWz9T9voc15XnB","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":"mRD9hJmacznaFrprLtavV","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":"X83d8jisA5maTVdm6GlhU","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":"qeRuQRIwoyEZcfWV1zMrU","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":"Wll7yPJKmS9HWwQ-9vtNZ","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":"-wUkgFMqBr9nv-sEmldkC","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":"FLqgMhe0u_qUw2mNYJgTH","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":"loZuVZdA0880AjI1q1rnC","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":"yO8Pr4r3btfbATEnuEDlC","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":"k7TL8LCVZBbrUCYsyI4DR","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":"DcG9VHF_7tkLSe0Tv_GJu","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":"jtHAU5-zNMZhUsI-Zn-13","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":"R0lrqXAcSEMQ4gO4MJhAX","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":"sYLS1A04CKs2RQnZ73UrH","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ou8kCPQvFP0UFB5T0Q_Bu","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":"4-5079xba3AGfliFXbG2q","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":"MqX27O2XYltoFkXYx40LG","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":"i0E6dUpDMmHkPthAqhbPW","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":"13q-NK2v7q5xiKbavmRcx","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":"jtdnIYs7rAluC1pCCXJy2","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":"8-YMcxUaCC5Z9r3tkW-tK","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":"EWyW9kN5729HnhgH4Y51-","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":"uotLvRzbaZfjLMO-cHJoJ","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":"ikpo75gSYyFcfsyDdipZV","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":"67VHh6aK3-SeXx1ZIYMca","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":"YQQFUQ4tKbPyJm0bLw12u","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":"UjfqDhkLTS7tO0MuJ0kwL","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":"e57GRXm_zFDHW8Xv-iWOO","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":"wxl_NXmtUw9yYT_TWeNkn","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":"x_26Zt8wld2-o9PoqTogJ","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":"JGdC2HYlcAmGWj3xhPfQZ","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":"j2aT-S4OXKYDpyjePlX2I","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":"cbsRipiDvxTlSQvBHUGu0","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":"rd-dVBHuosWyK1Ydpp9N7","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":"mbycpHPXaEhhz5qgg6I5R","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":"4G-OvN6GRisbMGFTbcyjb","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":"sABoQXgnNGnmzAH72zCfx","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":"hfSQ_jVVULBtTULz3C7-f","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":"Xv7pDoLHUsaaIsJsbaAY2","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":"rIjiBtgcrcAuRzriVBbYc","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":"ds0yF6RpUGQCi-M8jWGf1","name":"bounds","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
The AABB bounds box reprensenting this body
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MA6wNdVUT3hct0AW9fKUd","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":"35Tp_DKHgKNTpEOaBYo9D","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":"0q0u39s5QXB-WghpG2dkF","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":"wTGmx9Z4nFzFmZ0o8zSrn","name":"friction","brief":"","access":"public","defaultValue":"<0,0>","scope":"instance","type":"PropertyDoc","description":"
body friction
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"62HRaZgjqoCQ4plKbH0T8","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":"ta4fOdRbnyxnLzgboGkPG","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":"s_VujgQUcH5DM8_qQuAir","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":"QlPISKgl0DG80QVEKYTym","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":"3VhTM5gB9d-kH-p3JgpJf","name":"mass","brief":"","access":"public","defaultValue":"1","scope":"instance","type":"PropertyDoc","description":"the body mass
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dQdXG_JwD81ZUt62yhPkJ","name":"maxVel","brief":"","access":"public","defaultValue":"<490,490>","scope":"instance","type":"PropertyDoc","description":"max velocity (to limit body velocity)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9RBTOtu2ahCr96QRIt4sN","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":"5gWxwOUNmiVsCP--dCtD1","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":"ZsEmfwa7ykisdrsu5yfMr","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":"wn7-NJg6gv1Bh6APTqhQ2","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":"eifAjNnMrVHfJQkVjhCLJ","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","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":"TU1EsY6YeAqvK_AFG6KAX","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":"z91yvPAHqgzaYMufZZin-","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":"h33TI8LXZYPZ7MRSf9799","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":"JeJdEiUn6U3FtJvFO1OUh","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":"hLQ-5uoPg2gUJyx2vIZoP","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":"GirbGZbNlK96mB8Jdp02z","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":"H-Zu-c4r8oZdVnMwNO6ZH","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":"uDXgNpXVaxqw7VaXT0ls2","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":"7T-cvinH7XqhYbV2Yek8h","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":"xmu4oWFEaZoNeYqXbfEfH","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":"Kqa9P-qhWijgwki1Fz-Px","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":"5B9Pjq8fouzzISI2uuW53","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":"85OXFotxSclKZYi2LB0BD","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":"0DvUdpURKvn4GcWckMKPt","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":"X3STTJC5Ml-xG9o-W4xlF","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":"mpCG6ycHvg9WEuRxdpIte","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":"FOjhRidwl9bSSE2iZwoCW","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EII0ttM2xMlngG6KPm7Nc","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"return the center position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GO6MmZn1_GAIqCqR6AHyG","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the x axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XjSsyPf4S_D-lU7_yJzUr","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the y axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g4hWLq896Xwne3_SH1Bjh","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zUFuBsGnhLp7IVUHxQDwY","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9W4vv3Gej5O62feMqwv2E","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YbLXUp6vMGexz08r4epVz","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wtQ8R7e_0HN27d2GzZ7QX","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"the object type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-Ia9k7rL8WFNj6jirQp2h","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VIvhYQ1tiO-Sh0i8oJgYd","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"x position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7xvD4eHCTUL6yDniFQbqg","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"y position of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3zPp2nXQtI_u5un4PARgY","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":"vI8GrsBYFiI-yyuTkmfPB","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":"EU-wvMNuxnf6BKc2QeEoY","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":"9KO9riB0RkKFoSOPDTnXS","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":"WCX46ZdEUL5_E3RdVYTBJ","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":"uFAGzPPYYg4iDbQOPzF_B","name":"clear","brief":"reset the bound
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7CfZHkaE_Tlrv4zU1m6MH","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":"Qy0nvWmvG5ERg1Vgl3m1W","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":"dt-9U2Hn6UAsZQpMFlpBO","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":"IwL_WzH0TTrALvDcj31Gv","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":"Nzz_C5hHKsun1WN8NAFa7","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":"8lv66Xxp-H9-UpP2hI7ID","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":"YmwThsBqAEDcB21WcbqdW","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":"dR76RaK0DftLSJp7xCRPD","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":"X4a-oGQyan9brYlkHY5O2","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":"w1bsLZhZYY9T-SnVNFdkB","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":"cwQqxkhoo9WwdM67t66nB","name":"Camera2d","brief":"","type":"ClassDoc","description":"a 2D orthographic camera
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"ktXG1yAQEbY-qIRhyDIXf","name":"AXIS","brief":"","readonly":true,"type":"EnumDoc","description":"Axis definition
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"FTD0pW0GHAhGvbc5cjZUa","name":"BOTH","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"both axis
"},{"id":"p6XhHa0WSpr6uSpbStr2r","name":"HORIZONTAL","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"horizontal axis only
"},{"id":"kqjxCcTLYkYdQSmX3WhgF","name":"NONE","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"no axis
"},{"id":"sLP4lSQICJfzsDMzqwok7","name":"VERTICAL","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"vertical axis only
"}]},{"id":"RpQjAI8wCoQLAfqa1f9iq","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":"mM_ExRnzqngpexCD6OMk9","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":"raMWHDmT14ys-8U3P_jRT","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":"rtx6Me0uvdHmC2Flu43_k","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":"3Ew260xdvEx2QNJhSRhXG","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":"2BlOHPc3VN_cSPKsf0MAq","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":"dmXi5cGQLWab_4g4wfUQu","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":"KipCmC5L0igLHm5lTOdXg","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jtUmLwOSTxaeCnpGlIDkJ","name":"bounds","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Camera bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sAlS6vBUv8HjYeGGxzdt2","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P8CwaC6AbiR4KsE-zniPK","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TmMnmwZJVNeH6WHqbuclj","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qJAwIUQErPsg7fgLhJGnm","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":"TpzX6QwJDuSRk45sHaxf-","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WZSPtiaNddLYrNSo0g7TP","name":"far","brief":"","access":"public","defaultValue":"1000","scope":"instance","type":"PropertyDoc","description":"the furthest point relative to the camera.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"x1nU2kPgPXZjt3TtStclM","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":"V1uRTr3YVRm00eddUtAJN","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":"O2J8B8M2mBHY8LbCBIkHm","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"orhAFXWpOZ227vJrOeXNh","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":"4IFzT1NBjyMKtFnwQ-MCK","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":"DIYn67Bub0w91U63iZqib","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":"CTbDmf0l_UOu1V45AQ4E_","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":"tr7WUEvfMROUoK8a7pH8r","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":"TbhhUznnImNvC5wCpBM5d","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":"kNoxLS0lPHLxPPF6YCJf8","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LB2L0ggOrJE5f1i0FrXfb","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5M1d05ZpztLEQzJ0QrK_0","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":"Gqk_1rfgIE6KaIhai0Goi","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9ElvoSQp2rhZnlHh2HQck","name":"near","brief":"","access":"public","defaultValue":"-1000","scope":"instance","type":"PropertyDoc","description":"the closest point relative to the camera
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9mIFFy5905mVrEeYUZhZL","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":"njp6XcP7g80ovOnDl6X7E","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":"aOZ8RL4MJUknSoYWJWuqh","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NwG9bf9INjzEqt2vFFDXU","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":"sEpCfZq5tie8F2gytkyXW","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-MYuu7fBUx72cLzpo1h4z","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":"-onGv7TJWsYV-y_u7-LG5","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":"0oxN182to-MiezArrO2da","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HfeG01QjtsWZu0JLIIs00","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8itw4bRfNLJZwekEdZSr2","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":"yvCS42ooif19M6WdU0mQk","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"glVwAslokJWl8KJ196s7c","name":"smoothFollow","brief":"","access":"private","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"enable or disable damping
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rk5j5rw_Y8wWFaPTojae7","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":"EFmUyIQZ9B2Y5AOe3CvrT","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":"ic1j7FYCjyj-y4u1jSoy6","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":"rgj2D5he_ql-5TeVWB1TF","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":"tNfNOzG7xoDjdvIq0wLoS","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":"VCexuh0M0fmPIzshX0eb-","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":"MUrr6Wl3pwFKPNb2VvKO5","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":"FRBEOfTwp_t7liuU8_uDH","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":"5BwJgTkQ0G3zbDJ6af59w","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":"OJRDCJwRxwVlxT8JwbUEJ","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":"ed8JRiHXOC_MdLJwbdSB5","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":"wU7PVoXXn_EArPu_cD6Rh","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":"lpkJx8cLuyIedRYBuQQ7l","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":"PPHnU3TzKdkK-DoL1ThYt","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":"qMsozWez5Wq0EZS1dpcov","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":"G7_X74n_ge5QUJp8dWS3t","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":"_ayxwtAZBu0InGwt_iUni","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":"inKnd0MwPsUMuPn8Yjk2m","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":"g6GTqQrPE6-cfFbyhKmCE","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":"5gOOGLtdByIfe5oYQMYGa","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":"LLRSLaUpwYrU_xlQ6M0E5","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":"YM75MOfAdolvWGnSYfYz7","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":"pSkhp7iU1AOeW0E7aaURR","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":"nmPvXa9ksr2de046sIBlH","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":"drh8cTP7_Y0RYDDovVE3B","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":"O_CvC5yx1CK4nhvcwSlJy","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":"JsHtWZdQ6HP8ppZGJ54Mj","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":"Atqea4HslhVcfEcU78G5J","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vNGT6GvzyIsfK0rxyhyBW","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":"ixeff6C9EeD83NnJD5EUE","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":"d1aKRRkiXXaWqjKdomZvv","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":"v-8TL_OhBjmbMr400t0zK","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":"_3mAaGf3ymdXX_mad52E2","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":"UzXDWdiKQqU-2ay-osyKU","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":"eSdXEK8atQ68SQdRYZrq4","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":"stKVQlmkX21pkriXqS3P0","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":"7UqVG7FPN2qDoKZjncfoU","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":"gK6mcnCliYKmjV6fjNBd3","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":"bdHEw3qQwZCmpjJITA0oU","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":"ZCd4HuszE8wqiw6r77Lyg","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":"W9cobKMGYZ-fRQDLmYhsm","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":"JTeyoCtc05A0BeasL2c9R","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":"mYnG5f8iFER03p7zveTLh","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":"3xgx-C2TGdJhGJNsynX-L","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":"2Gr3nadC7-ZiFg3fur9xC","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":"ULmYCBxRm1lNISKZJ16PW","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":"MhyOQBvO5x-ACf1cPuLTK","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":"grYtbOUxE9nhO0cfXoTWA","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":"i_Azod7PMi98XMeDfVt5N","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":"i5BXhFV6vjRzMa6Z14VA7","name":"unfollow","brief":"","scope":"instance","type":"MethodDoc","description":"unfollow the current target
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ntxk7cfchOtRZVZprF68s","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":"PIP_Ouza5um4LVvDswWia","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":"g-QwgMHdbRClz7-1Lsy9M","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":"QlrJjXmZFEdK02CieTCFr","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":"qQ0JUNhpGP19A4eEWYGKO","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":"J07gWEDPlrbeyCyGJ1Rm2","name":"CanvasRenderer","brief":"","type":"ClassDoc","description":"a canvas renderer object
","params":[],"returns":[],"extends":["Renderer"],"implements":[],"members":[{"id":"uV7Q9n-1RQ1xPrVLG3f6I","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"the default method to sort object ("sorting", "z-buffer")
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YLjJReWtCfj1RVu9VklXf","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the requested video size ratio
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kggPy9Xzx03Gh7Ppkzu1A","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"true if the current rendering context is valid
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XkyvNUEpCkBDNl6FFGRYq","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"The Path2D instance used by the renderer to draw primitives
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OtdFyK7jjG0PyTX6ctrOi","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":"XO4LGp7NsI8HleVcrZSAe","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The given constructor options
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FYLdDu7Tseu9M8dNAm3sc","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":"ZG_-mU3oLxbRSyUCy-Uqf","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":"m8uZNAJllixlvKogqkRbu","name":"clear","brief":"prepare the framebuffer for drawing a new frame
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"06_ftsJ8Lx_6m5mj6EYuJ","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":"lGMg7yK9GxLmLK2D844sv","name":"clearMask","brief":"","scope":"instance","see":["CanvasRenderer#setMask"],"type":"MethodDoc","description":"disable (remove) the rendering mask set through setMask.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sxRsQW7pu34c3MR8KRD8r","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":"OQb_ECWoP-ssxdR3n-CwV","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"clear the rendering tint set through setTint.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rGoHqUtHHHIPWQl2CCk7W","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":"jk7Bf48s3GLZ1DgO1tAwL","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":"XwwtcO1oj01YtOAXMh8eU","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":"zxFNk_85s0HlJml0Z8sqx","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":"GV1dQ-hsE7t2yV6JM4DwK","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":"Q_COj0g7nI_CxxM0t_zZk","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":"Uu19K_zsUMjMnYN3r5z2P","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":"QW8WYj4pGXYODF13gZC00","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":"2pozs29YrzSySqqVEJbmh","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":"xRnyEvkrwNR3E-zqCAJy9","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":"VKt9uV_jlQl9jCvNygY_V","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":"q5j8vm2_BsoGSUaZHD0e7","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":"EHp1xRTByuv6mG9ILBv79","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":"8V0t9FF7PouVvnWgYCL0k","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":"D2plW-ZeOVHXw6kacy1XR","name":"flush","brief":"render the main framebuffer on screen
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EXmvMrL-iOsBT00RHDnLR","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":"Pq4Y57tEEau4nZA5Ie3zJ","name":"getCanvas","brief":"","scope":"instance","type":"MethodDoc","description":"return a reference to the canvas which this renderer draws to
","params":[],"returns":[{"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"y2egtUb6tR9nUax4pwUkM","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":"4u7_xqfqpUi0mgiTwQI84","name":"getContext","brief":"","scope":"instance","type":"MethodDoc","description":"return a reference to this renderer canvas 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":"L-WUGWHh3J6t0j_tL15_D","name":"getContext2d","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the 2D Context object of the given Canvas \nAlso configures anti-aliasing and blend modes based on constructor o...","params":[{"identifier":"canvas","optional":false,"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}},{"identifier":"transparent","optional":true,"default":"true","description":"
use false to disable transparency
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6vg2YvDKshJI_xkWg0sdE","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":"j5PTTxluUSQL7c2pbF2QP","name":"getHeight","brief":"","scope":"instance","type":"MethodDoc","description":"return the height of the system Canvas
","params":[],"returns":[{"description":"height of the system Canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"CsVh_tPv3wE-cLlG56K-v","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":"KpVSONxGvfipw1TxCSogN","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":"jihY9DySt2yCHPOJR0mJO","name":"getWidth","brief":"","scope":"instance","type":"MethodDoc","description":"
return the width of the system Canvas
","params":[],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"TwIokCgEv88_YntilP6Uc","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":"v7zN-0jTJhjkU1mD7gBbD","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":"NqXKu5uHr4ssFwGuRKx4o","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":"U6lnTc4YDM1KgMWHUH3c0","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":"sw49_-QE1dBAzoa2mjrwx","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":"yU-LSxTo8AVJxVzshFunj","name":"reset","brief":"Reset context state
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DqtSpccP28JXN9f7pLQuD","name":"resetTransform","brief":"Reset the canvas transform to identity
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S8rfONyOpL40iz63Ry2GV","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":"lcmAgS52AL0_z8VOAc0Zf","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":"X179sEVDPa52li8Ik-X-7","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":"7FJJzJB2k2RvrrbzIazoJ","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":"7W4A8iO4nCT1n4TS1kmG2","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":"KhVWwfizTpfQ4nrBZxHia","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":"QMZmHRNYqC4P0OmNsDlxL","name":"setAntiAlias","brief":"","scope":"instance","type":"MethodDoc","description":"
enable/disable image smoothing (scaling interpolation) for the given context
","params":[{"identifier":"context","optional":false,"dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}},{"identifier":"enable","optional":true,"default":"false","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"YU3UuOlkts3_3mzwXGdvj","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":"6_APVAFFUlzFTrRa6R66c","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":"1JLESNKC0VGW7hIAFIHuP","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":"bO2tT1KczLRbycPyGx5iV","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":"Y-Dlg5VUzEUR2Saz9ifLi","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":"YOJJxHyc4CQvcrsJO6lu3","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":"9-58SEM7-v_2Yug1HgfJ0","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":"O567oR4hxwoAbpzfbMZuD","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":"X0Hwzzt1-bW3Y4s51EkSp","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":"E5aJSLv69FB608VXPl9X1","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":"Nq9BoJGHB7QVzc39w5ifl","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":"fR2Lptj-xkz1jXG-NZlBC","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":"T3A1sTGFVviwwlm7IcCUJ","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":"o-TUyxyFS5V059f9xFHK2","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":"yr9EAJ0nnaeBfwO1-H3jW","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":"7CmxbO3rTRRSykDUjPzIH","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":"fsIdYh0p9XG-62in9d8O2","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 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":"b0kHpXSEwjU9ufFBzfYqN","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":"options","optional":true,"description":"An object with the following properties:
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options.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":"Qr4EMnN_yXbk0cVc5cmN3","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":"options","optional":true,"description":"An object with the following properties:
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options.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":"ctAdaf1DAnDarfAmxqZ-B","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":"options","optional":true,"description":"An object with the following properties:
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options.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":"JlTTLt0V1RHCjpd3zl5FB","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":"AkxK6B_saQubZxlUe3LVM","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":"Bd06XxluCCZH16kfURzyu","name":"CanvasTexture","brief":"","type":"ClassDoc","description":"Creates a Canvas Texture of the given size\n(when using WebGL, use invalidate
to force a reupload of the corre...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Y02HyY9d1uSZMO1MWzZps","name":"canvas","brief":"","scope":"instance","type":"PropertyDoc","description":"
the canvas created for this CanvasTexture
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VZVHACgElRUIj0gx4oSyD","name":"context","brief":"","scope":"instance","type":"PropertyDoc","description":"the rendering context of this CanvasTexture
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"peLiJsMPRQKLRk_fwVn-b","name":"height","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The height of this canvas texture in pixels
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1Y1uT-9a1fs9NnfFPQ3iP","name":"width","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The width of this canvas texture in pixels
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PRls_1hHZAm4I4qx2hFQ8","name":"clear","brief":"Clears the content of the canvas texture
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V7-BWkeO9CByzoyuwg-jO","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":"udg3kIROg2OryQGp2ZOrW","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 CanvasTexture.
","dataType":{"tokens":[{"value":"ImageData","kind":"canonical"},{"value":"ImageData","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Rqk4nR4rzwbOOijZUiSNr","name":"invalidate","brief":"","scope":"instance","type":"MethodDoc","description":"invalidate the current CanvasTexture, and force a reupload of the corresponding texture\n(call this if you modify the canva...","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":"rQCi6C1dQ1rcxZt65g9jB","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":"z2PmCWcIsj_PvogAtgdDq","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":"_9_OR-kgRCDPykJU6ev-8","name":"toBlob","brief":"","examples":[{"caption":"","code":"canvasTexture.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":"options","optional":true,"description":"An object with the following properties:
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options.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":"NFy8hsrNuAx_7oRuDrvoO","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":"options","optional":true,"description":"
An object with the following properties:
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options.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":"3JNREYpifrEnawqeWlbeC","name":"toImageBitmap","brief":"","examples":[{"caption":"","code":"canvasTexture.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":"options","optional":true,"description":"An object with the following properties:
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options.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":"jF5xnFs7iCfn6JQcq59M1","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":"TzWB8g6HXkdK3X1vnkQk4","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":"40cyx7T_CkwZW_VYPBXf3","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":"feDM0cx9f84HbMg7KR_BS","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":"MuIMBVLo4hD4YysA_MxrM","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":"nVWN_MRVmf79ipXVheraB","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"
pause and resume animation
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B4FW0VbZo6iphrcRXWtiK","name":"animationspeed","brief":"","access":"public","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L9VxpVWrsVJ1IXuP7AwZd","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":"ytpWZ9IIu13EOMh3VMDEI","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":"wKhqguqEjRQbsX5whGvyd","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":"T6kfbBLprOoLPXVc_0lWL","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U4zbMxtiLG5XaUAkypwge","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wq2rrBBOBqzujpOejw_3j","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CSi_OO6j_YYOvb5rEsBJU","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BZamZ7xtSIXNNcvdNPcqX","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iA5LBwCTOqOdbrGmC2FCT","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":"PZxF5ANmFAK_Qsx_MXapW","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":"zFxsCS9BK2-QvgE-H3k-1","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CD3nYVIl4FMa36GXdMILg","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":"oBRBIKoSxeb2ycFxwvgxJ","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":"zb1mdgKjR3exyWztDFR5R","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":"2Y-m6_gY9rK9v1TxmG8dr","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":"CDaencR0vy9Q20AdrjiZI","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":"CphEEhcIeANy4nR5FcWen","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":"u978_VWTF8AUm3oQX2evP","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p7RUNvaMwXlko-sxrir6-","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2MyMRt4g5kE1PXpnHNWNe","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":"d-zW7L5Pg6OoAqa5J_zod","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b2y_c7FczrTOdF5Dp3giQ","name":"offset","brief":"","access":"public","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":"OazeowTr2uZCBAqvM7zhw","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":"RCr6X9aJxMCqNfCNWJld5","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":"9uB471HAKR58uzb00Oqjz","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HSAbED_oLQFjFFFgkvTz-","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GSZFq5rTJrFVq4VpEB5FR","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":"Lo50ziN_QHXqf2IJr7Qf2","name":"source","brief":"","access":"public","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uC6NnDjlvt16sMajp8Ral","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":"S8x1SKeovjH5EAgsNCQw6","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gIxtyy_8pENKsb6OY8Jru","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NfTxK0JmPA1bKvvH5juBC","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":"GAvl8L2T5MOn-eC48WA00","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0ecH5NNKpFOyJcJd9KDtK","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\ndefining 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":"xnsB475qURAOyWBWhPAT-","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":"ZQLJ3gDXjobuiMfCsMgFU","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":"eo-CmpWAIA-fvLzprXvnA","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":"eptOZYjf-k3U_zbeioXxd","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":"oryrF64OvUwqK1jvcHZxl","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":"XXb9rP6t19IN2gvcCpvWj","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":"omRnP_I3lm01Mbeqa1h_d","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":"iA65_M5LB4_wO0StAgU-6","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":"h8qk2G8xrVGoblDgrMCAu","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":"7a0wK_87bUXTzs_aLeuMM","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":"-DZL9uOLc3IGnkoFGlXSo","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":"5hPbXBcCmGKbodNVmm7U0","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":"wwOuIa9JD5hDPy5ICOW3J","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":"pbVtdziDQL5ON8175MWSa","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":"pMC1z2CQeBc3lhkwVXmNP","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":"Rq0crtUGeEzwcOuIGRWTu","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":"hxJMp0le9ph1j3ItLQHa5","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":"QlPhVx9vXIlRM_wAiw-2c","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":"ZlmKt9a7FCHyP69ZFOgMw","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":"DY_79sl7OfvC9HnbGzFdQ","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":"IDu6kgBdKvELIGYO0Xd5b","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":"qimjcJvXWdey_rVx0jm9X","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":"rcPIPxMOTYnts2knjpoWu","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DJT5Ytt-CnFITmkMZeEUO","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":"4bjLRbwU_ldS4q7awFdgI","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":"gmH7rFaulwfrD6MVJiM3R","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":"Lx4PkbkQEIBDL5qdhUzXm","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":"NfHPvsqtArezYIjqh6MWA","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":"cg-ALpT0uinFvWUvJJqpP","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":"-YDLmsRBzM1Yftild688d","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":"3fyndNUYJhqGXJgd-_JHT","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":"CIOT6OocSge-YoeBcmmuv","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":"a68iIVqedM6qupDw_hEWZ","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":"zNq-caVnuDmn9izQ2H7m5","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":"JZg0zSGiTqnyVJFQDeP2K","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":"xhT5cEIDCfGb545oEakyC","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":"Ea5cD_oyWl1GmFxypjpZl","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":"2MzXRXZS1sjZso-Wn9A4q","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":"_l3IU7GMwifw7M3-uwyd1","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":"KA066-M3-N3v31XMJNgOG","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":"PWaaO8E1oyD7uROeojsPM","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":"Ab-1CxTTG0VeEvQgSZic9","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":"4gHmw5SCRiKj8Qa0OhlaM","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":"LaaPSfGkq3nQmbr4Brqxe","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":"JcoGfE5YAIuOUtdfuSaz4","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":"-BWNIgFfTVd-lpjPcdPKV","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":"hi7n_i-bf2P11vx7X_R-D","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":"eXUEpeP7rMgsk7AvZMErP","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":"R3A73jsFetTI4m2qElymE","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":"D_mxVILdbwBP-Ro3z_NX2","name":"Color","brief":"","type":"ClassDoc","description":"A color manipulation object.
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"P-d5C7VhLCzqRwcucJCIJ","name":"alpha","brief":"","scope":"instance","type":"PropertyDoc","description":"Color Alpha Component [0.0 .. 1.0]
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GVrOjHlmSER0F8copo5TI","name":"b","brief":"","scope":"instance","type":"PropertyDoc","description":"Color Blue Component [0 .. 255]
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XNU78IGQqcScdea7_oTF8","name":"g","brief":"","scope":"instance","type":"PropertyDoc","description":"Color Green Component [0 .. 255]
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4a6YJ-cczE5C7J5_DDuxJ","name":"r","brief":"","scope":"instance","type":"PropertyDoc","description":"Color Red Component [0 .. 255]
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IhCd9FYvnVQnovwVkSsxe","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":"jX0CoRIZKAPWm6t7Jeu5J","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":"1XMTiuaHSmlmOdrp_KlhL","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":"TnasR7miy9hSfA5LGBGj8","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":"LwrxvIeG0w48QDbUWSKcD","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":"saX32fNiqimx7rc2p6Qc_","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":"pFeM4P5NkR-0VjiDTfe-w","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":"rkkPOVI22_XgGjyJ8ZR94","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":"v-RjeZdVq6WQgSAzNOYWN","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":"0iwjyv-31ny8MsIin665B","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":"SNeShGkjr1dA1vUKZ-cxp","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":"sGE4uSwbfe_MMoTu4AEGj","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":"NJ32_EL7oomOPsiBGieEl","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":"lsja3vN7dDXBu8xPmJazW","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":"H6abBiwSft6ExzKW9tyj7","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":"ks0lIkhMa-TsQTlDcNlWt","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":"tzMXMhSQhE7n0McilXGtl","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":"_pF-eON9uu0GPLibMpuG3","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":"2KfG9tfJmtpqaGIVYKh4Z","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":"Y6LAIO8B7oMSYkvbkdSiX","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":"eVngKUFNfPXXDbu3dIOyP","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":"5vFxLHPYbBBc9EJKhcz0F","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":"VBInyGoRhbuR9ZUraFDbv","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":"mHYEc69eUXPTtTFOvcPvp","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":"M61soA-qIsHEHxesk9gtd","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":"mBtg4ZBChQFPmVRjJNn0j","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":"wuCiS3xz3u-u0foVzKYzp","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":"eGty-RQVgq_qBu65UPnqZ","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":"y0WFRnSs6FQEqahP-hjpb","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":"Yym29b4e4dc-R26kV-ip-","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":"5890TevAj-3Gv-FhSFvnl","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e18aMS932qg-y6jCBF7jp","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cu3tkV9LnvR_Vd3yYByjD","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"J7vPB2xj74ECOYNq9omp0","name":"color","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the layer color component
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OT8cIckdjLPNYusHZccJk","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p88Y-DkKL8IBOB7iyOH-V","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F5R_cX7Fu4TgBCeRcvMf8","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":"Lc2VIRlwVvoawZ7QXDx1z","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":"VnnyCeS4W_CWi6r3FHw_Q","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CYE7UQQOVlM59Opkb9Zbu","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":"oKkQBk8xZ1wtIOJRgTVRX","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":"vgFu19Hxv4sqKSezKUcN5","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":"sVbpaeCzHtb6wCLR8gLR8","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":"VU7wuvILLRM65d7zPSNFH","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":"UoJI-4nU14dhNQdLLbp2s","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":"xRYEBpUosYgzgmhTpzMwu","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UxyaramxzNgXd-PNq8q39","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y5a1jDD5iguqAwZEbAk3G","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":"X7gvt4T8qnHmAkXgkSu5B","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_1vv4X87gVu67WcDHjRQa","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":"wreBxqs6ByzGmlFLYZp8s","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":"EbY7yS-gf28Qb6ssG8pSP","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K8JuHp-neSvQZY_DB1OZU","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hntd15SUwU6pCCTr-Y9Hq","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":"mngmPzMOY6k3Gh85BpeXR","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":"vH5vfha6m1Na9RlCu3beH","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PtNYh7Gn6drzvDAPPnCfV","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ehG30adbt0_U8rLfIBHVq","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":"VtS08v4vzAWI8LXnSj7T0","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DxO8zyUxTQjPV5MhA1tg2","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":"1wmgF0NdWZLTSfNswKdiD","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":"M6XNFxRApZVl9QwnsXQ9R","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":"0k8MUE2syhNF3OuqynRHj","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":"y59qv0dLZyegZoN3eSfGb","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":"ODM2ottJR6OI55D7tqYX8","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":"MNQzs0hXaxU2Wck9I-m3h","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":"jscVknQu83d8Z33hqCIJf","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":"l9qtv8INSDok2ycdnI82v","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":"UvYN4o36AFuHGIdeXUoaD","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":"jvaYmKJ6kA5iq2QdYmMzT","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":"UNzNuPKV4mH7XRWj9UJi0","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":"2eMEpX_n_BHIv8K3p_BG2","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":"m5xjHdBVoFqe6iu6LtiU7","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":"wuC1ATaav5ak4ptuTp6GY","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":"3lxx-LZJjMM6-t5p_tc_O","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":"SOrdVYE62g2UpfE2l0X1q","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":"8sBKzmqADwuptjpgwTtW4","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":"r-RhW896XyEqEH7L3dESb","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-A15JUY2VNDS9Wx7pgawZ","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":"XwIisvXwHLhRa71HvCXlM","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":"vCCb-BMiH1mOI_pEunPj5","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":"dLeyCtE_EjcVRxSmys8ox","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":"dsADY0MmIspGFk_9aXVy9","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":"f1gU6rWI-ty2ei9ZE6lFV","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":"MW0wpL50A-CHSnhf9GNyC","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":"qZfnJIE1Wk7i8QrmzbM-w","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":"byOi-vt-EaYviaVHE8Vb0","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":"Toa5xhXpVWW7OpgPCOTZy","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":"YfVAgYP1Oo54hggBEeDx0","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":"eCLsRH2WE0TLDRsnXzlwe","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":"yj2vJ7U3Lce6brxQkibOb","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":"-efhSUWlJIa46d4WxHcCb","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":"c3eJJj_2jlyNW-bN0wKZw","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":"JgWcYkRPspNEZq3UKglvJ","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":"wF0LvPGr4Ef3pImiEqIfY","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":"vPAPLb4rI5FakpOpxFrNr","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":"rd8AHIGe_EczDeyJWNLCG","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":"RSw2cp5HiPxExfxMH0q8Q","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":"88JXIdHONY9ELIAztRUTo","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":"Gwf4LkwLz4OHTFsWEwR86","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":"92fMhtw8ucm6zAmGkdBvT","name":"Compositor","brief":"","type":"ClassDoc","description":"A base Compositor object.
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"lh1MuBP_PrVS-hI5BXZYB","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"an array of vertex attribute properties
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sUFcoKcG3wt05sxf6KRzL","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the shader currently used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4JkW9W--9X3kYIbXXe9SU","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the default shader created by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6TRYC4wVssz4iy5AzEDIR","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":"OlM6TnGgYjpVbBqYKfIgP","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":"fvgIPwauOP9at5wiDFLVM","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"the vertex data buffer used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"q48kiuXA8LGTEqXoKkZ_u","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":"hiQ1-9CYdHoK8FvUfSoJS","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":"BUrEOQFexwk1vtVbkpfkV","name":"bind","brief":"called by the WebGL renderer when a compositor become the current one
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iJRC_aJIVRAzzEFrjKMIs","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":"JKcBaZ_6WSzxyYTdtxMTr","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":"IjG5Y9T5pm3SpPwMOAnGF","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":"9mxvdnRWFFYN8b3ghlmZk","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":"AhD0gw8NAIp37nCbtSWeA","name":"Container","brief":"","type":"ClassDoc","description":"Container represents a collection of child objects
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"_bGkH-rpttw0ZaHq5MCkz","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":"HBsCriYLcOfLz2NlIZZgn","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":"bcnZ1Qj9d_mP4_biiRvur","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":"RGNzSl850VWN9tzhg88rz","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":"yCJyE44qQaIHzDhDi6Y46","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":"O1sGoOJVfuAsSAFnvce0s","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":"D1C6nQnEGVsm1lAzsQZlZ","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":"QCRG5MyT6MHQ9af3cVk4g","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":"OggCjU8Xs9jlkGEcEdw6h","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":"GueDzaLFlqz0ygS7M2zH1","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":"s4n7yFJk0d4ilhEY6fZlW","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6JcoHV7Z39Qm79o3s-VfL","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mdYmjszknGvn3QQV-TmvG","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"l_GlX9mljznhjJuZCrGOB","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":"sgO4wzoFySpB88tjalf6M","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_4m7oW4VYaFEq8LJ0-6ww","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lfeXdZfeFlWRpFQ8Qm6RZ","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":"4I-85OLyC-bQjAzdWGpfC","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":"mwdtUDIszineFhrFB6DQJ","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":"dNxzk3nR8xUYxshnPne0F","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ccroggM5uU5KYMA4VdASL","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":"jXF6OhpK-JUuZUhxfOXn3","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":"sywhCiGUrheiUqrtFfNww","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":"VN4oB7t2SnwOTf-5HuYox","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":"RFb-JpZf46tda1tF2iWYb","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":"p7yueiy-dmHeFOwQ0sn5C","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":"ZM_AT2HM9gVFeEvaOa8c1","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kdGB6XkDy1k8Qe1v21KSo","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YqYck691jaEXWPkhnyYkM","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":"_Fy4t9Id-tPO2jPrqhpZf","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d2UwpxnRmDorZ2vntTzFY","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":"pHx76b_8B46VPgnpuAAEu","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":"tkCVK-PgJUw4pqzjIPT5t","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JrZ0CVpmL4CWlPWVjhhiM","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ktYG6p1ugI-vxc1IMLsSU","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"whether the container is the root of the scene
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8mxMB6U3DyExbgOb83VJH","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":"bpDbpeqVkgm4VX4nZvvDy","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":"K0QYJiaUB333u--Sn3tzD","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":"Jjy3XXNH6QV-UCpZi8cNa","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rk1IApbrrQrYs9T8ByykE","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RJYU8wQFhAeAWxNn8HQFY","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":"aIffvufgaA_sDn7BsnB2M","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wwmVsq5GzGza9HyC1A2pz","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":"BLuZhHRFLU2-V3lrTdZox","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":"7UkjntWZErjJepKGpONlv","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":"Doo4F-L79KV50iOKuLdQa","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":"TWbdulnr0h3fxx4a1sZiz","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":"kulHtOheaaaBHokpd8jkq","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":"Fjg2K4eq9HyESlPWeXDN5","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":"EzQmHWwWtQl9ivYPCQIXm","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":"qVt7BjAmCXUQNpYqv9UTF","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":"EnIyhx6PzuKTfLqmgglwN","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":"7OESMT_UzcFQpPnlPn2Um","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":"2P7UucVQTIA-uggwejQ2i","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":"WNRl4nw5neZV9J9u_4LeQ","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":"Q1HTBB43T_8aubMWnhGNM","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":"RHvUMKbWDcu2qgAf8u867","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":"4POpzigko_SMzwVZ-D_Ev","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":"Q3u-IpmbjfO456fTWFvv1","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":"TRUZr-aQH46L3_n-SP-m7","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":"Jp8RK3aXwtk6LzDc5LMls","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":"dRPfOW1IJqX83ESZesmbv","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":"KjBHqPnvR02UWV0mcVQsy","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":"ZyFCceGeF0W263cI8x_XW","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":"6gp5BKXzOQ_KLaxFw-Wky","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":"NmjczPIRkfGRcC_mKYjMf","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":"uZFXinoM_2imkKgeCmR2L","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":"NPTiBqtl4QcaDtpi4SsAV","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":"TU2Quoh8rL3gOoftCqVUP","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":"9b4HSbQCDkoFBuy2_5rRg","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":"iRzWOEC5j5HgeUhaaJ_H4","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":"mWy6xbZisyvncVV0Auzpx","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":"MKWQhX1ELZ_1BUs9Azkr5","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":"mDmXR8ZE9qyjI9U5Zahn1","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":"xwqSrsduqdxk8DtyPu4rS","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":"FI8xPbQBcF1TvQQaZb6MM","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":"Em-pSaSt9Izn5IT94XC2Y","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":"xBlMGwKXoKBkfq-NO6Pr2","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":"EgrTw8sulhEZP5cmbw9zw","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":"Cdjs6yL5zdMaT0snR-YAK","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dCCY5Oo6QYK-07HFobKAG","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":"VYmeMCeTTs5l0aAKA04fs","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":"6Cxeo4Xr4wNJT3P_tpkpR","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":"nXHPjKm_GMYeto0ETutUz","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":"Du4wnuLplZZCYNY0PYSDM","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":"Igv5uPLNLMUoRxrCgWQkl","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":"sgPagCZFpw0C3F7AVehxY","name":"reset","brief":"reset the container, removing all childrens, and reseting transforms.
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uSfo9PG9M569g1UdxGqqN","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":"VWf39HOZXs4K5ug0-KhLQ","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":"P2I54lNoo0smQHlkgEsMG","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":"M0nyECKpLrUCepzMGKNPy","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":"Hx-fh-IwhIHKCf7B7jFDL","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":"wPPNYOp-7wvAYBo7WsEwK","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":"C9ZPOtSQHcfaqHPfBcAz2","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":"_ee_ey5b0PTQ09rZo3Wsv","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":"lZ-0dVl22DPau4w8Lp457","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":"_waZAeJIEfo-Rrwxq7TtV","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":"jb7cf8ZGPWlcwfFnOe-Az","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":"ALq9tyZDr4z1KPT1-BKQi","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":"hGS1oRVoT2IQkiPWihqOX","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":"58VrfuWYaIZcQCzMgxyDF","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":"Cn4gdKqMedg-2b0tY8kSr","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":"rJXKqOhM-vZyWPU3gwETM","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":"PxZDJjItSDPlUY1T1oJ2e","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":"KZ0sxEvHv5oBWed0dKmII","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":"oNsKxUAKyTtRwyEH-f7qb","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":"9Wkoaw2q5d6MNlPuYXhK8","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":"AK5vkZf-wJtIYui3xDmw4","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":"JFQO4qr3QAz30hThNcpMe","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":"dlSC8_91jRaVQ1ts3GABm","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":"MRtjjdp3SUFSVB2uxYtFV","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":"4YEt56VSkArPYpbadhQll","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":"ZPfpCvNpRbJBfnbETxQVa","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":"L_1fFlFChKu3VYUCZ6Mls","name":"Draggable","brief":"","see":["DropTarget"],"type":"ClassDoc","description":"A Draggable base object
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"jE9w8csfkGEtG8tBRiebd","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":"xp6zSEMMS5n5exCyQm_nx","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":"h8NkfjMmtNyiK7vaPMroD","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":"WH_1ohMV7EC04-boilOcT","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":"DkWpdup4vW52tADR76aLK","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":"1wtQWtmk3OK08MtYq63H-","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":"r25HvYcQmdjuRVH-ftwOf","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":"nVlbzA2GLZWjwJ4-LNnPb","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xX0L9ekP828tTm1Cgqwin","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"reAs42ce9MOd5xslaUNs_","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CslhEDjcPybkteS4Mg1ny","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LT0Pl3MP7iMNrvPbKCozO","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ObjU5z30T-IcuerBLCs2w","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":"3aU3lNmtVkCrSAEvBwAiP","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":"_rZnn9-MkzZFZPIm8rPK8","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OWrN2TZXSW-_CTSMEwKNZ","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":"Fm5jrivd4wN7dj76_mooj","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":"0C4qpVy6m0gmVjn2XOdBU","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":"4PJT-Wqi0-ae1yv7iNID9","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":"vYFxs0idfrcyKmKsLtHCI","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":"ybEqGeYs6REpvlNeubVmu","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":"dCJIgK9nSq-7F4ttAPsaM","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SgQPR5t2bHX15rZeCQ9AR","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vHlnaZR0Al-UTAwkZTDtP","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":"rWG5Q3vxStxOcVfuseOl1","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1ljzNfXlmLf9xlahNZYAf","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":"S43D1MHrV6RvKHdQCyW0V","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":"R7e5C8Y05XGC-bF2pMf77","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D1cBfanf3AdrySqJdXOI7","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mZ5iQOIKlXOjZl1JYm_oM","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":"r9sgP3JhIAN2qai0OMCd6","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":"6fa2PTs9i_vB0HyMxDGo4","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jFAgKpfE3LLiG7RIPkHHg","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rQN-4HxomIBtinlOEiVCH","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":"iS9mYmppFrxmxhPa_OPf9","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xFucGFMEo9pytkNhEucL-","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":"jSnNqwpzjx7cHF7AvoPQZ","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":"PEfpYCT7NPzyq8rWvicRd","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":"Ot_mnYx0NDCmPm-j3tr3R","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":"owTStqa0oIM5qrDkYTJGB","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":"SQWkdOouoG6FPbPTgcQNN","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":"fxIKhvWsFlv4V7fea9EEe","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":"Pn_r_oUdRvPORmZLTYyz-","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":"e3jGjCyTHyTQKwX0_fJc0","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":"kNsd7cbrRl1SZWvtG6iSE","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":"_zQdEXHXkLXop9BHbiPyS","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":"0SBVOefUg8OfQLatL1VcY","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":"VvSgPvLQo-W7UldtG22iK","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":"6kfEO6XxGnr8k7wtDIynh","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":"y5mWkoW41X1vKEOxSsOCX","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":"5c31J7cIZ8SypY7g9eB6Q","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":"CkqxBLTECDjohRsfSlLCI","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":"uOYjYwS-xw8ryxTDmnp-P","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":"Zgft8sFCgtcfV_95ML_Pr","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":"q_Rsa7kNqhhFUuaLq-uQl","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":"XFLBrfYjL9nRU5zKH9VqX","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":"LXy9EA78GBDa4-1o9XzhK","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":"_Y3Ps3_2Hw9bkq8I0katE","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1ktZzwtJSNh-FPqJkNTqg","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":"KNARAk1PYaE5ukFSzvePc","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":"bNs6mJUv40Gzqe-LbRXP2","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":"HkwP9qvEvDb7hPOugzkW3","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":"vKFn0zeeOE_t3CQV_iJ0G","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":"r7F5Az1QvPk032cQSdzmv","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":"1U_NmDv7Qbz-6adBVsVc8","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":"TyFk2kRHBrf58CKpxPwr9","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":"nbJsrubFXu5Cn_UWp95_f","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":"cqp_nDIBqaICAWdl8_XnO","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":"yw3XRRg3aYSmCv2PXwC9V","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":"t4NtDZMNSdk-d5om_dFPY","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":"qRWIGezv-Np08GKw5lfVS","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":"Egna7fxJ-EuYv97EUZYEl","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":"kWzbbV7e-tU9wBRopQ7b6","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":"wioC2jdter3AtVXKAT419","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":"fhiQEzV2feaEZcgnIPhce","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":"U0-vrRAIa9UaoyIT0RF2X","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":"sfh-fwquzW0TIxvFbXLWn","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":"9RQapVlf5xgtxG7BPI-1C","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":"FMCHQ7nZ00lHQoKZ4Ku6z","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":"7W3Z_WOVR9Yt6GX7ajRpE","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":"_WkwzZYa-4gOQZgjMP-Af","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":"avaKpfK_iCRJe7nhyaFeo","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"dead/living state of the entity \ndefault value : true
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"siNUBv3yY5FjN_dKvR4nx","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":"EYObWXx2RGoAVhp5ccSAm","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":"zATtwY6-XHp2psagnubF4","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":"zbPlC7gR5VwQ-F4xWzTt4","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":"eKZ9mTLwg8PG5xei5ndH3","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":"kAVsFErGy8XaPfUn0aIhg","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":"aE68ZnPST9WunwUqDqyW6","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"the entity body object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nQFmzFOKV617NduNPkCUh","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w1JWOlEKs6sfq8eWVqZWm","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SkEjenjALHnEb6YmdJBMi","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qWjc1r3UIrO54y48E70hz","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WwdflX4ZYMqs6lmMz_lW7","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ejNxXz8SXJpyUl9xzQ5y0","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":"mnvyloQMMFIMTeRUnTh0-","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":"6TDQ7AQBJxWvhyl9TGFhk","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0uIOK2JI5QJyJEZug2QMw","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"object unique ID (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NEgCKa376G18YRewDPvTZ","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":"D3rz1pw9UHZn_HnP15Zoi","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":"b-cjUBNFnHgjT9cyq1QQY","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":"7pFWqQBk3p9D2WjfDawjW","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":"63Ud1qS320UMaw56JFK8Y","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":"QE5eEse10HYWEvGcryCzi","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":"0DMNoaiJAmeq1yCIA4Ejf","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_8sz0Wo_b4QxMlQtPpEH0","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mjw7szQMNmkWBr_rqQUR6","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":"jMofeqYd_opW5UXxB5XS-","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Nj6mj9EUUjIMC7IrDO-88","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":"Ax6mb-kRGuyu4jKaLG7TO","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":"mLOKV0KMAKLpYMkz70y2Q","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4O_ujEjUwDUibc3Nu9XPy","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":"kjUTM1xT02LSYn1mhlTzy","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JNJ6VVR7kbAQgevko7lZb","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":"RGnL1Rp4qdgHf-J2p6FnV","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":"A4mqp2dTfRtWIWt7mMh8t","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"57AEW55HgUEt5bAVbIsQF","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"object type (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bii77T7MJY2ogMpSTlcAN","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":"JILCh3p4D_t-XQSkBkRxg","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fYnLFfAfl0FRpbikQ7T78","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":"oxNJ0DtQMv5ssD-yGN7AA","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":"cNskQHByvSzXo7hjqnePD","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":"C8TGePgElNBqKXMAmUxRM","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":"d4HnEWmo_UsXqQTXvSTzT","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":"YwABjeUDlOA3jXUQVZViQ","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":"8wRuEF2R4tg1FVPwM-E01","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":"iungm_Jc6j5xIpiO2sZkI","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":"OG8UPZ9pRHc-e76KQpwKY","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":"SHwcpz2DwwRioeiO4lrJr","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":"pgnuI-wmhyqE0bRSeqJuM","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":"I3MGwx6Nd2fqPgAhUKSbO","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":"cYv08xIcE07LhNvVXe9bf","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":"yLxKUcWimDYH4PPiYG9qd","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":"hw6d4rq6oZmrvKzSo20iT","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":"CLFFadO6GMYgLk-VOcPQp","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":"Lwjq3zzeo_fNN8mkQJtG5","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":"psxoOqejromTFIJFr6vY8","name":"onBodyUpdate","brief":"update the bounds when the body is modified
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jAp4CxkWp4tFU_H0fPPQq","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":"nXlipPNHrHCIF609vI2UD","name":"onDeactivateEvent","brief":"onDeactivateEvent Notification function
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lai17U031UEMwVeCcfMY2","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OYM8NV0F0UHc3usVOFA-z","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":"NgqPSr_fka-2jAWgB3L04","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":"GNGcAq_-IiRkWL1S3PFaH","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":"hAAKg6GOxGXDReWce7DLH","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":"55dDbz02tCKh_dvqqM-dI","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":"98WL0uxWvLYXxzUOGV8Ea","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":"NVIDgGCrzSTLdN862fFSk","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":"4SUJgBoOxG_bDudLHc65k","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":"eY6cOjnMAeNR_yrpef6p4","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":"zcVuHXy_TXRk-WcOVMz2w","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":"f_BrWjIPL-VUUcE4KoYA9","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":"nwbW52v4BooIcuoabDxaH","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":"_YAckoonJkY6owDD8d_Sm","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":"nrtkOlakEF38xQjsb3ac2","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":"t-WVzwpq5mCV47k6LVoi7","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":"rPR5XF84P_93j58mzJai1","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":"M-HQjtwPh8U_72qW2uAyq","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":"fShN4fQk9_CPN5r9PPJBq","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":"hJvySrUep_NbTlsw2GYLS","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":"cVceEGRh_Zx69P1g95-us","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":"vUCO_V0sId0KVL0WtZWRS","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":"agw7yPPxYLtR39aZ84mrs","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":"IcIH23Qjo-i3BliEUoIxo","name":"DropTarget","brief":"","see":["Draggable"],"type":"ClassDoc","description":"a base drop target object
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"U8h_Snwcq2EsRvF91bPHA","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":"WyqL8Jcmt3MoZ62Mgd8zw","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":"Vmy1VsB5uMKcHU2HIs013","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":"GQE5XyFQrr_zqcNri41Sb","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":"P71q-QKDwAb1eiMP6xQQc","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":"ZpRqG0bs4vticDpAkIGa8","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":"dgVTCmjGmLVFxA9IiSIeQ","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":"h7_QhrdWfVga0UwffnxqK","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"68Se_BE1RmF6Gw0pArtDY","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UFW_sr-wq088ASUJcX5nh","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n0EH0Bq8CsZFPBTiEg5tB","name":"checkMethod","brief":"","access":"public","defaultValue":"\"overlaps\"","scope":"instance","type":"PropertyDoc","description":"the checkmethod we want to use
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5LUVyef1medwHBNZp21fC","name":"CHECKMETHOD_CONTAINS","brief":"","access":"public","defaultValue":"\"contains\"","scope":"instance","type":"PropertyDoc","description":"constant for the contains method
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jf-C8J9zaKEGDzCiTLO1F","name":"CHECKMETHOD_OVERLAP","brief":"","access":"public","defaultValue":"\"overlaps\"","scope":"instance","type":"PropertyDoc","description":"constant for the overlaps method
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6iHwb9KCEqWhrvcCOflNY","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NDjmBvylVYHk_e1fjDIPF","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g_XAA70B8CsaKrM2ABuz2","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":"uI-_P2fOMwnVDPTQcvTEW","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":"veJP81ZPrLghZUTq5LifE","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"guc_sEhqiiGKldqZMMBVs","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":"QHfRyf67JeIiR30ELfS14","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":"Gt8Rco7VkCr3-MEXmAjsA","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":"rbzF7RuSvDm4MIdLBysq0","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":"pYzWU_i48S5OdvsnpifVU","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":"jGMzpBx8ssZtbyTV9zx9_","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":"tf204fLE250-Cks5dsXRl","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sL4UCbPPupXV440gphOjT","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i-slXzZyTWm0ZjBYOHWWL","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":"XHdF_2Nb8VfgBPZj1SzFW","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eLHX-hKP9IgKoL3DG_lmN","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":"6mKfxVOupVCzFSnn3Tteo","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":"tYssKJQ0BN9RgY3GW9vQW","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ki2za3xT4Bcps7DI4mSGQ","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B-ZWgs67SLFhEZmaHvZ5-","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":"89iVOwCgSNcyicXOJo1Zk","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":"_P1VaV_G8V_q72zfJFOkE","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GbuXRoJJu24uT3KyJjrmp","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D6RAYodoasSgMNGXAhf_d","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":"VHHSitN3dR18YhP8HSbKf","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pQObKzZWsae7nAlUmJOOw","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":"5zxlLYceAHu_m0mynIY_5","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":"SGlPItAf8f9JtSK4PX9_F","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":"XPvgaN6nFICmIjZIGmPY4","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":"L67zufV0lK8L1iALKzpqo","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":"ZdN7yNVXvx47C8coaYoVK","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":"_wT9780K-Aa69nRDna9Jw","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":"2Lqt7Mve68qzNSc6g6dMl","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":"pW8DRZ_dXMkha9NefCHc-","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":"b0ZBNCwV4286_HypcjJ9Y","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":"fqLncosZUeko8NQATQJeQ","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":"yBg4hoZQwHO7OzQsfCyA1","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":"Sx08drL_KCiCC-Kvlsvpn","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":"xGdQMOEcBpSsXfmI4iAbW","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":"ouey72dzBfcG_SVnF6_63","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":"aMdy6jQWjJTDbqQIbcq8r","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":"IXB2ycJVH6TeOa2BcHqVy","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":"W5jaX2OYv7G93YusjLIJJ","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":"psAfaAjTkUhlMhtGK9Da-","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":"vP55Gc5ld2Xq13kZTiT4g","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":"3pNWOhqEHCpdHiauQ5HGj","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":"nIJ04cooJ7yYXW7SJCZo5","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pHbhxP0ebpLtGhqmS_4V9","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":"9Cod8riW20mBRUZXdnHHk","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":"6jPllgmv0NfSeL7BM7xFl","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":"vdoRlfEfR0PfpdLsi9sSf","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":"tUr9D8ltnIDSfTV1LLPiG","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":"XEo3pOhhMTVn3VPrJAH5-","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":"sdFgOIhf7R0itb5YAU56T","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":"SHTeAOLS1q0OfVpOzfiWQ","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":"DE0FxT5UJsh0reRvPVBwu","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":"IT-LChanBwjdRMg1HTQNu","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":"SmYFUvAR007jKTD_bjqXs","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":"1lVdCMZTDz_wm0qVOuE3I","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":"s7c-wlw41N8WiDx3nRgRL","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":"ULSAgMwh-eb54NolPd7RK","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":"GOGoJuJ1gJD-58wBn6_G5","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":"_VQ0vo0zb3HLYlxqluKqv","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":"RKm8VTWwkTSC3xpxGsS3t","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":"yLM7VL11OU4pt_Brh-hfb","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":"KhmYT1YAlXwLaeXXM9tAC","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":"8Vf466tmglXC2DP-avv6a","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":"hDObOiuk1zTukqpncufU3","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":"jkb6RQPf8LkC1_MtBSJny","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":"LTsiu368J4WzxZtGczyp5","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":"hk6GJUr5jrcZe3XQdsiwz","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"dead/living state of the entity \ndefault value : true
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DOH8lhLdFNjD3hVdFEjT-","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":"CbANzRdihiKSQod-M4tRo","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":"pzwD29RI9Kc2qHAozW0op","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":"qquw06sqYB9vy49ojb7fI","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":"J13Vmda7h9qSjS7Nzk5oh","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":"taX4boIV5ECst933x7jxM","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":"a4S7_LWhJt5-rJ_iAn0Sq","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"the entity body object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k-14ayojBwUieCKCunfUJ","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1hqlWPU1zGee2IDJmlD_5","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RH7NbpZgtmUX0pY9vsZuz","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FNpsvxnN-q9fuepjgTdoq","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"egDywUOk4IuyKwkpZkSFx","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_hxbdj1RPV2Lab0S48Clm","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":"X3V4HakRvepFujk4CAm46","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":"Og9nXBOSt50EeVpmVzJS8","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D0fo4ZvGUrX4nXk-SZ0Y5","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"object unique ID (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"acZoSM6do5hfCLfZODC10","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":"tzo-LQgH-otgrNgQ4Vwml","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":"UkCF_LvJ0NAWdnXMOuSrK","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":"UTZFFFy2iLGheG0q-C1vG","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":"JDNKL5QMP6C2hODEtU76T","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":"YrDSs5esuPIXXWDTsql3L","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":"Jkk3yvq4nM4-_qfLQ7DS0","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y0WGuM0ffIxhpaBQQy340","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ePDnFXLvRTb2nXabWdKfM","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":"yE_F4BiXPHpFw-i0ewSGH","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0_2YXWL1FLOq0bHAJs6u8","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":"tw4ebE74a_uh5cSLodY3t","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":"fX4Fr4YORESO4M1BPatGv","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ck8OcScK9HeI3sVtTB1_l","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":"3ri4ngYkt0gIC_LRCzA49","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3ZbaNogZDJV8bzkD1nfaG","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":"46wH6lng8dxKRo7vR_TLA","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":"lxoOjLIwFn2pY2dzjbX16","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mWnHdA64vNgVPOpGd-TdV","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"object type (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bM8CTSzyWFZPB3Tx8uzsk","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":"lt7avko3fPt36NT6QRuQG","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yyisxU1-EjH7KNubMUpp8","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":"i_kfQ1SJjButNEdPx-SfY","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":"bhXFDV-5CPvGmgr_IjZlm","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":"OPNXAOdHt_xCkY4imgtVD","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":"qgRdG-AJsARhghZbyjEv1","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":"xktMFT3dqOWTJ8OddVfdd","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":"D3DQ9nXHrNDFrRl2Qyiaz","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":"eHdYVzkpvpzYy7BEjwjKg","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":"svudI7Wm_JVa0gq6j7gyT","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":"zw33oTnr5yyevlwGyKJ6U","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":"FsUI7SV-v-PWPgf9pfzgY","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":"SQ2RCRStnvJteg7AWiPjX","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":"ZbdInpqAHinlN7ek-WsG7","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":"3kQaO-Hn6Pwaub5sU6To8","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":"94nfRWaU14iFiTRkDe8yi","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":"htt_E21mposyY0IIOWcpv","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":"QBnC_2ulu_3asA-mdg4fj","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":"RzvDrtoeG_dspHA9KyDw8","name":"onBodyUpdate","brief":"update the bounds when the body is modified
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UD0-vL1BoLMUo_tuATIE8","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":"NjSfpcufO0yWwWckm4Ggf","name":"onDeactivateEvent","brief":"onDeactivateEvent Notification function
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a8OtEy5n-HSyZxTkX2xd9","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HRQgwztZgAzVdSUC_dyme","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":"-sxFIbos6DB65JjVn0u3g","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":"Yy0GgHjNbHJH_vLzzUKdO","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":"zrkbnU2RboEk4sUXO5Jno","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":"iIGZbn5QT6TJiUi-zcmHC","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":"ltqo3DzZH7f2kMhRsT5EQ","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":"t6RhHQawFYhXX8m77ydlM","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":"w1xSJJriFHpA-L-fh6uqp","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":"16_bpK8h929xSeWpoq1K0","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":"8l3m_curlHF5WFRcQWgLP","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":"SqT-ur5IvE4aKqYHiGDoP","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":"ZwfBDIGEtZd1sk3FeGWNA","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":"N0pk5RdKHjERLBoKz7tO-","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":"KE_YZqv2Aya72P4_uO-2s","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":"c-zeaNFqbXrd5UmOJon3A","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":"ukeW16_-6pDOsf_nmRNOQ","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":"bArfaViiLvK9nPtWa46TE","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":"BAkXLkO6sxr3hi8j3bgMq","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":"fdxDBucGrPCX0dMqoNLrY","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":"yAxENx1PvVpkb7jtW2VJV","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":"DIvWCDstXag-CRb8_SYQi","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":"pmrmfCVQd-_AnInhHWUCp","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":"dL81MAEYvqIaH0Zi23NzW","name":"Ellipse","brief":"","type":"ClassDoc","description":"an ellipse Object
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"49Mw7NmiQgRrA3dB2oQxA","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the center coordinates of the ellipse
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qYiUMGe4c5nwP4EEt4SfQ","name":"radius","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Maximum radius of the ellipse
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UYUdsGljNOyqCkfVwtSuK","name":"radiusSq","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Radius squared, for pythagorean theorom
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YU8nEG6JN86QCAcDjjWLY","name":"radiusV","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Pre-scaled radius vector for ellipse
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"smpQV53hoyy38Fn2y_16R","name":"ratio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"x/y scaling ratio for ellipse
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Kt6GF4-87KKviDrLdkukf","name":"type","brief":"","defaultValue":"\"Ellipse\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HUNJaosCgv2OD1p3bQnpw","name":"_bounds","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"The bounding rectangle for this shape
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ArAKcZVb1SXui3aJdl-C-","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":"rD1NoVx7wg7mCd59i5TXH","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":"s5K4Zpgr1M15YdZEunbxt","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","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":"V7QelfmGZ6tqbI1KjPLeu","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":"sPPUiJJyOlT8FEfDWxTeq","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":"WoiJnNPcUetxtDJKgVD6L","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":"0dK64v2fo7m0opVqi0Rv_","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":"-7CXG14oilYkIq9ZRlajw","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":"hkRXPDndNDPW8yJta0n9U","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":"eTowTmqwcENeF95slDe5U","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":"eenpYzaDp02sZMSe7YKIF","name":"Entity","brief":"","type":"ClassDoc","description":"a Generic Object Entity
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"niKEI2RO5w2hJ8k5BIq4v","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"dead/living state of the entity \ndefault value : true
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jDkHUMBt3Bhl9uWQnjy_G","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":"90_FYmy9dyqsqQJtOoZGm","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":"CO_z-v4GxLdD195GWOWUl","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":"2oyk5JkINVAE3HOqyxfR2","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":"_fJ0qjN5Y7LqUwCshW326","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":"DyOOitWMhjlFloZ9ICKse","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":"WkSUwmqpK6woDlwOVd0Pz","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"the entity body object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mHq8xdEz5NpHLAVDxQo5Z","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KJub1u3mWUefuwekCpYuT","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cKS27TcmWH7LjywfC6EIJ","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dFlr6GNia8bA6bQT8CCBs","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"apqS_nwWpJC3nblQJXUKU","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NfW8FkolqsDQM6AVSbxm_","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":"zGuBzaEBtGOQ5X2sDjFKI","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":"QDnBDJTHBZykOp9wiYTi6","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tfJ5uD_cK3G_ACCSuKINY","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"object unique ID (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V5WxQHTF833HphWLeQVPc","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":"P8mh8hJV0U-MHaERDOgiq","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":"GNre81NPs9ZzwyemluZrO","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":"Jd96kHQe5bD8SZ1fwAkfd","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":"kHAqf1iZGhFg2EvXB-vwJ","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":"7VCKeVSH1Asuvg209kHz9","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":"9Ad24mCnnpXwpHqpD7fT9","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vgg9sbU8lAX6UsUwOibjR","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dQ8NY_iAY8nTuYlX4CSsz","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":"gxgifYur2ZT3DmkkECq1k","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wTYEQqQvh3_JCAZKjQkIn","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":"1g8xeUQ-AAlA-xXfa2whE","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":"UzIxQKrmcZYGW9Amgy8TC","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cuGulxhDu9MEi9Kmn6dUF","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":"W05l_D7THO_eY3lWtsqZM","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0yRcvUk8unHUUfgAJ8A7b","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":"RKmdSLm6mJ64Xy4a1oJt-","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":"r0Dwc0Ydi611X94uEMNo3","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7qorxrZmnsCYW3pG61sZL","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"object type (as defined in Tiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"62z_m7ewrwJlnRJXD8zDB","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":"87tTuguhwt0e9Y6SbE9aV","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C4DfxLqK_WQIboQ6EDj4h","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":"X3A1_HKLAkNB3spED8zbP","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":"i3IchlvkGs4oWOvCZrBra","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":"3jn6P1YIFUp05TconzLRY","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":"8au9DeujgLg75ejFS1Oqa","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":"cRSa4YhPhuJQGlgGTMLh_","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":"KOYeXWKtAbq6ui_aN7lhM","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":"MJTQD9LRpmIcp61yemEFq","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":"EJiUlEFD9StZKxJ_-djRp","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":"gHxLyBoD6eCMq7tOO62tn","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":"75eqpHXem_N8xo8hq-DrF","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":"Ajn1Itk_2xF70Y1Ty-3tz","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":"25D7BhntAbyO560kwiKMR","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":"76x51lXUmDgvhfb-MP6iD","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":"IHfBr9d4srloJdUPcFHlj","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":"bTl4qTcADBu7mALUV6V5Y","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":"HAIauZVRaHp8IQ8QE8Aia","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":"sBoXDY6bF2t76ZeM-RN8M","name":"onBodyUpdate","brief":"update the bounds when the body is modified
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"t4kUlIQj8zt6aSC_ut2cG","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":"gjlQkfIGDntxO-KS16_qJ","name":"onDeactivateEvent","brief":"onDeactivateEvent Notification function
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CYrLIdTvZ9AD3XlmC33LP","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WCxjJhG9wodCjW64qMvWy","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":"3VGlbFPasI8jPm7QlyAFu","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":"iQJJr0s-X78vze-MBiOZB","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":"Vg7jbzxNCFwcHzZJ24oJW","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":"sXAUrQjvqVcil4tgpa2OY","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":"LSV2JIiYvJT_-3WiAI1-L","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":"TrqtmDoA7EoPuTmrULxIS","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":"-9Rpo1dDYLz4kJixrWvPZ","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":"G_9k54UFuuwcmqbfbv5_x","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":"Q7F5Fv724Ks59gqHODkax","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":"gjrfcZRacniRVGoSUHM2v","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":"3kqnpxEwJ5iQyjyw5ZHk1","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":"K3NBm5aCxJrxs_tr987m5","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":"2dgKA25gPhJRP_5o-Paxl","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":"S6FY5XqHoQoOJLFvrcXlh","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":"WQ_bZod8lQhdUt6wpTPtz","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":"QzWSEcOSeTxDCgviMByvm","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":"RPf4EPUP5qnL9UcweKH1Q","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":"3GwlCxtox85ZgAJd8qiWH","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":"SM3P-j-mpR8-BCDVOmO6Z","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":"oOJCsNAUUCWY4preP_0HZ","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":"1RCykRBcs6HN_8_y7DUCp","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":"KQs9UBf8n6fko4027xr-G","name":"GLShader","brief":"","type":"ClassDoc","description":"a base GL Shader object
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"W51FekJtRYfKlSxqsO0wn","name":"attributes","brief":"","scope":"instance","type":"PropertyDoc","description":"the location attributes of the shader
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u_ChQXI3zFKUDqmJwsMhF","name":"fragment","brief":"","scope":"instance","type":"PropertyDoc","description":"the fragment shader source code
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6ORwve-GSWBNUhbD8cm4I","name":"gl","brief":"","scope":"instance","type":"PropertyDoc","description":"the active gl rendering context
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_0KjaasUNq0tdeeWIahH1","name":"program","brief":"","scope":"instance","type":"PropertyDoc","description":"a reference to the shader program (once compiled)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HcPKlS6m8L6_WDfVNNP7b","name":"uniforms","brief":"","scope":"instance","type":"PropertyDoc","description":"the uniforms of the shader
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_cKJyxjrS6LDGgfyOfsw4","name":"vertex","brief":"","scope":"instance","type":"PropertyDoc","description":"the vertex shader source code
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YUAPofI0u2ZbZtoSbbnX7","name":"bind","brief":"Installs this shader program as part of current rendering state
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vt67_oWSygvbPDgUq6Z_C","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":"-QnJvNxBdWP7h8JgAhqFU","name":"destroy","brief":"destroy this shader objects resources (program, attributes, uniforms)
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hWkQMWGYbxOoqZx_QFQwy","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":"Sw8f3jx3B76mFNxFIDfu1","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":"EdttGjY3JSkGgTG9UrWSe","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":"yGhU1pvM6ha6KHPGI2ebb","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":"e6qYHdW9UyGlRvXRuGIK2","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":"Ug6ej9bMf4MVZGiOUr5bU","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":"GnLj3_JYBXXP_s_rDsQWd","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":"3By5KV64ICj1_TDO8hVFz","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":"kLzgnUQ6uwiWASENI2okY","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"
pause and resume animation
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ngo818dlfExUEsOxrrXwu","name":"animationspeed","brief":"","access":"public","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xlEcPOBB4kvdqO3J_jkt3","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":"aZgNk4C87vyhP9w2OUh3c","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":"C7bf9ZcxQOBKwrRJ4f3I_","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":"g-fINB12OcGsb_OqAYXnl","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0cOyjNOBwpjxOv-AxbZkv","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EjMKbgIDeoF8ZQCrkDugW","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"24M3RRiR6I61aXQvRyP8n","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mmTdsY0c_mWyjQSq4RuwC","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8XLQxXZMfM9ViHrWM36Nl","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":"Kk6JqxKvNUIQa16YAfx_K","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":"_59X6WVy4klPExIoOFFgp","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5b1jLzA6BZZRQS7rXY2Ly","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":"ed5Ib8jsvItGS3coHXBYv","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":"lwTmov7CF1lOTi28rsPGT","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":"tXjG8eU2JwOdsdc4_HceQ","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":"G98qC45QfaB392vD5OWU3","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":"zRaP5F7_hy56j9cxDu8yu","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":"nHgzEReaoNU2IavmfItIv","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_0UIvow-ifF6qQNAc5719","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RMnFR_k6i9ZyYnPdTtW39","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":"miB4Q_Y7KUeaK0bIArs1w","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PRYtn0LQWVxArdkHe_4dO","name":"offset","brief":"","access":"public","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":"stD6lfhqsjJ-860sBCl_R","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":"dtGJ7Z0YOLC3hG9csoKzi","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":"uiQl-WeVoPWDtduN3ghGQ","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7JcHd_Zloa8c2mMT2-AT7","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nIN6cE9HBNTs2aAEc73fy","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":"U-XReo98ivcELrkblHTIg","name":"source","brief":"","access":"public","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aiiA-ZPoS5MrkE53KtB_5","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":"gJOL6P1S_G6ibGgh3iINQ","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fMiwJuvWgArDkeBatoGV-","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uwyOFKVtH9OLLN99fMbgQ","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":"QTFmTlABE2KPeJsRONVsL","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0A5hioZGF2YCer7lUPE10","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\ndefining 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":"ag2ZVeT9knjo43VMUKfie","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":"taYlMi7voAHzR91bO81Bg","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":"tPyIeyXNC3yxKgVl_Ow14","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":"EIDnA8BmYW9Gy4MWrc0ep","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":"FgdQJL6LZs_lZ4zyK_ptl","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":"plMsGrsvA6d3aiQnhsrSc","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":"S3QQTTW1XPPCPCtxk74j_","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":"rdasYih4wNBVafJXx9p_c","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":"FaqOOjma8PbmlX-MkNsqU","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":"B7cdLeL7pYi5NA-dR_0zu","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":"ke38a2cLaRHGiBCYyzcJR","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":"Ihzw_oJV0k1QuCNzqO6N4","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":"S7FWT1OfT9Ove5dLSGvnR","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":"SQDTVxoSkN55v1a1IKSaM","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":"y6tFXGOXfYQRIHgYdpbVr","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":"3frkTZE0078NW4Xa9goU9","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":"O_DvZrmBQcOU49d5X-uW6","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":"8H0TQFW2vZFrDSbl-Bj6w","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":"BieyK1kPZTEoiYUWKWyOq","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":"kFo_2dhLwp8aOE4oBdteR","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":"NGkxjBLLktCU4FE8Xthq6","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":"N6j6NHJ16-6i5M1gpQyxP","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":"fbpyPhkt5NlC0RbamVt1q","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TbkJ64P72FgrJ07p-kNGh","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":"28loTrX2-W2MKZfmcNSkb","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":"8w3qq29TbBrGasppJqnKU","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":"hvWHs5nMc6gsXQcfS0m46","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":"X1sF3InMyp9RTHFChgDuY","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":"NZcIrZVf7vITAM_Yx4nzJ","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":"9-leM3ywyyckjPbiciliZ","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":"itxZ5sRiBfUs_0gp6mJBY","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":"SkPnKYZDtkgjMziPNGQNk","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":"-DtHF3sDQ0ycMuZYUaeQY","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":"3d6vueFCl_Ws3LDdEPjpy","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":"e5hDcZcVmcBX5-kSdmsl1","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":"hMu8f5seyI6QTgs8R-u5x","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":"bAdZBMOYB0JWirksfEYHs","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":"1NXXuiry5VPsD3P0Eio35","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":"E1sTWUai9M5Tyb5hskosr","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":"M7cSM_PwY_7oJ__2Oni0l","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":"cvdqnRlMq0GubPU8Nx_DU","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":"p8ncAeV449AHCKGauNoQH","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":"Cbuq-AJG0aixsKrqoRnxj","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":"opHyNqJebNwmzd9197MUe","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":"ADn6r4DcuHwhix1Vj_7QC","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":"AuVPcxQr7mxkzjZ3H0-nv","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":"IFJWbrXRNw8Z3ifpYXVj-","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":"hpC1LPCJ_P8uffdT7_2sY","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":"eZVgNlUZ5XAJksnacw8CT","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":"i0cCAM0hz-EOv3zgXf4TV","name":"ImageLayer","brief":"","type":"ClassDoc","description":"a generic Image Layer Object
","params":[],"returns":[],"extends":["Sprite"],"implements":[],"members":[{"id":"Adiggelftz3vMeXaAwXvx","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":"yO-TjjPoavXNeRUwdKmnz","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":"J0y5ANT90vI4NGyIN46uv","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":"yJhOebHgmIORyvkseOKQg","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":"grAodgnTXLDikzbVnCbKg","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"
pause and resume animation
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"l8hcLNwxxVmxcOo5rVqdU","name":"animationspeed","brief":"","access":"public","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hQxbBwWdfaQk8MvaeNy2R","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":"ZVABwKFxJJuKCvLffwrcP","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":"6x4gD4i_kJfa6JdiAp1ak","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":"MZ1922aECSx0eLPP3Jz6C","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K3WTMNX8JvUM8Z0HDDMZn","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uTzAfIqyCFjvdwaCXAAQN","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OY-21PB-pHJFQxifgEvsO","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EQeMoOnIIVUPYcIoeqOCp","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WQNjjDQ_P-OFHbsvmf4tc","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":"WW4qHIUmlckatLYgxirjr","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":"qHDw4kRcFpHV36s3H4yUZ","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1CQhesTHIb3vUw_6V0S6v","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":"0Fx31b34TQJNAQRjo8gUr","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":"eI--9-b_jjAsz2_tGpJeN","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":"o6CnyWELUozQnpLKo57AZ","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":"qxLWgiFaUrgohqNOap9Pw","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":"eeXPbteVXF3PuizbXiuqV","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":"6m3qt6merfOoGisFa_g2d","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WJ7hT4WRQe0Pe2vvf99uG","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BfRnuejcHluTO3LUaxxMT","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":"GBgRcMmGGTPMQYUOoNXkv","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mUSb9LxeDtmYcnGc5yyTi","name":"offset","brief":"","access":"public","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":"TjovC4ch08fHXkxBEcat3","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":"1fkNX3n9bfc3kG3aX09oK","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":"_xUiFwOAeGPw5A9WmHBU8","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7JoMdFM8s1EcIsTAIKchE","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":"knk7KYUAzK1VoBycsoZxB","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":"03DARk1pRm4UO1-ZotAgy","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"
right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BmVpDzy4tbHiDNjnmuAAB","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":"jeTx3eF_9zoEMKQf6zmsD","name":"source","brief":"","access":"public","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dw9NksCR0JrAFeGM1Gijs","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":"bEPZBpA4ybSnZhGdJpQcf","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZjDrAI4XQJ5CIBaJZeDEk","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dPqKReR0iQBOSaZm0OmmG","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":"yIwoZiw3VF75WWNjFqHD7","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MvB_PZfEznW7yAG8KX97_","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\ndefining 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":"0BQpJtmCyk4tBQl8aD2xA","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":"zHkr1l3OakWdPDzIqfoeX","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":"Ei-E4R_YnVqthllvsHEqd","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":"UGujIdN02z5FQ5R4bs2q4","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":"CAX9Nst_5zGw8qFuw8_uq","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":"d0CIOrBxmWTXEePkai9_I","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":"KsG34fNoAcGhdUer6vdht","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":"YMUdYsMXhaws57T3t3url","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":"J5fyzMNlXDOCAi_yNSNhv","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":"jm782r-VYEPvsTgzOhKTv","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":"OQKgwR_AGY0BMTLagXl2V","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":"mrzo3oaIV8fVzwwRBDjpR","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":"PA3WyNSTvvJt0AlRgFpXm","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":"vrhbMHsOc9AMlsQskVT4y","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":"BKV9zUuE4C-0ToQBcmoej","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":"uG2LedNcaqPk9w8oDul5k","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":"5gpQ8GUJmIZJFx9XggN2A","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":"ejYBKX9UlqqTyuYfx3RHm","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":"VFqPbM8GYe5xWE9GVuRKR","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":"DqN_IOL0JL64SPLOzFjRj","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":"SRIXFGQgU8Jtcyim9luvg","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":"HvearBr_MLjM8Um9bUI-l","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":"z_WuZq6ZAyJn9b7hnquQf","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-ClBSlOb06c1qPDE2OAst","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":"c5nZJl-ZFNkO9h5eCi4b-","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":"JQuzgZs3r8YLA8aK3z1MM","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":"3jTOLMI7kFrEQamZ5ib7f","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":"ZSjygtprS9OctMNfRoAyW","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":"r3a20PJ_kkNGuwa_P3kU1","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":"BEcqtjxl6N2Sms08aLkqX","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":"UUKyc239J31gtF3V1Guy9","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":"E0Wwyc6nJUlOUsiIbpGZG","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":"GDZyND2tLG_w63mWGr2iK","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":"yj5FchmHoeziSIhN8ieQE","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":"-FDcgUIM6hebumZ9VD4bj","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":"x7UVilV4XtSqX6pwy-HHa","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":"vqDNrrocGajaEbpFNqj0_","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":"UOdKJ1A2eCC-jezcqMKvj","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":"bjHoHiRJDgWdNlLIsmOjX","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":"zWtArTJ39yUnEdX3hBjbw","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":"V9P9l8J-MSFKrhNeLyRZz","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":"uahwa6_KXSiFbBVrfwqVQ","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":"ejS6cd_xswEMzh8kqYsPx","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":"MjANBc2IWYH5vmNroSIFW","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":"PzbBhTVi7WdRkO2dqmvtg","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":"tl3-alXdM52eySTqcsuSO","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":"gUY11ANhEOHYEM-qGYy70","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":"nbI0rZSQJ2Zahv7ppXo2w","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":"2DkAQnbxPMwzMlYifk4sD","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":"YmpEiRrT5Zdhs9aZwV-S8","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":"G-hqiczNXGEhdQ6pj-Qtu","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":"Rug1Tr64HO2yMYdJc9-4x","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":"KGHPoc5IxveC1e-WJsP3T","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":"IfCCzj3ExVAV3R79m727w","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":"UDxZKjzb2HZynlEuVfJ8Z","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":"aUDF_EB7jAlLMGvtb4Mk3","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":"XCvR_KqpRuF-3K0dsEJ68","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":"9JueRdP9s6lRT5epJG-uk","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VeB3g0MmEiaU0AMbWrTD-","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rjjf9p0orzGA66yawpEvJ","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"l_uOXOt55voqWizhU4RdG","name":"color","brief":"","defaultValue":"\"#FFF\"","scope":"instance","type":"PropertyDoc","description":"the color of the light
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F7ErGZP-3SYEuEItDZZAj","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Zz-MgKwqT7Nn13XDTOgau","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_eDFOBjU5hDCHIFzlup5y","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":"VJFSTjTflAn-N-bAWLdCp","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":"TchXI3wPLEI5mIFEQQCwA","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"icI9OAsBI7sGLM-ipZU43","name":"intensity","brief":"","defaultValue":"0.7","scope":"instance","type":"PropertyDoc","description":"The intensity of the light
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ApeB79Fv92_w8hZEsBuix","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":"BqC_mGtOkd0g8uSxLrs3w","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":"IdI0cETqJ36yqoqm_KKUb","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":"ua6yZommAioFyJ0LC9Bbg","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":"41tM7_6EDRoomVhiDGzYI","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":"LeF7Qk9_DWsJhDPx-NP_U","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":"hXR1AN568uD_8K_AbzEbC","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U_fjHLjeKyylOsR-QlFE6","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"akw9OexRPqlb0yiFZJhdC","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":"mirPDgoQD6K6ok7TuXVSg","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F8jV_iUKEbxvk2dBXGZg4","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":"ETm5wfKmWDnQRnxF4kd7X","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":"0t3aVkBPHg7H8ST_oXfOy","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8Qt-lthb05bwMOGgnNYfb","name":"radiusX","brief":"","scope":"instance","type":"PropertyDoc","description":"The horizontal radius of the light
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j1qZwHqhNdgyzatZHxpm5","name":"radiusY","brief":"","scope":"instance","type":"PropertyDoc","description":"The vertical radius of the light
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uwM1FNuYNQBToDY-10LiV","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WovejbMA2d2iHkEd1Xbcd","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":"OHzcwKNIxufaoCW719ccS","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":"_mR61k_hFWMzonGVZWo0X","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wj-XZU4_NVgK81m6ts0X8","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Bgaf8jeuFkq7HLgS7yceX","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":"lMLnerePGPxoTM1aiQlXv","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7q1ju_WevpYtnmHzvHMB1","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":"hfeBNGaulxk4AXbUBqab9","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":"7MZzFoy36sc6OeDeTgXl6","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":"t5klpcfmXRC00h_wdrO5i","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":"ghilyz4pcuELEa7Njpl-k","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":"wLLXaSJBh2cmB4svtQFcz","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":"k-2HIFQYQb7cpwJV5eUWk","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":"xIsijvF-ji4IOTR00R-0M","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":"tkR9pZZosf0Jm42a9QbDX","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":"XKhGa29Ok-KSLPiQwCroM","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":"2V3t0juEgZr25KV737xM0","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":"3VFuQ5zAoAtnG_WN5QpUD","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":"hsaXdsDFS2XdZI1OiExmk","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":"oYnUu6VEPPEH3qpAcrNC7","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":"Wh223s6JzXsChrX32diZe","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":"wIn2eFxLD90UOaPftuDA0","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":"Ka9MlzcuB6yrRMfi_APqR","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":"OQEBA8tu6CspEfWLizRP0","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":"xF5hmvEqYlxvzJNQJaH0k","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":"Ir2670o6mAgJkvaYD9KYm","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mvCTyf3IRKXR_Cowi0Cdd","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":"15YSyEVxo0YxXI5Jghr2Y","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":"PBbv48RCoZAKLdWJoTw1g","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":"jbtBP2WaDBVh9RcN7ybRr","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":"YeXyLuU3qxPPoM-UGOb7c","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":"_FOx8R2Z-H-tOUQBFKCxe","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":"gWM9fpiQq6RrvgI1nKysd","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":"xGk9UPn0zUKuUM3dJLVuQ","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":"CgYeMOsJ7S1OU4aynCIFB","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":"EWv40P5WySQWtr3tARmOs","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":"H_7aRWhasuEX55RcM7Rzt","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":"6TvArd6zh4vbs-WPoM-hF","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":"1DRnIYkWRa5HPQt7f7tCN","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":"Z3a3EJKfvsyp3used8vQW","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":"ljnxmIAVnbdSuTyGCPyca","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":"ZLQTD0QLFh_cEEeVX3H7V","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":"gk8JUeEvuvUAjOzL1b8ah","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":"cmz-rxXnsEuBS5YxUxIdB","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":"o7Rlj0fIKlVXsyrInnuzc","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":"jzfA2mH_G3P7m5-eqMLjK","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":"aLqTT_24Ln0q0il6oL30W","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":"f3s3jLn3SqOSBVqr7bbmf","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":"ShkcvHkdPoRRuu7AYJ-Te","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":"4HdeMAipN18iaAAehWHfX","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":"05Cus0nCMfucmXMOeUCeM","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"
origin point of the Polygon
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SCURjEOaJgC3Z1xV5WaSb","name":"type","brief":"","defaultValue":"\"Polygon\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O214NZfqaxy7lJRTHDbDp","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":"bvLC8_U_ZrtGSyzKgxfv6","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":"bZ88fhh8DQy9Rred7ir9r","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":"NvdWWcjHMOLvGTBycnRYA","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":"yMnDw6NIe2NIhBk8h6J0P","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":"QFHfUiX0D5LR1M196Zl6f","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":"a0Qc_DryAycle6h8TnC8N","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":"h9c5uvDvY7wxAto4p9tGj","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":"EqSs4f77NETDHm_XOnEhA","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":"dvcwGn1XXf5zw7HqXjIOJ","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":"GUikQCsjZ2uNAM9BxSZf3","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":"Ls2vH67yTqhoc5XttwaEw","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":"HhmZwjvbesuJJhkHORIvc","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":"RI_WuR6_sxJlb4Jg2Z9dV","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":"QuBH9CH8iPwa224hVZMSE","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":"l_XZBZK2lG1FYfvxtb-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":"e874dEou6Xcv0kXIGu3TJ","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":"cjruGOiQ5bO9nn9kL_GU1","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":"wuRD29adTq7xwM6DviLYs","name":"Matrix2d","brief":"","type":"ClassDoc","description":"a Matrix2d Object. \nthe identity matrix and parameters position : \n
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"A_SkA0Tg2scYzV-QNI5Ts","name":"tx","brief":"","scope":"instance","see":["Matrix2d.translate"],"type":"PropertyDoc","description":"tx component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"G7ra8nKnUG-kyVM9mZkzX","name":"ty","brief":"","scope":"instance","see":["Matrix2d.translate"],"type":"PropertyDoc","description":"ty component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z0ZmByODQXCt5IsM0_hZP","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":"aRj4P0CwD08eH5fTtRXcN","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":"o29j07yduy_hN9RQIoIMV","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":"R8BVR-EIJTCWy588WkVs6","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":"fyQje4cSi7Lfbzx2iqRHW","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":"6ebhB1J-YiU0EBvDCQPpE","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":"YrdFZguqMmvxScpF1tnJM","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":"H3GFBa2y4VS9sjmW2mDob","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":"fxO1oeXwqXfkq-UPTvInc","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":"piHAbtpzPfuw0kqpMg71Q","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":"qWfIFf4Nf1Wv9OHL-YpMm","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":"AB4A8kgciXP6shRWjQgL0","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":"Vk-OfdXBDhCk8EMr1yy6f","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":"d7IEq8sb_d2RuNUF_scuD","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":"O23hmdGCMyfGrY48eKNUJ","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":"o-Brm6Vrgi6xVAXWCPthN","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":"Tcnd2NTkMqcQWMXHd_mhM","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":"sXh42FEFTUph-HdGDWkKR","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":"1wBNffBiMsMxv9dAm_oVL","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":"R2YtoIA8GfwCsX5fc6xEW","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":"o0GW4BlrdMBWhlklIAfPW","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":"M5oDGsAlLhvjjez0DJ7ZB","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":"NWyEdzdK7PSxuoT-Y-4aY","name":"Matrix3d","brief":"","type":"ClassDoc","description":"a 4x4 Matrix3d Object
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"TFiUN2vZQzAFs_GP_qROX","name":"tx","brief":"","scope":"instance","type":"PropertyDoc","description":"tx component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9gdp3EQ0pn6D8SQzsb-G-","name":"ty","brief":"","scope":"instance","type":"PropertyDoc","description":"ty component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mk7b8GUQHiyfrPK6ApMiG","name":"tz","brief":"","scope":"instance","type":"PropertyDoc","description":"ty component of the matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Nt4K00YFUDx2ZhiNNWHnO","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":"pW0hpmf_qvSEp7WHO927j","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":"yEcO40R-oXN-xaxkwPYIv","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":"lVnSF9CcPzX5X4xN52RrS","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":"mKYYgGxxzrpCq0vXKzvXG","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":"hU8Kn1lka1YF13mp4k-lJ","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":"pQNAtjuPb9KxJCSbEwAVL","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":"OWii_MR3PFM-eUJSBeGwv","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":"q9LJtT4Dpm8rbVOTm-PQc","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":"RCui6b60zl0Q3q7wvTHiK","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":"PjicG4_1n4Sd1VTPH_a4s","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":"1fhOp_HYCr7tWIRVpvrZN","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":"rbakSgnjeVqurec1O9FsO","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":"bOzpIqQ716jCzv0XYxlG4","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":"jeHMRWCJmR0JoPVIhw2Hl","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":"_vEgvhSoECCpeWWwmF6UB","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":"iOCjJia640ZQxE-CvZ8W0","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":"NWWXhBc2OcscCaZYw0hsb","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":"OI6oXSvXvBJcuKoRx1xYC","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":"fIXBBVfuAs5LsHlwg18CV","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":"AqYJwhXDV--MK2DoPS0h_","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":"oqyKSe0dzrAPVjUNH6f2N","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":"3XOqhXZMfAmyG74HjpDmq","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":"CYg242CNn8pfeROcnXDqb","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":"JGCsgbPY6SKXg9mAhELgP","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":"oXlPaZjFpZ65YGdypUNd7","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":"cEtIOlQimXWtQsCffCN37","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":"u01syuYAvfQNO8O1MH-MZ","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"
pause and resume animation
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7lXFVUoBxtKMM4gHh4z8s","name":"animationspeed","brief":"","access":"public","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U72XGOFq_jD4jD5MFuSRh","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":"5r07uG-tqvGIkWN_-OT48","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":"myRGc1wBEXsiGiB5lFdei","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":"31Wpc3FvQj-spUtqSA3RG","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"l-AcBIOS1NETTA06Zsb1d","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ezUbvF2pJCx-UddulNxzj","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Vb1e1xWkx05ggATIZebP3","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rxghZUlgVGuu7PJOcJq2s","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GsSHV7p4npIUJ1VzBNPeY","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":"7FqG55g3qwmIwsxuoeEBX","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":"9Y4YGF_RQ2-AlcAgqrWUy","name":"height","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
height of the NineSliceSprite
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Gan4ZApnHWUl3BD5rsCUX","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":"2f3U4aMFd3QvEATzBqmcI","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":"T025qhmPHfulg30TIbcT_","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":"479GMjD7CoV1LB6y-QGLE","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":"kcjKKhIQc5zvinSe34siE","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":"y2707UW91BXME6uuW1G52","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":"o4vHmooUth5OxTFlCBpl7","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dZrGhwt8P8Yv_7UE_3hDA","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bd8suEYEy3xkGydNja7KE","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":"4y-eRmlk66Dj1J0KFTPz9","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bvPsC2pp_uBYIdAEVlwut","name":"offset","brief":"","access":"public","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":"Qmb6Bn1aBR2P5rm_KqR9y","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":"NcQ16u2X5zrcHpipJaQGC","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":"E0ypp_Tykbsb6IDZzB_ZH","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oUXMLst56Zm7Du9-lmBIZ","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rREebbguVK7_vBaeNciws","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":"Me8x7ZRTPRD08lCWuBwV3","name":"source","brief":"","access":"public","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kIfO5KaXrtX8mJT3-a9Ec","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":"F6pelWLyfI9R41apKbMKq","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7CwsOrWn9vFSuG4jR5w-R","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8NBcJpJMTpJvKgSHUSfXh","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":"a834cshZnT4IUoYbgR2jT","name":"width","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"width of the NineSliceSprite
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nwtm9Y4vNse9A2XZ5Vs12","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\ndefining 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":"5WSWh0uxMU2sQI6XnBgUR","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":"U_S199aBhSpE6HWRQFVvt","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":"hRVDdX9ewAJQb1I4GT-w7","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":"xRwrCM3ZYpMNMWUWIZgYU","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":"zb59T6k9WcrHiyT9BVdgk","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":"o-A8j6QMVkZgpIXw0jMsL","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":"4X-7MxhfBCIug6vOglDBY","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":"UffrBIOQw62I4D79YHxpr","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":"uRahJd4SP_m-Q1EITgmfr","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":"-6ghtIXcHjTDbtGfu25lW","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":"YXB2MqcO4HckH20_sYX10","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":"nBWFDgKACUJ7yXWPlvkWf","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":"B32xamOZ8ih48rVQLB81M","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":"WLELehXwMBFWcxqY5Bsb4","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":"sG7N4_UIZ52RSNC3PaOT7","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":"HdU0PPj6BNTtVAiwcTiRy","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":"-2TkaB5KLHX3PiQLB_H9Z","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":"xPPMytBA4BXiiqlsCyEMr","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":"OeNF7CbxzVF-fEhkMFa0-","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":"n162btkKi3yWKf7XmLsOH","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":"-HsGEN81hZRTq_CbBv6j-","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":"uof6RBLtUss4qc-4w5GE-","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":"ZBhWHlxYKmshnskoYxO5N","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KpNEZYsMQp97eERwffe-e","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":"0JlZ8EnDsTj9O1pO9YdnB","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":"-2Zy1jevsIZHXtxRn6AS4","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":"s1tRYL0cpQBgl2B4IebV-","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":"M1vc1QjEoTfmdYkP25cfR","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":"MIe8PWzLUbaYs6a8pjISp","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":"dr1KXm9czAtnj33MHEd-0","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":"juUnf1zh0jg1UhIyi1aEt","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":"J4W30ToD3jK52MtF_8Eev","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":"LCAwQzjWAbueUp5mKh_5p","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":"Ljc_OUSDszCX3pOsMp8mn","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":"dqdSI2o2lOavrePI4RcOG","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":"aOOX-MHdmhtyBWTbZuZ2A","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":"2Ke_oKfaNYX7v9_hMPLxn","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":"h6Nil7MuLJDE1DWA8-ctJ","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":"mZcqIlMa6iISXA-GvZf50","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":"2YVdrAS3JoGxl1DCiX2Kg","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":"hnVmkDjn7WizjlGPbZDjV","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":"-cDQ2SukiJ7J5wOpOYLxC","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":"mfQfqzI-o6MSK9zldenep","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":"pqHDvzbcVZhSsBXPt_Aw-","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":"R3eSfiAxRKZGkTYBiqbs6","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":"QWAzi0vXFICZcfBewaCYj","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":"WDV-4un8YgoLoc7zKlS8c","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":"dEd1LW3bDHwapVhtmWeXd","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":"VDCYK5sFcYPKsIva-ApXq","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":"qk3krdJDGF7NLCP2f5IG-","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":"LA2S8sLPu9k0NvH5g9zCU","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":"IrEeRsZjkG3ZYRBcrgKS6","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":"cNffHY44qmzXZ3Vjuc7L4","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":"fDiHoy-tGUuo9aiPCZIiF","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":"...arguments","optional":true,"variadic":true,"description":"arguments to be passed when instantiating/reinitializing the object
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"the instance of the requested object
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"GBX7p_stp66Z-I6z3Ljkl","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":"yTurfWO0ZTpKnkeg4P4yp","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":"AGvwiW1jcJXALMPDjK5Lr","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":"NHJecZF3zDbeQ2yxQkGh3","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":"p5JcUdjIxCqSY-wJ2Lpvz","name":"x","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"x value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PM3gGLLs-4rh9fCCBsyZT","name":"y","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"y value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aeuUxTLSjhGQaZl3B83gN","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":"JxPrLmPRehjGXGh4Avec6","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":"AK-yOWUAyow9N29IQ3WyH","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":"CmW5VAwhR5kZJZYhUFfqI","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":"a-tTC_j6BkSiK8kafrcDR","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":"9vuHQXTxQ54OzuvsC5tyc","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":"hydN_ASY9gIO4MRVIWsn5","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":"lPASG5GaAryB19GDiFYgD","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":"h_OyJp2mjkEUar9AQ2NVV","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":"WcckcDW8MLqa-SFv66BlW","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":"X_GKRZUrxgWkPzWrZehLG","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":"Y_OoFvH8jqWGtJA1Gtxed","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":"p9AqpDDk32ojfX0PstAel","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":"APoUnAN2SA1eEY1IzAw_l","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":"RdCQ8Zo8Y0V9hoeU_5I8U","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":"_9C9DPv4oZCNDgvcMsMxi","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":"ECvOmjDmEXSw_a3aJJyWN","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":"yEvkSrbkHrWT4KGxsL50X","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":"KS3UcosHwEO7I6yemf6tX","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":"Sv7HHM7AJeY-H2bqSWYPk","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":"T-2Rk4HFSxNgu4E4KU2tZ","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":"od14nG6zA745xxa8R9Gu8","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":"BV8ZqSfsVkjO7XnT_wgIl","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":"JZauAeq3VWUH3kSEk2HuP","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":"os-WWwcB7jYJjkCdgwu-a","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":"TQIEZcTPoF7VpyKqHqK-G","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":"NOGZvzlVI6EiJiPRtEAqR","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":"YvDhwX0uZStP8VffaM8eZ","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":"t07Ijz9Cr1oI7oM1ccHA6","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":"WO1J6TYPGwphhXLS45Mex","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":"tS5qfE3BNw2h8b3QdsWQR","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":"aCTaO6ERpk8w4fdQUzVyR","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":"5gyG7Ej4iNjoEzbo6jqe7","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":"fTOmYacwTVjrBwBdkQ4HR","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":"ijIOfBbWqeaLa0h59Ltpr","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":"1GlBxuWVl86DlmBNVVrdv","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":"rZbIA6iaewuprIukjL57C","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":"x3epUH6wQvPe2TpSO5t-1","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":"jn_v7wOvWL9IbEuNnDhPu","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":"ZxSgBZEeonlYc9rI5cXAJ","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":"T2VxradhS1rKuDnmoW5Vj","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":"ZG9GoLcbwVHLBm6-HQQ57","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":"0rbf6Tpmq42iet7ch2LtL","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":"_UwUrgRxRSSikd6glGO5e","name":"x","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"x value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pxnlfvITlF-qOawB_cIix","name":"y","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"y value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r3anKeBpwhLGFdO7g_kow","name":"z","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"z value of the vector
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AR-zZPVvJFHJQI-CQgTlU","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":"psrn7K6g-RMNWPmXdvprL","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":"SiPv3NxwFapvQq5pAbizR","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":"JR1Ek-tYawCnva0xwA2aJ","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":"V8qG1SNI3um4V-WcAHNar","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":"M1qZe-UnAXrJmySr8FeGf","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":"gVqtx-MFggh-lcyZtHqQ2","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":"tv3PD7NfzBmZpPjxEXLab","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":"GmNPCTtGyYIcaRTQ1fi_r","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":"n18-xcgwDJYQLu_vTddmk","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":"1p5Nbsiw5Hb34nc7hfrat","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":"s9Phre4U_eeKlRlPPNPbu","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":"XQWPpF7WqlikrLGuUqWr9","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":"NM94qnwH-SfwQckhFvv3f","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":"2CF8GWucF1oXDmnsO-NJ-","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":"lmulw3VSmA2XqO01g02Ab","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":"5s2B6FIIGiL7qVR87mLCM","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":"Eec9Xu4vHy_a7h1il6bF-","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":"Rp3IErh2z4ej2Uw5vCAmS","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":"Nvv4XD1cZDyYYkLF6ljIE","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":"ivXamlyI0ivq4Kbve1PYC","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":"AO-rYOLg7cEHjVwgSDetl","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":"DBqKNoRl9bEMbjGGUtbtc","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":"SLTcUjE-uAc3cZeg4QVcc","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":"GCPqr-4xf8nvOEN3wUEdH","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":"mBjv3F5bsDZ58w7wB_mBt","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":"EHDoxZYsMdbszNJvSBxW7","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":"W6ubsEiMartRJr0gfb6e0","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":"tUDe3XzV6sYctIBIXizJb","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":"-0etxoUjVkuyMq1z_BGYZ","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":"Jy9cqM6FOC4oFZpJWVQt2","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":"K2TfIhqrNorppQEePwn8O","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":"EnZvNtxMZ06lbBhn2RGZP","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":"GLUstx6sLGzpVutq4-MLp","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":"itJVCvvSFPEOtX3Nmb37q","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":"UvC5PzmcCELHdLTjKkqVX","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":"fczZ5pGwXNRiPBRdPOMAe","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":"CGQHFLj48qmx-5cWZ_qwC","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":"8Vi0azLZyg4fiXPyKzzQi","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":"TXo7zendL7F5DPZAlCG7N","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":"_RlVgrsReV55COpl9GkV5","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":"aImtW_pJ-wakd5GP_N1E6","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":"MPfl_FetbE9uiqb4tSO0m","name":"Particle","brief":"","type":"ClassDoc","description":"Single Particle Object.
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"UH_-OgeSPihAH4C8G3VGv","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":"BQgTfXyw9QxUOipx49fYC","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":"vkFTPZfCYu41LSKO2Id4E","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":"u5d87tDLjhY7Og1jmZLlp","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":"q4zhoGUl2c2jiSNMXRA23","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":"HuDOPyzd-czTFxz5HFUBT","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":"8JsGNTzRhP-dKzDHd3M5m","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":"ZU8fLvOxEUYLyM4YW1pbA","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nROTPiwsnivWD512sBaP0","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k8LbM3LS8KgYHSAvFvST2","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WFIJGrDKKKcFfsqkBk4PS","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L3qvlU7ZhchPy7hThBKpM","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5X3HDIdRGb8FAlZKv1LVf","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":"3B3ayIUemEIpPdS2A6cvj","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":"IeC7QUVpNCRutbTcR8iuV","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JyjZe4CI5KXTgTv4EeB26","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":"23zCFlDTWoHUEuz4NGqoa","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":"wsIGkrrj98bl9lG1koiGf","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":"Yq1X-BXCbMHOEQzwJhDOZ","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":"8yfFOR6tqHz39YawFf0ku","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":"1zL1txXAOQASIvTQ_oBSw","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":"bCwBoHfebAeJZ9e9SAq5O","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2x2GI6CG7QSofaF3OzUVA","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"R7DZWeq1afGotcgryuC12","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":"Li_YMrX3lN9DPxItCU1EK","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"39ryttx0m_elswnDqYdmI","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":"5VCj-GTrmiM_KpcwC86Uk","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":"aV9n6JXgNAkASu5pYr1-G","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XUGKZxIzAdW_9sZhJvDfV","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XgLKpvSHuc9iJsH0ZtMq7","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":"7LZ80yKGR8R0BUXuBvGSU","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":"bosCU4ec-_C-2FsLro54S","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MpXzNvlLKFfMxw_x18-28","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BVpNSBasb_PK3Qd8D7QId","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":"QSXWxPK-neQ2kr9RucCRE","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ab3SF564jAkBXySEo2BuP","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":"tf3A1SHUQGvmbffNTR4Jx","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":"1Sc9KlzMRP3kZRxRO-YXO","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":"_m8wRbLrFyHcQUL1NpQo1","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":"DWJG3FsJcZi-1BWMljS7L","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":"HhOset7mZyntMfy79jP9A","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":"meNiqHRXlN5SHWf7aJuC9","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":"ntnzMMJHOrAVwyWycuzKM","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":"fiqTOvsX4sO9hj_gkawQF","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":"t0ZZP-mBqoAiH3heKCGTw","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":"dC1XMf5Ioqd74KgJdI9R9","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":"o9iAyMZ09IcSJdjIq9-33","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":"Fd3QJ9axjoGzgFcjaaTmX","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":"6pbgsKOql8UJ4FfktMTGS","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":"SXsGNLLWVgqn-vyRimMzw","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":"DKmZaJ4bcXBfLSh3PE8uy","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":"B7ulQ29AD1cDqzbIxCLZs","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":"Fc81Z9WUIVudRiBGBrM0E","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":"YnwnyH3LZKo7rBdzFkNiT","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":"M5mGkLqmcLgNtBMb1P7P1","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nhnZyWJUwJ2_TuuyrcUf9","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":"cahX1E4fTHhdMV0N9wGVn","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":"dFCtE1T89sF-G9F4zIhBQ","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":"c7jUYxr3kxyEmQwiJykwe","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":"LwxKse9Q4GdPkwDi5U0wu","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":"A8WrjCSpN5X0GjcD7LRr1","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":"QTINgbjOB5muuUYMACqd-","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":"luobf4SIwyM4uedS4ssx4","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":"if920oByYy9n0vgB0wbTk","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":"NSD50Mhy1aDmfWrBN1RhW","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":"THCUH7CwG3yONW626ZUQ5","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":"-JScKLlU206crJqqqBVYW","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":"1QPkPoi8Vm1HaCkaA7-8g","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":"2kcZUDnC_hgYjkqk9KJ37","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":"L38jIWP6lpGa_P1u0BAD6","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":"PhF3hhJDp9B3m6RJY76kx","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":"oMu6Xi2asxfsBxr43uUpM","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":"KFjxIlyQWN7cuPHHmrq06","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":"QoL4OszhYqCyWL0fuIaBg","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":"Q3oPnCez2dT3yf6asj2nu","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":"kdBbPBarC_m4ZAKdDV-l7","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":"Nsbp4WdKjHr-6RAfGrCBU","name":"ParticleEmitter","brief":"","type":"ClassDoc","description":"Particle Emitter Object.
","params":[],"returns":[],"extends":["Container"],"implements":[],"members":[{"id":"6_is8scdAi5u-wXhDMuZp","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":"96SdD6xqSMgX2SoRj8g35","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":"4HCQYAO0nSeEqqLaywjH8","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":"w5rRrGPzZqV4k2BMcYUS8","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":"Mmsx0NoPISUpvhZEirhHv","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":"B1uO7csq13QKV-iU8gKRH","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":"9UCnHFPBsyP9GA4CFgdew","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":"wu3AG2FKY4V7-fB9IBoiX","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":"Esb8z0Hfk1_ciwgk6gI-6","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":"wQVGXrTrJHovLwv5_Q2kR","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":"ifGw3eLJ-P5D42tZib-EC","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6ZqL9JrFAhwEHSix7onfG","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c4dw4z48EPpNh7bh__Xrx","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GloPfUgrbN6ffUy5oysEt","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":"CJyUfci7dR2YPt2Hh8Chd","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GAP8Pc6f8rblvaa5mAB8i","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cSz4QinRb6pdoV2BPQ3RT","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":"ZQFF_PH-Vn0eyEBKpCr2k","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":"Xd2fAV_XP3jkp6aTHexFc","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":"Tv-Q1vG9w8jrXuiFhBvl3","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PonjngwnR2aRmIT4wIrcD","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":"b3QN49UnSTuefAd3lcntm","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":"aCLHhxww8Q_PZbiG9AGz3","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":"JmwKMZOgSusSIlWLcmoE2","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":"fta2nKu9MyHI2XLsfgapD","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":"C1QqkWt8i2yOecvqRQsMu","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":"Cf7xNkyyEf9SlCQ6Fi6o6","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_7nVPQDYDBUIfWlR-2CVu","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z8rbTi8cjuk0dUJPzSqj-","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":"x1A6No7dsmVw8-YvqLeey","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aAxhJEDOLbKC0qwS22MEI","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":"zdbl4an66hGv9Cxg63qPm","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":"4u4CKYNBK5N70qA6QkbFK","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6I4pdwjo1-GxabA_Dlbfi","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Yz1049LGXKkB9ZQ-07Bd8","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"whether the container is the root of the scene
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bjkGXNc3hBkYoKx1j-cGR","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the current (active) emitter settings
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TeVbUwYLJK6WnQUIkq16n","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":"roTajiJcoxOU-dVGsqYnB","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":"FiFTil11hRsFAPK0A2piG","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":"pyZRARtUBpT2D9yNyvVqo","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_g3o9U3fGavF-VPj2jlI0","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-k_iQI5IEHUGIo6bucrgT","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":"gDhNqABga822o9PsQUgHi","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DIfj4pFuytISbwmYvYEIB","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":"I8Dyn8MLw5UY3PA4C7qON","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":"hBbP5XlVmavEjwxDKO1mJ","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":"uySGfc8Zrx63ebvuet7NS","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":"fBoEYdTjt1QCN_gR-EoGA","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":"MF8j0Q9zSv3wsB3qtAV9c","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":"H4B4Cu8gkUuQwu4xyCr6h","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":"7YgEJaQSML2l4N8AhjcV3","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":"PM3RPXEJ9_CNWWjNItny1","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":"ZIZw03VjK-JVJiU4NPB_1","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":"fwWZFhIDDFLiRzxI3kGh_","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":"CrcjrzJkqtxWH2xr0w10H","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":"SEn00uBi5cdXsLevc70Co","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":"7CWgD9WID_SiJvo9LF-2J","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":"OnC35W3FmBN590PdXZuOi","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":"deQr5HeJuOzOcU8mlwhsY","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":"kS49k2NcXstHN1CAUgylV","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":"ogNJUKg9dhyG8WRhVKGcw","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":"m_r8R1TjlkBinNbqZV_ZZ","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":"7aoQDvTvfEw-WuBd3_REj","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":"e9IXf9CWJgR94G20vxrRq","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":"3E8kc6e-IXIRSKRPKTGe8","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":"y4-j0W9vjfyqzo3bhGqKn","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":"TwS0q8EzZ1M3MhpE8coHo","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":"ImkC6WxxPe4zozue1yv0G","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":"wHIjaHBw78RCdJdvOQWuP","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":"A6R5yQZU-u_BDUQ_MAgmN","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":"C4zbPi5U15fxdUGuY1QN3","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":"7UcvyDjDY_ighNmVoiN3X","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":"OBvZ7WwnLjNnAYKBbrEdP","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":"hRFrnnU1gJ5voo0R_zDEd","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":"PzATCIJuXooc6qUGqPU7o","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":"mxWMFg9E57uFzNHwgidZr","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":"dcwOujrgXd-ZJzdgmYO9t","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":"kSXAOJWQnzam1S6FXEdag","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":"RGU4boq1PiiEdKEXOfKTg","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":"Qu9NG-GTgBFyQ5G10qB5W","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":"dDz3yvk10TcbefIF9eYY3","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":"YcEdFxFWcJlXLAF6-P90B","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":"cm-CLdiqq-g0IBqHP215P","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":"qsikdPY62tOvHb_gJnkZg","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":"mbrkweuDIGAFHAS57DjdQ","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DxrLIS4Pv2lCzCuPOuUsU","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":"OXaFaVc2riMfjOOP4KHax","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":"WLpnhOZI_uC6tFbRasnaZ","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":"xYEzqq0P3MusinfqAbO-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":"SO6IBAOqLDzSL2PB8BJhI","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":"ji76WFZgG5ojHj8hy_biu","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":"wr4KyfVMQK4z2vcq2t2BK","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":"AHvSSIobxooP2DPVF61Cv","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":"fdOJ3oAMMUVJEcW6wlQi4","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":"UaJ1D7RCUY2HA-AfH04gP","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":"8Qa8KLgY8jaaTYw_KBjQD","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":"WJidowdDoWr0Dmnx2x2Rw","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":"ilHCWNpmAAfEG2YzIiGaX","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":"7uPf9bn03zQeQnLMk7k5s","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":"73Mf6_gODeiITBkRGON6z","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":"UvO4xKWGKmdI1fwFu0-u8","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":"TnrhMTOb31Mh_3ZrafeJz","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":"GPPp1CHp44XeJ0NwCQcxZ","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":"jdmRFqKy3aor63628QndP","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":"wdHoy0w5GTOb7P95lnFbO","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":"2tbnrZw695mXQd8o1Svwa","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":"E0WnnbwTE3hYVpSN5wuYM","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":"weCjg-lHuhjijpdGg_h8Y","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":"UM3PAKDBGYYO9uvdue0o4","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":"bNccxLsEVZCE1zMyi7a7J","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":"Dvw_-Zq3hKPmqWceCL2jj","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":"_knoU8GjAn98zFedJ3BIs","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":"CEtegUnz1PBh5ytB7-sm6","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":"o5Q6Xyy-nLqqEudS_RnVH","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":"oCHil_gj5xbkLgCfPinBq","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":"RYYD0aUSUrN-WdgQ6rMWS","name":"Path2D","brief":"","type":"ClassDoc","description":"a simplified path2d implementation, supporting only one path
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"gNgAqaYSsUbpmE56I0cXe","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":"aVBUfB-GLks1jmezJrbvo","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"the points defining the current path
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"q8zkZ3ImBacs01_-1NjA0","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":"2OPxzgbvgrHhGlJ0nnsG6","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":"0hc0JYW8hqY5EGM8Ds37n","name":"beginPath","brief":"begin a new path
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ow37ZvLm6hudW7m0Cv0cq","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":"6czjg6P6ev3bmVy12dRBd","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":"ErYuHjlwanVxigVTjDvv-","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":"JGLkMpTxThyXFt27rHYsy","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":"etk8m6fuCRMvESpf__R3t","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":"jlDb1eSj75KCqltbFmhgP","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":"-VFCyGsjR_GnxO9StxOPT","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":"ydcCtqTpoXQ-IawSDIbQQ","name":"Point","brief":"","type":"ClassDoc","description":"represents a point in a 2d space
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"n-_KVQXAd7-rUURuGTqNo","name":"type","brief":"","defaultValue":"\"Point\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P5sJrjNbXoiO97RsQSMcs","name":"x","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"the position of the point on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VDZ-y6zP5FXMRCeZoCq9l","name":"y","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"the position of the point on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VDDaJj-1XWePmN_k_Lcop","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":"YEznJq5vBhMXoO5g7SahP","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"return true if this point is equal to the given point
","params":[{"identifier":"x","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":"G5GI8LM2Jli7_byB3gKpD","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":"tHWzwuKEN-VlWTJMVLcaE","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":"6CiL3_dl6chLciGndVc9R","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-GBh3hKapb2XvPqrHhMqr","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":"Z2ZipSNlmHbZ199Uw0dr2","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"return the center position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-QAMb9JjsBalD7cf1a_6w","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the x axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kJ2edU6kl1uxLT9rsLKzq","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the y axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IyPhewR4CF9ksgAoSWVt-","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":"mZo_YvQm9vXboeltlWUgQ","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":"9ED2uivA0rzSoH551OvmZ","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":"NIr-pTSFcMHd2FLGgE0uK","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":"2rfIWYszpDUCQyhFionJi","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":"e5bzfa7NoxLnN1PY3nFE0","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":"W7lRr7vA5o27XD0KKQxGw","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":"8gFfonusBIHtZt93D3Et5","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":"UKRXkp5ZzBAyX2uAU8GKw","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":"lpzDXM2_v6rECGMy08YVt","name":"gameScreenX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event X coordinate relative to the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qjH8x9O8rhmY-Izjr-gpu","name":"gameScreenY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event Y coordinate relative to the viewport
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xWju1lJ_mKynkcbZbOmyl","name":"gameWorldX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event X coordinate relative to the map
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WFfly7e7HTcvdDFHVkVIu","name":"gameWorldY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Event Y coordinate relative to the map
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kY3YDinSp0YdjAOLRxa5c","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":"vvZsH21AevK0t0KlJvGQi","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":"fvnBQQy5d_5UhUm34aFI8","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TS7wZXqpHUCJsKS0lUfVr","name":"isNormalized","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if not originally a pointer event
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7YcoPT5HKJ8pLpBYQQxQY","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":"CwaXxAp_2SfbhW4YFiFjV","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N-SsvEa-FIKrELChnRYie","name":"LEFT","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"constant for left button
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jTVYw8HR3gD0TBZ8i3Mbf","name":"locked","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if the pointer is currently locked
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yGTkgABBSy44nPiOrU0RD","name":"MIDDLE","brief":"","access":"public","defaultValue":"1","scope":"instance","type":"PropertyDoc","description":"constant for middle button
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FCcU4lePly0ymKL7FYd6O","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":"UAehF4Flg6qUg9mxNtiIl","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":"WZdVUeqRvyQ8MKzWxjfQc","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":"kQ-3kmOZDBSJckCehqYXz","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":"jYdjBuq-VSjo8IU6W5xKQ","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":"ns8OvsT6iq-eZP9hAXzYx","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NPau6T8PxIp_FUckKU6MX","name":"RIGHT","brief":"","access":"public","defaultValue":"2","scope":"instance","type":"PropertyDoc","description":"constant for right button
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sVrECtvVu6roc_dc4ZZUo","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"akCfxgTIv1PRORqpNIp9L","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":"eXC6DIKiGEW_jFnEfZxMT","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gA0ZrZpDE5HgPmhP-Cojy","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"x position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jwa6kNwzCfB3HY-tbZg-o","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"y position of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TawwU7nbKQ9bXhJjTb9U-","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":"mojm-S4bIK0TlnQ3PdcbV","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":"liGLOYZ9d69UoKNr4pwcf","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":"00-nlG3MHhRTwuoqQwU9y","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":"2rFHu0UXIGwccSpGahdXc","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":"iujboEhdGt1Zuy6Rw_3MA","name":"clear","brief":"reset the bound
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MDAA5nsSC2xMU0U0ZfTTm","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":"I_DLG9VrAi4RwsXqWE0zL","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":"XYU0X9qUwatba3pKYXMav","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":"zFEVElTPqDhCNorgXDjUp","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":"O0w9cZcDPu6QcuGbq4Bc-","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":"DDXjv45FxPYNgPW638QAc","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":"TUJMJ4qUm5_IjMguMqHGR","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":"F5bnNunwVKyM1oN-2ydj4","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":"dDcQ9zG5VZm53OAnycp44","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":"9zynQ5mFsyMS4lPUZ-kxS","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":"XAXt8d3KvEGScCp1co3Cn","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":"PI2nu4t_HlZ40XlNkzNNc","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":"BFq7BQknfwZr6A4f5RKOh","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"
origin point of the Polygon
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TGz1iXdDfyN8TaJZKEL2e","name":"type","brief":"","defaultValue":"\"Polygon\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gSIlrYOpIEh2PiIqTvE_b","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":"Zqaf2hOoWbnThQcYnb0JY","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":"NBmvvCgGH3hz4qEVLR5-1","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","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":"6EOGhX2CTEjxkhh850nsg","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":"b4_smpZmOpFE5jg5qdJ74","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":"nWs82W3tLIeq7mcWO2IdU","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":"qGb1kwnZ0O9Uab8F-YG-M","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":"6Db4uz6Yz9ksuLpMeqO1K","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":"Aamc6w5RXHSPGxuWSYEWT","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":"0_NiTXpi8oextLqrxfld8","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":"a_QYOvl5gyCIZT9AyXil8","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":"98qFCsM8uQnnhj8GRdkdz","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":"jsVBAuMBcSaHm92WeSwYK","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":"2k2PFQS-9pxOfMM4tqudP","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":"y1aNoy9Qoo5Vg3Rn9WzlZ","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":"j4rtJZ5D-Ztd3z_tXfpvi","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":"RjekSlkzpN62NJXZWXWfn","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":"qg5R2e63fAkCFHAVFy_lj","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":"VXvvPJz2-jIHOL5-FtOQH","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":"TXzWeYhwr4ScLDHajcOus","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"
an array of vertex attribute properties
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s_c14Aoct6rVIfnS4fUoQ","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the shader currently used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6zPb2M64hOr3G1dvetg_c","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the default shader created by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"x6nYsF2kaoJD8F5Jl1v64","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":"mjqM5D9GEBl3LtwVlbiql","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":"MV-ZFswrSKW_IGfT3b2Mf","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"the vertex data buffer used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bMCNjGtBEpKuSG-KSZwcC","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":"17rEQz4rXpEXKFXKKYYU2","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":"QAZrHmBVWtZUDDOkz1CP1","name":"bind","brief":"called by the WebGL renderer when a compositor become the current one
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XsohNSErs8BPBuGwJcSZf","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"3_4QrdCZ_cQlO6eavg7v_","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":"umINyOq_u8e6HURz4qzN1","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":"YKpO0r59Nsc_1MRWUQ4aF","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":"TIGZ9EuzWsm6dTf2dluaN","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":"KyGqayVRLLJFa36rcATUQ","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":"mKEhk15NmZwebBY-j5e3-","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"
an array of vertex attribute properties
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VGQoaT3Y2pjcwRX8ui1sl","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the shader currently used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rkwRgtchQrUW_2Tv-fsj2","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"the default shader created by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zfmPiCnbd_XFLmuand1vT","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":"vlpKVQ0wjntL5nZYDerjr","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":"h6QJNAAZysOcWPm8O7Zi3","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"the vertex data buffer used by this compositor
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P-lgXll3NKaTzczNZ1R9d","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":"QssmdmunQNq5ziQVEMCfP","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":"OepoqujVPhdU3LRWR6oty","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"}}],"returns":[],"extends":[],"implements":[]},{"id":"lwYUnR9ipm9BTOSBFsezT","name":"bind","brief":"called by the WebGL renderer when a compositor become the current one
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_P0kZFzVOerSrHRn6T-up","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":"woOpKlSuq-BoPLrgTAM0g","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"_mqbKcuGh2lG3VvlfBvds","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":"popYFzhGfQW0vLFTZgMB-","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":"uCk54ObKrhODIXFdMdJi5","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":"4lorWAHsumM1Q2dnqDmX9","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":"lfQso7RS0DVYRfThyGYV5","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":"F8xWSR52z8kV5suiGOD2Z","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":"q7E7SqWZ98HlwrsRb6ArR","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":"damS9IdH7B96SaegacQd7","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":"7OC_e2oRFuoZPs6C0fTP3","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":"E0E-SZ3tNWvgSpMVkItgg","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":"fkyXCk-n0jhb3x_fmc0t6","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":"G-oLDR8D1-P9uQuepajRI","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":"Ncx8L9bucYogu0nF8Nm1e","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":"R2DK_fuf71MlwVBYzry_j","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":"G68KDQVKhE5gDNhCoUInG","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":"YwtFRiku9NKNyeTd2YXdx","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":"_wWQdzbXJ709oQ8vKAGBP","name":"Rect","brief":"","type":"ClassDoc","description":"a rectangle Object
","params":[],"returns":[],"extends":["Polygon"],"implements":[],"members":[{"id":"ZO3yZh4YNZCN18RO0h3x8","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bR5HutVdgvTylfieVOLzb","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jhn6-48yJ3i7jBew1IJ2D","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"68w0ph7xl4eQ_Bxa21kJf","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9C5OkGP7qxbr81xpd9Qcx","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cMf7RBOoCx_uKNS5lEF6-","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":"3i0jqIx17ZY3nCN3vDoaT","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"
origin point of the Polygon
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pyKCOE9TKsSApqW0Q66Oe","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XgWuSj86QgQdzl5NL72we","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XKM2ZLTXCGvpSpRCYu1aA","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SkKM6UWns8-s8NLVCi1u7","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sQYlwZ-gEHVmoHKLi8wGC","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":"zN8bHmLXBrh9vElWDB2N7","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":"DzNC-pPVx9LG97Fti03a_","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":"zq4Z_H82TNrbmsgDH0pwi","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":"PEcq0w6-mE43gZxl9hJ5u","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":"q6JQEXael_yQtEEkPW38d","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":"olAjae6DMQBoxM3zD6JVB","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":"3LPdIvkYnblGUmoe2EakL","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":"L4ltcsEdq8A4iXGiQ6_tv","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":"6vTX9uR3_iERKe-Je9f5e","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":"V5hISWZChWSYbS__EInm9","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":"Yy38DS68wAQzs8ym4W9s2","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":"aw-7wTo6lpNg16A6RFyfr","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":"KIJn5uMmulsql-2JbPVuQ","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":"WSXQzk5Z4xtQ5pYi9QLz-","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":"9iZti1hOiQHBlq693Kgjj","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":"9V8gCKg0HYLF3C28NUo88","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":"oLJk5GW2Gd9cHFDV0jsIY","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":"Y3Cza5hWiaOcu0ElLap4n","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":"V3Y1uWJmo-KU52geZ1sPy","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":"lcKlxOUKnSp_2h-wxq_1o","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":"G8I9drX1sUDhN4YRyTNoh","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":"dUpa7kQz1P2zueIz-lxaB","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":"8AWS_gklz7_Hc3ma8-uKR","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":"IM261-llE3JxMITFMpDyl","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":"Le6H76Y9E0B8K5LHl0P1T","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":"xi_UARge3byeIcIarLZxk","name":"Renderable","brief":"","type":"ClassDoc","description":"A base class for renderable objects.
","params":[],"returns":[],"extends":["Rect"],"implements":[],"members":[{"id":"kT5AbGkliyTqi5I-jRHq6","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":"PZrk4vHZz665qtaGt1MII","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":"z0YYf3QZ3ngr_a04f3-0g","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":"3L7xfiorzW8m_1Gzj17xz","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":"9hKxDo1sJiKr6erYAotle","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":"W2pN1LYpTm6RzTmtNCLgw","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":"zgcM-851MLn_mxu1wVevK","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":"nGg41A7_OAsayGlglphZ8","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cEb7s8ND-7zrWQfaD7Jax","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"omHEqPjsmzZZS5z0MxXTL","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3Pl9L6dNCMSSLgJOO3C5O","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a-RkFnH3LpoJw8GnoDPbX","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OgNHCzC33WsXxcrqfLgAi","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":"xAiMqtNClLN-rosD52WyI","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":"9ibiJkNAC1mYHu4DQzyv4","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RhTwRCUOUQXa8Fyhem2nS","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":"VJYxlGYuuqjHZD2onywCb","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":"0SBxCYbieC6EFbWN_9rO5","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":"e5K4qCa46dRWR5BsjD5zs","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":"aCm0P14dlhUoX6LRRy5VX","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":"mwrJpKsk01yowIVUFpH95","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":"HIf4YB_EfGUHP_zYKeelN","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GAdruO661vnhuIAsc5l05","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UMXLjysZ30KgbWUUwE671","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":"3Hcr_pbBlZEWZeFtKyPj4","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LKyWm_aLRwH3zAAnjiDMs","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":"yOrSsSM-zggvkHoNOgAa1","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":"qx5FVad8r0y-BNirp4Wg4","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"A39N7XxURGwJwJmcIbk3m","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yE-Yz_w0-ADXSX6D-9J15","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":"VpW7UTa4yxQBxbk4buPpY","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":"LUVWhNSmbA0GOtx6q6HSw","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b0bPxvNJe2QCXTf4e4FxY","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jQiVHKK7KPPq44s4F_WRE","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":"vrPUJfuc7NewvDZtw-ndp","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eEUi9prw0MLI7hNP9RwAM","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":"bDNzMV3a1h3UkmtUOOnE2","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":"h-nkezCMXs4xU5R3WDsjz","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":"rG30LV3Qa630C7rmgyZca","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":"QkNRgNYMjfnmzIxYbXUGA","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":"Q08bsoBehIyENEOn2N6Vh","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":"kY2Fk9EXq1xGU5i-QA1a7","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":"K9JBKYgNs1mhwRbmdLA5D","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":"qWRZCeAa0Naq88Hmt00Kk","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":"8gn6norowClJ7kBDygidn","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":"hqdJaewwfbMEJ6W0vRnyp","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":"0np0I-e1E00_iWgsg0wlK","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":"tr27wp7KlWqORm1qtmo8M","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":"SPtjUg4W8RpdbDW1cOBTT","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":"RWi0fXOwbulm28lYM9RSY","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":"bqFTmOdSyFPbPd0E2ZWfV","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":"UA6sFoGd4Ia5HJTp-fNnK","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":"QWiW4wZ2uUiNkc2VddX0o","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":"AmvWPYc_RaLW4bQv0_9u4","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":"623QGfTyPNyaPlWT4rATd","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Bvu-cNGvfw4UhGNUfD7_s","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":"ePwO-T69-3gSaU_WOFMH6","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":"C_Lzr8vzmxEaSPXVbbhg7","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":"LLKL4KP4UfGheFzZzYXxE","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":"ZkTXg9i2Z056gO7BENC_L","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":"Jhkp46iIITmEhwi-yFpeI","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":"S3rf2X1d-luMi1eLyaksf","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":"iCcHqzIuQiKpw3dZs7Jz1","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":"-hCULpdAePJ74wb7HT0Tu","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":"4gDhoZB7lT1cborZKCUlM","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":"UZz7Sj16ZTkB56sOCjVsu","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":"tkfLlVKlXFNrWYS7WP7nj","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":"GJMaHhBGkgewdka0l3-Ol","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":"fTDlfWhr0p5mRE5NBGuW2","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":"t9z5lvUgBMS50zn8Qxf9i","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":"jMZvLnMcWdy0ejCvd_li2","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":"locANM3HthOcos-3Ij-wp","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":"Nvuy7KTqZEanWE93sdAcN","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":"cpGK5qFsYwwLmgXCM2Q3o","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":"XwteyI3GSnF_qwIh9JxNB","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":"bmC4MM2zRepUcM3Z3EpFl","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":"LF74cgY9bQWhPvU8Y2e75","name":"Renderer","brief":"","type":"ClassDoc","description":"a base renderer object
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"xIXTJf1R4w--Es4bAREol","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":"IPGeGCrB8yreZuspK-oSk","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"DsKKdyJdQuQaM69YrQizh","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"the default method to sort object ("sorting", "z-buffer")
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"99_R2vd8sF2vAU6FmfSr2","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"the requested video size ratio
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0-kTvrf3w1-2sB_MUU1lB","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"true if the current rendering context is valid
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fSmVhx-_qQGMloQ61AZBp","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"The Path2D instance used by the renderer to draw primitives
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qq7TRAc9amsodFJC3KAsj","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":"NshnMvJ-jeqIUoXnrp4eI","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The given constructor options
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ea5qUe4axLAifwyli7MRx","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":"d6es52eRVjgaq1w4ZlBBQ","name":"clear","brief":"
prepare the framebuffer for drawing a new frame
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fBRvsFoA3hf4Pj3uktG2p","name":"clearMask","brief":"","scope":"instance","see":["Renderer#setMask"],"type":"MethodDoc","description":"disable (remove) the rendering mask set through setMask.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zgWAeN7OcBmNEdV1Q7vKQ","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"clear the rendering tint set through setTint.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F5i5aS79ep-g7LcNknLFa","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":"zYkLHyRmFdPx2BUcysN5E","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":"efDhftm6dqk_0j1-_ji34","name":"flush","brief":"render the main framebuffer on screen
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2D4ZfteqAOZ94ExMdqFSH","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":"yOCYgQj_tH1E0O-qttGTe","name":"getCanvas","brief":"","scope":"instance","type":"MethodDoc","description":"return a reference to the canvas which this renderer draws to
","params":[],"returns":[{"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZkOQY_Zturb57FNeq-sdD","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":"02mVjge7IzFJ9SqGo86KQ","name":"getContext","brief":"","scope":"instance","type":"MethodDoc","description":"return a reference to this renderer canvas 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":"-6KL338yfAr8F4NOMWuDJ","name":"getContext2d","brief":"","scope":"instance","type":"MethodDoc","description":"Returns the 2D Context object of the given Canvas \nAlso configures anti-aliasing and blend modes based on constructor o...","params":[{"identifier":"canvas","optional":false,"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}},{"identifier":"transparent","optional":true,"default":"true","description":"
use false to disable transparency
","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"p9UgArC2rDJxPbt2xMQf5","name":"getHeight","brief":"","scope":"instance","type":"MethodDoc","description":"return the height of the system Canvas
","params":[],"returns":[{"description":"height of the system Canvas
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-8LsOyCoNx6MiINr-oiNB","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":"BWUFWhq-7elzmMZbf_rIB","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":"tMMHLGFtZZvPpAn8zzKYE","name":"getWidth","brief":"","scope":"instance","type":"MethodDoc","description":"
return the width of the system Canvas
","params":[],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Pzs7Yygd_FMl89ULLiIv-","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":"r4JNTQdmZ_U3iqkcLFkdu","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":"_a9nQ_Iajz-kz7INUejco","name":"reset","brief":"Reset context state
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PBkMN-DWgiYVuSwqEAIEv","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":"KSYteN6GNVkcJt_v7dep5","name":"setAntiAlias","brief":"","scope":"instance","type":"MethodDoc","description":"enable/disable image smoothing (scaling interpolation) for the given context
","params":[{"identifier":"context","optional":false,"dataType":{"tokens":[{"value":"CanvasRenderingContext2D","kind":"canonical"},{"value":"CanvasRenderingContext2D","kind":"canonical"}],"template":"%1"}},{"identifier":"enable","optional":true,"default":"false","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"m_DyaH2dnFEdFDTEMrwPi","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":"WKq1OTAnXDVpTh4K_guRD","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":"vVhCeFHLaPnoAuFlWYDhV","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":"HAmNRtncT5kgcjSnqRHwE","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":"0gr3Kq9XzE8voF3KFU2yB","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 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":"ROCHqdAzoZ__C3AoqlkMy","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":"options","optional":true,"description":"An object with the following properties:
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options.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":"ssWD6rC0qBO42nLkpRit5","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":"options","optional":true,"description":"An object with the following properties:
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options.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":"YIvnqtcP1Bwwg6-iGbM9k","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":"options","optional":true,"description":"An object with the following properties:
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.type","optional":true,"default":"\"image/png\"","description":"A string indicating the image format
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options.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":"dB02gysCoX70XiRTwkDHA","name":"ResponseObject","brief":"","access":"public","type":"ClassDoc","description":"An object representing the result of an intersection.
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"K-_SJpB8QVUVTW1WKAvKl","name":"a","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The first object participating in the intersection
"},{"id":"XC0Tjm08DGNGaVRoQGjkQ","name":"aInB","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Whether the first object is entirely inside the second
"},{"id":"ZbGX420Hj7-bgh1Q28-it","name":"b","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The second object participating in the intersection
"},{"id":"SfDaXBQWEQslEZxKlkix4","name":"bInA","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Whether the second object is entirely inside the first
"},{"id":"WQjEplOypHnVkoz9ITrPz","name":"indexShapeA","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The index of the colliding shape for the object a body
"},{"id":"f80bNVVEL19c2e0uYH7-Y","name":"indexShapeB","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The index of the colliding shape for the object b body
"},{"id":"jfoVs-tExR_WTZfuLO_fQ","name":"overlap","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"Magnitude of the overlap on the shortest colliding axis
"},{"id":"YgwzOYRZK8BoUunEgclDx","name":"overlapN","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The shortest colliding axis (unit-vector)
"},{"id":"0BnZl_2sXKhdZ1Xn662_1","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":"eeT_kT5m6flz2occcWEgS","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":"gKegxmNOlKHHckTBHzzQK","name":"RoundRect","brief":"","type":"ClassDoc","description":"a rectangle object with rounded corners
","params":[],"returns":[],"extends":["Rect"],"implements":[],"members":[{"id":"AwrSmeVVD1Qce3UTe0Kv_","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IisHG0wZTgRQAq1366VqP","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"90DJOAXZj0wSywNXuq0S8","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YX9c6jGo6aNQSNVGn437g","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZtGyWaoTWlWywGMbJIn6I","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SNMJjcRcMUmW9Tqgjdncn","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":"uzLFv2Sit5-a56YYxd1Pf","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"
origin point of the Polygon
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zbYluCG_Wepl4UkAiTpoe","name":"radius","brief":"","defaultValue":"20","scope":"instance","type":"PropertyDoc","description":"the radius of the rounded corner
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Op1tkSIq65b04M_tuNQ01","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2mgnyT0Lay2ChepbJhs9l","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wMxfP_VB43Zn9OVPWVLwE","name":"type","brief":"","defaultValue":"\"RoundRect\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qluKV3Qqbhu8SKNfa-OTt","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4sR0WDh3k2woSiSZGBkiD","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":"qeXDDmzqN9RY6skjuu644","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":"ul_JwPSqo_GQHWL3wvr9Q","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":"8yFUY5_rAdsyNM7aVI-SJ","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":"qXFWtBd8Gzn0Vd7W4n1Le","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":"VJxFQCWL2BB99HIIpdKp4","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":"19oCVyM19Oaje-Wfa8-Ce","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":"ew81qLA99gf8ldmK0K2rL","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":"aVrmcFibLbfIKDmnHmYnb","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":"aoiSfCZVktp3X6j3aB71d","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":"omEHDh1mL07bzDGQTAEQb","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":"NQHQ7NH8srOcyIB2iFPGy","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":"l-olWKc40k0hVJYPBPIrc","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":"xqWFRddyIV7KF1R6iqjd-","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":"ePR_5foVsf4vQziVZDwsa","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":"6LKnsIPgy4ce-8W6dd_0z","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":"pD8nsDA7onytlRXmHccpR","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":"Cica9JNihsz8jjIZRtvIk","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":"S7wK83TUxywUXvqaRgtMh","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":"_WgHZWfLplt4Ons4mzNMG","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":"19Uba1udqVF7-a7vqVckW","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":"ZS7ChE8-fUT5iZy4q68oL","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":"SzbzZSVjWgWCFQYhrnIDi","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":"m66MgciTPQpLG6c6oOhHO","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":"6mhYXwkHiU_ztLyy5tw0O","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":"reDg3DtaK2AjMYQjm1pLk","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":"dhz8rUVIt5qLJ3HbgUUHr","name":"Sprite","brief":"","type":"ClassDoc","description":"An object to display a fixed or animated sprite on screen.
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"lPjFdghYcX-GM8qfSzp1c","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":"vIZTthGSCEnoqZFjn3OzZ","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":"azw40PvPdtqvl9WiCbSKJ","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":"sgZoDierkRvlo8Yv1t9tl","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":"GJmdT0HmqHi7cP8iS2ufQ","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"
pause and resume animation
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"95Cwl_k3hjlMSb6wnmMqi","name":"animationspeed","brief":"","access":"public","defaultValue":"100","scope":"instance","type":"PropertyDoc","description":"animation cycling speed (delay between frame in ms)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p1K7YwSd0OLGN2LDMzSkb","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":"apuviS9GU55b66oOkXU86","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":"nAw_2YwCW6wtLeRhgdW2l","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":"ODdo-H1VCPZC5mJ0OvmhT","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u6jueHPlhtMYUj2ihGHA7","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_DRFJVHJ1kPwzH9PZtCy0","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pmC_wMafaqEy5eVyG1WaW","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wZldnYze8pqHgpCbjedE7","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"l-6EGIjdRn8tt9PV1O597","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":"gPlhTu9Yl1Ty1RpsqEfUx","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":"9-2N8F0MTlaOaK9lZnE2O","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HIsA-wN78u0aJPubQvsF0","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":"mN8ep4uNTrpQpamBvmsgx","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":"QEhDX3MOo2JvpGSJ66Mso","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":"r0roIA3oxfZujOWn_CWua","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":"speVapnYdUEVB4d5QT2ai","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":"ZEsUsutt_TbltWinfs0lV","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":"bnhy8cmrq_f2YBznKSJJk","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JPnmPi_K4e-PCMmhteL8o","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pUAgtwbvoX2WdCVKqfWfk","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":"135jrrFQadahHo5bmg0GZ","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pN2JWsT9nbL-xpsJNA-EZ","name":"offset","brief":"","access":"public","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":"e4GYmL8tAJDk7RLAV4LHA","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":"Xo1JaRG68ViY_j3lZRgvZ","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":"5SzA4wO3uw9v_ixNCyuUs","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HlaBI_IC3pfEPXj5kfOgM","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"69YmaicFgfvhgeWIqUhyR","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":"J28U8UAYuBfQT32OUlT19","name":"source","brief":"","access":"public","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"
The source texture object this sprite object is using
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VMIOCO1JETpB5QHKA_OlU","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":"Qgdax0i-ziI9035sGygpV","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-F_UphiCO8KFcZbkbm2In","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AwqG5lCH3FefCYBUXzuDq","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":"IR7V8DgN9s4EbrvdtqCme","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rLcszADNeAaDY2I0Usaub","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\ndefining 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":"qMGtQvRuQf33fTyrmef5v","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":"i3jr3D36Cl-boEYAFogHJ","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":"AThs-iED1uOwOuWDXtsfA","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":"TVt4SXwoQIqjnHtXVgd0x","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 });"}],"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 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":"VLBgxknPSpgMTk1CksPvV","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":"BaBkT8pyruJJRNgYlLjtF","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":"e56IXF8DKs2HZh-tCuKUB","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":"fBcRo-5TobDB0O6u8iPFU","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":"8FIRgMNIkcX6Pkafh72JT","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":"Wu2VWBxaERo4cPr8THpHo","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":"AMNbC5WrxVqCGUyt7fnVy","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":"muScECfvXmfGBIRnWtKjj","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":"9MjfhHWJh7w5_ylphXzQu","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":"EiJ8ozgUCKdYFnWnNrOGv","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":"8UJEyyT_NQLu2OdTS7zwI","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":"qnccGRGzq3Mo2r5TQk8qc","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":"6kOGt3IkexwKp_IH9NQBr","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":"57EfM2EZ0oqHxLoN2qPQg","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":"2AuZxzw8kAR8e8TyfpIqu","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":"ct8oOVRcqtL_8D_jzoMd9","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":"FQs9F0xZ9ZdzY8YyUlYF0","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":"y9J0srqW2_VrwO3Erp75b","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":"K4uEufvb52gSu08HZo_Dy","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CdFSp2GkjDxaLEVB1a5xs","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":"QqbPnXRLvvxtRIKtR5zqI","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":"OmhlSzs4BlQYyDhhXyNtE","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":"znQnI9i-upsjC-G6jFF6i","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":"FoScF6fbuabOIiSsJje-O","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":"hX3MOd4xqiCsvbpq5c9C-","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":"wbhY3EnQvTl9NzsLD203a","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":"inaJR-MmHDNIgzC60yFkO","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":"mMO8tkMGrtpC1A-5aTnFp","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":"WZGNIH_neg0kXVtFHCVbE","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":"rSvbJgfvuec-Ao1c4krHo","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":"eaZTtAl1f6zdp9IXkxv0x","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":"s07ji1ijcBqaVJ8PrinJ6","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":"LxFn-4Wh6BiKPem-ZAhuF","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":"_o-_p0cbO35xNW7lSwXjt","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":"atg5pN_uvrhCo7leTmqgI","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":"wiBGh_SY2cWsqPn3YxCLk","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":"DbWgjlxbxnWLOoYS_z3iD","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":"0YYGF4lNefgvOKy8Snx5S","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":"T2e4uYIlUXrQjv-5f6XF3","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":"bo0l65pHPQf9pxzH68SKg","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":"358_VcmGFStUrCkg9AZZD","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":"E5dZulSuWdnFyyNzoRv5z","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":"WOq9c8IWHHypIkQH7-Fm-","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":"1l4juOlGzd1eNUWHMCajY","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":"AHsV5VUy-PezgXl-q_AhM","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":"2xDC15xe_1Zgu_KDmPZwW","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":"EXLSpYq275-rwxqlEmRQn","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":"pvTseEzXL112YUBHEcggm","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":"_V4yN59DoXMhjdVFoH5wa","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":"Zh_thsotjcYzZxCUNr_uW","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"The given constructor options
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w09-YaeV9XN4wwAftFnlt","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":"9bDwtWfIgDf4XPr5Z_FfQ","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":"n4WfoQrsSo7Ct54TmOlue","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":"...arguments","optional":true,"variadic":true,"description":"
optional arguments passed when switching state
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"tUXWh-Fo-r-NnGZVR2-9r","name":"Text","brief":"","type":"ClassDoc","description":"a generic system font object.
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"RztbLuMK_bP2Cv4N4H7Ql","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":"Of7-EFuC8qjd8NQl762sg","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":"ct5jMyxziQ5Gn-LT-QPdv","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":"RJuEo90_H4_6ze1_65tFO","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":"gwPF625SSKDiOlvfaKIBa","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":"5Q9Hz1har1aFrZfyjsUrM","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":"epBuG1AWpD1iQJQ3KXW7t","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":"pFFd-yggufKvIeUH1xj1f","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xSj7TtEP3P_sinRFef0Ro","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d3qJWVdlVJmaxphBXNUWj","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Iey9HCU6xxdWlmnPaE9lK","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9xo6o-VJPSiK48Icq3FSL","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e-OK_FlAIVg-Jluf6NzFJ","name":"fillStyle","brief":"","defaultValue":"black","scope":"instance","type":"PropertyDoc","description":"defines the color used to draw the font.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_QNaslnq7MP_KPi4hfCMI","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":"zRXYNkUbGBc9CtKfes0KX","name":"fontSize","brief":"","defaultValue":"10","scope":"instance","type":"PropertyDoc","description":"
the font size (in px)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Bhy29OKUhqV4rg5mS4Gld","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":"Z2bIEomdqDAw6f5LavxqJ","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"znbY-P__GZAA7FQUpWBwc","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":"wFe8K1yi26Sv36o31hZQH","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":"XtqqM_7RNe2RrrfoVSHGa","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":"DvLSI-PEkURv7AhRzgJEM","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":"3akNFI2nyfeZ9yWOEWeIZ","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":"WbPrkdNayuRSg3a-v3wC-","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":"5bmVsl9cTDt5c8WY0u6FC","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y4kajlhvEZ7VDqujnsFx_","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WuZPrXahm7F0cY3j9EbHD","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":"UD-dEJV7EtWUQutMyleJX","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":"81DPC3CquhGDZWXCfFBAn","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":"zeQxgefAyPRbjSPhlxti6","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9yirJkwpMgV0dzYgXN4c5","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":"WZuH7QPe6S9eNq98tGOpn","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":"GEz-l3RuX4uXQf5LVSQul","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yGlCzNEkWYpxFBNj0HW-a","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6gus9i2A67chW7NVbAY0l","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":"jx7h2DALGi5gL70GYqZsx","name":"strokeStyle","brief":"","defaultValue":"black","scope":"instance","type":"PropertyDoc","description":"
defines the color used to draw the font stroke.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4X3H8x719ElOW6vP5zp0R","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":"JK0fqcrJK_lu5E4UxvMAa","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":"wCoY-GxPxuPCr_y7j50NA","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":"GzVWq4nOKCITu1lqpumnV","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"acucyseXlByEGnTUY2T_7","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NZRcdFhtkuXqDKrl7HpWY","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":"qv4C_dvAbGDnsIFzgzUym","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Stjxxb4ggUUC2-efTpsT-","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":"NOMYLUvj1RdUX1Jz2-6xU","name":"_text","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"the text to be displayed
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jcygq3T9cN41csVPYBGQB","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":"gtdIZas24-gMSY161Sl5l","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":"lOaNFs04pBRKbO8SuZ0Fv","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":"dieywd55wtcmcU0bC4G79","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":"oMmyIDh9DWxD37qeW3GJk","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":"7-oY6iMqqiiqVJxwz3OSp","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":"PhMUj-iJEfgib3LDkIy1z","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":"CQOQKUWQLdCdivV_idcrA","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":"I0tXyG4oU9PkcBv_gixSy","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":"pqIlalQmQIB6hsBIImB_D","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":"yqg7Fo9FecTDySwCtk_GF","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":"1lx9tgeenGHaULb0FfAJM","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":"SUW8q-xzDA-6xB0DkGxE1","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":"UhuJ43dgxKJutbqqI47zF","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":"_0w6f6VXUgl7qgsXjX0kk","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":"63ACNaG_C6slyYakRSBc2","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":"-SU69SBUcfiZ55t_nXvht","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":"GPBO0iU4Csjyx_I5LOlv5","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":"o0K7GN3H8WIZxZg7e8onz","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":"7gmF1qx2q_rL07eQxLOZm","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":"ErHIEusp4oY-UtetxkqW3","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":"0JSsNJPPXEvmxVGdIX-zv","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":"tBZ2f3ePWXjDOdd8Ozs3g","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":"LFD_vYUAFavSM2WueCrhR","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H8-qkG-4hVNUhecn1y-31","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":"q3d2AhipfxAHuFSYCDsVh","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":"YPuw6hJ_0SF-g-vD_tVML","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":"eiVpbedsjJTjX5dFKJ0si","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":"iFquCjZo9MHL1QDFl-heY","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":"XBOWxDhZbQC249pePdZ1I","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":"4KQpE0LnN-AZoYZ-uGWuB","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":"E8YYBEyobWNBHEsMFW80F","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":"ypEpHauf82xBHGXi4UBAN","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":"jDDJAQAN-0Wkm3nmHwG7f","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":"B4QcHG89biv7zyo6-_dN5","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":"xja2oTUgi73FACxtmAKfF","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":"CwBJabF7tL9SN_tYAeiBu","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":"HjoFdELdLdAgp5qctp8JX","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":"GC6Ke8tfmz3MlCLVCTdix","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":"jsOdSPVzWGv0znWIbIglx","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":"d4Vk0JxCR-T0_PuVg1yRS","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":"qW-c91RNUIy-z1OS10fjl","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":"yM5hiqfUpLz3vckYPW9X_","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":"HqU8qQ3Mp8v6oO72k-ZJZ","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":"TCMKeT3Ned0v8tIc_AYCr","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":"OzkUCcPW8_TbN8ISRKDZw","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":"CY383Hqq8q0ZkMRAHbZJs","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":"n8vhuEn9I_bUBuO_JiLIh","name":"TextMetrics","brief":"","type":"ClassDoc","description":"a Text Metrics object that contains helper for text manipulation
","params":[],"returns":[],"extends":["Bounds"],"implements":[],"members":[{"id":"ueDDwU3u4t5739zUMvkIw","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":"7YpP6ccDOO0xf_INAzYvY","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O8HZXQGfOi9YdJZQCr3LU","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"return the center position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"m6-kGWp0COBWmnc0oWy5g","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the x axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qG3feJsueXu7d7FY__22B","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the y axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"djfvRxk_1urLDnGUdEh6X","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DIgPeiyBhRHT1OVVCZu4e","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wkTT3PjCkAd6lZ8IV1Wf1","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2dG9tKK6aWEDO0EKaGJKq","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_MZvyw9xNy_BSfysAy4Z6","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"the object type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"63txS-dV4-lhHBYE8oHHk","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ankkk5lmdDYqsZU1AdegX","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"x position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H2bCnvfOaDNAy6fdiBopm","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"y position of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fWuEvCRTiRXg5r5hizOJD","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":"p8H76nYHjY1AiTwPoFX5Z","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":"2gz63PfTGx0VHmvuELrEo","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":"ynxjT8XXKbJk9ZIpvdlsu","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":"EJlD_VNGntJsZDftdtdhX","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":"Vq8IXMSXwIgAz3Bs6GwWQ","name":"clear","brief":"reset the bound
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oi7SUoqf_c1vX6qHEbgHg","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":"Mz5lpb0BZ5rmWPbLaKQH5","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":"e-OX7BR3jzw7PtzRKWsXS","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":"KiPPaXbFeg4I1gMCL3QWD","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":"XjjZiGkkUPxP2yowFfuOc","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":"HdnqjfwKmxt-wq7tOyADF","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":"SBm5ZJZTaq8SSQXEFk0wy","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":"owO3cHsGOZf-aWNiSUGNY","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":"TeTI46zM_OpV7XpzbsBvE","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":"7u9xNoJ81LMdvQbPYmS1z","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":"GVoigsIpEyh0Ok_tfrwe1","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":"PI4hxeEiQRzIXosjJjhpt","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":"IMOG8DPHGfu-M-woW9bYV","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":"0imNYpEm08yKXBA1FveD7","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":"fIlRSBHEyyEIqUOKs_hhb","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":"yxybBBugX4xp3tocOGhPs","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":"CYfc5qVSnFTmUEH0vdH0H","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":"dA3JXa_5Kd-iisJmLs5aN","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":"eD-qbogpljZnFZeF3S9AS","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":false,"description":"list of names for each sprite\n(when manually creating a Texture out of a spritesheet, only numeric values are authorized)
","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":"sNZj_Z-xTCAV5mY-hXX4m","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":"O1nJybJXp96_OchAE7uFA","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":"YTP9PyLcsV3peR-33z2aL","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":"w6ff-rwynC4Q6A5y-6b0y","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":"NQGNUJKyzV7rFj4liNCsw","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":"kqxmjAsuj67AIjRNMGu_g","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":"Kh1VlHrvh9GHSk4CMpfZf","name":"Tile","brief":"","type":"ClassDoc","description":"a basic tile object
","params":[],"returns":[],"extends":["Bounds"],"implements":[],"members":[{"id":"KlAO0tC0uLyxSgNrh53du","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g7A0gwGMf_UXUYUjJs1lY","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"return the center position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JuJq8YlzRnFxTTF2M_ALc","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the x axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OH9thl2e6EpcR4_v67wRK","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"center position of the bound on the y axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TcTWqukvZc3fGdjoSBNGh","name":"flipped","brief":"","scope":"instance","type":"PropertyDoc","description":"Global flag that indicates if the tile is flipped
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LzS8u_8l9cp6PpKWDXXZO","name":"flippedAD","brief":"","scope":"instance","type":"PropertyDoc","description":"True if the tile is flipped anti-diagonally
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-3i2-Ro_IZtvkSR0paPe7","name":"flippedX","brief":"","scope":"instance","type":"PropertyDoc","description":"True if the tile is flipped horizontally
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"89ZeRwUQj_Nr26Xdy5DeG","name":"flippedY","brief":"","scope":"instance","type":"PropertyDoc","description":"True if the tile is flipped vertically
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9ESvbTGSAkZBDDJcGLTmX","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PCYITc7HD1zvZZ5Oq4MPE","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a3GOjT5clu0KSSZhIn15A","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2L7V6Z7UE_oc13xhSoYsl","name":"tileId","brief":"","scope":"instance","type":"PropertyDoc","description":"tileId
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"h49efFr0lrDNzLUec8Rfx","name":"tileset","brief":"","scope":"instance","type":"PropertyDoc","description":"tileset
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dmE-ON1meUXCLn0nwDdt9","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FTj46INliwaYHfPKFVYw3","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"the object type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"anjne0Ghcrp26tUFaU8TX","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w3uTk6V19f0Hrut3g6h1i","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"x position of the bound
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1g3xfnht_jvNDId_jJ869","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"y position of the bounds
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kl6-PRXb_KEUvsjS8CcLs","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":"jN92qqAi9lz4hJYvy8PDr","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":"WGCt5k71WaaL_CpQi4pn6","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":"tNwXzwvGbnMtIBjAdWxUr","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":"CeftLPwW5ycXOhjSq70br","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":"JoR41Nq7cEKJqD6uAoGX2","name":"clear","brief":"reset the bound
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"egNDFVll7U0p30ykDTgwH","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":"tAWR2_aIsufTJ-fFXSpL_","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":"U1rNXToIdQ9iajYyfJoFg","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":"ibVp9QTuL8am2DKqBvWva","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":"_e4YPkCugqi4FFBjs1Dnb","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":"bYPC5xlr5fdMQ2A2f0icW","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":"-X2JDRFOCZ2wVAYRsK4xw","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":"o_FtWRfKWkL3KtYcaGh_Q","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":"Ad2ixt6C9cXQlJaa9GAOZ","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":"TrDImaayFidkNdusLZXTr","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":"cwljpO9dQ_IZVZsvLZ6R4","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":"f2Aitw4wB4OwsR_fZaXxO","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":"nnUlqkTgl6QP90UZX_vsR","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":"84tr-M75SkZyvsxFWGGFq","name":"interpolation","brief":"","defaultValue":"false","scope":"instance","see":["tick"],"type":"PropertyDoc","description":"Enable/disable frame interpolation
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ys6F7HZ9ke3c7txfkfs4e","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":"cPNY_OMeStXUbPmOiSqo-","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":"ijIxMY8fLluBtMWaUIojt","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":"fsIpuW7mKISUhpwfhg55G","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":"ziV6rKmYRy5Sa65R2x9iF","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":"PVxOkMWLiIl5n_r9UxEJg","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":"cmxWbgcYx0GGwN9WqqNlC","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":"FkisOdbHOzcBSv8ytS-pn","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":"WUb7un-Z0Ns0TVb_R1KtU","name":"TMXHexagonalRenderer","brief":"","type":"ClassDoc","description":"
an Hexagonal Map Renderder
","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"qF4nkI9e3gTvOpkihWgMr","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":"ExLDN2Po1PIhnBNdmA4e7","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":"ufabgaYgOF_ZbDmjex9ag","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":"r2dnrQci9pKu6MYqo2Vfa","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":"lZio3EUkiuz32KQzETbVk","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":"DXO5xFagtYVl6l7NkBI-W","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":"buqxzGJEGk_rELxuB8zZG","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":"jg0hcAS23iRcKeTd85FpL","name":"TMXIsometricRenderer","brief":"","type":"ClassDoc","description":"an Isometric Map Renderder
","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"yBVFXx9PubRyoo84u22CA","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":"MtJTM7cBjELmFIZmGuM3X","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":"k-cE-TmsOxC8fEkUEidIN","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":"9isRPPl7N85p7WM--4D05","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":"d0Abk1Yz7KSEzsS1ZgDCu","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":"_CgYTIfe97aFlA3Vn0LR_","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":"Xlpdc81U2gLPdxR5N6i11","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":"Yth5Kyzkwh9HI6HHngKB-","name":"TMXLayer","brief":"","type":"ClassDoc","description":"a TMX Tile Layer Object\nTiled QT 0.7.x format
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"eySMbA5o8k9kwhPUVibur","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":"YcB597gbyjqPhstoCNhX1","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":"yt-kpFeUcm9x3lRU7FmvG","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":"_64eZAN_EMKUqU95lwilK","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":"eG8s5fuPen0d69XBPKWnu","name":"animatedTilesets","brief":"","scope":"instance","type":"PropertyDoc","description":"
All animated tilesets in this layer
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"30a-fxNEOe2EoMDcfW6C8","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":"EqV04XlIrqsUi3QMiqm1C","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":"AGan-gSoFj2g-5ikV6m2W","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":"RHO3JKeSLXPZ6fnq8uM7S","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tMTU_gd_JQcdRwfE1HWAf","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4sydvkqrjGcmpxkD8lYtX","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SvFnJqkJ8G080nAMQGoM-","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"the layer class
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tsam0d8iCPqKyK2pkUrcD","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OP30sq3EsP96ny3OyjK1c","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aZekaHyw6i46i7RxsMrb1","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":"GfPra8y1VYkEKmrzNxSyN","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":"DDWOjHUMoH6EeiwtX9cZG","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z7UVLGF2nArKRP3-JCsW8","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":"MkFbLzet2Jslr2_3CbAWJ","name":"isAnimated","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Layer contains tileset animations
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H0SoVt7YoR1XFw4q2oXxy","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":"lk9S94XsFznxDrWEnNEZv","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":"8fwlCk1a5BikLclWriS55","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":"-AdrnvLvepuTePT3NueZ0","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":"sJJ9Zd9xbpj8Q5hLV1Wlb","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":"rMeAAQ8269QeB-Ft_zv44","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QAM8QtvQwwkvEAAIPcLGQ","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nSn4HJpER9u583nRZMyPO","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":"klAcQsO86mc_0SgCOW2DY","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aXklw6bAjHJjpqNhtfGHw","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":"LMRJ_ThnD3yxJhuUVMn_q","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":"XAhhObTvdGRZfvypyHqjx","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gm6ed55tLioq-ldvwo7ZF","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":"tM53ys37aKrzTitqcC6JX","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"
right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7b8UjTNmJltI2FqxM_jMo","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":"6-tWI84WVtberk-eVysDy","name":"tilesets","brief":"","scope":"instance","type":"PropertyDoc","description":"
The Layer corresponding Tilesets
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Yxy8r-8Cc4P3KEBr5H5PO","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":"L1cHWtecUkIrrkq7J7H8m","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5GrX_vl8KH6dpB6z22a7-","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IFJWBA3lHrICD7GusxZk7","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":"Vj7WduBiV5bPYNcsK_5Z1","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d9b0tZ6aGBWVEHMmAuxWb","name":"x","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Horizontal layer offset in tiles
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DVhrdQN3PNXIYx0draufK","name":"y","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Vertical layer offset in tiles
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p8E4BZQVPRv_Z9RMpc9-L","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":"TlYIypRAlVrRO9H7P6KsR","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":"K64Zs5se1jvS_P08cp4si","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":"Yz1Q0gCazI6LUjcMwI4Y2","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":"cap6kxy-Q8YRB4IKKWP9H","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":"aKGcymkjgu1U8zdYIuLlc","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":"l2QqAXpfchKJ7qzCNMBPD","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":"JJIgjuMl77KBHXzhkOKWj","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":"q4ZxSg3et93vEVViER6p0","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":"KfVtTEZN3ulhLPrv9Qp4p","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":"ZAFT-2l_Bq2PpjzR71sYN","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":"i5ygpWMw0pjxEcyKgJRwQ","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":"0W_mp5ZiYyz1DcwDvXgEI","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":"Ex6ADLDwMrbEMiDfZHZSa","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":"lhXNcXfRIl6fwx7JUgyRQ","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":"8dH2--LvnqwIox_Ni3vkk","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":"qfxoYWEotNgj7AvbUvA_3","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":"KbXPxRlwxQyPLc0ubOYkb","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":"ICFjZxqciDxYIMnpbztCD","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":"6cp3rETSaCT5pPuUUXbHp","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":"gorynyfKhdiAST2uA7lVb","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":"kHYMt7Tu0bmwrNP_1o9VF","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":"xkkDm9Fm3Cj87K-qEY6nf","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":"7lGjbdH_SZH7Ma-4up0OX","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":"mfvSzSvlqznGSAIxsRTfC","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":"tJsmPRiPils2xBRvEF10c","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"OnDestroy Notification function \nCalled by engine before deleting the object
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3ivpOGJhIRdF39exdxLoX","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":"YVZJjRf0D-YorcAIKQoFn","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":"C1KamOior3ng-m0JqZjpn","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":"3Zooc-hayqTRVqele--ue","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":"1sc5hbkJSffyNAAaeSGnB","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":"zNiWLIqq2OznYwnBE1k1f","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":"2VJZImq5PbJ5O2TZD_kWX","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":"wcBa_s-b6K9wfMeWZJDwo","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":"pwGZvzUqqvK1dnEYxPQYF","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":"DyNtVxITwSmmuNY2Yf13n","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":"Z1U907Y4OyuoyxTdUq_aF","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":"iTj-N5K6teugNWrUXam8T","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":"yngP_enkCuJlmNmNfJtUA","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":"suBEVtPnx21vqzwi8B8mW","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":"EIq9leIA9WxRbMFRoHS3u","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":"RDU--r96kz_mtn7mV4iiT","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":"Z6icC7QoeZrBSihYLD6Ki","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":"hNQJUjLirfpCBqStmnJCk","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":"A4D9ODDmfhHXPR-NCXP2J","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":"VASAgezUn3BN8LvJtgeZX","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":"TkH9opMw33PcQ06Tab3hA","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":"mY-0gdTPEql_vhx7FFV6k","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":"Hq6rVY5NwLi_cDY6mGgVn","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":"st0SqSTd00vsPtRq34Be1","name":"TMXOrthogonalRenderer","brief":"","type":"ClassDoc","description":"an Orthogonal Map Renderder
","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"_-y9p5z9jxsK9gZOWMyAp","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":"JeL-IsXdA1ATsVsM91LP5","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":"wh3Z5vO6gRwi2xDtueaVN","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":"5v0xOuuOC9SMuQfvTDuzu","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":"XrQLM8I4BxqXSz2k_90x1","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":"oY8Bb32iNgt39pbTr_-Yu","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":"S2PUQwxXjXfT2s9hZaKEC","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":"HvNUdznHGccbeud73LSW5","name":"TMXRenderer","brief":"","type":"ClassDoc","description":"The map renderer base class
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"XoR_mQEU_1Bc5YMk4itwD","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":"fB4JHZ7AXY_54hGecmIXV","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":"t2U8TlrNv6JdrgZUT8-sr","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":"M5S65WiZ6dj_mAAl4z4B5","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":"PWfrungJlPYQkGuihVR2x","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":"ugxdIkdbLdelczM8vBD2M","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":"kDzXpKZVDRCbCXI7GjGAC","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":"7LPK1JbZNpJAvS4EMbKNt","name":"TMXStaggeredRenderer","type":"ClassDoc","description":"a Staggered Map Renderder
","params":[],"returns":[],"extends":["TMXHexagonalRenderer"],"implements":[],"members":[{"id":"tsKxkf4GiUmFWwVqNXqAT","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":"8UvF5S8qrxytzjRzYPvls","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"iPSxB5vhRmdfof8b4UkP8","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":"D2f2QJa3zjkLpyAAG4x8S","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":"aQsFUqwBtVYkbx-FTc5bA","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":"5v0XJz-rU93d3xNgzsZOQ","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":"1pFhgfOqZEbxmSvJr9MwM","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":"mUN95Glyvz2wwAGZofU9F","name":"TMXTileMap","brief":"","type":"ClassDoc","description":"a TMX Tile Map Object\nTiled QT +0.7.x format
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"SQJ5w765D9TIS2UUHe5Jz","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"The map class.
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DPzKErXoKrUzL4vDwXLDC","name":"cols","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"width of the tilemap in tiles
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_mT5LqDdwZZOaWCk0eJUh","name":"infinite","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"is the map an infinite map
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wZscj-5e5NVf74OE73Cbt","name":"name","brief":"","scope":"instance","type":"PropertyDoc","description":"name of the tilemap
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Pmj7X16xWHPfmbF3HWdXh","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":"dzG7k6CFSf4LuQvivWaf3","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":"twFAk7bqzu6NB366A1qug","name":"rows","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"
height of the tilemap in tiles
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y2hFbPXLo1Lgcv5YXN0L4","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":"9ptXqQFcKvVFdtqkb5viv","name":"tileheight","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"Tile height
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Nk3BmpAMfYkp-xCNU1kN4","name":"tilewidth","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"Tile width
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r71c5PNInBlFs1vjsk0Ho","name":"version","brief":"","scope":"instance","type":"PropertyDoc","description":"the TMX format version
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ar8d90cyD_-lG582DNDwZ","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 me.Container
object will be created for each co...","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"setViewportBounds","optional":true,"default":"false","description":"
if true, set the viewport bounds to the map size, this should be set to true especially if adding a level to the game worl...","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"zp98DysGaRG88FAjIQvMM","name":"constructor","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);"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"levelId","optional":false,"description":"
name of TMX map
","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"data","optional":false,"description":"TMX map in JSON format
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"gI2XZLY1LctzImSvHJ58h","name":"destroy","brief":"destroy function, clean all allocated objects
","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LGqMLMIw1K95hlAhGaHG8","name":"getBounds","brief":"","scope":"instance","type":"MethodDoc","description":"return the map bounding rect
","params":[],"returns":[{"dataType":{"tokens":[{"value":"Bounds","kind":"canonical"},{"value":"Bounds","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6C-ysAki_sBVSU7FCh1F_","name":"getLayers","brief":"","scope":"instance","type":"MethodDoc","description":"return all the existing layers
","params":[],"returns":[{"description":"Array of Layers
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"TMXLayer","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"M3CSpTiEOcRnroI2L035H","name":"getObjects","brief":"","scope":"instance","type":"MethodDoc","description":"return an Array of instantiated objects, based on the map object definition
","params":[{"identifier":"flatten","optional":true,"default":"true","description":"if true, flatten all objects into the returned array.\nwhen false, a me.Container
object will be created for e...","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"
Array of Objects
","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"bLx2qryI9lkHkPLbwriQP","name":"getRenderer","brief":"","scope":"instance","type":"MethodDoc","description":"Return the map default renderer
","params":[],"returns":[{"description":"a TMX renderer
","dataType":{"tokens":[{"value":"TMXRenderer","kind":"canonical"},{"value":"TMXRenderer","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"CufJKHGVpOpBzbSKfOx-1","name":"TMXTileset","brief":"","type":"ClassDoc","description":"a TMX Tile Set Object
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Wv0ECmhokhWqICu5MHug0","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"the tileset class
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JlOt-egCDwiDnep5aNh39","name":"isAnimated","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"Tileset contains animated tiles
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HouGKBiHyeRUz7zDxsaqZ","name":"isCollection","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"true if the tileset is a "Collection of Image" Tileset
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fRO57oe1ox6wGYfGS5MJY","name":"_lastUpdate","brief":"","access":"private","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"Remember the last update timestamp to prevent too many animation updates
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xHb6GbhNH4xqRtmvqO54k","name":"animations","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"Tileset animations
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"frOPAe68704XcmR77O5Ct","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"tileset","optional":false,"description":"tileset data in JSON format ({@link http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#tileset})
","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"XhhfQezZdp_qFsozGNW79","name":"contains","brief":"","scope":"instance","type":"MethodDoc","description":"return true if the gid belongs to the tileset
","params":[{"identifier":"gid","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"C5ln-Luo6yLrGjbCBO56l","name":"getTileImage","brief":"","scope":"instance","type":"MethodDoc","description":"return the tile image from a "Collection of Image" tileset
","params":[{"identifier":"gid","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"corresponding image or undefined
","dataType":{"tokens":[{"value":"Image","kind":"canonical"},{"value":"Image","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0NRnrg3Ie8Zs8swXbL1Ua","name":"getTileProperties","brief":"","scope":"instance","type":"MethodDoc","description":"return the properties of the specified tile
","params":[{"identifier":"tileId","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"zMham9PJu0k7-_GQ_ESoa","name":"getViewTileId","brief":"","scope":"instance","type":"MethodDoc","description":"Get the view (local) tile ID from a GID, with animations applied
","params":[{"identifier":"gid","optional":false,"description":"Global tile ID
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"View tile ID
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"gwDtG1wbGtDWAD3NGQl44","name":"TMXTilesetGroup","brief":"","type":"ClassDoc","description":"an object containing all tileset
","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Y3TVhrYKYKAaGUIVHDV05","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"add a tileset to the tileset group
","params":[{"identifier":"tileset","optional":false,"dataType":{"tokens":[{"value":"TMXTileset","kind":"canonical"},{"value":"TMXTileset","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"v_EmM_f8D_6VBabS6wR-N","name":"getTilesetByGid","brief":"","scope":"instance","type":"MethodDoc","description":"return the tileset corresponding to the specified id \nwill throw an exception if no matching tileset is found
","params":[{"identifier":"gid","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"corresponding tileset
","dataType":{"tokens":[{"value":"TMXTileset","kind":"canonical"},{"value":"TMXTileset","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"h-JaSHJJsnkZ__JqSlZ1S","name":"getTilesetByIndex","brief":"","scope":"instance","type":"MethodDoc","description":"return the tileset at the specified index
","params":[{"identifier":"i","optional":false,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"corresponding tileset
","dataType":{"tokens":[{"value":"TMXTileset","kind":"canonical"},{"value":"TMXTileset","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"EksmMFLs4T98_LUT63Aex","name":"Trigger","brief":"","type":"ClassDoc","description":"trigger an event when colliding with another object
","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"EwjGo16DlNY78MEsrLTGy","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":"8SHtX7MUFRC2rzWw2we0s","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":"QJkP0a-CQSE5uvIlXHbv8","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":"weelln3fwUT6gJ72lISy1","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":"BXsQJmdVUFm4dbl4ABEwn","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":"UeXarnHR7ZpxgkjrHeqTh","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":"QMs7S1J8NNZrtqTrifIY2","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":"E90Hb3a22WV30Fe5E7FmU","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"bottom coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4M5BHzfT7DvPyMEcViOz0","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the horizontal axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3GmYoqOmGGiEvW_lHFgZU","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"absolute center of this rectangle on the vertical axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V4v14bMOuSBbFOq0bE5bA","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"the renderable default transformation matrix
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HO342nM9P7G7JxLsI5dRl","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"the depth of this renderable on the z axis
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IKqA98mbQeCUJDkY1lrrA","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":"FxQbB6EsGlD_j1lRw1-1-","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":"XZQNppesbHSl4iOPvDjlF","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"
height of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ia5096yKr4PR1Sm5969fB","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":"oYBk9eG-CotXScSLOEmAU","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":"jaYNsmwfkvJQZ6qEjfHTZ","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":"ybZR96eqTkeimSAZz-Vm-","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":"zi6Cxs06eKMDGxwziEZ2H","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":"HhT6PlgSe-DmjGPhzJWc8","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":"tYVUS5BMQf3ZFD9ABTjwh","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"make the renderable object persistent over level changes
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B5-YnLx3vaQtU4OA7LztD","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"left coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uFZkKJ2FvNQJ9RB_EgeSm","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":"HmA29rhs45HKAYOJ8mh4s","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"
The name of the renderable
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9oeSYXLUEUEX9lwD8wt3z","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":"iQTHnIDvYn_nURhs6Wg90","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":"OxO7QDnjRisk2Hxlt5Iel","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"
Position of the Renderable relative to its parent container
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BlTxh40rdP1ZJwsWNyS5t","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"right coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uhjATA-vXMao70OJYUfhQ","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":"w-FdIkdIm9KDSfqEY36hq","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":"ea5mlPfCY-wOfz6XBp6V9","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"top coordinate of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Dx5famAYBuHh_9AuhPfwl","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"the shape type (used internally)
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4_HKc_Ke9yMytdtNIdbbX","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":"MgKwuqwNojeXHABCXr-TH","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"width of the Rectangle
","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5bqKRAiIHlXTmLxTu2EZ9","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":"uNkY9oC7SML0KgwBf099T","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":"GIumxE4mr3RnB0a5fjbd7","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":"MYHqF4nu3VRRXTuXM412c","name":"constructor","brief":"","examples":[{"caption":"","code":"world.addChild(new me.Trigger(\n x, y, {\n shapes: [new me.Rect(0, 0, 100, 100)],\n \"duration\" : 250,\n \"color\" : \"#000\",\n \"to\" : \"mymap2\"\n }\n));"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"the x coordinates of the trigger area
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"the y coordinates of the trigger area
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.width","optional":true,"description":"width of the trigger area
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.height","optional":true,"description":"height of the trigger area
","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.shapes","optional":true,"description":"collision shape(s) that will trigger the event
","dataType":{"tokens":[{"value":"Array | Array | Array