From 019d88b32e43f6a01b56024c12e7b1c597838783 Mon Sep 17 00:00:00 2001 From: Olivier Biot Date: Mon, 20 Nov 2023 08:51:54 +0800 Subject: [PATCH] 15.15.0 dist files --- dist/melonjs.mjs/_virtual/_commonjsHelpers.js | 2 +- dist/melonjs.mjs/_virtual/earcut.js | 2 +- dist/melonjs.mjs/_virtual/howler.js | 2 +- dist/melonjs.mjs/_virtual/index.js | 2 +- dist/melonjs.mjs/application/application.js | 2 +- dist/melonjs.mjs/application/header.js | 2 +- dist/melonjs.mjs/application/resize.js | 2 +- dist/melonjs.mjs/application/settings.js | 2 +- dist/melonjs.mjs/audio/audio.js | 2 +- dist/melonjs.mjs/camera/camera2d.js | 2 +- dist/melonjs.mjs/const.js | 2 +- dist/melonjs.mjs/geometries/ellipse.js | 2 +- dist/melonjs.mjs/geometries/line.js | 2 +- dist/melonjs.mjs/geometries/path2d.js | 2 +- dist/melonjs.mjs/geometries/point.js | 2 +- dist/melonjs.mjs/geometries/poly.js | 2 +- dist/melonjs.mjs/geometries/rectangle.js | 2 +- dist/melonjs.mjs/geometries/roundrect.js | 2 +- dist/melonjs.mjs/index.js | 4 +- dist/melonjs.mjs/input/gamepad.js | 2 +- dist/melonjs.mjs/input/input.js | 2 +- dist/melonjs.mjs/input/keyboard.js | 2 +- dist/melonjs.mjs/input/pointer.js | 2 +- dist/melonjs.mjs/input/pointerevent.js | 2 +- dist/melonjs.mjs/lang/console.js | 2 +- dist/melonjs.mjs/lang/deprecated.js | 2 +- dist/melonjs.mjs/level/level.js | 2 +- dist/melonjs.mjs/level/tiled/TMXGroup.js | 2 +- dist/melonjs.mjs/level/tiled/TMXLayer.js | 2 +- dist/melonjs.mjs/level/tiled/TMXObject.js | 2 +- dist/melonjs.mjs/level/tiled/TMXTile.js | 2 +- dist/melonjs.mjs/level/tiled/TMXTileMap.js | 2 +- dist/melonjs.mjs/level/tiled/TMXTileset.js | 2 +- .../level/tiled/TMXTilesetGroup.js | 2 +- dist/melonjs.mjs/level/tiled/TMXUtils.js | 2 +- dist/melonjs.mjs/level/tiled/constants.js | 2 +- .../tiled/renderer/TMXHexagonalRenderer.js | 2 +- .../tiled/renderer/TMXIsometricRenderer.js | 2 +- .../tiled/renderer/TMXOrthogonalRenderer.js | 2 +- .../level/tiled/renderer/TMXRenderer.js | 2 +- .../tiled/renderer/TMXStaggeredRenderer.js | 2 +- .../level/tiled/renderer/autodetect.js | 2 +- dist/melonjs.mjs/loader/cache.js | 2 +- dist/melonjs.mjs/loader/loader.js | 2 +- dist/melonjs.mjs/loader/loadingscreen.js | 2 +- dist/melonjs.mjs/loader/melonjs_logo.png.js | 2 +- dist/melonjs.mjs/loader/parsers/binary.js | 2 +- dist/melonjs.mjs/loader/parsers/fontface.js | 2 +- dist/melonjs.mjs/loader/parsers/image.js | 2 +- dist/melonjs.mjs/loader/parsers/json.js | 2 +- dist/melonjs.mjs/loader/parsers/script.js | 2 +- dist/melonjs.mjs/loader/parsers/tmx.js | 2 +- dist/melonjs.mjs/loader/settings.js | 2 +- dist/melonjs.mjs/math/color.js | 2 +- dist/melonjs.mjs/math/math.js | 2 +- dist/melonjs.mjs/math/matrix2.js | 2 +- dist/melonjs.mjs/math/matrix3.js | 2 +- dist/melonjs.mjs/math/observable_vector2.js | 2 +- dist/melonjs.mjs/math/observable_vector3.js | 2 +- dist/melonjs.mjs/math/vector2.js | 2 +- dist/melonjs.mjs/math/vector3.js | 2 +- dist/melonjs.mjs/particles/emitter.js | 2 +- dist/melonjs.mjs/particles/particle.js | 2 +- dist/melonjs.mjs/particles/settings.js | 2 +- dist/melonjs.mjs/physics/body.js | 2 +- dist/melonjs.mjs/physics/bounds.js | 2 +- dist/melonjs.mjs/physics/collision.js | 2 +- dist/melonjs.mjs/physics/detector.js | 2 +- dist/melonjs.mjs/physics/quadtree.js | 2 +- dist/melonjs.mjs/physics/response.js | 2 +- dist/melonjs.mjs/physics/sat.js | 2 +- dist/melonjs.mjs/physics/world.js | 2 +- dist/melonjs.mjs/plugin/plugin.js | 6 +- dist/melonjs.mjs/renderable/collectable.js | 2 +- dist/melonjs.mjs/renderable/colorlayer.js | 2 +- dist/melonjs.mjs/renderable/container.js | 2 +- dist/melonjs.mjs/renderable/draggable.js | 2 +- dist/melonjs.mjs/renderable/dragndrop.js | 2 +- dist/melonjs.mjs/renderable/entity/entity.js | 2 +- dist/melonjs.mjs/renderable/imagelayer.js | 23 +- dist/melonjs.mjs/renderable/light2d.js | 2 +- .../melonjs.mjs/renderable/nineslicesprite.js | 2 +- dist/melonjs.mjs/renderable/renderable.js | 20 +- dist/melonjs.mjs/renderable/sprite.js | 2 +- .../melonjs.mjs/renderable/text/bitmaptext.js | 2 +- .../renderable/text/bitmaptextdata.js | 2 +- dist/melonjs.mjs/renderable/text/glyph.js | 2 +- dist/melonjs.mjs/renderable/text/text.js | 2 +- .../renderable/text/textmetrics.js | 2 +- dist/melonjs.mjs/renderable/text/textstyle.js | 2 +- dist/melonjs.mjs/renderable/trigger.js | 2 +- .../renderable/ui/uibaseelement.js | 2 +- .../renderable/ui/uispriteelement.js | 2 +- .../melonjs.mjs/renderable/ui/uitextbutton.js | 2 +- dist/melonjs.mjs/state/stage.js | 2 +- dist/melonjs.mjs/state/state.js | 2 +- dist/melonjs.mjs/system/device.js | 2 +- dist/melonjs.mjs/system/dom.js | 2 +- dist/melonjs.mjs/system/event.js | 2 +- dist/melonjs.mjs/system/platform.js | 2 +- dist/melonjs.mjs/system/pooling.js | 2 +- dist/melonjs.mjs/system/save.js | 2 +- dist/melonjs.mjs/system/timer.js | 2 +- dist/melonjs.mjs/tweens/easing.js | 2 +- dist/melonjs.mjs/tweens/interpolation.js | 2 +- dist/melonjs.mjs/tweens/tween.js | 2 +- dist/melonjs.mjs/utils/agent.js | 2 +- dist/melonjs.mjs/utils/array.js | 2 +- dist/melonjs.mjs/utils/file.js | 2 +- dist/melonjs.mjs/utils/function.js | 2 +- dist/melonjs.mjs/utils/string.js | 2 +- dist/melonjs.mjs/utils/utils.js | 2 +- .../video/canvas/canvas_renderer.js | 2 +- dist/melonjs.mjs/video/renderer.js | 2 +- dist/melonjs.mjs/video/texture/atlas.js | 2 +- dist/melonjs.mjs/video/texture/cache.js | 2 +- .../video/texture/canvas_texture.js | 2 +- dist/melonjs.mjs/video/utils/autodetect.js | 2 +- dist/melonjs.mjs/video/video.js | 2 +- dist/melonjs.mjs/video/webgl/buffer/vertex.js | 2 +- .../video/webgl/compositors/compositor.js | 2 +- .../webgl/compositors/primitive_compositor.js | 2 +- .../webgl/compositors/quad_compositor.js | 2 +- dist/melonjs.mjs/video/webgl/glshader.js | 2 +- .../video/webgl/shaders/primitive.frag.js | 2 +- .../video/webgl/shaders/primitive.vert.js | 2 +- .../video/webgl/shaders/quad.frag.js | 2 +- .../video/webgl/shaders/quad.vert.js | 2 +- .../video/webgl/utils/attributes.js | 2 +- .../video/webgl/utils/precision.js | 2 +- dist/melonjs.mjs/video/webgl/utils/program.js | 2 +- dist/melonjs.mjs/video/webgl/utils/string.js | 2 +- .../melonjs.mjs/video/webgl/utils/uniforms.js | 2 +- .../melonjs.mjs/video/webgl/webgl_renderer.js | 2 +- dist/melonjs.module.js | 52 +- dist/types/renderable/imagelayer.d.ts | 2 +- dist/types/renderable/renderable.d.ts | 6 + docs/docs/Class-Index.html | 2 +- docs/docs/index.html | 2 +- docs/docs/melonjs.api.json | 2 +- docs/docs/melonjs.api.json.md5 | 2 +- docs/docs/melonjs.html | 2 +- docs/docs/melonjs/Application.html | 2 +- docs/docs/melonjs/Application/Settings.html | 2 +- docs/docs/melonjs/BitmapText.html | 18 +- docs/docs/melonjs/Body.html | 2 +- docs/docs/melonjs/Bounds.html | 2 +- docs/docs/melonjs/Camera2d.html | 18 +- docs/docs/melonjs/Camera2d/AXIS.html | 2 +- docs/docs/melonjs/CanvasRenderer.html | 2 +- docs/docs/melonjs/CanvasTexture.html | 2 +- docs/docs/melonjs/Collectable.html | 18 +- docs/docs/melonjs/Color.html | 2 +- docs/docs/melonjs/ColorLayer.html | 18 +- docs/docs/melonjs/Compositor.html | 2 +- docs/docs/melonjs/Container.html | 18 +- docs/docs/melonjs/Detector.html | 2 +- docs/docs/melonjs/Draggable.html | 18 +- docs/docs/melonjs/DraggableEntity.html | 18 +- docs/docs/melonjs/DropTarget.html | 18 +- docs/docs/melonjs/DroptargetEntity.html | 18 +- docs/docs/melonjs/Ellipse.html | 2 +- docs/docs/melonjs/Entity.html | 18 +- docs/docs/melonjs/GLShader.html | 2 +- docs/docs/melonjs/GUI_Object.html | 18 +- docs/docs/melonjs/ImageLayer.html | 20 +- docs/docs/melonjs/Light2d.html | 18 +- docs/docs/melonjs/Line.html | 2 +- docs/docs/melonjs/Math.html | 2 +- docs/docs/melonjs/Math/clamp.html | 2 +- docs/docs/melonjs/Math/degToRad.html | 2 +- docs/docs/melonjs/Math/isPowerOfTwo.html | 2 +- docs/docs/melonjs/Math/nextPowerOfTwo.html | 2 +- docs/docs/melonjs/Math/radToDeg.html | 2 +- docs/docs/melonjs/Math/random.html | 2 +- docs/docs/melonjs/Math/randomFloat.html | 2 +- docs/docs/melonjs/Math/round.html | 2 +- docs/docs/melonjs/Math/toBeCloseTo.html | 2 +- docs/docs/melonjs/Math/weightedRandom.html | 2 +- docs/docs/melonjs/Matrix2d.html | 2 +- docs/docs/melonjs/Matrix3d.html | 2 +- docs/docs/melonjs/NineSliceSprite.html | 18 +- docs/docs/melonjs/ObjectPool.html | 2 +- docs/docs/melonjs/ObservableVector2d.html | 2 +- docs/docs/melonjs/ObservableVector3d.html | 2 +- docs/docs/melonjs/Particle.html | 18 +- docs/docs/melonjs/ParticleEmitter.html | 18 +- .../docs/melonjs/ParticleEmitterSettings.html | 2 +- docs/docs/melonjs/Path2D.html | 2 +- docs/docs/melonjs/Point.html | 2 +- docs/docs/melonjs/Pointer.html | 2 +- docs/docs/melonjs/Polygon.html | 2 +- docs/docs/melonjs/PrimitiveCompositor.html | 2 +- docs/docs/melonjs/QuadCompositor.html | 2 +- docs/docs/melonjs/QuadTree.html | 2 +- docs/docs/melonjs/Rect.html | 2 +- docs/docs/melonjs/Renderable.html | 147 +- docs/docs/melonjs/Renderer.html | 2 +- docs/docs/melonjs/Renderer/Texture.html | 2 +- docs/docs/melonjs/Renderer/getHeight.html | 2 +- docs/docs/melonjs/Renderer/getWidth.html | 2 +- docs/docs/melonjs/ResponseObject.html | 2 +- docs/docs/melonjs/RoundRect.html | 2 +- docs/docs/melonjs/Sprite.html | 18 +- docs/docs/melonjs/Stage.html | 2 +- docs/docs/melonjs/TMXHexagonalRenderer.html | 2 +- docs/docs/melonjs/TMXIsometricRenderer.html | 2 +- docs/docs/melonjs/TMXLayer.html | 18 +- docs/docs/melonjs/TMXOrthogonalRenderer.html | 2 +- docs/docs/melonjs/TMXRenderer.html | 2 +- docs/docs/melonjs/TMXStaggeredRenderer.html | 2 +- docs/docs/melonjs/TMXTileMap.html | 2 +- docs/docs/melonjs/TMXTileset.html | 2 +- docs/docs/melonjs/TMXTilesetGroup.html | 2 +- docs/docs/melonjs/TMXUtils.html | 2 +- .../melonjs/TMXUtils/applyTMXProperties.html | 2 +- docs/docs/melonjs/TMXUtils/decode.html | 2 +- .../melonjs/TMXUtils/decodeBase64AsArray.html | 2 +- docs/docs/melonjs/TMXUtils/decodeCSV.html | 2 +- docs/docs/melonjs/TMXUtils/decompress.html | 2 +- docs/docs/melonjs/TMXUtils/parse.html | 2 +- .../melonjs/TMXUtils/setInflateFunction.html | 2 +- docs/docs/melonjs/Text.html | 18 +- docs/docs/melonjs/TextMetrics.html | 2 +- docs/docs/melonjs/TextureAtlas.html | 2 +- docs/docs/melonjs/Tile.html | 2 +- docs/docs/melonjs/Timer_.html | 2 +- docs/docs/melonjs/Trigger.html | 18 +- docs/docs/melonjs/Tween.html | 2 +- docs/docs/melonjs/Tween/Easing.html | 2 +- docs/docs/melonjs/Tween/Interpolation.html | 2 +- docs/docs/melonjs/UIBaseElement.html | 18 +- docs/docs/melonjs/UISpriteElement.html | 18 +- docs/docs/melonjs/UITextButton.html | 18 +- docs/docs/melonjs/Vector2d.html | 2 +- docs/docs/melonjs/Vector3d.html | 2 +- docs/docs/melonjs/WebGLRenderer.html | 2 +- docs/docs/melonjs/World.html | 18 +- docs/docs/melonjs/audio.html | 2 +- docs/docs/melonjs/audio/disable.html | 2 +- docs/docs/melonjs/audio/enable.html | 2 +- docs/docs/melonjs/audio/fade.html | 2 +- docs/docs/melonjs/audio/getCurrentTrack.html | 2 +- docs/docs/melonjs/audio/getVolume.html | 2 +- docs/docs/melonjs/audio/hasAudio.html | 2 +- docs/docs/melonjs/audio/hasFormat.html | 2 +- docs/docs/melonjs/audio/init.html | 2 +- docs/docs/melonjs/audio/load.html | 2 +- docs/docs/melonjs/audio/mute.html | 2 +- docs/docs/melonjs/audio/muteAll.html | 2 +- docs/docs/melonjs/audio/muted.html | 2 +- docs/docs/melonjs/audio/pause.html | 2 +- docs/docs/melonjs/audio/pauseTrack.html | 2 +- docs/docs/melonjs/audio/play.html | 2 +- docs/docs/melonjs/audio/playTrack.html | 2 +- docs/docs/melonjs/audio/rate.html | 2 +- docs/docs/melonjs/audio/resume.html | 2 +- docs/docs/melonjs/audio/resumeTrack.html | 2 +- docs/docs/melonjs/audio/seek.html | 2 +- docs/docs/melonjs/audio/setVolume.html | 2 +- docs/docs/melonjs/audio/stop.html | 2 +- docs/docs/melonjs/audio/stopTrack.html | 2 +- docs/docs/melonjs/audio/unload.html | 2 +- docs/docs/melonjs/audio/unloadAll.html | 2 +- docs/docs/melonjs/audio/unmute.html | 2 +- docs/docs/melonjs/audio/unmuteAll.html | 2 +- docs/docs/melonjs/boot.html | 2 +- docs/docs/melonjs/collision.html | 2 +- docs/docs/melonjs/collision/types.html | 2 +- docs/docs/melonjs/consoleHeader.html | 2 +- docs/docs/melonjs/device.html | 2 +- docs/docs/melonjs/device/enableSwipe.html | 2 +- docs/docs/melonjs/device/exitFullscreen.html | 2 +- docs/docs/melonjs/device/focus.html | 2 +- docs/docs/melonjs/device/getElement.html | 2 +- .../docs/melonjs/device/getElementBounds.html | 2 +- docs/docs/melonjs/device/getParentBounds.html | 2 +- .../docs/melonjs/device/getParentElement.html | 2 +- .../melonjs/device/getScreenOrientation.html | 2 +- docs/docs/melonjs/device/getStorage.html | 2 +- docs/docs/melonjs/device/isFullscreen.html | 2 +- docs/docs/melonjs/device/isLandscape.html | 2 +- docs/docs/melonjs/device/isPortrait.html | 2 +- .../docs/melonjs/device/isWebGLSupported.html | 2 +- docs/docs/melonjs/device/lockOrientation.html | 2 +- docs/docs/melonjs/device/onReady.html | 2 +- docs/docs/melonjs/device/platform.html | 2 +- .../melonjs/device/requestFullscreen.html | 2 +- .../melonjs/device/unlockOrientation.html | 2 +- .../melonjs/device/unwatchAccelerometer.html | 2 +- .../device/unwatchDeviceOrientation.html | 2 +- docs/docs/melonjs/device/vibrate.html | 2 +- .../melonjs/device/watchAccelerometer.html | 2 +- .../device/watchDeviceOrientation.html | 2 +- docs/docs/melonjs/event.html | 2 +- docs/docs/melonjs/event/emit.html | 2 +- docs/docs/melonjs/event/off.html | 2 +- docs/docs/melonjs/event/on.html | 2 +- docs/docs/melonjs/event/once.html | 2 +- docs/docs/melonjs/game.html | 2 +- docs/docs/melonjs/input.html | 2 +- docs/docs/melonjs/input/GAMEPAD.html | 2 +- docs/docs/melonjs/input/GAMEPAD/AXES.html | 2 +- docs/docs/melonjs/input/GAMEPAD/BUTTONS.html | 2 +- docs/docs/melonjs/input/KEY.html | 2 +- docs/docs/melonjs/input/bindGamepad.html | 2 +- docs/docs/melonjs/input/bindKey.html | 2 +- docs/docs/melonjs/input/bindPointer.html | 2 +- docs/docs/melonjs/input/exitPointerLock.html | 2 +- docs/docs/melonjs/input/getBindingKey.html | 2 +- docs/docs/melonjs/input/globalToLocal.html | 2 +- docs/docs/melonjs/input/hasActiveEvents.html | 2 +- .../melonjs/input/hasRegisteredEvents.html | 2 +- docs/docs/melonjs/input/isKeyPressed.html | 2 +- docs/docs/melonjs/input/keyStatus.html | 2 +- .../melonjs/input/registerPointerEvent.html | 2 +- .../input/releaseAllPointerEvents.html | 2 +- .../melonjs/input/releasePointerEvent.html | 2 +- .../melonjs/input/requestPointerLock.html | 2 +- .../melonjs/input/setGamepadDeadzone.html | 2 +- docs/docs/melonjs/input/setTouchAction.html | 2 +- docs/docs/melonjs/input/triggerKeyEvent.html | 2 +- docs/docs/melonjs/input/unbindGamepad.html | 2 +- docs/docs/melonjs/input/unbindKey.html | 2 +- docs/docs/melonjs/input/unbindPointer.html | 2 +- docs/docs/melonjs/input/unlockKey.html | 2 +- docs/docs/melonjs/level.html | 2 +- docs/docs/melonjs/loader.html | 2 +- docs/docs/melonjs/loader/Asset.html | 2 +- docs/docs/melonjs/loader/getBinary.html | 2 +- docs/docs/melonjs/loader/getImage.html | 2 +- docs/docs/melonjs/loader/getJSON.html | 2 +- docs/docs/melonjs/loader/getTMX.html | 2 +- docs/docs/melonjs/loader/load.html | 2 +- docs/docs/melonjs/loader/preload.html | 2 +- docs/docs/melonjs/loader/reload.html | 2 +- docs/docs/melonjs/loader/setBaseURL.html | 2 +- docs/docs/melonjs/loader/setParser.html | 2 +- docs/docs/melonjs/loader/unload.html | 2 +- docs/docs/melonjs/loader/unloadAll.html | 2 +- docs/docs/melonjs/onresize.html | 2 +- docs/docs/melonjs/plugin.html | 2 +- docs/docs/melonjs/plugin/Base.html | 2 +- docs/docs/melonjs/plugin/BasePlugin.html | 2 +- docs/docs/melonjs/plugin/get.html | 2 +- docs/docs/melonjs/plugin/patch.html | 2 +- docs/docs/melonjs/plugin/register.html | 2 +- docs/docs/melonjs/pool.html | 2 +- docs/docs/melonjs/save.html | 2 +- docs/docs/melonjs/scale.html | 2 +- .../src/application/application.js.html | 2 +- .../melonjs/src/application/header.js.html | 2 +- .../melonjs/src/application/resize.js.html | 2 +- .../melonjs/src/application/settings.js.html | 2 +- docs/docs/melonjs/src/audio/audio.js.html | 2 +- docs/docs/melonjs/src/camera/camera2d.js.html | 2 +- docs/docs/melonjs/src/const.js.html | 2 +- .../melonjs/src/geometries/ellipse.js.html | 2 +- docs/docs/melonjs/src/geometries/line.js.html | 2 +- .../melonjs/src/geometries/path2d.js.html | 2 +- .../docs/melonjs/src/geometries/point.js.html | 2 +- docs/docs/melonjs/src/geometries/poly.js.html | 2 +- .../melonjs/src/geometries/rectangle.js.html | 2 +- .../melonjs/src/geometries/roundrect.js.html | 2 +- docs/docs/melonjs/src/index.js.html | 2 +- docs/docs/melonjs/src/input/gamepad.js.html | 2 +- docs/docs/melonjs/src/input/input.js.html | 2 +- docs/docs/melonjs/src/input/keyboard.js.html | 2 +- docs/docs/melonjs/src/input/pointer.js.html | 2 +- .../melonjs/src/input/pointerevent.js.html | 2 +- docs/docs/melonjs/src/lang/console.js.html | 2 +- docs/docs/melonjs/src/lang/deprecated.js.html | 2 +- docs/docs/melonjs/src/level/level.js.html | 2 +- .../melonjs/src/level/tiled/TMXGroup.js.html | 2 +- .../melonjs/src/level/tiled/TMXLayer.js.html | 2 +- .../melonjs/src/level/tiled/TMXObject.js.html | 2 +- .../melonjs/src/level/tiled/TMXTile.js.html | 2 +- .../src/level/tiled/TMXTileMap.js.html | 2 +- .../src/level/tiled/TMXTileset.js.html | 2 +- .../src/level/tiled/TMXTilesetGroup.js.html | 2 +- .../melonjs/src/level/tiled/TMXUtils.js.html | 2 +- .../melonjs/src/level/tiled/constants.js.html | 2 +- .../renderer/TMXHexagonalRenderer.js.html | 2 +- .../renderer/TMXIsometricRenderer.js.html | 2 +- .../renderer/TMXOrthogonalRenderer.js.html | 2 +- .../level/tiled/renderer/TMXRenderer.js.html | 2 +- .../renderer/TMXStaggeredRenderer.js.html | 2 +- .../level/tiled/renderer/autodetect.js.html | 2 +- docs/docs/melonjs/src/loader/cache.js.html | 2 +- docs/docs/melonjs/src/loader/loader.js.html | 2 +- .../melonjs/src/loader/loadingscreen.js.html | 2 +- .../melonjs/src/loader/parsers/binary.js.html | 2 +- .../src/loader/parsers/fontface.js.html | 2 +- .../melonjs/src/loader/parsers/image.js.html | 2 +- .../melonjs/src/loader/parsers/json.js.html | 2 +- .../melonjs/src/loader/parsers/script.js.html | 2 +- .../melonjs/src/loader/parsers/tmx.js.html | 2 +- docs/docs/melonjs/src/loader/settings.js.html | 2 +- docs/docs/melonjs/src/math/color.js.html | 2 +- docs/docs/melonjs/src/math/math.js.html | 2 +- docs/docs/melonjs/src/math/matrix2.js.html | 2 +- docs/docs/melonjs/src/math/matrix3.js.html | 2 +- .../src/math/observable_vector2.js.html | 2 +- .../src/math/observable_vector3.js.html | 2 +- docs/docs/melonjs/src/math/vector2.js.html | 2 +- docs/docs/melonjs/src/math/vector3.js.html | 2 +- .../melonjs/src/particles/emitter.js.html | 2 +- .../melonjs/src/particles/particle.js.html | 2 +- .../melonjs/src/particles/settings.js.html | 2 +- docs/docs/melonjs/src/physics/body.js.html | 2 +- docs/docs/melonjs/src/physics/bounds.js.html | 2 +- .../melonjs/src/physics/collision.js.html | 2 +- .../docs/melonjs/src/physics/detector.js.html | 2 +- .../docs/melonjs/src/physics/quadtree.js.html | 2 +- .../docs/melonjs/src/physics/response.js.html | 2 +- docs/docs/melonjs/src/physics/sat.js.html | 2 +- docs/docs/melonjs/src/physics/world.js.html | 2 +- docs/docs/melonjs/src/plugin/plugin.js.html | 2 +- .../docs/melonjs/src/polyfill/console.js.html | 2 +- docs/docs/melonjs/src/polyfill/index.js.html | 2 +- .../melonjs/src/polyfill/roundrect.js.html | 2 +- .../src/renderable/collectable.js.html | 2 +- .../melonjs/src/renderable/colorlayer.js.html | 2 +- .../melonjs/src/renderable/container.js.html | 2 +- .../melonjs/src/renderable/draggable.js.html | 2 +- .../melonjs/src/renderable/dragndrop.js.html | 2 +- .../src/renderable/entity/entity.js.html | 2 +- .../melonjs/src/renderable/imagelayer.js.html | 25 +- .../melonjs/src/renderable/light2d.js.html | 2 +- .../src/renderable/nineslicesprite.js.html | 2 +- .../melonjs/src/renderable/renderable.js.html | 92 +- .../melonjs/src/renderable/sprite.js.html | 2 +- .../src/renderable/text/bitmaptext.js.html | 2 +- .../renderable/text/bitmaptextdata.js.html | 2 +- .../melonjs/src/renderable/text/glyph.js.html | 2 +- .../melonjs/src/renderable/text/text.js.html | 2 +- .../src/renderable/text/textmetrics.js.html | 2 +- .../src/renderable/text/textstyle.js.html | 2 +- .../melonjs/src/renderable/trigger.js.html | 2 +- .../src/renderable/ui/uibaseelement.js.html | 2 +- .../src/renderable/ui/uispriteelement.js.html | 2 +- .../src/renderable/ui/uitextbutton.js.html | 2 +- docs/docs/melonjs/src/state/stage.js.html | 2 +- docs/docs/melonjs/src/state/state.js.html | 2 +- docs/docs/melonjs/src/system/device.js.html | 2 +- docs/docs/melonjs/src/system/dom.js.html | 2 +- docs/docs/melonjs/src/system/event.js.html | 2 +- docs/docs/melonjs/src/system/platform.js.html | 2 +- docs/docs/melonjs/src/system/pooling.js.html | 2 +- docs/docs/melonjs/src/system/save.js.html | 2 +- docs/docs/melonjs/src/system/timer.js.html | 2 +- docs/docs/melonjs/src/tweens/easing.js.html | 2 +- .../melonjs/src/tweens/interpolation.js.html | 2 +- docs/docs/melonjs/src/tweens/tween.js.html | 2 +- docs/docs/melonjs/src/utils/agent.js.html | 2 +- docs/docs/melonjs/src/utils/array.js.html | 2 +- docs/docs/melonjs/src/utils/file.js.html | 2 +- docs/docs/melonjs/src/utils/function.js.html | 2 +- docs/docs/melonjs/src/utils/string.js.html | 2 +- docs/docs/melonjs/src/utils/utils.js.html | 2 +- .../src/video/canvas/canvas_renderer.js.html | 2 +- docs/docs/melonjs/src/video/renderer.js.html | 2 +- .../melonjs/src/video/texture/atlas.js.html | 2 +- .../melonjs/src/video/texture/cache.js.html | 2 +- .../src/video/texture/canvas_texture.js.html | 2 +- .../src/video/utils/autodetect.js.html | 2 +- docs/docs/melonjs/src/video/video.js.html | 2 +- .../src/video/webgl/buffer/vertex.js.html | 2 +- .../webgl/compositors/compositor.js.html | 2 +- .../compositors/primitive_compositor.js.html | 2 +- .../webgl/compositors/quad_compositor.js.html | 2 +- .../melonjs/src/video/webgl/glshader.js.html | 2 +- .../src/video/webgl/utils/attributes.js.html | 2 +- .../src/video/webgl/utils/precision.js.html | 2 +- .../src/video/webgl/utils/program.js.html | 2 +- .../src/video/webgl/utils/string.js.html | 2 +- .../src/video/webgl/utils/uniforms.js.html | 2 +- .../src/video/webgl/webgl_renderer.js.html | 2 +- docs/docs/melonjs/state.html | 2 +- docs/docs/melonjs/timer.html | 2 +- docs/docs/melonjs/utils.html | 2 +- docs/docs/melonjs/utils/agent.html | 2 +- docs/docs/melonjs/utils/agent/prefixed.html | 2 +- .../docs/melonjs/utils/agent/setPrefixed.html | 2 +- docs/docs/melonjs/utils/array.html | 2 +- docs/docs/melonjs/utils/array/random.html | 2 +- docs/docs/melonjs/utils/array/remove.html | 2 +- .../melonjs/utils/array/weightedRandom.html | 2 +- docs/docs/melonjs/utils/checkVersion.html | 2 +- docs/docs/melonjs/utils/file.html | 2 +- docs/docs/melonjs/utils/file/getBasename.html | 2 +- .../docs/melonjs/utils/file/getExtension.html | 2 +- docs/docs/melonjs/utils/file/getPath.html | 2 +- docs/docs/melonjs/utils/function.html | 2 +- docs/docs/melonjs/utils/function/defer.html | 2 +- .../docs/melonjs/utils/function/throttle.html | 2 +- docs/docs/melonjs/utils/getUriFragment.html | 2 +- docs/docs/melonjs/utils/string.html | 2 +- .../docs/melonjs/utils/string/capitalize.html | 2 +- docs/docs/melonjs/utils/string/isBoolean.html | 2 +- docs/docs/melonjs/utils/string/isDataUrl.html | 2 +- docs/docs/melonjs/utils/string/isNumeric.html | 2 +- docs/docs/melonjs/utils/string/toHex.html | 2 +- docs/docs/melonjs/video.html | 2 +- docs/docs/melonjs/video/createCanvas.html | 2 +- docs/docs/melonjs/video/getParent.html | 2 +- docs/docs/melonjs/video/init.html | 2 +- docs/docs/melonjs/warning.html | 2 +- docs/docs/settings.html | 2 +- docs/melonjs.module.js | 38872 ++++++++++++++++ 510 files changed, 40061 insertions(+), 572 deletions(-) create mode 100644 docs/melonjs.module.js diff --git a/dist/melonjs.mjs/_virtual/_commonjsHelpers.js b/dist/melonjs.mjs/_virtual/_commonjsHelpers.js index 117d1c1289..b112928387 100644 --- a/dist/melonjs.mjs/_virtual/_commonjsHelpers.js +++ b/dist/melonjs.mjs/_virtual/_commonjsHelpers.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/_virtual/earcut.js b/dist/melonjs.mjs/_virtual/earcut.js index caa1acc9b0..4beee0cf88 100644 --- a/dist/melonjs.mjs/_virtual/earcut.js +++ b/dist/melonjs.mjs/_virtual/earcut.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/_virtual/howler.js b/dist/melonjs.mjs/_virtual/howler.js index d9f485a893..c60918db13 100644 --- a/dist/melonjs.mjs/_virtual/howler.js +++ b/dist/melonjs.mjs/_virtual/howler.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/_virtual/index.js b/dist/melonjs.mjs/_virtual/index.js index 2bca5ea3f0..aa31d6ce40 100644 --- a/dist/melonjs.mjs/_virtual/index.js +++ b/dist/melonjs.mjs/_virtual/index.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/application/application.js b/dist/melonjs.mjs/application/application.js index bbb54cd5f3..2ee874ee6f 100644 --- a/dist/melonjs.mjs/application/application.js +++ b/dist/melonjs.mjs/application/application.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/application/header.js b/dist/melonjs.mjs/application/header.js index e7f8e86a01..fa57d81fc6 100644 --- a/dist/melonjs.mjs/application/header.js +++ b/dist/melonjs.mjs/application/header.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/application/resize.js b/dist/melonjs.mjs/application/resize.js index cb2bde4e05..94ab5917b4 100644 --- a/dist/melonjs.mjs/application/resize.js +++ b/dist/melonjs.mjs/application/resize.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/application/settings.js b/dist/melonjs.mjs/application/settings.js index f5db5fd9b9..fa10295d73 100644 --- a/dist/melonjs.mjs/application/settings.js +++ b/dist/melonjs.mjs/application/settings.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/audio/audio.js b/dist/melonjs.mjs/audio/audio.js index 0df9038eef..966d50723b 100644 --- a/dist/melonjs.mjs/audio/audio.js +++ b/dist/melonjs.mjs/audio/audio.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/camera/camera2d.js b/dist/melonjs.mjs/camera/camera2d.js index 66a6cfb5e1..3e4c93e485 100644 --- a/dist/melonjs.mjs/camera/camera2d.js +++ b/dist/melonjs.mjs/camera/camera2d.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/const.js b/dist/melonjs.mjs/const.js index dae28322d2..1acfb32c04 100644 --- a/dist/melonjs.mjs/const.js +++ b/dist/melonjs.mjs/const.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/geometries/ellipse.js b/dist/melonjs.mjs/geometries/ellipse.js index 7487531f73..328df1bff7 100644 --- a/dist/melonjs.mjs/geometries/ellipse.js +++ b/dist/melonjs.mjs/geometries/ellipse.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/geometries/line.js b/dist/melonjs.mjs/geometries/line.js index ec386468c3..44f3e4eea6 100644 --- a/dist/melonjs.mjs/geometries/line.js +++ b/dist/melonjs.mjs/geometries/line.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/geometries/path2d.js b/dist/melonjs.mjs/geometries/path2d.js index 672f49bdee..82141cb392 100644 --- a/dist/melonjs.mjs/geometries/path2d.js +++ b/dist/melonjs.mjs/geometries/path2d.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/geometries/point.js b/dist/melonjs.mjs/geometries/point.js index 184c5a6f39..53a0801d3f 100644 --- a/dist/melonjs.mjs/geometries/point.js +++ b/dist/melonjs.mjs/geometries/point.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/geometries/poly.js b/dist/melonjs.mjs/geometries/poly.js index 70c130a44b..f03eb0ba20 100644 --- a/dist/melonjs.mjs/geometries/poly.js +++ b/dist/melonjs.mjs/geometries/poly.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/geometries/rectangle.js b/dist/melonjs.mjs/geometries/rectangle.js index 72fe4f6157..5cbff488fd 100644 --- a/dist/melonjs.mjs/geometries/rectangle.js +++ b/dist/melonjs.mjs/geometries/rectangle.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/geometries/roundrect.js b/dist/melonjs.mjs/geometries/roundrect.js index b419b0dbac..fe48ea6190 100644 --- a/dist/melonjs.mjs/geometries/roundrect.js +++ b/dist/melonjs.mjs/geometries/roundrect.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/index.js b/dist/melonjs.mjs/index.js index 0a50b84cd1..cbdb7ca805 100644 --- a/dist/melonjs.mjs/index.js +++ b/dist/melonjs.mjs/index.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license @@ -112,7 +112,7 @@ import { initKeyboardEvent } from './input/keyboard.js'; * @name version * @type {string} */ -const version = "15.14.0"; +const version = "15.15.0"; /** * a flag indicating that melonJS is fully initialized diff --git a/dist/melonjs.mjs/input/gamepad.js b/dist/melonjs.mjs/input/gamepad.js index b76737dcf4..90ec54839a 100644 --- a/dist/melonjs.mjs/input/gamepad.js +++ b/dist/melonjs.mjs/input/gamepad.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/input/input.js b/dist/melonjs.mjs/input/input.js index bdcd35bef7..1e451e0af9 100644 --- a/dist/melonjs.mjs/input/input.js +++ b/dist/melonjs.mjs/input/input.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/input/keyboard.js b/dist/melonjs.mjs/input/keyboard.js index 35f504f8be..d16ed5eea8 100644 --- a/dist/melonjs.mjs/input/keyboard.js +++ b/dist/melonjs.mjs/input/keyboard.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/input/pointer.js b/dist/melonjs.mjs/input/pointer.js index 554922cb26..2d602f8878 100644 --- a/dist/melonjs.mjs/input/pointer.js +++ b/dist/melonjs.mjs/input/pointer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/input/pointerevent.js b/dist/melonjs.mjs/input/pointerevent.js index 5bb049fded..536286916c 100644 --- a/dist/melonjs.mjs/input/pointerevent.js +++ b/dist/melonjs.mjs/input/pointerevent.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/lang/console.js b/dist/melonjs.mjs/lang/console.js index 18237dea08..fe1cad3a0c 100644 --- a/dist/melonjs.mjs/lang/console.js +++ b/dist/melonjs.mjs/lang/console.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/lang/deprecated.js b/dist/melonjs.mjs/lang/deprecated.js index beefc8d307..62b8b9317e 100644 --- a/dist/melonjs.mjs/lang/deprecated.js +++ b/dist/melonjs.mjs/lang/deprecated.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/level.js b/dist/melonjs.mjs/level/level.js index d0733d6b4a..01a407a005 100644 --- a/dist/melonjs.mjs/level/level.js +++ b/dist/melonjs.mjs/level/level.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/TMXGroup.js b/dist/melonjs.mjs/level/tiled/TMXGroup.js index 01ff2bd140..5f51a59faa 100644 --- a/dist/melonjs.mjs/level/tiled/TMXGroup.js +++ b/dist/melonjs.mjs/level/tiled/TMXGroup.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/TMXLayer.js b/dist/melonjs.mjs/level/tiled/TMXLayer.js index e8a7ad5c62..85760b42fd 100644 --- a/dist/melonjs.mjs/level/tiled/TMXLayer.js +++ b/dist/melonjs.mjs/level/tiled/TMXLayer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/TMXObject.js b/dist/melonjs.mjs/level/tiled/TMXObject.js index 8d858e4334..6664c446bb 100644 --- a/dist/melonjs.mjs/level/tiled/TMXObject.js +++ b/dist/melonjs.mjs/level/tiled/TMXObject.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/TMXTile.js b/dist/melonjs.mjs/level/tiled/TMXTile.js index ea0ef48b38..4821d3f87a 100644 --- a/dist/melonjs.mjs/level/tiled/TMXTile.js +++ b/dist/melonjs.mjs/level/tiled/TMXTile.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/TMXTileMap.js b/dist/melonjs.mjs/level/tiled/TMXTileMap.js index ea2cf07946..4451c4aa68 100644 --- a/dist/melonjs.mjs/level/tiled/TMXTileMap.js +++ b/dist/melonjs.mjs/level/tiled/TMXTileMap.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/TMXTileset.js b/dist/melonjs.mjs/level/tiled/TMXTileset.js index 358c0cdd82..361acc17f0 100644 --- a/dist/melonjs.mjs/level/tiled/TMXTileset.js +++ b/dist/melonjs.mjs/level/tiled/TMXTileset.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/TMXTilesetGroup.js b/dist/melonjs.mjs/level/tiled/TMXTilesetGroup.js index 83bb32111a..f613af9761 100644 --- a/dist/melonjs.mjs/level/tiled/TMXTilesetGroup.js +++ b/dist/melonjs.mjs/level/tiled/TMXTilesetGroup.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/TMXUtils.js b/dist/melonjs.mjs/level/tiled/TMXUtils.js index 9b931608f3..929c7d55d5 100644 --- a/dist/melonjs.mjs/level/tiled/TMXUtils.js +++ b/dist/melonjs.mjs/level/tiled/TMXUtils.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/constants.js b/dist/melonjs.mjs/level/tiled/constants.js index 0f30e3940f..a2568edfba 100644 --- a/dist/melonjs.mjs/level/tiled/constants.js +++ b/dist/melonjs.mjs/level/tiled/constants.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/renderer/TMXHexagonalRenderer.js b/dist/melonjs.mjs/level/tiled/renderer/TMXHexagonalRenderer.js index 17a02dfef2..04deb1c30c 100644 --- a/dist/melonjs.mjs/level/tiled/renderer/TMXHexagonalRenderer.js +++ b/dist/melonjs.mjs/level/tiled/renderer/TMXHexagonalRenderer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/renderer/TMXIsometricRenderer.js b/dist/melonjs.mjs/level/tiled/renderer/TMXIsometricRenderer.js index 9f1f466e86..2c8557dd11 100644 --- a/dist/melonjs.mjs/level/tiled/renderer/TMXIsometricRenderer.js +++ b/dist/melonjs.mjs/level/tiled/renderer/TMXIsometricRenderer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/renderer/TMXOrthogonalRenderer.js b/dist/melonjs.mjs/level/tiled/renderer/TMXOrthogonalRenderer.js index d14626b363..552bd62f41 100644 --- a/dist/melonjs.mjs/level/tiled/renderer/TMXOrthogonalRenderer.js +++ b/dist/melonjs.mjs/level/tiled/renderer/TMXOrthogonalRenderer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/renderer/TMXRenderer.js b/dist/melonjs.mjs/level/tiled/renderer/TMXRenderer.js index d039e92268..066bd31f8f 100644 --- a/dist/melonjs.mjs/level/tiled/renderer/TMXRenderer.js +++ b/dist/melonjs.mjs/level/tiled/renderer/TMXRenderer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/renderer/TMXStaggeredRenderer.js b/dist/melonjs.mjs/level/tiled/renderer/TMXStaggeredRenderer.js index f3a5a7d7e5..0142de22dd 100644 --- a/dist/melonjs.mjs/level/tiled/renderer/TMXStaggeredRenderer.js +++ b/dist/melonjs.mjs/level/tiled/renderer/TMXStaggeredRenderer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/level/tiled/renderer/autodetect.js b/dist/melonjs.mjs/level/tiled/renderer/autodetect.js index 77d688fcc8..a9aa3c6f5d 100644 --- a/dist/melonjs.mjs/level/tiled/renderer/autodetect.js +++ b/dist/melonjs.mjs/level/tiled/renderer/autodetect.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/cache.js b/dist/melonjs.mjs/loader/cache.js index ab80039633..7d26c1d9be 100644 --- a/dist/melonjs.mjs/loader/cache.js +++ b/dist/melonjs.mjs/loader/cache.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/loader.js b/dist/melonjs.mjs/loader/loader.js index 9c6c8caeb9..57a8288bcb 100644 --- a/dist/melonjs.mjs/loader/loader.js +++ b/dist/melonjs.mjs/loader/loader.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/loadingscreen.js b/dist/melonjs.mjs/loader/loadingscreen.js index a00ee6e647..19fb3ee8b9 100644 --- a/dist/melonjs.mjs/loader/loadingscreen.js +++ b/dist/melonjs.mjs/loader/loadingscreen.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/melonjs_logo.png.js b/dist/melonjs.mjs/loader/melonjs_logo.png.js index 5df3b32ed7..f8d8c961c2 100644 --- a/dist/melonjs.mjs/loader/melonjs_logo.png.js +++ b/dist/melonjs.mjs/loader/melonjs_logo.png.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/parsers/binary.js b/dist/melonjs.mjs/loader/parsers/binary.js index c94e1e1bdf..0dd9586ac6 100644 --- a/dist/melonjs.mjs/loader/parsers/binary.js +++ b/dist/melonjs.mjs/loader/parsers/binary.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/parsers/fontface.js b/dist/melonjs.mjs/loader/parsers/fontface.js index dfd8d76054..443513864c 100644 --- a/dist/melonjs.mjs/loader/parsers/fontface.js +++ b/dist/melonjs.mjs/loader/parsers/fontface.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/parsers/image.js b/dist/melonjs.mjs/loader/parsers/image.js index 017ca94467..8c2fa31f89 100644 --- a/dist/melonjs.mjs/loader/parsers/image.js +++ b/dist/melonjs.mjs/loader/parsers/image.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/parsers/json.js b/dist/melonjs.mjs/loader/parsers/json.js index 6c0de7093e..f6f3fc9b5a 100644 --- a/dist/melonjs.mjs/loader/parsers/json.js +++ b/dist/melonjs.mjs/loader/parsers/json.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/parsers/script.js b/dist/melonjs.mjs/loader/parsers/script.js index 4e3385c834..a1c0cfe4d4 100644 --- a/dist/melonjs.mjs/loader/parsers/script.js +++ b/dist/melonjs.mjs/loader/parsers/script.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/parsers/tmx.js b/dist/melonjs.mjs/loader/parsers/tmx.js index a595cc9908..efd5078e75 100644 --- a/dist/melonjs.mjs/loader/parsers/tmx.js +++ b/dist/melonjs.mjs/loader/parsers/tmx.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/loader/settings.js b/dist/melonjs.mjs/loader/settings.js index 36dc6e5417..15bc96dcf6 100644 --- a/dist/melonjs.mjs/loader/settings.js +++ b/dist/melonjs.mjs/loader/settings.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/math/color.js b/dist/melonjs.mjs/math/color.js index 755145a65d..9bba4d776c 100644 --- a/dist/melonjs.mjs/math/color.js +++ b/dist/melonjs.mjs/math/color.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/math/math.js b/dist/melonjs.mjs/math/math.js index 9340a2aa0f..45c8afc272 100644 --- a/dist/melonjs.mjs/math/math.js +++ b/dist/melonjs.mjs/math/math.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/math/matrix2.js b/dist/melonjs.mjs/math/matrix2.js index 1c258b3c2a..400aa5f843 100644 --- a/dist/melonjs.mjs/math/matrix2.js +++ b/dist/melonjs.mjs/math/matrix2.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/math/matrix3.js b/dist/melonjs.mjs/math/matrix3.js index 3dbed05868..257373c6cd 100644 --- a/dist/melonjs.mjs/math/matrix3.js +++ b/dist/melonjs.mjs/math/matrix3.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/math/observable_vector2.js b/dist/melonjs.mjs/math/observable_vector2.js index 47404d2fa3..c626ac3123 100644 --- a/dist/melonjs.mjs/math/observable_vector2.js +++ b/dist/melonjs.mjs/math/observable_vector2.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/math/observable_vector3.js b/dist/melonjs.mjs/math/observable_vector3.js index 216a2407ed..127dd5ba34 100644 --- a/dist/melonjs.mjs/math/observable_vector3.js +++ b/dist/melonjs.mjs/math/observable_vector3.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/math/vector2.js b/dist/melonjs.mjs/math/vector2.js index 997e0d6abb..147bf48e86 100644 --- a/dist/melonjs.mjs/math/vector2.js +++ b/dist/melonjs.mjs/math/vector2.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/math/vector3.js b/dist/melonjs.mjs/math/vector3.js index a49eb49003..2b02ba8541 100644 --- a/dist/melonjs.mjs/math/vector3.js +++ b/dist/melonjs.mjs/math/vector3.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/particles/emitter.js b/dist/melonjs.mjs/particles/emitter.js index 49d421a173..17804cda24 100644 --- a/dist/melonjs.mjs/particles/emitter.js +++ b/dist/melonjs.mjs/particles/emitter.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/particles/particle.js b/dist/melonjs.mjs/particles/particle.js index 01ee5a3a96..3f21abf31d 100644 --- a/dist/melonjs.mjs/particles/particle.js +++ b/dist/melonjs.mjs/particles/particle.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/particles/settings.js b/dist/melonjs.mjs/particles/settings.js index a81551a9a0..a21a5b741d 100644 --- a/dist/melonjs.mjs/particles/settings.js +++ b/dist/melonjs.mjs/particles/settings.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/physics/body.js b/dist/melonjs.mjs/physics/body.js index 7bb7744fd6..1fdbcc1e63 100644 --- a/dist/melonjs.mjs/physics/body.js +++ b/dist/melonjs.mjs/physics/body.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/physics/bounds.js b/dist/melonjs.mjs/physics/bounds.js index 9027a21b60..65c4f6dbf7 100644 --- a/dist/melonjs.mjs/physics/bounds.js +++ b/dist/melonjs.mjs/physics/bounds.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/physics/collision.js b/dist/melonjs.mjs/physics/collision.js index 0c27327ed4..c5aca1ac48 100644 --- a/dist/melonjs.mjs/physics/collision.js +++ b/dist/melonjs.mjs/physics/collision.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/physics/detector.js b/dist/melonjs.mjs/physics/detector.js index fa14e8008e..0afc7ccc8d 100644 --- a/dist/melonjs.mjs/physics/detector.js +++ b/dist/melonjs.mjs/physics/detector.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/physics/quadtree.js b/dist/melonjs.mjs/physics/quadtree.js index 1d9da7887c..5a5daf1d00 100644 --- a/dist/melonjs.mjs/physics/quadtree.js +++ b/dist/melonjs.mjs/physics/quadtree.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/physics/response.js b/dist/melonjs.mjs/physics/response.js index 82569ef0b5..a7876b7d9d 100644 --- a/dist/melonjs.mjs/physics/response.js +++ b/dist/melonjs.mjs/physics/response.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/physics/sat.js b/dist/melonjs.mjs/physics/sat.js index 6141d8f7f5..e331d673fc 100644 --- a/dist/melonjs.mjs/physics/sat.js +++ b/dist/melonjs.mjs/physics/sat.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/physics/world.js b/dist/melonjs.mjs/physics/world.js index 8cf8283de9..93f325b1ad 100644 --- a/dist/melonjs.mjs/physics/world.js +++ b/dist/melonjs.mjs/physics/world.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/plugin/plugin.js b/dist/melonjs.mjs/plugin/plugin.js index a054c66895..6a98c2428a 100644 --- a/dist/melonjs.mjs/plugin/plugin.js +++ b/dist/melonjs.mjs/plugin/plugin.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license @@ -37,9 +37,9 @@ class BasePlugin { * define the minimum required version of melonJS
* this can be overridden by the plugin * @type {string} - * @default "15.14.0" + * @default "15.15.0" */ - this.version = "15.14.0"; + this.version = "15.15.0"; /** * a reference to the app/game that registered this plugin diff --git a/dist/melonjs.mjs/renderable/collectable.js b/dist/melonjs.mjs/renderable/collectable.js index cb2359273c..aa46854f90 100644 --- a/dist/melonjs.mjs/renderable/collectable.js +++ b/dist/melonjs.mjs/renderable/collectable.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/colorlayer.js b/dist/melonjs.mjs/renderable/colorlayer.js index 6ab0e8aed4..d6eff7d5ab 100644 --- a/dist/melonjs.mjs/renderable/colorlayer.js +++ b/dist/melonjs.mjs/renderable/colorlayer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/container.js b/dist/melonjs.mjs/renderable/container.js index 02fd794a0a..c0d71d662e 100644 --- a/dist/melonjs.mjs/renderable/container.js +++ b/dist/melonjs.mjs/renderable/container.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/draggable.js b/dist/melonjs.mjs/renderable/draggable.js index 8595c28d98..e0551871a7 100644 --- a/dist/melonjs.mjs/renderable/draggable.js +++ b/dist/melonjs.mjs/renderable/draggable.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/dragndrop.js b/dist/melonjs.mjs/renderable/dragndrop.js index 20c01cc4be..f89a999383 100644 --- a/dist/melonjs.mjs/renderable/dragndrop.js +++ b/dist/melonjs.mjs/renderable/dragndrop.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/entity/entity.js b/dist/melonjs.mjs/renderable/entity/entity.js index f65ddee753..53e431f4f2 100644 --- a/dist/melonjs.mjs/renderable/entity/entity.js +++ b/dist/melonjs.mjs/renderable/entity/entity.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/imagelayer.js b/dist/melonjs.mjs/renderable/imagelayer.js index a63132a279..cb79d2d4d2 100644 --- a/dist/melonjs.mjs/renderable/imagelayer.js +++ b/dist/melonjs.mjs/renderable/imagelayer.js @@ -1,12 +1,12 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license * @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd) */ import { renderer } from '../video/video.js'; -import { on, ONCONTEXT_RESTORED, VIEWPORT_ONCHANGE, VIEWPORT_ONRESIZE, once, off, LEVEL_LOADED } from '../system/event.js'; +import { on, ONCONTEXT_RESTORED, VIEWPORT_ONCHANGE, VIEWPORT_ONRESIZE, LEVEL_LOADED, off } from '../system/event.js'; import pool from '../system/pooling.js'; import { game } from '../index.js'; import Sprite from './sprite.js'; @@ -130,14 +130,12 @@ class ImageLayer extends Sprite { on(VIEWPORT_ONCHANGE, this.updateLayer, this); on(VIEWPORT_ONRESIZE, this.resize, this); // force a first refresh when the level is loaded - once(LEVEL_LOADED, () => { - this.updateLayer(game.viewport.pos); - }); + on(LEVEL_LOADED, this.updateLayer, this); // in case the level is not added to the root container, // the onActivateEvent call happens after the LEVEL_LOADED event // so we need to force a first update if (this.ancestor.root !== true) { - this.updateLayer(game.viewport.pos); + this.updateLayer(); } } @@ -165,10 +163,12 @@ class ImageLayer extends Sprite { * updateLayer function * @ignore */ - updateLayer(vpos) { + updateLayer() { const rx = this.ratio.x, ry = this.ratio.y; + const viewport = game.viewport; + if (rx === 0 && ry === 0) { // static image return; @@ -176,8 +176,8 @@ class ImageLayer extends Sprite { const width = this.width, height = this.height, - bw = game.viewport.bounds.width, - bh = game.viewport.bounds.height, + bw = viewport.bounds.width, + bh = viewport.bounds.height, ax = this.anchorPoint.x, ay = this.anchorPoint.y, @@ -187,8 +187,8 @@ class ImageLayer extends Sprite { * See https://github.com/melonjs/melonJS/issues/741#issuecomment-138431532 * for a thorough description of how this works. */ - x = ax * (rx - 1) * (bw - game.viewport.width) + this.offset.x - rx * vpos.x, - y = ay * (ry - 1) * (bh - game.viewport.height) + this.offset.y - ry * vpos.y; + x = ax * (rx - 1) * (bw - viewport.width) + this.offset.x - rx * viewport.pos.x, + y = ay * (ry - 1) * (bh - viewport.height) + this.offset.y - ry * viewport.pos.y; // Repeat horizontally; start drawing from left boundary @@ -269,6 +269,7 @@ class ImageLayer extends Sprite { // cancel all event subscriptions off(VIEWPORT_ONCHANGE, this.updateLayer); off(VIEWPORT_ONRESIZE, this.resize); + off(LEVEL_LOADED, this.updateLayer); } /** diff --git a/dist/melonjs.mjs/renderable/light2d.js b/dist/melonjs.mjs/renderable/light2d.js index 90a39d132d..55a4ccca85 100644 --- a/dist/melonjs.mjs/renderable/light2d.js +++ b/dist/melonjs.mjs/renderable/light2d.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/nineslicesprite.js b/dist/melonjs.mjs/renderable/nineslicesprite.js index d4b1b110f2..e88be3fd9b 100644 --- a/dist/melonjs.mjs/renderable/nineslicesprite.js +++ b/dist/melonjs.mjs/renderable/nineslicesprite.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/renderable.js b/dist/melonjs.mjs/renderable/renderable.js index 7ba079d853..2aeb53a5fe 100644 --- a/dist/melonjs.mjs/renderable/renderable.js +++ b/dist/melonjs.mjs/renderable/renderable.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license @@ -265,6 +265,9 @@ class Renderable extends Rect { // viewport flag this._inViewport = false; + // cache value for the parentApp + this._parentApp = undefined; + // renderable cache tint value used by the getter/setter this._tint = pool.pull("Color", 255, 255, 255, 1.0); @@ -272,6 +275,20 @@ class Renderable extends Rect { this.setOpacity(1.0); } + /** + * returns the parent application (or game) to which this renderable is attached to + * @return {Application} the parent application or undefined if not attached to any container/app + */ + get parentApp() { + if (typeof this._parentApp === "undefined") { + if (typeof this.ancestor !== "undefined" && typeof this.ancestor.getRootAncestor === "function") { + // the `app` property is only defined in the world "root" container + this._parentApp = this.ancestor.getRootAncestor().app; + } + } + return this._parentApp; + } + /** * Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container * @see Renderable#floating @@ -797,6 +814,7 @@ class Renderable extends Rect { } this.ancestor = undefined; + this._parentApp = undefined; // destroy the physic body if defined and is a builtin body object if ((typeof this.body !== "undefined") && (typeof this.body.destroy === "function")) { diff --git a/dist/melonjs.mjs/renderable/sprite.js b/dist/melonjs.mjs/renderable/sprite.js index a7f3b39a8b..6f74d2261f 100644 --- a/dist/melonjs.mjs/renderable/sprite.js +++ b/dist/melonjs.mjs/renderable/sprite.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/text/bitmaptext.js b/dist/melonjs.mjs/renderable/text/bitmaptext.js index 7f8deb602d..951529b45a 100644 --- a/dist/melonjs.mjs/renderable/text/bitmaptext.js +++ b/dist/melonjs.mjs/renderable/text/bitmaptext.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/text/bitmaptextdata.js b/dist/melonjs.mjs/renderable/text/bitmaptextdata.js index 311ad52b17..6f6c51c30f 100644 --- a/dist/melonjs.mjs/renderable/text/bitmaptextdata.js +++ b/dist/melonjs.mjs/renderable/text/bitmaptextdata.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/text/glyph.js b/dist/melonjs.mjs/renderable/text/glyph.js index 2227c2f485..a566d6e51d 100644 --- a/dist/melonjs.mjs/renderable/text/glyph.js +++ b/dist/melonjs.mjs/renderable/text/glyph.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/text/text.js b/dist/melonjs.mjs/renderable/text/text.js index d64ca3a4d1..3140ba2e1e 100644 --- a/dist/melonjs.mjs/renderable/text/text.js +++ b/dist/melonjs.mjs/renderable/text/text.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/text/textmetrics.js b/dist/melonjs.mjs/renderable/text/textmetrics.js index 83c7c6bfae..87286d8924 100644 --- a/dist/melonjs.mjs/renderable/text/textmetrics.js +++ b/dist/melonjs.mjs/renderable/text/textmetrics.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/text/textstyle.js b/dist/melonjs.mjs/renderable/text/textstyle.js index e55267a476..14bd10792c 100644 --- a/dist/melonjs.mjs/renderable/text/textstyle.js +++ b/dist/melonjs.mjs/renderable/text/textstyle.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/trigger.js b/dist/melonjs.mjs/renderable/trigger.js index 31fefe87c3..7452838812 100644 --- a/dist/melonjs.mjs/renderable/trigger.js +++ b/dist/melonjs.mjs/renderable/trigger.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/ui/uibaseelement.js b/dist/melonjs.mjs/renderable/ui/uibaseelement.js index 8332bbd4e6..8e7bf01a24 100644 --- a/dist/melonjs.mjs/renderable/ui/uibaseelement.js +++ b/dist/melonjs.mjs/renderable/ui/uibaseelement.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/ui/uispriteelement.js b/dist/melonjs.mjs/renderable/ui/uispriteelement.js index d28834d302..ab017b3cd3 100644 --- a/dist/melonjs.mjs/renderable/ui/uispriteelement.js +++ b/dist/melonjs.mjs/renderable/ui/uispriteelement.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/renderable/ui/uitextbutton.js b/dist/melonjs.mjs/renderable/ui/uitextbutton.js index 4c69a1d3b3..897bd3cbe4 100644 --- a/dist/melonjs.mjs/renderable/ui/uitextbutton.js +++ b/dist/melonjs.mjs/renderable/ui/uitextbutton.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/state/stage.js b/dist/melonjs.mjs/state/stage.js index 7ff10e1fc7..9d9bcb70c1 100644 --- a/dist/melonjs.mjs/state/stage.js +++ b/dist/melonjs.mjs/state/stage.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/state/state.js b/dist/melonjs.mjs/state/state.js index 7b74a117b2..9135d931ae 100644 --- a/dist/melonjs.mjs/state/state.js +++ b/dist/melonjs.mjs/state/state.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/system/device.js b/dist/melonjs.mjs/system/device.js index 3088126cdf..18b0f6311d 100644 --- a/dist/melonjs.mjs/system/device.js +++ b/dist/melonjs.mjs/system/device.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/system/dom.js b/dist/melonjs.mjs/system/dom.js index 3e7d4d0384..edead2e3b8 100644 --- a/dist/melonjs.mjs/system/dom.js +++ b/dist/melonjs.mjs/system/dom.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/system/event.js b/dist/melonjs.mjs/system/event.js index 8b2c2fc92f..8b96d5f593 100644 --- a/dist/melonjs.mjs/system/event.js +++ b/dist/melonjs.mjs/system/event.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/system/platform.js b/dist/melonjs.mjs/system/platform.js index 0a8612a85c..4a4fee5a6c 100644 --- a/dist/melonjs.mjs/system/platform.js +++ b/dist/melonjs.mjs/system/platform.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/system/pooling.js b/dist/melonjs.mjs/system/pooling.js index 7e8d9461a8..4ec45c8b86 100644 --- a/dist/melonjs.mjs/system/pooling.js +++ b/dist/melonjs.mjs/system/pooling.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/system/save.js b/dist/melonjs.mjs/system/save.js index 80a99b5d72..997936de5f 100644 --- a/dist/melonjs.mjs/system/save.js +++ b/dist/melonjs.mjs/system/save.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/system/timer.js b/dist/melonjs.mjs/system/timer.js index a55dcb0c16..dd3d8e24d4 100644 --- a/dist/melonjs.mjs/system/timer.js +++ b/dist/melonjs.mjs/system/timer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/tweens/easing.js b/dist/melonjs.mjs/tweens/easing.js index 4bf99e0389..1355d78a76 100644 --- a/dist/melonjs.mjs/tweens/easing.js +++ b/dist/melonjs.mjs/tweens/easing.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/tweens/interpolation.js b/dist/melonjs.mjs/tweens/interpolation.js index f4da5e522f..df80dba0f2 100644 --- a/dist/melonjs.mjs/tweens/interpolation.js +++ b/dist/melonjs.mjs/tweens/interpolation.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/tweens/tween.js b/dist/melonjs.mjs/tweens/tween.js index 262d143a1c..42a7e34e17 100644 --- a/dist/melonjs.mjs/tweens/tween.js +++ b/dist/melonjs.mjs/tweens/tween.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/utils/agent.js b/dist/melonjs.mjs/utils/agent.js index 0de56fcd29..a177035476 100644 --- a/dist/melonjs.mjs/utils/agent.js +++ b/dist/melonjs.mjs/utils/agent.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/utils/array.js b/dist/melonjs.mjs/utils/array.js index 0d556948f3..236b759f24 100644 --- a/dist/melonjs.mjs/utils/array.js +++ b/dist/melonjs.mjs/utils/array.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/utils/file.js b/dist/melonjs.mjs/utils/file.js index 9e06b7fdf1..8733cef011 100644 --- a/dist/melonjs.mjs/utils/file.js +++ b/dist/melonjs.mjs/utils/file.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/utils/function.js b/dist/melonjs.mjs/utils/function.js index 8c5c2a2ad4..83a3f59602 100644 --- a/dist/melonjs.mjs/utils/function.js +++ b/dist/melonjs.mjs/utils/function.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/utils/string.js b/dist/melonjs.mjs/utils/string.js index c7a8517ecc..406ce6c33e 100644 --- a/dist/melonjs.mjs/utils/string.js +++ b/dist/melonjs.mjs/utils/string.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/utils/utils.js b/dist/melonjs.mjs/utils/utils.js index d9e886a651..e88ebe1df6 100644 --- a/dist/melonjs.mjs/utils/utils.js +++ b/dist/melonjs.mjs/utils/utils.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/canvas/canvas_renderer.js b/dist/melonjs.mjs/video/canvas/canvas_renderer.js index 8eaf2273ef..835234945d 100644 --- a/dist/melonjs.mjs/video/canvas/canvas_renderer.js +++ b/dist/melonjs.mjs/video/canvas/canvas_renderer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/renderer.js b/dist/melonjs.mjs/video/renderer.js index 9b4f12d0eb..466a05d7ad 100644 --- a/dist/melonjs.mjs/video/renderer.js +++ b/dist/melonjs.mjs/video/renderer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/texture/atlas.js b/dist/melonjs.mjs/video/texture/atlas.js index 9b00f42254..c2cacc1181 100644 --- a/dist/melonjs.mjs/video/texture/atlas.js +++ b/dist/melonjs.mjs/video/texture/atlas.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/texture/cache.js b/dist/melonjs.mjs/video/texture/cache.js index 04dad4eb33..28f3b1a04f 100644 --- a/dist/melonjs.mjs/video/texture/cache.js +++ b/dist/melonjs.mjs/video/texture/cache.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/texture/canvas_texture.js b/dist/melonjs.mjs/video/texture/canvas_texture.js index 8dfde8e353..9f0db859ac 100644 --- a/dist/melonjs.mjs/video/texture/canvas_texture.js +++ b/dist/melonjs.mjs/video/texture/canvas_texture.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/utils/autodetect.js b/dist/melonjs.mjs/video/utils/autodetect.js index 7b202a1117..053691bc9f 100644 --- a/dist/melonjs.mjs/video/utils/autodetect.js +++ b/dist/melonjs.mjs/video/utils/autodetect.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/video.js b/dist/melonjs.mjs/video/video.js index 14491301c9..63e8b06723 100644 --- a/dist/melonjs.mjs/video/video.js +++ b/dist/melonjs.mjs/video/video.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/buffer/vertex.js b/dist/melonjs.mjs/video/webgl/buffer/vertex.js index ce90066f33..fb0facf3d5 100644 --- a/dist/melonjs.mjs/video/webgl/buffer/vertex.js +++ b/dist/melonjs.mjs/video/webgl/buffer/vertex.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/compositors/compositor.js b/dist/melonjs.mjs/video/webgl/compositors/compositor.js index 0576422d51..f13db4f7aa 100644 --- a/dist/melonjs.mjs/video/webgl/compositors/compositor.js +++ b/dist/melonjs.mjs/video/webgl/compositors/compositor.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/compositors/primitive_compositor.js b/dist/melonjs.mjs/video/webgl/compositors/primitive_compositor.js index d193bf0aeb..9a4ba5daa4 100644 --- a/dist/melonjs.mjs/video/webgl/compositors/primitive_compositor.js +++ b/dist/melonjs.mjs/video/webgl/compositors/primitive_compositor.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/compositors/quad_compositor.js b/dist/melonjs.mjs/video/webgl/compositors/quad_compositor.js index 532f673fce..87b275702b 100644 --- a/dist/melonjs.mjs/video/webgl/compositors/quad_compositor.js +++ b/dist/melonjs.mjs/video/webgl/compositors/quad_compositor.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/glshader.js b/dist/melonjs.mjs/video/webgl/glshader.js index bc34ae8181..5e9e3c437b 100644 --- a/dist/melonjs.mjs/video/webgl/glshader.js +++ b/dist/melonjs.mjs/video/webgl/glshader.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/shaders/primitive.frag.js b/dist/melonjs.mjs/video/webgl/shaders/primitive.frag.js index ab08989c5b..e586f0e8b9 100644 --- a/dist/melonjs.mjs/video/webgl/shaders/primitive.frag.js +++ b/dist/melonjs.mjs/video/webgl/shaders/primitive.frag.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/shaders/primitive.vert.js b/dist/melonjs.mjs/video/webgl/shaders/primitive.vert.js index c8611b9780..ae5206dafd 100644 --- a/dist/melonjs.mjs/video/webgl/shaders/primitive.vert.js +++ b/dist/melonjs.mjs/video/webgl/shaders/primitive.vert.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/shaders/quad.frag.js b/dist/melonjs.mjs/video/webgl/shaders/quad.frag.js index 6c8593d25f..94f2b2252a 100644 --- a/dist/melonjs.mjs/video/webgl/shaders/quad.frag.js +++ b/dist/melonjs.mjs/video/webgl/shaders/quad.frag.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/shaders/quad.vert.js b/dist/melonjs.mjs/video/webgl/shaders/quad.vert.js index 70c0e80a08..9d53a5d4fc 100644 --- a/dist/melonjs.mjs/video/webgl/shaders/quad.vert.js +++ b/dist/melonjs.mjs/video/webgl/shaders/quad.vert.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/utils/attributes.js b/dist/melonjs.mjs/video/webgl/utils/attributes.js index 6799a380a6..4e1ec5ccf8 100644 --- a/dist/melonjs.mjs/video/webgl/utils/attributes.js +++ b/dist/melonjs.mjs/video/webgl/utils/attributes.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/utils/precision.js b/dist/melonjs.mjs/video/webgl/utils/precision.js index 8327681408..f6d78792eb 100644 --- a/dist/melonjs.mjs/video/webgl/utils/precision.js +++ b/dist/melonjs.mjs/video/webgl/utils/precision.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/utils/program.js b/dist/melonjs.mjs/video/webgl/utils/program.js index f3d5a17ccb..b7e47097f5 100644 --- a/dist/melonjs.mjs/video/webgl/utils/program.js +++ b/dist/melonjs.mjs/video/webgl/utils/program.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/utils/string.js b/dist/melonjs.mjs/video/webgl/utils/string.js index a7032ce482..aac189790b 100644 --- a/dist/melonjs.mjs/video/webgl/utils/string.js +++ b/dist/melonjs.mjs/video/webgl/utils/string.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/utils/uniforms.js b/dist/melonjs.mjs/video/webgl/utils/uniforms.js index 7b1b05767f..84b8f0b90b 100644 --- a/dist/melonjs.mjs/video/webgl/utils/uniforms.js +++ b/dist/melonjs.mjs/video/webgl/utils/uniforms.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.mjs/video/webgl/webgl_renderer.js b/dist/melonjs.mjs/video/webgl/webgl_renderer.js index dbf24a8c68..6046abbb7c 100644 --- a/dist/melonjs.mjs/video/webgl/webgl_renderer.js +++ b/dist/melonjs.mjs/video/webgl/webgl_renderer.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/melonjs.module.js b/dist/melonjs.module.js index 19ce449dd8..f859cd857c 100644 --- a/dist/melonjs.module.js +++ b/dist/melonjs.module.js @@ -1,5 +1,5 @@ /*! - * melonJS Game Engine - v15.14.0 + * melonJS Game Engine - v15.15.0 * http://www.melonjs.org * melonjs is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license @@ -61,8 +61,9 @@ var global$e = // eslint-disable-next-line no-restricted-globals -- safe check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || + check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback - (function () { return this; })() || commonjsGlobal || Function('return this')(); + (function () { return this; })() || Function('return this')(); var global$f = /*@__PURE__*/getDefaultExportFromCjs(global$e); @@ -473,10 +474,10 @@ var store$2 = sharedStore; (shared$5.exports = function (key, value) { return store$2[key] || (store$2[key] = value !== undefined ? value : {}); })('versions', []).push({ - version: '3.33.0', + version: '3.33.3', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)', - license: 'https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE', + license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE', source: 'https://github.com/zloirock/core-js' }); @@ -17622,6 +17623,9 @@ class Renderable extends Rect { // viewport flag this._inViewport = false; + // cache value for the parentApp + this._parentApp = undefined; + // renderable cache tint value used by the getter/setter this._tint = pool.pull("Color", 255, 255, 255, 1.0); @@ -17629,6 +17633,20 @@ class Renderable extends Rect { this.setOpacity(1.0); } + /** + * returns the parent application (or game) to which this renderable is attached to + * @return {Application} the parent application or undefined if not attached to any container/app + */ + get parentApp() { + if (typeof this._parentApp === "undefined") { + if (typeof this.ancestor !== "undefined" && typeof this.ancestor.getRootAncestor === "function") { + // the `app` property is only defined in the world "root" container + this._parentApp = this.ancestor.getRootAncestor().app; + } + } + return this._parentApp; + } + /** * Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container * @see Renderable#floating @@ -18154,6 +18172,7 @@ class Renderable extends Rect { } this.ancestor = undefined; + this._parentApp = undefined; // destroy the physic body if defined and is a builtin body object if ((typeof this.body !== "undefined") && (typeof this.body.destroy === "function")) { @@ -33066,14 +33085,12 @@ class ImageLayer extends Sprite { on(VIEWPORT_ONCHANGE, this.updateLayer, this); on(VIEWPORT_ONRESIZE, this.resize, this); // force a first refresh when the level is loaded - once(LEVEL_LOADED, () => { - this.updateLayer(game.viewport.pos); - }); + on(LEVEL_LOADED, this.updateLayer, this); // in case the level is not added to the root container, // the onActivateEvent call happens after the LEVEL_LOADED event // so we need to force a first update if (this.ancestor.root !== true) { - this.updateLayer(game.viewport.pos); + this.updateLayer(); } } @@ -33101,10 +33118,12 @@ class ImageLayer extends Sprite { * updateLayer function * @ignore */ - updateLayer(vpos) { + updateLayer() { const rx = this.ratio.x, ry = this.ratio.y; + const viewport = game.viewport; + if (rx === 0 && ry === 0) { // static image return; @@ -33112,8 +33131,8 @@ class ImageLayer extends Sprite { const width = this.width, height = this.height, - bw = game.viewport.bounds.width, - bh = game.viewport.bounds.height, + bw = viewport.bounds.width, + bh = viewport.bounds.height, ax = this.anchorPoint.x, ay = this.anchorPoint.y, @@ -33123,8 +33142,8 @@ class ImageLayer extends Sprite { * See https://github.com/melonjs/melonJS/issues/741#issuecomment-138431532 * for a thorough description of how this works. */ - x = ax * (rx - 1) * (bw - game.viewport.width) + this.offset.x - rx * vpos.x, - y = ay * (ry - 1) * (bh - game.viewport.height) + this.offset.y - ry * vpos.y; + x = ax * (rx - 1) * (bw - viewport.width) + this.offset.x - rx * viewport.pos.x, + y = ay * (ry - 1) * (bh - viewport.height) + this.offset.y - ry * viewport.pos.y; // Repeat horizontally; start drawing from left boundary @@ -33205,6 +33224,7 @@ class ImageLayer extends Sprite { // cancel all event subscriptions off(VIEWPORT_ONCHANGE, this.updateLayer); off(VIEWPORT_ONRESIZE, this.resize); + off(LEVEL_LOADED, this.updateLayer); } /** @@ -38436,9 +38456,9 @@ class BasePlugin { * define the minimum required version of melonJS
* this can be overridden by the plugin * @type {string} - * @default "15.14.0" + * @default "15.15.0" */ - this.version = "15.14.0"; + this.version = "15.15.0"; /** * a reference to the app/game that registered this plugin @@ -38720,7 +38740,7 @@ Renderer.prototype.getHeight = function() { * @name version * @type {string} */ -const version = "15.14.0"; +const version = "15.15.0"; /** * a flag indicating that melonJS is fully initialized diff --git a/dist/types/renderable/imagelayer.d.ts b/dist/types/renderable/imagelayer.d.ts index 89e121c0ec..60721f8026 100644 --- a/dist/types/renderable/imagelayer.d.ts +++ b/dist/types/renderable/imagelayer.d.ts @@ -67,7 +67,7 @@ export default class ImageLayer extends Sprite { * updateLayer function * @ignore */ - updateLayer(vpos: any): void; + updateLayer(): void; /** * override the default predraw function * as repeat and anchor are managed directly in the draw method diff --git a/dist/types/renderable/renderable.d.ts b/dist/types/renderable/renderable.d.ts index 982a005712..924de3aca4 100644 --- a/dist/types/renderable/renderable.d.ts +++ b/dist/types/renderable/renderable.d.ts @@ -199,7 +199,13 @@ export default class Renderable extends Rect { y: boolean; }; _inViewport: boolean; + _parentApp: any; _tint: object; + /** + * returns the parent application (or game) to which this renderable is attached to + * @return {Application} the parent application or undefined if not attached to any container/app + */ + get parentApp(): Application; /** * Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container * @see Renderable#floating diff --git a/docs/docs/Class-Index.html b/docs/docs/Class-Index.html index b842e2de74..32a9f50fd3 100644 --- a/docs/docs/Class-Index.html +++ b/docs/docs/Class-Index.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/index.html b/docs/docs/index.html index 6c66a60fdf..1dd6f01eb5 100644 --- a/docs/docs/index.html +++ b/docs/docs/index.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs.api.json b/docs/docs/melonjs.api.json index a7767bfdec..d51302d06f 100644 --- a/docs/docs/melonjs.api.json +++ b/docs/docs/melonjs.api.json @@ -1 +1 @@ -{"version":"1.0.0","metadata":{"linker":"(unsigned)","siteRoot":"melonJS/docs"},"root":{"id":"root-DwmjkEuNQZDUny1jfrFnY","name":"","type":"RootDoc","members":[{"id":"MNsGh-wpZpzzNJh_BsRfD","name":"audio","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"f1-xBTH8VE-xCgkIumXnO","name":"stopOnAudioError","brief":"","defaultValue":"true","type":"PropertyDoc","description":"

Specify either to stop on audio loading error or not
\nif true, melonJS will throw an exception and stop loading
\nif ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e5r4x9f7TxU1EFBXG6GmV","name":"disable","brief":"","scope":"static","type":"FunctionDoc","description":"

disable audio output

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y0Qblv-yYZ437okc4lYXE","name":"enable","brief":"","scope":"static","see":["audio.disable"],"type":"FunctionDoc","description":"

enable audio output
\nonly useful if audio supported and previously disabled through

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s5eyvd1NKrwpf9_bt6TPU","name":"fade","brief":"","scope":"static","type":"FunctionDoc","description":"

Fade a currently playing sound between two volumee.

","params":[{"identifier":"sound_name","optional":false,"description":"

audio clip name - case sensitive

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"from","optional":false,"description":"

Volume to fade from (0.0 to 1.0).

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"to","optional":false,"description":"

Volume to fade to (0.0 to 1.0).

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"duration","optional":false,"description":"

Time in milliseconds to fade.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"id","optional":true,"description":"

the sound instance ID. If none is passed, all sounds in group will fade.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"KiEEI15GTv1w7trNCkhB6","name":"getCurrentTrack","brief":"","scope":"static","type":"FunctionDoc","description":"

returns the current track Id

","params":[],"returns":[{"description":"

audio track name

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"TJdJcuuSMk_EAXgwjvM7d","name":"getVolume","brief":"","scope":"static","type":"FunctionDoc","description":"

get the default global volume

","params":[],"returns":[{"description":"

current volume value in Float [0.0 - 1.0] .

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"V5jFtEnLaokIMuY-6-mqs","name":"hasAudio","brief":"","scope":"static","type":"FunctionDoc","description":"

check if audio (HTML5 or WebAudio) is supported

","params":[],"returns":[{"description":"

return true if audio (HTML5 or WebAudio) is supported

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"QqcO_Az3vlw5h2Rp2mpEF","name":"hasFormat","brief":"","scope":"static","type":"FunctionDoc","description":"

check if the given audio format is supported

","params":[{"identifier":"codec","optional":false,"description":"

the audio format to check for support

","dataType":{"tokens":[{"value":"\"mp3\" | \"mpeg\" | \"opus\" | \"ogg\" | \"oga\" | \"wav\" | \"aac\" | \"caf\" | \"m4a\" | \"m4b\" | \"mp4\" | \"weba\" | \"webm\" | \"dolby\" | \"flac\"","kind":"canonical"},{"value":"\"mp3\"","kind":"canonical"},{"value":"\"mpeg\"","kind":"canonical"},{"value":"\"opus\"","kind":"canonical"},{"value":"\"ogg\"","kind":"canonical"},{"value":"\"oga\"","kind":"canonical"},{"value":"\"wav\"","kind":"canonical"},{"value":"\"aac\"","kind":"canonical"},{"value":"\"caf\"","kind":"canonical"},{"value":"\"m4a\"","kind":"canonical"},{"value":"\"m4b\"","kind":"canonical"},{"value":"\"mp4\"","kind":"canonical"},{"value":"\"weba\"","kind":"canonical"},{"value":"\"webm\"","kind":"canonical"},{"value":"\"dolby\"","kind":"canonical"},{"value":"\"flac\"","kind":"canonical"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15"}}],"returns":[{"description":"

return true if the given audio format is supported

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"4iXfwPU00RvRu69TQBVWg","name":"init","brief":"","examples":[{"caption":"","code":"// initialize the \"sound engine\", giving \"webm\" as default desired audio format, and \"mp3\" as a fallback\nif (!me.audio.init(\"webm,mp3\")) {\n alert(\"Sorry but your browser does not support html 5 audio !\");\n return;\n}"}],"scope":"static","type":"FunctionDoc","description":"

Initialize and configure the audio support.
\nFor a maximum browser coverage the recommendation is to use at least two o...","params":[{"identifier":"format","optional":true,"default":"\"mp3\"","description":"

audio format to prioritize ("mp3"|"mpeg"|"opus"|"ogg"|"oga"|"wav&qu...","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

Indicates whether audio initialization was successful

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"q_bL_bEFJmn8_H7gCVa99","name":"load","brief":"","scope":"static","type":"FunctionDoc","description":"

Load an audio file

","params":[{"identifier":"sound","optional":false,"dataType":{"tokens":[{"value":"loader.Asset","kind":"canonical"},{"value":"loader.Asset","kind":"link"}],"template":"%1"}},{"identifier":"onloadcb","optional":true,"description":"

function to be called when the resource is loaded

","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"onerrorcb","optional":true,"description":"

function to be called in case of error

","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

the amount of asset loaded (always 1 if successfull)

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mOo_qGQc7UDf0u2tXU1VU","name":"mute","brief":"","examples":[{"caption":"","code":"// mute the background music\nme.audio.mute(\"awesome_music\");"}],"scope":"static","type":"FunctionDoc","description":"

mute or unmute the specified sound, but does not pause the playback.

","params":[{"identifier":"sound_name","optional":false,"description":"

audio clip name - case sensitive

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

the sound instance ID. If none is passed, all sounds in group will mute.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"mute","optional":true,"default":"true","description":"

True to mute and false to unmute

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"OGTYa2Hmnp-acDEqeuZec","name":"muteAll","brief":"","scope":"static","type":"FunctionDoc","description":"

mute all audio

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FueS5nIyMi83Mqfplr1Vi","name":"muted","brief":"","scope":"static","type":"FunctionDoc","description":"

Returns true if audio is muted globally.

","params":[],"returns":[{"description":"

true if audio is muted globally

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"VLMYR1CtaNhEq-rHHvVIn","name":"pause","brief":"","examples":[{"caption":"","code":"me.audio.pause(\"cling\");"}],"scope":"static","type":"FunctionDoc","description":"

pause the specified sound on all channels
\nthis function does not reset the currentTime property

","params":[{"identifier":"sound_name","optional":false,"description":"

audio clip name - case sensitive

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

the sound instance ID. If none is passed, all sounds in group will pause.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"mC0JlFpSjXQGRA54RlrE_","name":"pauseTrack","brief":"","examples":[{"caption":"","code":"me.audio.pauseTrack();"}],"scope":"static","type":"FunctionDoc","description":"

pause the current audio track

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6Sw_x6pJSlfOZ-S8IqH32","name":"play","brief":"","examples":[{"caption":"","code":"// play the \"cling\" audio clip\nme.audio.play(\"cling\");\n// play & repeat the \"engine\" audio clip\nme.audio.play(\"engine\", true);\n// play the \"gameover_sfx\" audio clip and call myFunc when finished\nme.audio.play(\"gameover_sfx\", false, myFunc);\n// play the \"gameover_sfx\" audio clip with a lower volume level\nme.audio.play(\"gameover_sfx\", false, null, 0.5);"}],"scope":"static","type":"FunctionDoc","description":"

play the specified sound

","params":[{"identifier":"sound_name","optional":false,"description":"

audio clip name - case sensitive

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"loop","optional":true,"default":"false","description":"

loop audio

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"onend","optional":true,"description":"

Function to call when sound instance ends playing.

","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"volume","optional":true,"default":"default","description":"

Float specifying volume (0.0 - 1.0 values accepted).

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

the sound instance ID.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Pkmhhl8Db5ouiTMvJjg-C","name":"playTrack","brief":"","examples":[{"caption":"","code":"me.audio.playTrack(\"awesome_music\");"}],"scope":"static","type":"FunctionDoc","description":"

play the specified audio track
\nthis function automatically set the loop property to true
\nand keep track of the cur...","params":[{"identifier":"sound_name","optional":false,"description":"

audio track name - case sensitive

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"volume","optional":true,"default":"default","description":"

Float specifying volume (0.0 - 1.0 values accepted).

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

the sound instance ID.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"WVmybg7MsayKmBCdbqC5f","name":"rate","brief":"","examples":[{"caption":"","code":"// get the playback rate of the background music\nlet rate = me.audio.rate(\"dst-gameforest\");\n// speed up the playback of the background music\nme.audio.rate(\"dst-gameforest\", 2.0);"}],"scope":"static","type":"FunctionDoc","description":"

get or set the rate of playback for a sound.

","params":[{"identifier":"sound_name","optional":false,"description":"

audio clip name - case sensitive

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"rate","optional":true,"variadic":true,"description":"

playback rate : 0.5 to 4.0, with 1.0 being normal speed.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"id","optional":true,"description":"

the sound instance ID. If none is passed, all sounds in group will be changed.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

return the current playback rate (if no extra parameters were given)

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"A2dmhuF2-m1of7ATCPuHJ","name":"resume","brief":"","examples":[{"caption":"","code":"// play a audio clip\nlet id = me.audio.play(\"myClip\");\n...\n// pause it\nme.audio.pause(\"myClip\", id);\n...\n// resume\nme.audio.resume(\"myClip\", id);"}],"scope":"static","type":"FunctionDoc","description":"

resume the specified sound on all channels

","params":[{"identifier":"sound_name","optional":false,"description":"

audio clip name - case sensitive

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

the sound instance ID. If none is passed, all sounds in group will resume.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"dA21jtUJbvcTzKc2dnSzG","name":"resumeTrack","brief":"","examples":[{"caption":"","code":"// play an awesome music\nme.audio.playTrack(\"awesome_music\");\n// pause the audio track\nme.audio.pauseTrack();\n// resume the music\nme.audio.resumeTrack();"}],"scope":"static","type":"FunctionDoc","description":"

resume the previously paused audio track

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bWUkLjnjYT47gcqJiwEcW","name":"seek","brief":"","examples":[{"caption":"","code":"// return the current position of the background music\nlet current_pos = me.audio.seek(\"dst-gameforest\");\n// set back the position of the background music to the beginning\nme.audio.seek(\"dst-gameforest\", 0);"}],"scope":"static","type":"FunctionDoc","description":"

get/set the position of playback for a sound.

","params":[{"identifier":"sound_name","optional":false,"description":"

audio clip name - case sensitive

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"seek","optional":true,"variadic":true,"description":"

the position to move current playback to (in seconds).

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"id","optional":true,"description":"

the sound instance ID. If none is passed, all sounds in group will changed.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

return the current seek position (if no extra parameters were given)

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"G4l0nhkfytUrLr6k8X4Nd","name":"setVolume","brief":"","scope":"static","type":"FunctionDoc","description":"

set the default global volume

","params":[{"identifier":"volume","optional":false,"description":"

Float specifying volume (0.0 - 1.0 values accepted).

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"gzvyyPOT6i_CQpl8Jt4Rw","name":"stop","brief":"","examples":[{"caption":"","code":"me.audio.stop(\"cling\");"}],"scope":"static","type":"FunctionDoc","description":"

stop the specified sound on all channels

","params":[{"identifier":"sound_name","optional":true,"description":"

audio clip name (case sensitive). If none is passed, all sounds are stopped.

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

the sound instance ID. If none is passed, all sounds in group will stop.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"9Hm6tD3zZ6npsOY_Arnca","name":"stopTrack","brief":"","examples":[{"caption":"","code":"// play a awesome music\nme.audio.playTrack(\"awesome_music\");\n// stop the current music\nme.audio.stopTrack();"}],"scope":"static","see":["audio.playTrack"],"type":"FunctionDoc","description":"

stop the current audio track

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AdCBPmx8qwdX1Q6cczdgw","name":"unload","brief":"","examples":[{"caption":"","code":"me.audio.unload(\"awesome_music\");"}],"scope":"static","type":"FunctionDoc","description":"

unload specified audio track to free memory

","params":[{"identifier":"sound_name","optional":false,"description":"

audio track name - case sensitive

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

true if unloaded

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"3daeKRXdDO7Rt0HwoRrcr","name":"unloadAll","brief":"","examples":[{"caption":"","code":"me.audio.unloadAll();"}],"scope":"static","type":"FunctionDoc","description":"

unload all audio to free memory

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0A0XLHfIP9A0PYvC5I2nO","name":"unmute","brief":"","scope":"static","type":"FunctionDoc","description":"

unmute the specified sound

","params":[{"identifier":"sound_name","optional":false,"description":"

audio clip name

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

the sound instance ID. If none is passed, all sounds in group will unmute.

","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"fJY01islkkuWxRV3kc7z_","name":"unmuteAll","brief":"","scope":"static","type":"FunctionDoc","description":"

unmute all audio

","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"Acw1RhN_Z_Sx7oQLPoj1s","name":"collision","brief":"","type":"NSDoc","description":"

Collision detection (and projection-based collision response) of 2D shapes.
\nBased on the Separating Axis Theorem and s...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"vTBP_x-6HjFQw5k_pZcXu","name":"types","brief":"","examples":[{"caption":"","code":" // set the body collision type\n myEntity.body.collisionType = me.collision.types.PLAYER_OBJECT;\n\n // filter collision detection with collision shapes, enemies and collectables\n myEntity.body.setCollisionMask(\n me.collision.types.WORLD_SHAPE |\n me.collision.types.ENEMY_OBJECT |\n me.collision.types.COLLECTABLE_OBJECT\n );\n\n // User-defined collision types are defined using BITWISE LEFT-SHIFT:\n game.collisionTypes = {\n LOCKED_DOOR : me.collision.types.USER << 0,\n OPEN_DOOR : me.collision.types.USER << 1,\n LOOT : me.collision.types.USER << 2,\n };\n\n // Set collision type for a door entity\n myDoorEntity.body.collisionType = game.collisionTypes.LOCKED_DOOR;\n\n // Set collision mask for the player entity, so it collides with locked doors and loot\n myPlayerEntity.body.setCollisionMask(\n me.collision.types.ENEMY_OBJECT |\n me.collision.types.WORLD_SHAPE |\n game.collisionTypes.LOCKED_DOOR |\n game.collisionTypes.LOOT\n );"}],"readonly":true,"scope":"static","see":["Body.setCollisionMask","Body.collisionType"],"type":"EnumDoc","description":"

Enum for collision type values.

","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"cvKI7icUcJyqnP9D13jGN","name":"ACTION_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

e.g. doors

"},{"id":"UlAtBCdRLdGLGjnuLMJj1","name":"ALL_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

all of the above (including user-defined types)

"},{"id":"UgKw4CM1umxDUjIHCkRjT","name":"COLLECTABLE_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

collectable objects

"},{"id":"usJlkPM6HTB9aLQGfoM3z","name":"ENEMY_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

enemies objects

"},{"id":"KtI-RbDxupaqF9PmDyTFW","name":"NO_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

to disable collision check

"},{"id":"f4lFrhHc1wQ0CCgf_U46z","name":"NO_OBJECT","brief":"

to disable collision check

","defaultValue":"0","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZREx9yQjbO9Us3XdjxBvP","name":"NPC_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

non playable characters

"},{"id":"cMaFbLHPumd_fZsntXJ0R","name":"PLAYER_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

playbable characters

"},{"id":"E2JFomk_62jFvpSR1nmVf","name":"PROJECTILE_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

e.g. missiles

"},{"id":"iajqvY46kINisSKS2Vnyw","name":"USER","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

user-defined collision types (see example)

"},{"id":"iHz0KH9rQbT0lHyV92v3I","name":"WORLD_SHAPE","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

e.g. walls; for map collision shapes

"}]},{"id":"i5a_WXMEh7FLK6WBtVHyu","name":"maxChildren","brief":"","access":"public","defaultValue":"8","scope":"static","see":["game.world.broadphase"],"type":"PropertyDoc","description":"

The maximum number of children that a quadtree node can contain before it is split into sub-nodes.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PKmnLLigxnBHDCz_GXLsn","name":"maxDepth","brief":"","access":"public","defaultValue":"4","scope":"static","see":["game.world.broadphase"],"type":"PropertyDoc","description":"

The maximum number of levels that the quadtree will create.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CKtWIRheV1Sl4t-migRuc","name":"rayCast","brief":"","access":"public","examples":[{"caption":"","code":" // define a line accross the viewport\n let ray = new me.Line(\n // absolute position of the line\n 0, 0, [\n // starting point relative to the initial position\n new me.Vector2d(0, 0),\n // ending point\n new me.Vector2d(me.game.viewport.width, me.game.viewport.height)\n ]);\n\n // check for collition\n result = me.collision.rayCast(ray);\n\n if (result.length > 0) {\n // ...\n }"}],"scope":"instance","type":"MethodDoc","description":"

Checks for object colliding with the given line

","params":[{"identifier":"line","optional":false,"description":"

line to be tested for collision

","dataType":{"tokens":[{"value":"Line","kind":"canonical"},{"value":"Line","kind":"link"}],"template":"%1"}},{"identifier":"result","optional":true,"description":"

a user defined array that will be populated with intersecting physic objects.

","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"

an array of intersecting physic objects

","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]}]},{"id":"MOM6LiylbWgYAnjJcAs5O","name":"device","brief":"","defaultValue":"false","type":"NSDoc","description":"

device type and capabilities

","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"B_0lXkbRACSEZU384ynrL","name":"platform","brief":"","readonly":true,"type":"NSDoc","description":"

The device platform type

","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"3cJH4XAz8u81xw_Qow-KJ","name":"android","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if the device is an Android platform

"},{"id":"jzIyhVpq426VayI2LG5uA","name":"android2","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if the device is an Android 2.x platform

"},{"id":"oxeaKDkhrRJT-lv8J2iJD","name":"BlackBerry","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if the device is a BlackBerry platform

"},{"id":"ZfZ6r4RiVIMdpX8YtaP5n","name":"chromeOS","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if the device is running on ChromeOS.

"},{"id":"HlRWIvBijC7fLTC2Ess7U","name":"ejecta","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if running under Ejecta

"},{"id":"4ZioyeegxVAqx8TyO4Dvt","name":"iOS","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if the device is an iOS platform

"},{"id":"g06XmBC8P8F9dPY25Trqo","name":"isMobile","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if a mobile device

"},{"id":"og9XEMWsRC2ZmsXUCKY3m","name":"isWeixin","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if running under Wechat

"},{"id":"gLvynEYKNLBMEbDo6BOR8","name":"Kindle","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if the device is a Kindle platform

"},{"id":"f2LF5Ao4H-2yBtMIwRaJH","name":"linux","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if the device is a Linux platform

"},{"id":"eRxLSPK_jpIzatZs3Ryrp","name":"nodeJS","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if running under node.js

"},{"id":"i1aHbPGFc-VgsaBFH3vDN","name":"ua","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

the user agent string for the current device

"},{"id":"qvL4k6APDHSubX3BP5Jsx","name":"wp","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

true if the device is a Windows Phone platform

"}]},{"id":"sVuIHnLK2Lsbhdmh7yThu","name":"accelerationX","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchAccelerometer"],"type":"PropertyDoc","description":"

contains the g-force acceleration along the x-axis.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j43nAM7hwHoLeV45-4RxQ","name":"accelerationY","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchAccelerometer"],"type":"PropertyDoc","description":"

contains the g-force acceleration along the y-axis.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nyQ8GLNBozVKskByquBDP","name":"accelerationZ","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchAccelerometer"],"type":"PropertyDoc","description":"

contains the g-force acceleration along the z-axis.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RE8Bmy_IbNu0YS30rDVQ7","name":"alpha","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchDeviceOrientation"],"type":"PropertyDoc","description":"

Device orientation Alpha property. Gives angle based on the rotation of the phone around its z axis.\nThe z-axis is perpend...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aX4syVX0pPPwUC1Ckhg0R","name":"autoFocus","brief":"","access":"public","defaultValue":"true","type":"PropertyDoc","description":"

Specify whether to automatically bring the window to the front

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2MmDcwj5iZ94-QFvkgNt-","name":"beta","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchDeviceOrientation"],"type":"PropertyDoc","description":"

Device orientation Beta property. Gives angle on tilting a portrait held phone forward or backward

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MGE-NEu7DRW-BGCciwTDh","name":"devicePixelRatio","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

Ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gm5JJf6kwMRtp1VHqpRIv","name":"gamma","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchDeviceOrientation"],"type":"PropertyDoc","description":"

Device orientation Gamma property. Gives angle on tilting a portrait held phone left or right

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PWEMyFYeUFEQ-WlyvwHXK","name":"hasAccelerometer","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

Browser accelerometer capabilities

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Jj29dOhFKke3VFXBg2Dyt","name":"hasDeviceOrientation","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

Browser device orientation

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HdXT26-npDyK-vxs3z_j7","name":"hasFullscreenSupport","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

Browser full screen support

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RzT3seKjjx9Uy0P1q2WHA","name":"hasHTML5Audio","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

Device HTML5Audio Support

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DSx4ehTs65_GIe1dlRpBd","name":"hasPointerLockSupport","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

Browser pointerlock api support

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1tV8hJ_44s9lSZ9_b3-SA","name":"hasWebAudio","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

Device WebAudio Support

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DC3NKZA3rcYThIa6ivr9y","name":"isMobile","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

equals to true if a mobile device.\n(Android | iPhone | iPad | iPod | BlackBerry | Windows Phone | Kindle)

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K1cXXPWrOrMJ1Smjg-O_w","name":"language","brief":"","access":"public","readonly":true,"see":["http://www.w3schools.com/tags/ref_language_codes.asp"],"type":"PropertyDoc","description":"

a string representing the preferred language of the user, usually the language of the browser UI.\n(will default to "e...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mLykYiZtwI4K2d1_6DYuR","name":"localStorage","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

Browser Local Storage capabilities
\n(this flag will be set to false if cookies are blocked)

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"98hizMd9RZPVoWZKxDNx3","name":"maxTouchPoints","brief":"","access":"public","examples":[{"caption":"","code":"if (me.device.maxTouchPoints > 1) {\n // device supports multi-touch\n}"}],"readonly":true,"type":"PropertyDoc","description":"

the maximum number of simultaneous touch contact points are supported by the current device.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eoo0loXjkfqk4fTxcLqQQ","name":"nativeBase64","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

Browser Base64 decoding capability

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HWQIooKQRcF6BELACEvYT","name":"offscreenCanvas","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

equals to true if the device browser supports OffScreenCanvas.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PA0sG0WyxVkdt7wLKxuWS","name":"pauseOnBlur","brief":"","access":"public","defaultValue":"true","deprecated":"since 15.4.0","see":["Application.pauseOnBlur"],"type":"PropertyDoc","description":"

Specify whether to pause the game when losing focus

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MNg4EEG-au4Q-zBNkTXWo","name":"platform","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

the device platform type

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vZdjGfzSfcZvoiPIGHR4D","name":"pointerEvent","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

True if the browser supports Pointer Events

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9vHNV8gDwtRrN18rJld_u","name":"resumeOnFocus","brief":"","access":"public","defaultValue":"true","deprecated":"since 15.4.0","see":["Application.resumeOnFocus"],"type":"PropertyDoc","description":"

Specify whether to unpause the game when gaining focus

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Lj1xaw5rU58AqhNBoeuku","name":"screenOrientation","brief":"","access":"public","readonly":true,"see":["https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/onchange"],"type":"PropertyDoc","description":"

Supports the ScreenOrientation API

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s6_yNOuX1zt2jxwqS0BmE","name":"sound","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

Returns true if the browser/device has audio capabilities.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AdF_zyhvy_OmzSeJPEaMP","name":"stopOnBlur","brief":"","access":"public","defaultValue":"false","deprecated":"since 15.4.0","see":["Application.stopOnBlur"],"type":"PropertyDoc","description":"

Specify whether to stop the game when losing focus or not.\nThe engine restarts on focus if this is enabled.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WHDKHDFd-zl-QUvv4XXV6","name":"touch","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

Touch capabilities (support either Touch or Pointer events)

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"REKH4os23niQIWY16XJ3g","name":"touchEvent","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

True if the browser supports Touch Events

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I2joj4kyEXZ3D6HJWr9hM","name":"wheel","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

W3C standard wheel events

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DLzPTaefYSCOowOAibZKV","name":"enableSwipe","brief":"","access":"public","type":"FunctionDoc","description":"

enable/disable swipe on WebView.

","params":[{"identifier":"enable","optional":true,"default":"true","description":"

enable or disable swipe.

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"rEdj9esLNzuPsJhHSw9kI","name":"exitFullscreen","brief":"","access":"public","type":"FunctionDoc","description":"

Exit fullscreen mode. Requires fullscreen support from the browser/device.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"epnCrdV_-VVac6TlBEsb4","name":"focus","brief":"","access":"public","examples":[{"caption":"","code":"if (clicked) {\n me.device.focus();\n}"}],"type":"FunctionDoc","description":"

Makes a request to bring this device window to the front.

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rN2JonIIjqY3oc0yi-aa5","name":"getElement","brief":"","access":"public","type":"FunctionDoc","description":"

return the DOM element for the given element name or HTMLElement object

","params":[{"identifier":"element","optional":false,"description":"

the parent element name or a HTMLElement object

","dataType":{"tokens":[{"value":"string | HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

the corresponding DOM Element or null if not existing

","dataType":{"tokens":[{"value":"HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"60cTMutldhITujwC-w-vq","name":"getElementBounds","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/DOMRect"],"type":"FunctionDoc","description":"

returns the size of the given HTMLElement and its position relative to the viewport\n
an HTMLElement object

","dataType":{"tokens":[{"value":"string | HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

the size and position of the element relatively to the viewport

","dataType":{"tokens":[{"value":"DOMRect","kind":"canonical"},{"value":"DOMRect","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PNs2z91N51a2DoM0V4CKR","name":"getParentBounds","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/DOMRect"],"type":"FunctionDoc","description":"

returns the size of the given HTMLElement Parent and its position relative to the viewport\n
an HTMLElement object

","dataType":{"tokens":[{"value":"string | HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

the size and position of the given element parent relative to the viewport

","dataType":{"tokens":[{"value":"DOMRect","kind":"canonical"},{"value":"DOMRect","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"crUiI-6IfE2V9tEHBSCYu","name":"getParentElement","brief":"","access":"public","type":"FunctionDoc","description":"

return the parent DOM element for the given parent name or HTMLElement object

","params":[{"identifier":"element","optional":false,"description":"

the parent element name or a HTMLElement object

","dataType":{"tokens":[{"value":"string | HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

the parent Element

","dataType":{"tokens":[{"value":"HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oqfsS4wNRzDwmDpH9HQ2i","name":"getScreenOrientation","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation"],"type":"FunctionDoc","description":"

Return a string representing the orientation of the device screen.\nIt can be "any", "natural", "l...","params":[],"returns":[{"description":"

the screen orientation

","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"RWV7wZHO34kFBUJfVem9J","name":"getStorage","brief":"","access":"public","see":["save"],"type":"FunctionDoc","description":"

return the device storage

","params":[{"identifier":"type","optional":true,"default":"\"local\"","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

a reference to the device storage

","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"2P5K1imjFl40GYC9LQf3x","name":"isFullscreen","brief":"","access":"public","type":"FunctionDoc","description":"

Returns true if the browser/device is in full screen mode.

","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"VT6782dpK8_V7eP5MrUQs","name":"isLandscape","brief":"","access":"public","type":"FunctionDoc","description":"

return true if the device screen orientation is in Portrait mode

","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"U8KExO51vcco6KVKfpzlt","name":"isPortrait","brief":"","access":"public","type":"FunctionDoc","description":"

return true if the device screen orientation is in Portrait mode

","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"5xhMpZQjhBtEaFrK6_9UJ","name":"isWebGLSupported","brief":"","access":"public","type":"FunctionDoc","description":"

returns true if the device supports WebGL

","params":[{"identifier":"options","optional":true,"description":"

context creation options

","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.failIfMajorPerformanceCaveat","optional":true,"default":"true","description":"

If true, the renderer will switch to CANVAS mode if the performances of a WebGL context would be dramatically lower than t...","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

true if WebGL is supported

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"hZgoGspisA_do7w2WyLcW","name":"lockOrientation","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation"],"type":"FunctionDoc","description":"

locks the device screen into the specified orientation.
\nThis method only works for installed Web apps or for Web pages...","params":[{"identifier":"orientation","optional":false,"description":"

The orientation into which to lock the screen.

","dataType":{"tokens":[{"value":"string | Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

true if the orientation was unsuccessfully locked

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"r7KZqlg-Ovj2Y3mqrXHEf","name":"onReady","brief":"","access":"public","examples":[{"caption":"","code":" // small game skeleton\n let game = {\n // called by the me.device.onReady function\n onload = function () {\n // init video\n if (!me.video.init('screen', 640, 480, true)) {\n alert(\"Sorry but your browser does not support html 5 canvas.\");\n return;\n }\n\n // initialize the \"audio\"\n me.audio.init(\"mp3,ogg\");\n\n // set callback for ressources loaded event\n me.loader.onload = this.loaded.bind(this);\n\n // set all ressources to be loaded\n me.loader.preload(game.assets);\n\n // load everything & display a loading screen\n me.state.change(me.state.LOADING);\n };\n\n // callback when everything is loaded\n loaded = function () {\n // define stuff\n // ....\n\n // change to the menu screen\n me.state.change(me.state.PLAY);\n }\n }; // game\n\n // \"bootstrap\"\n me.device.onReady(function () {\n game.onload();\n });"}],"type":"FunctionDoc","description":"

specify a function to execute when the Device is fully loaded and ready

","params":[{"identifier":"fn","optional":false,"description":"

the function to be executed

","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"OCpxhl5dfRteUSxJbTBpx","name":"requestFullscreen","brief":"","access":"public","examples":[{"caption":"","code":"// add a keyboard shortcut to toggle Fullscreen mode on/off\nme.input.bindKey(me.input.KEY.F, \"toggleFullscreen\");\nme.event.on(me.event.KEYDOWN, function (action, keyCode, edge) {\n // toggle fullscreen on/off\n if (action === \"toggleFullscreen\") {\n me.device.requestFullscreen();\n } else {\n me.device.exitFullscreen();\n }\n});"}],"type":"FunctionDoc","description":"

Triggers a fullscreen request. Requires fullscreen support from the browser/device.

","params":[{"identifier":"element","optional":true,"description":"

the element to be set in full-screen mode.

","dataType":{"tokens":[{"value":"Element","kind":"canonical"},{"value":"Element","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"ssRoDAuy1Tf5yFZtgsq8H","name":"unlockOrientation","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation"],"type":"FunctionDoc","description":"

unlocks the device screen into the specified orientation.
\nThis method only works for installed Web apps or for Web pag...","params":[],"returns":[{"description":"

true if the orientation was unsuccessfully unlocked

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"5QUCiuBDYC4mQCApaFwZn","name":"unwatchAccelerometer","brief":"","access":"public","type":"FunctionDoc","description":"

unwatch Accelerometor event

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u1FgxqE-Q-2d-7OyXWUDt","name":"unwatchDeviceOrientation","brief":"","access":"public","type":"FunctionDoc","description":"

unwatch Device orientation event

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xaqrZRRrNvTWObl31u98r","name":"vibrate","brief":"","access":"public","examples":[{"caption":"","code":"// vibrate for 1000 ms\nme.device.vibrate(1000);\n// or alternatively\nme.device.vibrate([1000]);\n// vibrate for 50 ms, be still for 100 ms, and then vibrate for 150 ms:\nme.device.vibrate([50, 100, 150]);\n// cancel any existing vibrations\nme.device.vibrate(0);"}],"type":"FunctionDoc","description":"

the vibrate method pulses the vibration hardware on the device,
\nIf the device doesn't support vibration, this method ...","params":[{"identifier":"pattern","optional":false,"description":"

pattern of vibration and pause intervals

","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1 | %3<%2>"}}],"returns":[],"extends":[],"implements":[]},{"id":"kjtzRojOYBO3oDNRcoUzK","name":"watchAccelerometer","brief":"","access":"public","examples":[{"caption":"","code":"// try to enable device accelerometer event on user gesture\nme.input.registerPointerEvent(\"pointerleave\", me.game.viewport, function() {\n if (me.device.watchAccelerometer() === true) {\n // Success\n me.input.releasePointerEvent(\"pointerleave\", me.game.viewport);\n } else {\n // ... fail at enabling the device accelerometer event\n }\n});"}],"see":["device.accelerationX","device.accelerationY","device.accelerationZ"],"type":"FunctionDoc","description":"

Enable monitor of the device accelerator to detect the amount of physical force of acceleration the device is receiving.\n(...","params":[],"returns":[{"description":"

false if not supported or permission not granted by the user

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"4zc8NDo7K2PzF7FBT5Ss6","name":"watchDeviceOrientation","brief":"","access":"public","examples":[{"caption":"","code":"// try to enable device orientation event on user gesture\nme.input.registerPointerEvent(\"pointerleave\", me.game.viewport, function() {\n if (me.device.watchDeviceOrientation() === true) {\n // Success\n me.input.releasePointerEvent(\"pointerleave\", me.game.viewport);\n } else {\n // ... fail at enabling the device orientation event\n }\n});"}],"see":["device.alpha","device.beta","device.gamma"],"type":"FunctionDoc","description":"

Enable monitor of the device orientation to detect the current orientation of the device as compared to the Earth coordina...","params":[],"returns":[{"description":"

false if not supported or permission not granted by the user

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]}]},{"id":"-K7Ab5qPxMisOIdCBlfrd","name":"event","brief":"","type":"NSDoc","description":"

an event system based on nodeJS EventEmitter interface

","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"AOOY21sSPcB0cNggCN1SQ","name":"BLUR","brief":"","access":"public","defaultValue":"\"me.blur\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event generated when the main browser or window is losing focus

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fv82KXq9YMs9v8uQEmiDP","name":"BOOT","brief":"","access":"public","defaultValue":"\"me.boot\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event when the system is booting

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"diON7PIWkuVBEU-hs0EqY","name":"CANVAS_ONRESIZE","brief":"","access":"public","defaultValue":"\"canvas.onresize\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when the canvas is resized
\n(this usually follows a WINDOW_ONRESIZE event).
\nData passed : {number} canva...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CoeTyHF4KdGr1IxZQu_-P","name":"DOM_READY","brief":"","access":"public","defaultValue":"\"dom_ready\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event when the DOM is Ready is booting

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nttwKJHwix3z-Ew0cEmEq","name":"DRAGEND","brief":"","access":"public","defaultValue":"\"me.game.dragend\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for dragend events on a Draggable entity
\nData passed:\n{object} the drag event
\n{object} the Draggable entit...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-TO9GH9tSdtxAb5GpUFL5","name":"DRAGSTART","brief":"","access":"public","defaultValue":"\"me.game.dragstart\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for dragstart events on a Draggable entity
\nData passed:\n{object} the drag event
\n{object} the Draggable ent...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OSiMv_Sxn2uyI5k-BkjXV","name":"FOCUS","brief":"","access":"public","defaultValue":"\"me.focus\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event generated when the main browser or window is gaining back focus

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eXUC86uvwPBmTtH3TUItz","name":"GAME_AFTER_DRAW","brief":"","access":"public","defaultValue":"\"me.game.afterDraw\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for the start of the draw loop\nData passed : {number} time the current time stamp

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v7TGYetgxCboIuCDvWhcG","name":"GAME_AFTER_UPDATE","brief":"","access":"public","defaultValue":"\"me.game.afterUpdate\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event for the end of the update loop\nData passed : {number} time the current time stamp

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VO1rM52Il1Iijl9qfjI2c","name":"GAME_BEFORE_DRAW","brief":"","access":"public","defaultValue":"\"me.game.beforeDraw\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for the end of the draw loop\nData passed : {number} time the current time stamp

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1AAU4Hwc3wjdTXIOTy30X","name":"GAME_BEFORE_UPDATE","brief":"","access":"public","defaultValue":"\"me.game.beforeUpdate\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event for when the engine is about to start a new game loop\nData passed : {number} time the current time stamp

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8k8skTyk6Wyns-kwKIeaZ","name":"GAME_INIT","brief":"","access":"public","defaultValue":"\"me.game.onInit\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event for when the game manager is initialized
\nData passed : none

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3JfkYgXPU4KvLvS7saTel","name":"GAME_RESET","brief":"","access":"public","defaultValue":"\"me.game.onReset\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event for when the game manager is resetted
\nData passed : none

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JipUF3bNVso8qbO7iBdNS","name":"GAME_UPDATE","brief":"","access":"public","defaultValue":"\"me.game.onUpdate\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when the game is updated (will be impacted by frame skip, frame interpolation and pause/resume state)
\nData ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NI3WQXErAbs968zwakoDh","name":"GAMEPAD_CONNECTED","brief":"","access":"public","defaultValue":"\"gamepad.connected\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when a gamepad is connected
\nData passed : {object} gamepad object

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CoTWAhMxMsN7Clo5YRaZh","name":"GAMEPAD_DISCONNECTED","brief":"","access":"public","defaultValue":"\"gamepad.disconnected\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when a gamepad is disconnected
\nData passed : {object} gamepad object

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fWSrmen19G5XInL6IyW-W","name":"GAMEPAD_UPDATE","brief":"","access":"public","defaultValue":"\"gamepad.update\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when gamepad button/axis state is updated
\nData passed : {number} index
\nData passed : {string} type : &...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"23675U4YJbNOZcLmVT9Py","name":"KEYDOWN","brief":"","access":"public","defaultValue":"\"me.input.keydown\"","examples":[{"caption":"","code":" me.input.bindKey(me.input.KEY.X, \"jump\", true); // Edge-triggered\n me.input.bindKey(me.input.KEY.Z, \"shoot\"); // Level-triggered\n me.event.on(me.event.KEYDOWN, (action, keyCode, edge) => {\n // Checking bound keys\n if (action === \"jump\") {\n if (edge) {\n this.doJump();\n }\n\n // Make character fall slower when holding the jump key\n this.vel.y = this.body.gravity;\n }\n });"}],"readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for pressing a binded key
\nData passed : {string} user-defined action, {number} keyCode,\n{boolean} edge state {\n // Checking unbound keys\n if (keyCode == me.input.KEY.ESC) {\n if (me.state.isPaused()) {\n me.state.resume();\n }\n else {\n me.state.pause();\n }\n }\n});"}],"readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for releasing a binded key
\nData passed : {string} user-defined action, {number} keyCode

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OyDUAK-W_kl1DzdFSFs_4","name":"LEVEL_LOADED","brief":"","access":"public","defaultValue":"\"me.game.onLevelLoaded\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when a level is loaded
\nData passed : {string} Level Name

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oBQG6KplTmueFLO_Oiou2","name":"LOADER_COMPLETE","brief":"","access":"public","defaultValue":"\"me.loader.onload\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when everything has loaded
\nData passed : none

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nsGrzxXnWiSPGs0OceOqQ","name":"LOADER_ERROR","brief":"","access":"public","defaultValue":"\"me.loader.onError\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when an error occur during preloading
\nData passed : {Resource} resource object

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CdSvmArXP80PfcYgQsLZa","name":"LOADER_PROGRESS","brief":"","access":"public","defaultValue":"\"me.loader.onProgress\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for displaying a load progress indicator
\nData passed : {number} [0 .. 1], {Resource} resource object

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IhbvnupsVoWOXaFBAIOH3","name":"ONCONTEXT_RESTORED","brief":"","access":"public","defaultValue":"\"renderer.contextrestored\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when the current context is restored
\nData passed : {me.Renderer} the current renderer instance`

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Iqieas0XHGkf0Dxwnfk_w","name":"POINTERLOCKCHANGE","brief":"","access":"public","defaultValue":"\"me.event.pointerlockChange\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for onPointerLockChange event
\nData passed : {boolean} pointer lock status (true/false)

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9hWBY23QIILLoEmVQBh0e","name":"POINTERMOVE","brief":"","access":"public","defaultValue":"\"me.event.pointermove\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for pointermove events on the screen area
\nData passed : {me.Pointer} a Pointer object

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UuaYBIxNSp_feH3egOJgC","name":"STAGE_RESET","brief":"","access":"public","defaultValue":"\"me.stage.onReset\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event for when a stage is resetted

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uEO8wK9G7jI1XEWP264E_","name":"STATE_CHANGE","brief":"","access":"public","defaultValue":"\"me.state.onChange\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event for when the changing to a different stage

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2W-LORCt02A2m9_MMdZgT","name":"STATE_PAUSE","brief":"","access":"public","defaultValue":"\"me.state.onPause\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event when the game is paused
\nData passed : none

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nXEtecBkO0xIKYAmzOGqL","name":"STATE_RESTART","brief":"","access":"public","defaultValue":"\"me.state.onRestart\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event for when the game is restarted
\nData passed : {number} time in ms the game was stopped

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eNptu6Gbkar5nzwGjT1Xz","name":"STATE_RESUME","brief":"","access":"public","defaultValue":"\"me.state.onResume\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event for when the game is resumed
\nData passed : {number} time in ms the game was paused

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ng9nLYdjQoQ6F2l_g_wR3","name":"STATE_STOP","brief":"","access":"public","defaultValue":"\"me.state.onStop\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event when the game is stopped
\nData passed : none

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cqAyGNu9x4PjYPnfWIhkx","name":"TICK","brief":"","access":"public","defaultValue":"\"me.tick\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

event generated when the system update the engine and the renderer by one step

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YdCfVLuCkh-dp1ZofL-2J","name":"VIDEO_INIT","brief":"","access":"public","defaultValue":"\"me.video.onInit\"","readonly":true,"see":["video.init","event.on"],"type":"PropertyDoc","description":"

event for when the video is initialized
\nData passed : {Renderer} the renderer instance created

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"czqz_xXp5PxzirBwhJpA-","name":"VIEWPORT_ONCHANGE","brief":"","access":"public","defaultValue":"\"viewport.onchange\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when the viewport position is updated
\nData passed : {me.Vector2d} viewport position vector

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"czO0Xn1LodBOdX8ut91dK","name":"VIEWPORT_ONRESIZE","brief":"","access":"public","defaultValue":"\"viewport.onresize\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when the viewport is resized
\n(this usually follows a WINDOW_ONRESIZE event, when using the flexEvent for when the current context is lost
\nData passed : {me.Renderer} the current renderer instance

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9srY1W4HdKwjrQ92bwpIk","name":"WINDOW_ONORIENTATION_CHANGE","brief":"","access":"public","defaultValue":"\"globalThis.orientationchange\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when the device is rotated
\nData passed : {Event} Event object

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cxoTgrL2YBvslRK0Qcd7t","name":"WINDOW_ONRESIZE","brief":"","access":"public","defaultValue":"\"globalThis.onresize\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when the (browser) window is resized
\nData passed : {Event} Event object

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T0gNqkQadvYB4Q6lVLdfT","name":"WINDOW_ONSCROLL","brief":"","access":"public","defaultValue":"\"globalThis.onscroll\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when the (browser) window is scrolled
\nData passed : {Event} Event object

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r54Gh-uD7FhQ456__i7gl","name":"WORLD_STEP","brief":"","access":"public","defaultValue":"\"me.world.step\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

Event for when the physic world is updated\nData passed : {number} time the current time stamp

","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xi0qebk_gqo8kb-KXkmZ3","name":"emit","brief":"","examples":[{"caption":"","code":"me.event.emit(\"event-name\", a, b, c);"}],"scope":"static","type":"FunctionDoc","description":"

calls each of the listeners registered for a given event.

","params":[{"identifier":"eventName","optional":false,"description":"

The event name.

","dataType":{"tokens":[{"value":"string | symbol","kind":"canonical"},{"value":"symbol","kind":"canonical"}],"template":"string | %1"}},{"identifier":"...arguments","optional":true,"variadic":true,"description":"

arguments to be passed to all listeners

","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"

true if the event had listeners, false otherwise.

","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"JQ56fLAhofT5kwUJLvGyi","name":"off","brief":"","access":"public","examples":[{"caption":"","code":"me.event.off(\"event-name\", myFunction);"}],"scope":"static","type":"FunctionDoc","description":"

remove the given listener for a given event.

","params":[{"identifier":"eventName","optional":false,"description":"

The event name.

","dataType":{"tokens":[{"value":"string | symbol","kind":"canonical"},{"value":"symbol","kind":"canonical"}],"template":"string | %1"}},{"identifier":"listener","optional":false,"description":"

The listener function.

","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

this.

","dataType":{"tokens":[{"value":"EventEmitter","kind":"canonical"},{"value":"EventEmitter","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"r_5bKOfwAetenC8cDFCzZ","name":"on","brief":"","access":"public","examples":[{"caption":"","code":"me.event.on(\"event-name\", myFunction, this);"}],"scope":"static","type":"FunctionDoc","description":"

Add a listener for a given event.

","params":[{"identifier":"eventName","optional":false,"description":"

The event name.

","dataType":{"tokens":[{"value":"string | symbol","kind":"canonical"},{"value":"symbol","kind":"canonical"}],"template":"string | %1"}},{"identifier":"listener","optional":false,"description":"

The listener function.

","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"context","optional":true,"default":"this","description":"

The context to invoke the listener with.

","dataType":{"tokens":[{"value":"unknown","kind":"canonical"}],"template":"unknown"}}],"returns":[{"description":"

this.

","dataType":{"tokens":[{"value":"EventEmitter","kind":"canonical"},{"value":"EventEmitter","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rwZLUh9ozjEDBxcSjLGXP","name":"once","brief":"","access":"public","examples":[{"caption":"","code":"me.event.once(\"event-name\", myFunction, this);"}],"scope":"static","type":"FunctionDoc","description":"

Add a one-time listener for a given event.

","params":[{"identifier":"eventName","optional":false,"description":"

The event name.

","dataType":{"tokens":[{"value":"string | symbol","kind":"canonical"},{"value":"symbol","kind":"canonical"}],"template":"string | %1"}},{"identifier":"listener","optional":false,"description":"

The listener function.

","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"context","optional":true,"default":"this","description":"

The context to invoke the listener with.

","dataType":{"tokens":[{"value":"unknown","kind":"canonical"}],"template":"unknown"}}],"returns":[{"description":"

this.

","dataType":{"tokens":[{"value":"EventEmitter","kind":"canonical"},{"value":"EventEmitter","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"xjWLQ24oC5madf1bdyFJf","name":"game","brief":"","readonly":true,"see":["Application"],"type":"NSDoc","description":"

game is a default instance of a melonJS Application and represents your current game,\nit contains all the objects, tilemap...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F6_N573ALKKMegH1r6VYg","name":"input","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"NEJyL5nDClpS7IC6rnUmv","name":"GAMEPAD","brief":"","access":"public","type":"NSDoc","description":"

Namespace for standard gamepad mapping constants

","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"pWlAIBkjoee4UlhXt0KTf","name":"AXES","brief":"","access":"public","scope":"static","see":["https://w3c.github.io/gamepad/#remapping"],"type":"EnumDoc","description":"

Standard gamepad mapping information for axes

\n
    \n
  • Left control stick: LX (horizontal), Standard gamepad mapping information for buttons

    \n
      \n
    • Face buttons: FACE_1, FACE_2standard keyboard constants

      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"ki5eGz33K1zUt9v9YROMD","name":"A","brief":"","defaultValue":"65","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0rnSSSJrMvWSe2KCQxw9y","name":"ADD","brief":"","defaultValue":"107","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mYi5BrA_dhAcSCWMSm7_V","name":"ALT","brief":"","defaultValue":"18","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YCL8WZe08NbBFqRIFlMdy","name":"B","brief":"","defaultValue":"66","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gKN5qPgotAHRQN4UcD7C-","name":"BACK_SLASH","brief":"","defaultValue":"220","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eAAGndbabDkYLTxEOzv3V","name":"C","brief":"","defaultValue":"67","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lXesbGIJR7_gU0_LBBujA","name":"CAPS_LOCK","brief":"","defaultValue":"20","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nZoZItnOw9UTgbxYLA5xp","name":"CLOSE_BRACKET","brief":"","defaultValue":"221","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LFE5hclPLhXxf4YbQgLn1","name":"COMMA","brief":"","defaultValue":"188","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fZ0CCeDuJXrXy7d0DGQNo","name":"CTRL","brief":"","defaultValue":"17","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u6vju5i4-USJ5KtjYwSjA","name":"D","brief":"","defaultValue":"68","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eEOR876zQ8AXQyTF7I836","name":"DECIMAL","brief":"","defaultValue":"110","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FbTLolW5kdAiGWGNESE0Z","name":"DELETE","brief":"","defaultValue":"46","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jHfcZjJmqc3jXku_twB8t","name":"DIVIDE","brief":"","defaultValue":"111","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6genEOJcd3zXTSUZatPkV","name":"DOWN","brief":"","defaultValue":"40","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C3g5L9V7tXB0_m7Y4xpxt","name":"E","brief":"","defaultValue":"69","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3ZY-2YqyKa-FA7UsCBdsK","name":"END","brief":"","defaultValue":"35","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CVvGTHpLkiQccPsnqvvze","name":"ENTER","brief":"","defaultValue":"13","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TEeUq637eLNQaposRIPQL","name":"ESC","brief":"","defaultValue":"27","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8XuTLVuCcdsULrBDJRhoT","name":"F","brief":"","defaultValue":"70","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bVLR7Am2jf0WMMA647c8o","name":"F1","brief":"","defaultValue":"112","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6TqEuabyhwHdeZAtjfTnC","name":"F10","brief":"","defaultValue":"121","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RkwLVpAgF187_dLcK8uzg","name":"F11","brief":"","defaultValue":"122","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oxu3Ygzi4l0VOMTO6iWpJ","name":"F12","brief":"","defaultValue":"123","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D_E05RyPlRGxIfBlKe-7A","name":"F2","brief":"","defaultValue":"113","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dtpq7skrgtEiBmuI-toaU","name":"F3","brief":"","defaultValue":"114","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L-2_yxgTqAxboN-z9POQw","name":"F4","brief":"","defaultValue":"115","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UrMOmIw3Sm8WmhJkZ62Ki","name":"F5","brief":"","defaultValue":"116","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WbWUpCPDn3FD12a-MtKkn","name":"F6","brief":"","defaultValue":"117","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IywJm8DN95uAOlRvd0pQd","name":"F7","brief":"","defaultValue":"118","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c9bWBpmEyF0SAU4oLRl4y","name":"F8","brief":"","defaultValue":"119","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-St-550U7rM9cw3wIlwhu","name":"F9","brief":"","defaultValue":"120","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TTfT-u6i_VJiojzbfh87w","name":"FORWAND_SLASH","brief":"","defaultValue":"191","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0mZCDkA2izv36ejWc4sUn","name":"G","brief":"","defaultValue":"71","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KT4ziTl9K5E0BXQ3vFHsP","name":"GRAVE_ACCENT","brief":"","defaultValue":"192","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2uCyZLuvC3BSsS9-qsvLF","name":"H","brief":"","defaultValue":"72","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"X1RmQrlQITLD8ckoPoxN6","name":"HOME","brief":"","defaultValue":"36","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"53JNSLH3F96HER03fzKq4","name":"I","brief":"","defaultValue":"73","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0DVO5siFWpp8LRWRm754C","name":"INSERT","brief":"","defaultValue":"45","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sc8vd_AvqdPROuVebibJm","name":"J","brief":"","defaultValue":"74","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bOUUuGtR-TGM7R5CD94OJ","name":"K","brief":"","defaultValue":"75","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JWos-Cn6AuIz0RHI_WSqh","name":"L","brief":"","defaultValue":"76","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mI52aoERplGLu3GnoeRcp","name":"LEFT","brief":"","defaultValue":"37","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4z2-VGo6miJS0a44FFnth","name":"M","brief":"","defaultValue":"77","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Rtqzrb6rfKRTon0Ki7O5I","name":"MINUS","brief":"","defaultValue":"189","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bpVS5QBZbZISjRDAB35-A","name":"MULTIPLY","brief":"","defaultValue":"106","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w1G1zhvnTwgLVgmBI_8GB","name":"N","brief":"","defaultValue":"78","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0RlgkEYXYCmJuLKN17CJc","name":"NUM_LOCK","brief":"","defaultValue":"144","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3hZ4NVWY4sDy7iDz06oSc","name":"NUM0","brief":"","defaultValue":"48","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xLFNKTL038_CTC-deXopK","name":"NUM1","brief":"","defaultValue":"49","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AID8udLpT5A94udxRqa4s","name":"NUM2","brief":"","defaultValue":"50","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WBOTMn1G1jXQbVR4IOuIX","name":"NUM3","brief":"","defaultValue":"51","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cuz6B0Zeu0az3u-vzpCCX","name":"NUM4","brief":"","defaultValue":"52","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Qm9Iuy23Gh4FDCTwMiELg","name":"NUM5","brief":"","defaultValue":"53","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4_AVmeK_Jydd19Av-zp_B","name":"NUM6","brief":"","defaultValue":"54","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qwd6iQR-qUaUl4VcxlXSn","name":"NUM7","brief":"","defaultValue":"55","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-cRhmlSrqV5f7veT0svse","name":"NUM8","brief":"","defaultValue":"56","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w1V7gmEm1WZTk9oFLgIpN","name":"NUM9","brief":"","defaultValue":"57","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fKhQbdeMhEr8qVrCe9Mam","name":"NUMPAD0","brief":"","defaultValue":"96","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-BeAXkxLxWTU_vEwDIeqs","name":"NUMPAD1","brief":"","defaultValue":"97","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-xxoylS3w5tDp0uscRrBJ","name":"NUMPAD2","brief":"","defaultValue":"98","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uV1CiyCqQb8A3jIuTsg0g","name":"NUMPAD3","brief":"","defaultValue":"99","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8jz87I7hNKQcA8PXdIS1v","name":"NUMPAD4","brief":"","defaultValue":"100","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fO952akGGW3-ljEOnNclo","name":"NUMPAD5","brief":"","defaultValue":"101","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CsmDLM0qgg5lQ95ZIgiz9","name":"NUMPAD6","brief":"","defaultValue":"102","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EXbklo_DAXtMQ56NNiylg","name":"NUMPAD7","brief":"","defaultValue":"103","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RDfKPHOtcMgXffPkLP9_5","name":"NUMPAD8","brief":"","defaultValue":"104","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6RGspa-fgmbW6mzVgnRvt","name":"NUMPAD9","brief":"","defaultValue":"105","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"X-6FuG92ucqRH0Z_6cMJT","name":"O","brief":"","defaultValue":"79","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JsTPInbFYDeW8dUcpIJan","name":"OPEN_BRACKET","brief":"","defaultValue":"219","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mNdtWnvIYnNoIlIuL_t5x","name":"P","brief":"","defaultValue":"80","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"q4KoGFH9lB0fsiarAZzXR","name":"PAGE_DOWN","brief":"","defaultValue":"34","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-aGUtDpJs127PbOcy8-sh","name":"PAGE_UP","brief":"","defaultValue":"33","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Gok2mD3kM9V7MYGiQvJIZ","name":"PAUSE","brief":"","defaultValue":"19","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2yQBgLegDzNCdBL6GLQk7","name":"PERIOD","brief":"","defaultValue":"190","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Bd_MbyOyy9pB3vEJsc2qm","name":"PLUS","brief":"","defaultValue":"187","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cQeiY4WLhp2H311EcHGsP","name":"PRINT_SCREEN","brief":"","defaultValue":"42","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BBCS_pKpzPJGLT97KLwMN","name":"Q","brief":"","defaultValue":"81","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CFk8Pvt75Vo9CWeBQsxlX","name":"R","brief":"","defaultValue":"82","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9wzl8wZiqXBvsgMGhy7g0","name":"RIGHT","brief":"","defaultValue":"39","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9FEEdhBhyknjo68asWcUT","name":"S","brief":"","defaultValue":"83","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nQLUyTn9O5Y6qt_wy8sfn","name":"SCROLL_LOCK","brief":"","defaultValue":"145","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WeRc_QmpagN0aRL2pVJBo","name":"SEMICOLON","brief":"","defaultValue":"186","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4xjw-kBiDVqGCwQCvprki","name":"SHIFT","brief":"","defaultValue":"16","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mUy0JWllXkS80k8O-CBfb","name":"SINGLE_QUOTE","brief":"","defaultValue":"222","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vttKEDgeJCFPs638lV8Ro","name":"SPACE","brief":"","defaultValue":"32","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CnoWacpAK8FcT64L76g8F","name":"SUBSTRACT","brief":"","defaultValue":"109","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6jt2GB8AiE_URKirR91e1","name":"T","brief":"","defaultValue":"84","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GWg8VUeGLmRCVDdH6yG3t","name":"TAB","brief":"","defaultValue":"9","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aF87XarNewSYyK29uevQF","name":"TILDE","brief":"","defaultValue":"126","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eT7QH-aKL4RkvfrI-yKHT","name":"U","brief":"","defaultValue":"85","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k_8KsxH-08by21wkVnEGf","name":"UP","brief":"","defaultValue":"38","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6H0_PhQ7yXQr-oM8xhMgT","name":"V","brief":"","defaultValue":"86","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aTvQo7z_dJP6QXHVTxaTU","name":"W","brief":"","defaultValue":"87","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WYhv8iqTjN3lcD2j6J94d","name":"WINDOW_KEY","brief":"","defaultValue":"91","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lLybxVPYE7fo5--wDCyCE","name":"X","brief":"","defaultValue":"88","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cxVNwekTw6WjmSapH-5_5","name":"Y","brief":"","defaultValue":"89","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sa5fVKgNjdX-DI_9nE-OR","name":"Z","brief":"","defaultValue":"90","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"k8NLDgKWqBncWuYPPPGEl","name":"keyBoardEventTarget","brief":"","access":"public","defaultValue":"undefined","type":"PropertyDoc","description":"

      the default target element for keyboard events (usually the window element in which the game is running)

      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9MX7BYmYqfK020NgiGa3z","name":"locked","brief":"","access":"public","defaultValue":"false","type":"PropertyDoc","description":"

      indicates if the pointer is currently locked

      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vL1hJIE2RgNaKuTBbcL1Z","name":"pointer","brief":"","access":"public","type":"PropertyDoc","description":"

      Pointer information (current position and size)

      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kkz3esU2ETYT4mfzwWxsE","name":"pointerEventTarget","brief":"","access":"public","defaultValue":"undefined","type":"PropertyDoc","description":"

      the default target element for pointer events (usually the canvas element in which the game is rendered)

      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FFsQKvZYt1zKikps_KDJG","name":"preventDefault","brief":"","access":"public","defaultValue":"true","type":"PropertyDoc","description":"

      specify if melonJS should prevent all default browser action on registered events.

      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_G3acHqhLAXbHZwYtd_fE","name":"setGamepadMapping","brief":"","access":"public","examples":[{"caption":"","code":" // A weird controller that has its axis mappings reversed\n me.input.setGamepadMapping(\"Generic USB Controller\", {\n \"axes\" : [ 3, 2, 1, 0 ],\n \"buttons\" : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]\n });\n\n // Mapping extra axes to analog buttons\n me.input.setGamepadMapping(\"Generic Analog Controller\", {\n \"axes\" : [ 0, 1, 2, 3 ],\n \"buttons\" : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ],\n\n // Raw axis 4 is mapped to GAMEPAD.BUTTONS.FACE_1\n // Raw axis 5 is mapped to GAMEPAD.BUTTONS.FACE_2\n // etc...\n // Also maps left and right triggers\n \"analog\" : [ 4, 5, 6, 7, -1, -1, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1 ],\n\n // Normalize the value of button L2: [-1.0..1.0] => [0.0..1.0]\n \"normalize_fn\" : function (value, axis, button) {\n return ((button === me.input.GAMEPAD.BUTTONS.L2) ? ((value + 1) / 2) : value) || 0;\n }\n });"}],"type":"PropertyDoc","description":"

      specify a custom mapping for a specific gamepad id
      \nsee below for the default mapping :

      \n
      Gamepad id string

      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"mapping","description":"

      A hash table

      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"mapping.axes","description":"

      Standard analog control stick axis locations

      ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}},{"identifier":"mapping.buttons","description":"

      Standard digital button locations

      ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}},{"identifier":"mapping.analog","optional":true,"description":"

      Analog axis locations for buttons

      ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}},{"identifier":"mapping.normalize_fn","optional":true,"description":"

      a function that returns a normalized value in range [-1.0..1.0] for the given value, axis and button

      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"ACQDZmLXlkw2tK7P1h2p7","name":"throttlingInterval","brief":"","access":"public","type":"PropertyDoc","description":"

      time interval for event throttling in milliseconds
      \ndefault value : "1000/me.timer.maxfps" ms
      \nset to 0 ms...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F1a7SQepE445Op7ITyvo6","name":"bindGamepad","brief":"","access":"public","examples":[{"caption":"","code":"// enable the keyboard\nme.input.bindKey(me.input.KEY.X, \"shoot\");\n...\n// map the lower face button on the first gamepad to the X key\nme.input.bindGamepad(0, {type:\"buttons\", code: me.input.GAMEPAD.BUTTONS.FACE_1}, me.input.KEY.X);\n// map the left axis value on the first gamepad to the LEFT key\nme.input.bindGamepad(0, {type:\"axes\", code: me.input.GAMEPAD.AXES.LX, threshold: -0.5}, me.input.KEY.LEFT);"}],"type":"FunctionDoc","description":"

      Associate a gamepad event to a keycode

      ","params":[{"identifier":"index","optional":false,"description":"

      Gamepad index

      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"button","optional":false,"description":"

      Button/Axis definition

      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"button.type","description":"

      "buttons" or "axes"

      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"button.code","description":"

      button or axis code id (See {@link input.GAMEPAD.BUTTONS}, {@link input.GAMEPAD.AXES})

      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"button.threshold","optional":true,"default":"1","description":"

      value indicating when the axis should trigger the keycode (e.g. -0.5 or 0.5)

      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"keyCode","optional":false,"description":"

      (See {@link input.KEY})

      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"owqdyGg0FJnj52c6GoQEV","name":"bindKey","brief":"","access":"public","examples":[{"caption":"","code":"// enable the keyboard\nme.input.bindKey(me.input.KEY.LEFT, \"left\");\nme.input.bindKey(me.input.KEY.RIGHT, \"right\");\nme.input.bindKey(me.input.KEY.X, \"jump\", true);\nme.input.bindKey(me.input.KEY.F1, \"options\", true, true);"}],"type":"FunctionDoc","description":"

      associate a user defined action to a keycode

      ","params":[{"identifier":"keycode","optional":false,"description":"

      (See {@link input.KEY})

      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"action","optional":false,"description":"

      user defined corresponding action

      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"lock","optional":true,"default":"false","description":"

      cancel the keypress event once read

      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"preventDefault","optional":true,"default":"input.preventDefault","description":"

      prevent default browser action

      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"zqqTVXYFun7r5b1Ha1ZJg","name":"bindPointer","brief":"","examples":[{"caption":"","code":"// enable the keyboard\nme.input.bindKey(me.input.KEY.X, \"shoot\");\n// map the left button click on the X key (default if the button is not specified)\nme.input.bindPointer(me.input.KEY.X);\n// map the right button click on the X key\nme.input.bindPointer(me.input.pointer.RIGHT, me.input.KEY.X);"}],"type":"FunctionDoc","description":"

      Associate a pointer event to a keycode
      \nLeft button – 0\nMiddle button – 1\nRight button – 2

      ","params":[{"identifier":"button","optional":true,"default":"input.pointer.LEFT","description":"

      (accordingly to W3C values : 0,1,2 for left, middle and right buttons)

      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"keyCode","dataType":{"tokens":[{"value":"input.KEY","kind":"canonical"},{"value":"input.KEY","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"hDOSCkBrNMFjSKDiPowAO","name":"exitPointerLock","brief":"","type":"FunctionDoc","description":"

      Initiates an exit from pointer lock state

      ","params":[],"returns":[{"description":"

      return true if the request was successfully submitted

      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"JenGPW2onK2JFpeX18CtD","name":"getBindingKey","brief":"","access":"public","type":"FunctionDoc","description":"

      return the action associated with the given keycode

      ","params":[{"identifier":"keycode","optional":false,"description":"

      (See {@link input.KEY})

      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

      user defined associated action

      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"zG7A5SPxh8IQ3LErg1jNN","name":"globalToLocal","brief":"","examples":[{"caption":"","code":"onMouseEvent : function (pointer) {\n // convert the given into local (viewport) relative coordinates\n let pos = me.input.globalToLocal(pointer.clientX, pointer.clientY);\n // do something with pos !\n};"}],"type":"FunctionDoc","description":"

      Translate the specified x and y values from the global (absolute)\ncoordinate to local (viewport) relative coordinate.

      ","params":[{"identifier":"x","optional":false,"description":"

      the global x coordinate to be translated.

      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

      the global y coordinate to be translated.

      ","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 translated coordinates

      ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

      A vector object with the corresponding translated coordinates

      ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6qSBk9gJE3cjlNLGNNMdH","name":"hasActiveEvents","brief":"","type":"FunctionDoc","description":"

      return true if there are pending pointer events in the queue

      ","params":[],"returns":[{"description":"

      true if there are pending events

      "}],"extends":[],"implements":[]},{"id":"yVwUCy0_FCWlluniwzjxQ","name":"hasRegisteredEvents","brief":"","see":["registerPointerEvent"],"type":"FunctionDoc","description":"

      return true if there are register pointer events

      ","params":[],"returns":[{"description":"

      true if there are pending events

      "}],"extends":[],"implements":[]},{"id":"ldR4JoBOz3-fOGDcwJmb8","name":"isKeyPressed","brief":"","access":"public","examples":[{"caption":"","code":"if (me.input.isKeyPressed('left')) {\n //do something\n}\nelse if (me.input.isKeyPressed('right')) {\n //do something else...\n}"}],"type":"FunctionDoc","description":"

      return the key press status of the specified action

      ","params":[{"identifier":"action","optional":false,"description":"

      user defined corresponding action

      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

      true if pressed

      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"coQt-g6ovyUGE5_kyHidI","name":"keyStatus","brief":"","access":"public","type":"FunctionDoc","description":"

      return the key status of the specified action

      ","params":[{"identifier":"action","optional":false,"description":"

      user defined corresponding action

      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

      down (true) or up(false)

      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"IRJ0A71J0XJKBVhAC8N84","name":"registerPointerEvent","brief":"","examples":[{"caption":"","code":" // onActivate function\n onActivateEvent: function () {\n // register on the 'pointerdown' event\n me.input.registerPointerEvent('pointerdown', this, (e) => this.pointerDown(e));\n },\n\n // pointerDown event callback\n pointerDown: function (pointer) {\n // do something\n ....\n // don\"t propagate the event to other objects\n return false;\n },"}],"see":["Pointer","{@link http://www.w3.org/TR/pointerevents/#list-of-pointer-events|W3C Pointer Event list}"],"type":"FunctionDoc","description":"

      allows registration of event listeners on the object target.
      \nmelonJS will pass a me.Pointer object to the defined cal...","params":[{"identifier":"eventType","optional":false,"description":"

      The event type for which the object is registering
      \nmelonJS currently supports:

      \n
        \n
      • \"pointermo...","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"region","optional":false,"description":"

        a shape representing the region to register on

        ","dataType":{"tokens":[{"value":"Rect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4"}},{"identifier":"callback","optional":false,"description":"

        methods to be called when the event occurs.\nReturning false from the defined callback will prevent the event ...","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"A6XLGuUzrVcEyf-9bAMTa","name":"releaseAllPointerEvents","brief":"","examples":[{"caption":"","code":"// release all registered event on the\nme.input.releaseAllPointerEvents(this);"}],"type":"FunctionDoc","description":"

        allows the removal of all registered event listeners from the object target.

        ","params":[{"identifier":"region","optional":false,"description":"

        the registered region to release event from

        ","dataType":{"tokens":[{"value":"Rect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[],"extends":[],"implements":[]},{"id":"8_cdYr_UygIScy_TbKCMt","name":"releasePointerEvent","brief":"","examples":[{"caption":"","code":"// release the registered region on the 'pointerdown' event\nme.input.releasePointerEvent('pointerdown', this);"}],"see":["{@link http://www.w3.org/TR/pointerevents/#list-of-pointer-events|W3C Pointer Event list}"],"type":"FunctionDoc","description":"

        allows the removal of event listeners from the object target.

        ","params":[{"identifier":"eventType","optional":false,"description":"

        The event type for which the object was registered. See {@link input.registerPointerEvent}

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"region","optional":false,"description":"

        the registered region to release for this event

        ","dataType":{"tokens":[{"value":"Rect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4"}},{"identifier":"callback","optional":true,"default":"\"all\"","description":"

        if specified unregister the event only for the specific callback

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"-YUOnNgxONSMYL_dFlT7G","name":"requestPointerLock","brief":"","examples":[{"caption":"","code":"// register on the pointer lock change event\nevent.on(event.POINTERLOCKCHANGE, (locked)=> {\n console.log(\"pointer lock: \" + locked);\n});\n// request for pointer lock\nme.input.requestPointerLock();"}],"type":"FunctionDoc","description":"

        request for the pointer to be locked on the parent DOM element.\n(Must be called in a click event or an event that requires...","params":[],"returns":[{"description":"

        return true if the request was successfully submitted

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"136PRu32r5INzWU0fc4Db","name":"setGamepadDeadzone","brief":"","access":"public","type":"FunctionDoc","description":"

        Set deadzone for analog gamepad inputs
        \nThe default deadzone is 0.1 (10%) Analog values less than this will be ignored

        ","params":[{"identifier":"value","optional":false,"description":"

        Deadzone value

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Dat_XRSDT8agvgiBokmkY","name":"setTouchAction","brief":"","see":["https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action"],"type":"FunctionDoc","description":"

        enable/disable all gestures on the given element.
        \nby default melonJS will disable browser handling of all panning and ...","params":[{"identifier":"element","optional":false,"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}},{"identifier":"value","optional":true,"default":"\"none\"","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"tb-0JtBjGOUvNpXxobzvs","name":"triggerKeyEvent","brief":"","access":"public","examples":[{"caption":"","code":"// trigger a key press\nme.input.triggerKeyEvent(me.input.KEY.LEFT, true);"}],"type":"FunctionDoc","description":"

        trigger the specified key (simulated) event

        ","params":[{"identifier":"keycode","optional":false,"description":"

        (See {@link input.KEY})

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"status","optional":true,"default":"false","description":"

        true to trigger a key down event, or false for key up event

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"mouseButton","optional":true,"description":"

        the mouse button to trigger

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"mDbML06lCCvoU4rWFmdtG","name":"unbindGamepad","brief":"","access":"public","examples":[{"caption":"","code":"me.input.unbindGamepad(0, me.input.GAMEPAD.BUTTONS.FACE_1);"}],"type":"FunctionDoc","description":"

        unbind the defined keycode

        ","params":[{"identifier":"index","optional":false,"description":"

        Gamepad index

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"button","optional":false,"description":"

        (See {@link input.GAMEPAD.BUTTONS})

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Dq5STkdO-DxZ9_BVtJ1Cb","name":"unbindKey","brief":"","access":"public","examples":[{"caption":"","code":"me.input.unbindKey(me.input.KEY.LEFT);"}],"type":"FunctionDoc","description":"

        unbind the defined keycode

        ","params":[{"identifier":"keycode","optional":false,"description":"

        (See {@link input.KEY})

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"cwe7hI6wqGBVngbTji0Xq","name":"unbindPointer","brief":"","examples":[{"caption":"","code":"me.input.unbindPointer(me.input.pointer.LEFT);"}],"type":"FunctionDoc","description":"

        unbind the defined keycode

        ","params":[{"identifier":"button","optional":true,"default":"input.pointer.LEFT","description":"

        (accordingly to W3C values : 0,1,2 for left, middle and right buttons)

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"nUWsAtN4zgfBlBOCToyaF","name":"unlockKey","brief":"","access":"public","examples":[{"caption":"","code":"// Unlock jump when touching the ground\nif (!this.falling && !this.jumping) {\n me.input.unlockKey(\"jump\");\n}"}],"type":"FunctionDoc","description":"

        unlock a key manually

        ","params":[{"identifier":"action","optional":false,"description":"

        user defined corresponding action

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"bTkcpvAFwH5z2qYIrpVGU","name":"level","brief":"","type":"NSDoc","description":"

        a level manager. once ressources loaded, the level manager contains all references of defined levels.

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"GLcJ1jV1NlK0OHqgDVn2d","name":"add","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        add a level into the game manager (usually called by the preloader)

        ","params":[{"identifier":"format","optional":false,"description":"

        level format (only "tmx" supported)

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"levelId","optional":false,"description":"

        the level id (or name)

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"callback","optional":true,"description":"

        a function to be called once the level is loaded

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

        true if the level was loaded

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"M80ggZa4i63VTMBcxSmvd","name":"getCurrentLevel","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        return the current level definition.\nfor a reference to the live instantiated level,\nrather use the container in which it ...","params":[],"returns":[{"dataType":{"tokens":[{"value":"TMXTileMap","kind":"canonical"},{"value":"TMXTileMap","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"D83xFgSgTlh_iZTpzw3Ya","name":"getCurrentLevelId","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        return the current level id

        ","params":[],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"gHZN9tbf5LkFy5Rceij57","name":"levelCount","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        return the amount of level preloaded

        ","params":[],"returns":[{"description":"

        the amount of level preloaded

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"pKfxqJwq1JFSMQTVKIwOP","name":"load","brief":"","access":"public","examples":[{"caption":"","code":" // the game assets to be be preloaded\n // TMX maps\n let resources = [\n {name: \"a4_level1\", type: \"tmx\", src: \"data/level/a4_level1.tmx\"},\n {name: \"a4_level2\", type: \"tmx\", src: \"data/level/a4_level2.tmx\"},\n {name: \"a4_level3\", type: \"tmx\", src: \"data/level/a4_level3.tmx\"},\n // ...\n ];\n\n // ...\n\n // load a level into the game world\n me.level.load(\"a4_level1\");\n ...\n ...\n // load a level into a specific container\n let levelContainer = new me.Container();\n me.level.load(\"a4_level2\", {container:levelContainer});\n // add a simple transformation\n levelContainer.currentTransform.translate(levelContainer.width / 2, levelContainer.height / 2 );\n levelContainer.currentTransform.rotate(0.05);\n levelContainer.currentTransform.translate(-levelContainer.width / 2, -levelContainer.height / 2 );\n // add it to the game world\n me.game.world.addChild(levelContainer);"}],"scope":"instance","type":"MethodDoc","description":"

        load a level into the game manager
        \n(will also create all level defined entities, etc..)

        ","params":[{"identifier":"levelId","optional":false,"description":"

        level id

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options","optional":true,"description":"

        additional optional parameters

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.container","optional":true,"default":"game.world","description":"

        container in which to load the specified level

        ","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}},{"identifier":"options.onLoaded","optional":true,"default":"game.onLevelLoaded","description":"

        callback for when the level is fully loaded

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"options.flatten","optional":true,"default":"game.mergeGroup","description":"

        if true, flatten all objects into the given container

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"options.setViewportBounds","optional":true,"default":"true","description":"

        if true, set the viewport bounds to the map size

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

        true if the level was successfully loaded

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"UWQJVMIKfgpwUtY4CQkF4","name":"next","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        load the next level

        ","params":[{"identifier":"options","optional":true,"description":"

        additional optional parameters

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.container","optional":true,"default":"game.world","description":"

        container in which to load the specified level

        ","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}},{"identifier":"options.onLoaded","optional":true,"default":"game.onLevelLoaded","description":"

        callback for when the level is fully loaded

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"options.flatten","optional":true,"default":"game.mergeGroup","description":"

        if true, flatten all objects into the given container

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

        true if the next level was successfully loaded

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"dpLUgmDpMuVJkeEtnayka","name":"previous","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        load the previous level

        ","params":[{"identifier":"options","optional":true,"description":"

        additional optional parameters

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.container","optional":true,"default":"game.world","description":"

        container in which to load the specified level

        ","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}},{"identifier":"options.onLoaded","optional":true,"default":"game.onLevelLoaded","description":"

        callback for when the level is fully loaded

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"options.flatten","optional":true,"default":"game.mergeGroup","description":"

        if true, flatten all objects into the given container

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

        true if the previous level was successfully loaded

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"_tpejw6iPGbrPe8bDK3e2","name":"reload","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        reload the current level

        ","params":[{"identifier":"options","optional":true,"description":"

        additional optional parameters

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.container","optional":true,"default":"game.world","description":"

        container in which to load the specified level

        ","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}},{"identifier":"options.onLoaded","optional":true,"default":"game.onLevelLoaded","description":"

        callback for when the level is fully loaded

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"options.flatten","optional":true,"default":"game.mergeGroup","description":"

        if true, flatten all objects into the given container

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

        the current level

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]}]},{"id":"7fM8w6IWcyp4MVvz0bf7G","name":"loader","brief":"","type":"NSDoc","description":"

        a small class to manage loading of stuff and manage resources

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"RXN5ATz9FA0NDDxJkiT7X","name":"Asset","brief":"","examples":[{"caption":"","code":"// PNG tileset\n{name: \"tileset-platformer\", type: \"image\", src: \"data/map/tileset.png\"}\n// PNG packed texture\n{name: \"texture\", type:\"image\", src: \"data/gfx/texture.png\"}\n// PNG base64 encoded image\n{name: \"texture\", type:\"image\", src: \"data:image/png;base64,iVBORw0KAAAQAAAAEACA...\"}\n// TSX file\n{name: \"meta_tiles\", type: \"tsx\", src: \"data/map/meta_tiles.tsx\"}\n// TMX level (XML & JSON)\n{name: \"map1\", type: \"tmx\", src: \"data/map/map1.json\"}\n{name: \"map2\", type: \"tmx\", src: \"data/map/map2.tmx\"}\n{name: \"map3\", type: \"tmx\", format: \"json\", data: {\"height\":15,\"layers\":[...],\"tilewidth\":32,\"version\":1,\"width\":20}}\n{name: \"map4\", type: \"tmx\", format: \"xml\", data: {xml representation of tmx}}\n// audio resources\n{name: \"bgmusic\", type: \"audio\", src: \"data/audio/\"}\n{name: \"cling\", type: \"audio\", src: \"data/audio/\"}\n// base64 encoded audio resources\n{name: \"band\", type: \"audio\", src: \"data:audio/wav;base64,...\"}\n// binary file\n{name: \"ymTrack\", type: \"binary\", src: \"data/audio/main.ym\"}\n// JSON file (used for texturePacker)\n{name: \"texture\", type: \"json\", src: \"data/gfx/texture.json\"}\n// JavaScript file\n{name: \"plugin\", type: \"js\", src: \"data/js/plugin.js\"}\n// Font Face\n{ name: \"'kenpixel'\", type: \"fontface\", src: \"url('data/font/kenvector_future.woff2')\" }"}],"scope":"static","see":["loader.preload","loader.load"],"type":"TypedefDoc","description":"

        an asset definition to be used with the loader

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"wbLqy-JTJmxNJ0bofkMzZ","name":"data","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

        TMX data if not provided through a src url

        "},{"id":"d4qOh05h7Hl2BzH4xvNPt","name":"name","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

        name of the asset

        "},{"id":"-2GbEkdRVLUG07fJT6ZoT","name":"src","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

        path and/or file name of the resource (for audio assets only the path is required)

        "},{"id":"4-9Yuk1hbDtwqGsXeXUzv","name":"stream","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        Set to true to force HTML5 Audio, which allows not to wait for large file to be downloaded before playing.

        "},{"id":"IFMz5_v3wK54rK9rP9wIh","name":"type","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

        the type of the asset ("audio"|"binary"|"image"|"json"|"js"|"tmx&qu..."}]},{"id":"v2JMHEhZPbwt8ZxAZNe0m","name":"crossOrigin","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":" // allow for cross-origin texture loading in WebGL\n me.loader.crossOrigin = \"anonymous\";\n\n // set all ressources to be loaded\n me.loader.preload(game.resources, () => this.loaded());"}],"see":["https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes"],"type":"PropertyDoc","description":"

        crossOrigin attribute to configure the CORS requests for Image data element.\nBy default (that is, when the attribute is no...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sEa4jATea0aVRJCzdHUPZ","name":"onError","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// set a callback for error notification\nme.loader.onError = this.loaderError.bind(this);"}],"type":"PropertyDoc","description":"

        onError callback
        \neach time a resource loading is failed, the loader will fire the specified function giving the actual...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2K15jvtf8F1o4shs2j_2z","name":"onload","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// set a callback when everything is loaded\nme.loader.onload = this.loaded.bind(this);"}],"type":"PropertyDoc","description":"

        onload callback

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hhH6isQLezGQFj2M8Mpmn","name":"onProgress","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// set a callback for progress notification\nme.loader.onProgress = this.updateProgress.bind(this);"}],"type":"PropertyDoc","description":"

        onProgress callback
        \neach time a resource is loaded, the loader will fire the specified function,\ngiving the actual pro...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vWa41KdDt4CS_zq6660yT","name":"withCredentials","brief":"","access":"public","defaultValue":"false","examples":[{"caption":"","code":" // enable withCredentials\n me.loader.withCredentials = true;\n\n // set all ressources to be loaded\n me.loader.preload(game.resources, () => this.loaded());"}],"see":["https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials"],"type":"PropertyDoc","description":"

        indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies,\nauthorizatio...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uN7YvwwXmxRcEXfPrRCfr","name":"getBinary","brief":"","type":"FunctionDoc","description":"

        return the specified Binary object

        ","params":[{"identifier":"elt","optional":false,"description":"

        name of the binary object ("ymTrack");

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

        requested element or null if not found

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"F-X2wH4835QaGkv_18qe4","name":"getImage","brief":"","type":"FunctionDoc","description":"

        return the specified Image Object

        ","params":[{"identifier":"image","optional":false,"description":"

        name of the Image element ("tileset-platformer");

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

        requested element or null if not found

        ","dataType":{"tokens":[{"value":"HTMLImageElement","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"yTykAzXji3DmxA1HCER6b","name":"getJSON","brief":"","type":"FunctionDoc","description":"

        return the specified JSON Object

        ","params":[{"identifier":"elt","optional":false,"description":"

        name of the json file to load

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"PaUzXsNaMGVNXagtjulKx","name":"getTMX","brief":"","type":"FunctionDoc","description":"

        return the specified TMX/TSX object

        ","params":[{"identifier":"elt","optional":false,"description":"

        name of the tmx/tsx element ("map1");

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

        requested element or null if not found

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"XgqTtQObBaMfFy0HIvbLv","name":"load","brief":"","examples":[{"caption":"","code":"// load an image asset\nme.loader.load({name: \"avatar\", type:\"image\", src: \"data/avatar.png\"}, () => this.onload(), () => this.onerror());\n// load a base64 image asset\n me.loader.load({name: \"avatar\", type:\"image\", src: \"data:image/png;base64,iVBORw0KAAAQAAAAEACA...\"};\n// start loading music\nme.loader.load({\n name : \"bgmusic\",\n type : \"audio\",\n src : \"data/audio/\"\n}, function () {\n me.audio.play(\"bgmusic\");\n});"}],"type":"FunctionDoc","description":"

        Load a single asset (to be used if you need to load additional asset(s) during the game)

        ","params":[{"identifier":"asset","optional":false,"dataType":{"tokens":[{"value":"loader.Asset","kind":"canonical"},{"value":"loader.Asset","kind":"link"}],"template":"%1"}},{"identifier":"onload","optional":true,"description":"

        function to be called when the asset is loaded

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"onerror","optional":true,"description":"

        function to be called in case of error

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

        the amount of corresponding resource to be preloaded

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"kI9wYBExq53yEKbLXiaeS","name":"preload","brief":"","examples":[{"caption":"","code":"game.assets = [\n // PNG tileset\n {name: \"tileset-platformer\", type: \"image\", src: \"data/map/tileset.png\"},\n // PNG packed texture\n {name: \"texture\", type:\"image\", src: \"data/gfx/texture.png\"}\n // PNG base64 encoded image\n {name: \"texture\", type:\"image\", src: \"data:image/png;base64,iVBORw0KAAAQAAAAEACA...\"}\n // TSX file\n {name: \"meta_tiles\", type: \"tsx\", src: \"data/map/meta_tiles.tsx\"},\n // TMX level (XML & JSON)\n {name: \"map1\", type: \"tmx\", src: \"data/map/map1.json\"},\n {name: \"map2\", type: \"tmx\", src: \"data/map/map2.tmx\"},\n {name: \"map3\", type: \"tmx\", format: \"json\", data: {\"height\":15,\"layers\":[...],\"tilewidth\":32,\"version\":1,\"width\":20}},\n {name: \"map4\", type: \"tmx\", format: \"xml\", data: {xml representation of tmx}},\n // audio resources\n {name: \"bgmusic\", type: \"audio\", src: \"data/audio/\"},\n {name: \"cling\", type: \"audio\", src: \"data/audio/\"},\n // base64 encoded audio resources\n {name: \"band\", type: \"audio\", src: \"data:audio/wav;base64,...\"},\n // binary file\n {name: \"ymTrack\", type: \"binary\", src: \"data/audio/main.ym\"},\n // JSON file (used for texturePacker)\n {name: \"texture\", type: \"json\", src: \"data/gfx/texture.json\"},\n // JavaScript file\n {name: \"plugin\", type: \"js\", src: \"data/js/plugin.js\"},\n // Font Face\n { name: \"'kenpixel'\", type: \"fontface\", src: \"url('data/font/kenvector_future.woff2')\" }\n];\n...\n// set all resources to be loaded\nme.loader.preload(game.assets, () => this.loaded());"}],"type":"FunctionDoc","description":"

        set all the specified game assets to be preloaded.

        ","params":[{"identifier":"assets","optional":false,"description":"

        list of assets to load

        ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"loader.Asset","kind":"link"}],"template":"%1<%2>"}},{"identifier":"onloadcb","optional":true,"default":"loader.onload","description":"

        function to be called when all resources are loaded

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"switchToLoadState","optional":true,"default":"true","description":"

        automatically switch to the loading screen

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"2rCEW-_u0nfiboO2F3BAT","name":"reload","brief":"","examples":[{"caption":"","code":"event.on(\n event.LOADER_ERROR,\n (res) => {\n // custom function\n showErrorNotification({\n text: `Error during loading content: ${res.name}`,\n done: loader.reload(res.src);\n })\n }\n);"}],"type":"FunctionDoc","description":"

        retry loading assets after a loading failure

        ","params":[{"identifier":"src","optional":false,"description":"

        src of asset to reload

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"JPNbO18Cz7n-P5XJwR85x","name":"setBaseURL","brief":"","access":"public","examples":[{"caption":"","code":"// change the base URL relative address for audio assets\nme.loader.setBaseURL(\"audio\", \"data/audio/\");\n// change the base URL absolute address for all object types\nme.loader.setBaseURL(\"*\", \"http://myurl.com/\")"}],"type":"FunctionDoc","description":"

        change the default baseURL for the given asset type.
        \n(this will prepend the asset URL and must finish with a '/')

        ","params":[{"identifier":"type","optional":false,"description":"

        "*", "audio", binary", "image", "json", "js", "tmx", &quo...","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"url","optional":true,"default":"\"./\"","description":"

        default base URL

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"9LEPpySu66PMm23SfWXn_","name":"setParser","brief":"","examples":[{"caption":"","code":"// specify a custom function for \"abc\" format\nfunction customAbcParser(data, onload, onerror) {\n // preload and do something with the data\n let parsedData = doSomething(data);\n // when done, call the onload callback with the parsed data\n onload(parsedData);\n // in case of error, call the onerror callback\n onerror();\n // return the amount of asset parsed\n return 1\n}\n// set the parser for the custom format\nloader.setParser(\"abc\", customAbcParser);"}],"see":["loader.Asset.type"],"type":"FunctionDoc","description":"

        specify a parser/preload function for the given asset type

        ","params":[{"identifier":"type","optional":false,"description":"

        asset type

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"parserFn","optional":false,"description":"

        parser function

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"X5FaIlhW_mVQPQmGMAjrn","name":"unload","brief":"","examples":[{"caption":"","code":"me.loader.unload({name: \"avatar\", type:\"image\"});"}],"type":"FunctionDoc","description":"

        unload the specified asset to free memory

        ","params":[{"identifier":"asset","optional":false,"dataType":{"tokens":[{"value":"loader.Asset","kind":"canonical"},{"value":"loader.Asset","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

        true if unloaded

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"2Q40U5nfAfFiQ0dvsFYkh","name":"unloadAll","brief":"","examples":[{"caption":"","code":"me.loader.unloadAll();"}],"type":"FunctionDoc","description":"

        unload all resources to free memory

        ","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"nGJPNf2dZpKjpdqouSz5X","name":"Math","brief":"","type":"NSDoc","description":"

        a collection of math utility functions

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"dM60qDGcI4tXvrNXGysQ1","name":"DEG_TO_RAD","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

        constant to convert from degrees to radians

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ViQm7KzmT_z1AvbeIBF_U","name":"EPSILON","brief":"","access":"public","defaultValue":"0.000001","readonly":true,"type":"PropertyDoc","description":"

        the difference between 1 and the smallest floating point number greater than 1

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QyviMWDP7qXfse5utvbxQ","name":"ETA","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

        constant equals to half pi

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Vy0ffPDswDIMK4ofmwSE2","name":"RAD_TO_DEG","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

        constant to convert from radians to degrees

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"A7GgvjQWQI7MdVdoeGNUb","name":"TAU","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

        constant equals to 2 times pi

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6O8QSDAJRBuwAN-ovscTi","name":"clamp","brief":"","access":"public","type":"FunctionDoc","description":"

        clamp the given value

        ","params":[{"identifier":"val","optional":false,"description":"

        the value to clamp

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"low","optional":false,"description":"

        lower limit

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"high","optional":false,"description":"

        higher limit

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        clamped value

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ejNZg0G5EuF0MgAXRm5gq","name":"degToRad","brief":"","access":"public","examples":[{"caption":"","code":"// convert a specific angle\nme.Math.degToRad(60); // return 1.0471..."}],"type":"FunctionDoc","description":"

        Converts an angle in degrees to an angle in radians

        ","params":[{"identifier":"angle","optional":false,"description":"

        angle in degrees

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        corresponding angle in radians

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"CdEpT-f1x8QkLP0MBvf3A","name":"isPowerOfTwo","brief":"","access":"public","type":"FunctionDoc","description":"

        returns true if the given value is a power of two

        ","params":[{"identifier":"val","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":"GI_CNEfQRiNpI0xOKEFmT","name":"nextPowerOfTwo","brief":"","access":"public","type":"FunctionDoc","description":"

        returns the next power of two for the given value

        ","params":[{"identifier":"val","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":"ZtUm4x3u_ZXGrhVZdSLjv","name":"radToDeg","brief":"","access":"public","examples":[{"caption":"","code":"// convert a specific angle\nme.Math.radToDeg(1.0471975511965976); // return 60"}],"type":"FunctionDoc","description":"

        Converts an angle in radians to an angle in degrees.

        ","params":[{"identifier":"radians","optional":false,"description":"

        angle in radians

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        corresponding angle in degrees

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KTtsRt4ndu0BXrKYhcgXU","name":"random","brief":"","access":"public","examples":[{"caption":"","code":"// Print a random number; one of 5, 6, 7, 8, 9\nconsole.log(me.Math.random(5, 10) );"}],"type":"FunctionDoc","description":"

        return a random integer between min (included) and max (excluded)

        ","params":[{"identifier":"min","optional":false,"description":"

        minimum value.

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"max","optional":false,"description":"

        maximum value.

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        random value

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3FhGSWAKH_ivbnSr4Pvss","name":"randomFloat","brief":"","access":"public","examples":[{"caption":"","code":"// Print a random number; one of 5, 6, 7, 8, 9\nconsole.log(me.Math.randomFloat(5, 10) );"}],"type":"FunctionDoc","description":"

        return a random float between min, max (exclusive)

        ","params":[{"identifier":"min","optional":false,"description":"

        minimum value.

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"max","optional":false,"description":"

        maximum value.

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        random value

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3YVfnRqitcGqTHXWzeBI_","name":"round","brief":"","access":"public","examples":[{"caption":"","code":"// round a specific value to 2 digits\nme.Math.round(10.33333, 2); // return 10.33"}],"type":"FunctionDoc","description":"

        round a value to the specified number of digit

        ","params":[{"identifier":"num","optional":false,"description":"

        value to be rounded.

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"dec","optional":true,"default":"0","description":"

        number of decimal digit to be rounded to.

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        rounded value

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jDFTUQLdcA5DV2Hz1dJRf","name":"toBeCloseTo","brief":"","access":"public","examples":[{"caption":"","code":"// test if the given value is close to 10\nif (me.Math.toBeCloseTo(10, value)) {\n // do something\n}"}],"type":"FunctionDoc","description":"

        check if the given value is close to the expected one

        ","params":[{"identifier":"expected","optional":false,"description":"

        value to be compared with.

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"actual","optional":false,"description":"

        actual value to compare

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"precision","optional":true,"default":"2","description":"

        float precision for the comparison

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        if close to

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"CUJcaigx9HyZ5-JHiYvWn","name":"weightedRandom","brief":"","access":"public","examples":[{"caption":"","code":"// Print a random number; one of 5, 6, 7, 8, 9\nconsole.log(me.Math.weightedRandom(5, 10) );"}],"type":"FunctionDoc","description":"

        return a weighted random between min, max (exclusive)

        ","params":[{"identifier":"min","optional":false,"description":"

        minimum value.

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"max","optional":false,"description":"

        maximum value.

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        random value

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"XsXFxm_c58vmlPNoiOPYB","name":"ParticleEmitterSettings","brief":"","readonly":true,"see":["ParticleEmitter"],"type":"NSDoc","description":"

        ParticleEmitterSettings contains the default settings for ParticleEmitter

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"EK0uQcIy4aYJhF2kfWC_k","name":"angle","brief":"","access":"public","defaultValue":"Math.PI / 2","scope":"static","type":"PropertyDoc","description":"

        Start angle for particle launch in Radians

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DYf1nmw8_1sLt17zlI-SA","name":"angleVariation","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

        letiation in the start angle for particle launch in Radians.

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oGXD81_-B69_CAFxDKBCT","name":"blendMode","brief":"","access":"public","defaultValue":"normal","scope":"static","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"

        the blend mode to be applied when rendering particles.\n(note: this will superseed the textureAdditive setting...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sA9fcE5cGs-sYFX5B-7fj","name":"duration","brief":"","access":"public","defaultValue":"Infinity","scope":"static","type":"PropertyDoc","description":"

        Duration that the emitter releases particles in ms (used only if emitter is Stream).\nAfter this period, the emitter stop t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oFBb3I8z8Z8uRvx3jaAu7","name":"floating","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        Render particles in screen space.

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vwehfuAxmKebr0mjbkh4-","name":"followTrajectory","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        Update the rotation of particle in accordance the particle trajectory.
        \nThe particle sprite should aim at zero angle (d...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w74K_SP8nd1S37cPOMcye","name":"framesToSkip","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

        Skip n frames after updating the particle system once.\nThis can be used to reduce the performance impact of emitters with ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"msfZj74hHHf-VUE11h7Gl","name":"frequency","brief":"","access":"public","defaultValue":"100","scope":"static","type":"PropertyDoc","description":"

        How often a particle is emitted in ms (used only if emitter is a Stream).

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"f1MvnihAggq23_Omod1R9","name":"gravity","brief":"","access":"public","defaultValue":"0","scope":"static","see":["game.world.gravity"],"type":"PropertyDoc","description":"

        Vertical force (Gravity) for each particle

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"J0STLzq1fxnLH8aaUCc1e","name":"height","brief":"","access":"public","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

        Height of the particle spawn area

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ymt7GI1IT7nBIlNSpHOrX","name":"image","brief":"","access":"public","defaultValue":"undefined","scope":"static","see":["ParticleEmitterSettings.textureSize"],"type":"PropertyDoc","description":"

        image used for particles texture\n(by default melonJS will create an white 8x8 texture image)

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"acj1OuLBdivIddtyWx_IA","name":"maxEndScale","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

        Maximum end scale ratio for particles

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_0TBtISjZoX_Z_SeAaeYC","name":"maxLife","brief":"","access":"public","defaultValue":"3000","scope":"static","type":"PropertyDoc","description":"

        Maximum time each particle lives once it is emitted in ms.

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"04HbIXYoTlqBh_0S3_eRH","name":"maxParticles","brief":"","access":"public","defaultValue":"10","scope":"static","type":"PropertyDoc","description":"

        Maximum number of particles launched each time in this emitter (used only if emitter is Stream).

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4jtcW5eYcaUeaFBN1adUb","name":"maxRotation","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

        Maximum start rotation for particles sprites in Radians

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ssu0TjOmu-vt1QAGTfCJZ","name":"maxStartScale","brief":"","access":"public","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

        Maximum start scale ratio for particles (1 = no scaling)

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zUgpg65193xmuKU_ENfXr","name":"minEndScale","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

        Minimum end scale ratio for particles

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y248QAseEDuoJRDTT4W8P","name":"minLife","brief":"","access":"public","defaultValue":"1000","scope":"static","type":"PropertyDoc","description":"

        Minimum time each particle lives once it is emitted in ms.

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wa4GljkvrW_oxdGn3cncd","name":"minRotation","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

        Minimum start rotation for particles sprites in Radians

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gOGLcrzmkAYeOxw4NTaNo","name":"minStartScale","brief":"","access":"public","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

        Minimum start scale ratio for particles (1 = no scaling)

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nOTNrq0c6ayiqvgqGCsUF","name":"onlyInViewport","brief":"","access":"public","defaultValue":"true","scope":"static","type":"PropertyDoc","description":"

        Update particles only in the viewport, remove it when out of viewport.

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"J3V2CtniNvPjvIExLQNnC","name":"speed","brief":"","access":"public","defaultValue":"2","scope":"static","type":"PropertyDoc","description":"

        Start speed of particles.

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BBrlUe9ktSVBhJlkxnoff","name":"speedVariation","brief":"","access":"public","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

        letiation in the start speed of particles

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NWAhOuFEJTPSfR7jcVjSk","name":"textureAdditive","brief":"","access":"public","defaultValue":"false","scope":"static","see":["ParticleEmitterSettings.blendMode"],"type":"PropertyDoc","description":"

        Enable the Texture Additive by composite operation ("additive" blendMode)

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9nwIGNGFFUnrayW73ilJC","name":"textureSize","brief":"","access":"public","defaultValue":"8","scope":"static","see":["ParticleEmitterSettings.image"],"type":"PropertyDoc","description":"

        default texture size used for particles if no image is specified\n(by default melonJS will create an white 8x8 texture imag...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iqQx0b1um-Wy6FTUaM8F8","name":"tint","brief":"","access":"public","defaultValue":"\"#fff\"","scope":"static","type":"PropertyDoc","description":"

        tint to be applied to particles

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u9LJkof4WM7OZZi2XjRc8","name":"totalParticles","brief":"","access":"public","defaultValue":"50","scope":"static","type":"PropertyDoc","description":"

        Total number of particles in the emitter

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ln5IZT3POPBc-HZhZN6Jp","name":"width","brief":"","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

        Width of the particle spawn area.

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MRTtDoFeOj2fxgO-f358n","name":"wind","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

        Horizontal force (like a Wind) for each particle

        ","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"UcdNaE1JqZsT5cx560Sgd","name":"plugin","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"f7r_wKUPIlFPDHahIOXfB","name":"Base","brief":"","deprecated":"since 15.1.6, see {@link plugin.BasePlugin}","type":"ClassDoc","params":[],"returns":[],"extends":["plugin.BasePlugin"],"implements":[],"members":[{"id":"W1CmRusz6n3DcCbvC0YfK","name":"app","brief":"","scope":"instance","type":"PropertyDoc","description":"

        a reference to the app/game that registered this plugin

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z3SqGV44gYsabRDmaakux","name":"version","brief":"","defaultValue":"\"__VERSION__\"","scope":"instance","type":"PropertyDoc","description":"

        define the minimum required version of melonJS
        \nthis can be overridden by the plugin

        ","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"dBULBqomyLNW8Qt--S8MP","name":"BasePlugin","brief":"","type":"ClassDoc","description":"

        a base Object class for plugin\n(plugin must be installed using the register function)

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"UryDXElGCOJF6uF2XWOv1","name":"app","brief":"","scope":"instance","type":"PropertyDoc","description":"

        a reference to the app/game that registered this plugin

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_kGDccW0CpNLY8xgnWWzL","name":"version","brief":"","defaultValue":"\"__VERSION__\"","scope":"instance","type":"PropertyDoc","description":"

        define the minimum required version of melonJS
        \nthis can be overridden by the plugin

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"316-z8ShLfLDdcfMbOKno","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"app","optional":true,"description":"

        a reference to the app/game that registered this plugin

        ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"m19M6aFH5fiAnV0qh0gAH","name":"cache","brief":"","type":"PropertyDoc","description":"

        Contains all registered plugins.

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AL5yJKIz2vu-qZnzQc_5x","name":"get","brief":"","type":"FunctionDoc","description":"

        returns the the plugin instance with the specified class type or registered name

        ","params":[{"identifier":"classType","optional":false,"description":"

        the Class Object or registered name of the plugin to retreive

        ","dataType":{"tokens":[{"value":"object | string","kind":"canonical"}],"template":"object | string"}}],"returns":[{"description":"

        a plugin instance or undefined

        ","dataType":{"tokens":[{"value":"BasePlugin","kind":"canonical"},{"value":"BasePlugin","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"sklehmj6_1-KSTWS2UP9Z","name":"patch","brief":"","examples":[{"caption":"","code":"// redefine the me.game.update function with a new one\nme.plugin.patch(me.game, \"update\", function () {\n // display something in the console\n console.log(\"duh\");\n // call the original me.game.update function\n this._patched();\n});"}],"type":"FunctionDoc","description":"

        patch a melonJS function

        ","params":[{"identifier":"proto","optional":false,"description":"

        target object

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"name","optional":false,"description":"

        target function

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"fn","optional":false,"description":"

        replacement function

        ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"AeKk9C22hgtMaBGoQOn1X","name":"register","brief":"","examples":[{"caption":"","code":"// register a new plugin\nme.plugin.register(TestPlugin, \"testPlugin\");\n// the `testPlugin` class instance can also be accessed through me.plugin.cache\nme.plugin.cache.testPlugin.myfunction ();"}],"type":"FunctionDoc","description":"

        Register a plugin.

        ","params":[{"identifier":"plugin","optional":false,"description":"

        Plugin object to instantiate and register

        ","dataType":{"tokens":[{"value":"plugin.BasePlugin","kind":"canonical"},{"value":"plugin.BasePlugin","kind":"link"}],"template":"%1"}},{"identifier":"name","optional":true,"default":"plugin.constructor.name","description":"

        a unique name for this plugin

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"...arguments","optional":true,"variadic":true,"description":"

        all extra parameters will be passed to the plugin constructor

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"VVkDC0c1eYKZzAUUd0sfn","name":"pool","brief":"","examples":[{"caption":"","code":"// register our bullet object into the object pool\npool.register(\"bullet\", BulletEntity, true);\n// ...\n// when we need to manually create a new bullet:\nlet bullet = pool.pull(\"bullet\", x, y, direction, velocity);\n// ...\n// when we want to destroy existing object, the remove\n// function will ensure the object can then be reallocated later\ngame.world.removeChild(bullet);"}],"see":["ObjectPool"],"type":"NSDoc","description":"

        a default global ObjectPool instance

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hUDMo24V70eaWQCZG9MOw","name":"save","brief":"","examples":[{"caption":"","code":" // Initialize \"score\" and \"lives\" with default values\n // This loads the properties from localStorage if they exist, else it sets the given defaults\n me.save.add({ score : 0, lives : 3 });\n\n // Print all\n // On first load, this prints { score : 0, lives : 3 }\n // On further reloads, it prints { score : 31337, lives : 3, complexObject : ... }\n // Because the following changes will be saved to localStorage\n console.log(JSON.stringify(me.save));\n\n // Save score\n me.save.score = 31337;\n\n // Also supports complex objects thanks to the JSON backend\n me.save.add({ complexObject : {} })\n me.save.complexObject = { a : \"b\", c : [ 1, 2, 3, \"d\" ], e : { f : [{}] } };\n\n // WARNING: Do not set any child properties of complex objects directly!\n // Changes made that way will not save. Always set the entire object value at once.\n // If you cannot live with this limitation, there's a workaround:\n me.save.complexObject.c.push(\"foo\"); // Modify a child property\n me.save.complexObject = me.save.complexObject; // Save the entire object!\n\n // Remove \"lives\" from localStorage\n me.save.remove(\"lives\");"}],"type":"NSDoc","description":"

        allow to access and manage the device localStorage

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"IU7FRVv6dh7rXdV7PGXCu","name":"add","brief":"","examples":[{"caption":"","code":"// Initialize \"score\" and \"lives\" with default values\nme.save.add({ score : 0, lives : 3 });\n// get or set the value through me.save\nme.save.score = 1000;"}],"scope":"instance","type":"MethodDoc","description":"

        Add new keys to localStorage and set them to the given default values if they do not exist

        ","params":[{"identifier":"props","optional":false,"description":"

        key and corresponding values

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"8wR38BlfUzh26lRf4VSGp","name":"remove","brief":"","examples":[{"caption":"","code":"// Remove the \"score\" key from localStorage\nme.save.remove(\"score\");"}],"scope":"instance","type":"MethodDoc","description":"

        Remove a key from localStorage

        ","params":[{"identifier":"key","optional":false,"description":"

        key to be removed

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"0iFKQsBvtSCUNzVzgkgZU","name":"state","brief":"","type":"NSDoc","description":"

        a State Manager (state machine)

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"XukGczzlG5cWXWATZXUAa","name":"CREDITS","brief":"","defaultValue":"7","scope":"static","type":"PropertyDoc","description":"

        default state ID for Credits Stage

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S5TVKYxhb--NeEmwWH1be","name":"DEFAULT","brief":"","defaultValue":"9","scope":"static","type":"PropertyDoc","description":"

        default state ID for the default Stage\n(the default stage is the one running as soon as melonJS is started)

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2ls-Yx7wbzMqlkez-gIUT","name":"GAME_END","brief":"","defaultValue":"5","scope":"static","type":"PropertyDoc","description":"

        default state ID for Game End Stage

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iw6a8-APNJ9HCQeAld6pL","name":"GAMEOVER","brief":"","defaultValue":"4","scope":"static","type":"PropertyDoc","description":"

        default state ID for Game Over Stage

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wNkwpnKnagQLWvsv5Ilv5","name":"LOADING","brief":"","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

        default state ID for Loading Stage

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hVV29ldRSEtywRzA4VnU8","name":"MENU","brief":"","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

        default state ID for Menu Stage

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3RrdcealKE3-RGc0JsVkN","name":"PLAY","brief":"","defaultValue":"3","scope":"static","type":"PropertyDoc","description":"

        default state ID for Play Stage

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fWUvI3nFLxDbP4OGrFTDA","name":"READY","brief":"","defaultValue":"2","scope":"static","type":"PropertyDoc","description":"

        default state ID for "Ready" Stage

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DnTxHvbCoBS1wfHDOaKfs","name":"SCORE","brief":"","defaultValue":"6","scope":"static","type":"PropertyDoc","description":"

        default state ID for High Score Stage

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_35OOsnjo2v3_7at0ZUy1","name":"SETTINGS","brief":"","defaultValue":"8","scope":"static","type":"PropertyDoc","description":"

        default state ID for Settings Stage

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GpTZAu4mJmEXLDnWyP0h5","name":"USER","brief":"","defaultValue":"100","examples":[{"caption":"","code":"let STATE_INFO = me.state.USER + 0;\nlet STATE_WARN = me.state.USER + 1;\nlet STATE_ERROR = me.state.USER + 2;\nlet STATE_CUTSCENE = me.state.USER + 3;"}],"scope":"static","type":"PropertyDoc","description":"

        default state ID for user defined constants

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K9q7mDmwwEPKnHe1WikT5","name":"change","brief":"","access":"public","examples":[{"caption":"","code":"// The onResetEvent method on the play screen will receive two args:\n// \"level_1\" and the number 3\nme.state.change(me.state.PLAY, \"level_1\", 3);"}],"scope":"instance","type":"MethodDoc","description":"

        change the game/app state

        ","params":[{"identifier":"state","optional":false,"description":"

        State ID (see constants)

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"forceChange","optional":false,"description":"

        if true the state will be changed immediately

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"...arguments","optional":true,"variadic":true,"description":"

        extra arguments to be passed to the reset functions

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"5R_u15QEb77QmtUPfsv5e","name":"current","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        return a reference to the current stage
        \nuseful to call a object specific method

        ","params":[],"returns":[{"dataType":{"tokens":[{"value":"Stage","kind":"canonical"},{"value":"Stage","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6mGQNu_xuK7WSejH6m55H","name":"isCurrent","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        return true if the specified state is the current one

        ","params":[{"identifier":"state","optional":false,"description":"

        State ID (see constants)

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        true if the specified state is the current one

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ruoYN4Ii9UfyE_2I7LOcR","name":"isPaused","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        Return the pause state of the state manager

        ","params":[],"returns":[{"description":"

        true if the game is paused

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ifWH745ZGorOplnkESThW","name":"isRunning","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        return the running state of the state manager

        ","params":[],"returns":[{"description":"

        true if a "process is running"

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"FX3_8ImhYUi2TYpunIqqo","name":"pause","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        pause the current stage

        ","params":[{"identifier":"music","optional":true,"default":"false","description":"

        pause current music track on screen pause

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"LBRvhZSpunagPVSB5Lncc","name":"restart","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        Restart the current stage from a full stop.

        ","params":[{"identifier":"music","optional":true,"default":"false","description":"

        resume current music track on screen resume

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"8bMTDKLjGqDyJGHKWmf3O","name":"resume","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        resume the current stage

        ","params":[{"identifier":"music","optional":true,"default":"false","description":"

        resume current music track on screen resume

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"YshSr5rbtpGK9I2tjGeTK","name":"set","brief":"","access":"public","examples":[{"caption":"","code":" class MenuButton extends me.GUI_Object {\n onClick() {\n // Change to the PLAY state when the button is clicked\n me.state.change(me.state.PLAY);\n return true;\n }\n };\n\n class MenuScreen extends me.Stage {\n onResetEvent() {\n // Load background image\n me.game.world.addChild(\n new me.ImageLayer(0, 0, {\n image : \"bg\",\n z: 0 // z-index\n }\n );\n\n // Add a button\n me.game.world.addChild(\n new MenuButton(350, 200, { \"image\" : \"start\" }),\n 1 // z-index\n );\n\n // Play music\n me.audio.playTrack(\"menu\");\n }\n\n onDestroyEvent() {\n // Stop music\n me.audio.stopTrack();\n }\n };\n\n me.state.set(me.state.MENU, new MenuScreen());"}],"scope":"instance","type":"MethodDoc","description":"

        associate the specified state with a Stage

        ","params":[{"identifier":"state","optional":false,"description":"

        State ID (see constants)

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"stage","optional":false,"description":"

        Instantiated Stage to associate with state ID

        ","dataType":{"tokens":[{"value":"Stage","kind":"canonical"},{"value":"Stage","kind":"link"}],"template":"%1"}},{"identifier":"start ","optional":true,"default":" false","description":"

        if true the state will be changed immediately after adding it.

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"ELvLwmVpXjdZ_UjU0tZQ6","name":"set","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        returns the stage associated with the specified state\n(or the current one if none is specified)

        ","params":[{"identifier":"state","optional":true,"description":"

        State ID (see constants)

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Stage","kind":"canonical"},{"value":"Stage","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"52SXAh4Cy_7uoWGRKSgN4","name":"setTransition","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        enable/disable the transition to a particular state (by default enabled for all)

        ","params":[{"identifier":"state","optional":false,"description":"

        State ID (see constants)

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"enable","optional":false,"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"XorpM3oBv4NpAHXNOKqtA","name":"stop","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        Stop the current stage.

        ","params":[{"identifier":"pauseTrack","optional":true,"default":"false","description":"

        pause current track on screen stop.

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"fxYj14iaNQamNH7Jg19KI","name":"transition","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

        specify a global transition effect

        ","params":[{"identifier":"effect","optional":false,"description":"

        (only "fade" is supported for now)

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"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"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"7oDe18VFOq5BNe9azbUbb","name":"timer","brief":"","examples":[{"caption":"","code":"// set a timer to call \"myFunction\" after 1000ms\ntimer.setTimeout(myFunction, 1000);\n// set a timer to call \"myFunction\" after 1000ms (respecting the pause state) and passing param1 and param2\ntimer.setTimeout(myFunction, 1000, true, param1, param2);\n// set a timer to call \"myFunction\" every 1000ms\ntimer.setInterval(myFunction, 1000);\n// set a timer to call \"myFunction\" every 1000ms (respecting the pause state) and passing param1 and param2\ntimer.setInterval(myFunction, 1000, true, param1, param2);"}],"see":["Timer"],"type":"NSDoc","description":"

        the default global Timer instance

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KiGluKths4wH_U2uY9IoP","name":"TMXUtils","brief":"","type":"NSDoc","description":"

        a collection of utility functions for parsing TMX maps

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"KWFR_BXG8ZZyKq698cp_K","name":"applyTMXProperties","brief":"","type":"FunctionDoc","description":"

        Apply TMX Properties to the given object

        ","params":[{"identifier":"obj","optional":false,"description":"

        object to apply the properties to

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"data","optional":false,"description":"

        TMX data object

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"

        obj

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"S-0l69Iy9a8_gOksBF5ko","name":"decode","brief":"","type":"FunctionDoc","description":"

        Decode a encoded array into a binary array

        ","params":[{"identifier":"data","optional":false,"description":"

        data to be decoded

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"encoding","optional":true,"default":"\"none\"","description":"

        data encoding ("csv", "base64", "xml")

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

        Decoded data

        ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"e6HI9SMTrozf8GS0sbyE0","name":"decodeBase64AsArray","brief":"","type":"FunctionDoc","description":"

        Decode a base64 encoded string into a byte array

        ","params":[{"identifier":"input","optional":false,"description":"

        Base64 encoded data

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"bytes","optional":true,"default":"1","description":"

        number of bytes per array entry

        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        Decoded data

        ","dataType":{"tokens":[{"value":"Uint32Array","kind":"canonical"},{"value":"Uint32Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wmpXulvRxhhRoVfDw0Zfz","name":"decodeCSV","brief":"","type":"FunctionDoc","description":"

        Decode a CSV encoded array into a binary array

        ","params":[{"identifier":"input-","optional":false,"description":"

        CSV formatted data (only numbers, everything else will be converted to NaN)

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

        Decoded data

        ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"uPaQuhTSLT1Xol_XfGoGN","name":"decompress","brief":"","type":"FunctionDoc","description":"

        decompress and decode zlib/gzip data

        ","params":[{"identifier":"input","optional":false,"description":"

        Base64 encoded and compressed data

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"format","optional":false,"description":"

        compressed data format ("gzip","zlib", "zstd")

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

        Decoded and decompress data

        ","dataType":{"tokens":[{"value":"Uint32Array","kind":"canonical"},{"value":"Uint32Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"h5gPivdDAoF6AacZLoE64","name":"parse","brief":"","type":"FunctionDoc","description":"

        Parse a XML TMX object and returns the corresponding javascript object

        ","params":[{"identifier":"xml","optional":false,"description":"

        XML TMX object

        ","dataType":{"tokens":[{"value":"Document","kind":"canonical"},{"value":"Document","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

        Javascript object

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"LqI-fpaOaYrkAfaia4Ld0","name":"setInflateFunction","brief":"","type":"FunctionDoc","description":"

        set the function used to inflate gzip/zlib data

        ","params":[{"identifier":"fn","optional":false,"description":"

        inflate function

        ","dataType":{"tokens":[{"value":"Func","kind":"canonical"},{"value":"Func","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"VYgw9Vyyi1jQvF7Gupr5r","name":"utils","brief":"","defaultValue":"\"\"","type":"NSDoc","description":"

        a collection of utility functions

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"58mHd9dCHGMaTcwp2TJcp","name":"agent","brief":"","scope":"static","type":"NSDoc","description":"

        a collection of utility functons to ease porting between different user agents.

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"IQNrB1dGoaXGldT4_68ox","name":"prefixed","brief":"","access":"public","type":"FunctionDoc","description":"

        Get a vendor-prefixed property

        ","params":[{"identifier":"name","optional":false,"description":"

        Property name

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"obj","optional":true,"default":"globalThis","description":"

        Object or element reference to access

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"

        Value of property

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"EGpEELaY8BW99vmBynEEN","name":"setPrefixed","brief":"","access":"public","type":"FunctionDoc","description":"

        Set a vendor-prefixed property

        ","params":[{"identifier":"name","optional":false,"description":"

        Property name

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"value","optional":false,"description":"

        Property value

        ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"obj","optional":true,"default":"globalThis","description":"

        Object or element reference to access

        ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"

        true if one of the vendor-prefixed property was found

        ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]}]},{"id":"J_3Xku1mDH_bsQr9yf9mD","name":"array","brief":"","scope":"static","type":"NSDoc","description":"

        a collection of array utility functions

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"VeTJEWFHCEmxWXCsktyK5","name":"random","brief":"","access":"public","examples":[{"caption":"","code":"// Select a random array element\nlet arr = [ \"foo\", \"bar\", \"baz\" ];\nconsole.log(me.utils.array.random(arr));"}],"type":"FunctionDoc","description":"

        return a random array element

        ","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":"83L1q7_xkUFv8f1i4ALVr","name":"remove","brief":"","access":"public","type":"FunctionDoc","description":"

        Remove the specified object from the given Array

        ","params":[{"identifier":"arr","optional":false,"description":"

        array from which to remove an object

        ","dataType":{"tokens":[{"value":"Array","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":"Kp3aSRb4cY1VwjaleQ6Dj","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":"91EBojdvCjtbaRe_PbX08","name":"file","brief":"","defaultValue":"undefined","readonly":true,"scope":"static","type":"NSDoc","description":"

        a collection of file utility functions

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"uvy6Fzy2WhG0u-J6uqdOI","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":"IQu6LPXHY0dJ2v4xNTzUS","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":"oRHLTw5AdsoQY9uKNpkZR","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":"Ibn60tN0NDigkXHAgYkt7","name":"function","brief":"","scope":"static","type":"NSDoc","description":"

        a collection of utility functions

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"yYvAoj8OXoPjgeeRFcqgU","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":"XCdePtmKlWAJDf3ljlqlM","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":"p02BOXGSb8IyteY692Tjt","name":"string","brief":"","scope":"static","type":"NSDoc","description":"

        a collection of string utility functions

        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"pqbDitsdhJ9RrV43vUEUw","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":"hmxRVOFK6xfAL6cxYQvHw","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":"1NfgcXo3KvQzK6rCMPrqg","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":"lhpfAV8V-sy7W_xt5Cg6f","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":"NThMllgCnlgSmCqrOezfk","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":"tfFT1_bEOcJaueZysrC9o","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":"ABtudh13db3wVRSbZEhnq","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":"j_q6jQk5AjqEIetk1isX7","name":"debug","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        display the debug panel (if preloaded)

        "},{"id":"Z5MDrli3RCAcnJ9sTP2t8","name":"debugToggleKey","brief":"","access":"public","defaultValue":"\"s\"","scope":"static","type":"PropertyDoc","description":"

        show/hide the debug panel (if preloaded)

        "},{"id":"cADJ6_ioOaYRhfbM8juKJ","name":"hitbox","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        draw the hitbox in the debug panel (if enabled)

        "},{"id":"Jh9hwgcSpx1DKaIZvfFvG","name":"quadtree","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        draw the quadtree in the debug panel (if enabled)

        "},{"id":"B8aizaQqTTaJL8Ytxuf_R","name":"velocity","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        draw the entities velocity in the debug panel (if enabled)

        "},{"id":"l5Fzkexge9yq7bT_2PpUX","name":"webgl","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        force the renderer to WebGL

        "}]}]},{"id":"595TTo-jfJm0xAEbJalmP","name":"video","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"mVMC3Smc2mJxnLnBuytVO","name":"renderer","brief":"","defaultValue":"undefined","type":"PropertyDoc","description":"

        A reference to the active Canvas or WebGL active renderer renderer

        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0WAa4LBmgpiiEaOIufTeA","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":"dS8F9Z6ejPsDwQPQe7ZIl","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":"1bdHPN1CiVZ1OMFqDTQOm","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":"LYgDL9QzG-s8MocHcJOha","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":"orZtd25uJGrAitcyUVmP5","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":"vWrpzDPuSK5K3F6zGCxsU","name":"antiAlias","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        whether to enable or not video scaling interpolation

        "},{"id":"_SMWORYvAfjaBQmteIl_P","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":"_7ZPkttOLGoIq9AwCfYP4","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":"niPcGKntwJm421KXZOzIz","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":"dLuNslAlf1g_iORvtnP3Z","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":"saX9Pi8-eyBm0hJu250EL","name":"preferWebGL1","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

        if true the renderer will only use WebGL 1

        "},{"id":"l6QGKw3p07ujXaAfTUzbL","name":"renderer","brief":"","access":"public","defaultValue":"AUTO","scope":"static","type":"PropertyDoc","description":"

        renderer to use (CANVAS, WEBGL, AUTO), or a custom renderer class

        "},{"id":"FuI2CKUuxaTVbXPsOTmNr","name":"scale","brief":"","access":"public","defaultValue":"1.0","scope":"static","type":"PropertyDoc","description":"

        enable scaling of the canvas ('auto' for automatic scaling)

        "},{"id":"FHDdgSuj6uwY-yFh_WXBD","name":"scaleMethod","brief":"","access":"public","defaultValue":"\"fit\"","scope":"static","type":"PropertyDoc","description":"

        screen scaling modes :

        \n
          \n
        • fit : Letterboxed; content is scaled to design aspect ..."},{"id":"RrvffoRxphWWe-X52lFWy","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":"6fjpRLr7o3lkY327g27W-","name":"transparent","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

          whether to allow transparent pixels in the front buffer (screen).

          "}]},{"id":"K2yb8AQBZoplE17e5-z2m","name":"isInitialized","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

          true when this app instance has been initialized

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HGUQ-mRr-6-v8AoV6UlLv","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":"xmqKPbF5YK_9kwjuu1m40","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":"5E_-If5It6ZzHc0Z4pkdl","name":"parentElement","brief":"","scope":"instance","type":"PropertyDoc","description":"

          the parent HTML element holding the main canvas of this application

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aaueizq5_zJIgJ5P9RiW9","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":"FNfn5rbEEEuF6Dj4Y7rcp","name":"renderer","brief":"","scope":"instance","type":"PropertyDoc","description":"

          a reference to the active Canvas or WebGL active renderer renderer

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mEn5IbQU27eAhvDbryJQi","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":"r4gFGfKobSPwB--ssp-vA","name":"settings","brief":"","scope":"instance","type":"PropertyDoc","description":"

          the given settings used when creating this application

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5oOs-YZne4PUg9QuELCmJ","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":"-rn4ygbBYhE11naC3AyZ6","name":"stopOnBlur","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

          Specify whether to stop this app when losing focus

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JBZAaY0ClHMYNlsDO5qYw","name":"viewport","brief":"","scope":"instance","type":"PropertyDoc","description":"

          the active stage "default" camera

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ltr48C1i1Qn0qKbMqGTl3","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":"TNubkdwDuoSgxeDCH2q8k","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":"uaVFUNOPbYEEAwQGtb0Vj","name":"draw","brief":"

          draw the active scene/stage associated to this game

          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2U1LxR6NELR8L-3pf6Wln","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":"38g0rv1D7v06xWfKKiYzR","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":"-GQ3qIE9Fv44RNluMLz30","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":"REuxBdizEZi4vQHEZtkEo","name":"repaint","brief":"

          force the redraw (not update) of all objects

          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jJ8t6cp356CNuU9tHD0sX","name":"reset","brief":"","scope":"instance","type":"MethodDoc","description":"

          reset the game Object manager\ndestroy all current objects

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fLPsiSeHLbHz_JT65dw0j","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":"EYLfmw6BySCvSOH8lcUN8","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":"zOJaZBjzUWX-SjuCN7der","name":"BitmapText","brief":"","type":"ClassDoc","description":"

          a bitmap font object

          ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"JBcWHlwcvfLeSJfWPjZF6","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":"_0OITouMmN73YPPJF2fY7","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":"Esfe4yJc3zduXJ12yZD2I","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":"VeJWKznL5-f0A-dAqxjxZ","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":"SCAGEo5ZxsiLKaxeXf9I2","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":"sweFcABFS5HkGtvHJtHeM","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":"IqkeawHlw6rOo23gggqJv","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":"G0rvgHSYqsB0tzYFfKjv_","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

          bottom coordinate of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jOfqsXuBgjAVMLleDvrWZ","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

          absolute center of this rectangle on the horizontal axis

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bSjrTxUke30rEM3jJOz2V","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

          absolute center of this rectangle on the vertical axis

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lRBKHoN3kED9Hb6XAOp64","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

          the renderable default transformation matrix

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"f2pPat4CPpxNS45_0Dxso","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

          the depth of this renderable on the z axis

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z1Hu3LnbnW1pHZrX7nqi0","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":"f9y35Yc4K5Dzc_a29Bjgn","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":"9jQCz2TJyEfGssMXc9-Ur","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":"zUbEDVBMQD_SM3x39srjo","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

          height of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fkcppk8F7ZtAWg5Io_52h","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":"5uKFBF5KSR8-1OT-ubmYv","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":"4y4BCgz5SjFcy7jzQtmXR","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":"ktbZi9GekjALwW8YdK1-G","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":"rlzgS3fesqeT4B5ZI-Cb3","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":"gMAuUrnSyb_8cK7khs6oy","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":"SZAyq9Kk1G_Gz3yBknDsS","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

          make the renderable object persistent over level changes

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cONSU9ptPPWSK4wE-r5RH","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

          left coordinate of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8xUQSabEt4AoXk6Hq19Ke","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":"Z6s9VdyeGnqeMiyz5-FpE","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":"OxEOXOxtWzBqXxw-6f76R","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

          The name of the renderable

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wbXv69m8t0oksSqUY3iu2","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":"u2ul4yPZXdHhRtNaJmN2M","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":"PKnPf9hF4K1xxkfmbk-Kh","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

          Position of the Renderable relative to its parent container

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wsAloiHcj4gY-91_KWR0U","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

          right coordinate of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4KEmOsJt2RWytGpcrfvpv","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":"RPiPFvyIpEE6lqC4k-46k","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":"mKqB-q6q06y8D9WC2Pmcp","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":"krLadPC1RWx_YlIyVS2T5","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":"ViJswbCQpUa4QhqzOyqLQ","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

          top coordinate of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pmFNZwo8_whZwCN99nbkv","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

          the shape type (used internally)

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SsTreVWdnvEPt64WznJxn","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":"M0_BGTbuDctyc-Hertq1W","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

          width of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NrH9Ag1L1TptnV-gl5Z6v","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":"aqdRqMOnXzniwu13LNM8o","name":"_text","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

          the text to be displayed

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pL5-UReqlqPHevpBfW8B0","name":"fontData","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

          font data

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eV1Z3m8GbncJiB6VJSkzd","name":"fontImage","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

          font image

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Cr6At6WXUEgupN3Qca8Wp","name":"fontScale","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

          scaled font size

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"76pnCujSmr8aC4UkjTxSD","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":"8SnWPy-zRrpW7qX9sbW2q","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":"mNjizrHBhJcAqQxVueweU","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":"BnSC0UQE3CfoSAJ9PEwEs","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":"PRdnPj5rkEy6EcXB3VKd2","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":"sFStDj-VkTVXueKczkWL3","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":"ehpZ2ggzQpmv1DhqzTzZ7","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":"LO7z091t5E14Mu2SAfngv","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":"vW5u3Va6jrbj7r7l7vXWv","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":"M0KaLPH53tBn6_BwJLZnV","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":"YL1gr6yy-VhFCK5CPygbu","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":"0iUKISqssNc-EcHc6qWNq","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":"QFV4oxWFqA4883ie0QSs3","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":"nL9g-tG2HciHOVmg_JAjg","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":"C4HHe6HKCZ7e7tJH0Z3JQ","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":"ZqfDLmfYTPuBUDjYg2mdb","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":"3_bmM16afVd6qxj2imwX0","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":"GjPFls6nCI3cdINRQeT9z","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":"w7Bsf7eWeoMQ53qQCecRa","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":"TZEg6_QIQ8KSLWkDeKfqI","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":"2drYLOSJ5pkgZCFkeWOss","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

          OnDestroy Notification function
          \nCalled by engine before deleting the object

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"408PovSYLbZnwP2NJggjd","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":"tL6YGLk2TbrY5rTP4yK0g","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":"M4o6ymk-jaQZdu9t6Jejm","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":"MXJlU3UXhXgvS8Er-bbod","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":"xDT2tC3bdJkj1vXvJfr5b","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":"53yCgrnx2CszPbpCUKXKk","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":"Xnp0hFr7Snnh9IwQbvj0B","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":"0xmP6Qw3dw3IKJJnMzG9q","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":"uPob1oao9dZF3Kz_Y7l8X","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":"8sBnBEv8Yj10dI2XRWFiV","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":"MnVSpv_OJPg9HnaU1wcqn","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":"r_HqMLFxO6-o5JFlRvyy1","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":"QPk3F-woaUp_hbxQdFoDH","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":"o-6s1lxm5Vllxft4s2Wb8","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":"3nByTNdmU4QZ0-M6TJuN9","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":"XTljZyHviQI5hzj-R-FUR","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":"0okjj5fXyE7I9BQeHTxXx","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":"BMUzRMMQs2qEdoMp7jasj","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":"A-pyP7b_lBxDqgaYUJoLd","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":"hjbptci2R_0IY-uhyvpVU","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":"fckKSLv09T7JqwAl1MQtY","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":"KhGb-4gcRjOQFNTkFcV66","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":"Zt5l3SKncvkSu4OrTB7M2","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":"FH--RSSkS0ryIBs-kFx1d","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":"pOjjjUPoVNLeQUZN-5jrR","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":"5tj9z9toG1xg7wg4PNyMI","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":"bFJFGIEkWwwVXuzr-Y-Xc","name":"bounds","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

          The AABB bounds box reprensenting this body

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jOxuyKEwyPTDovHJZ0sP7","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":"Hjkjdx4bTBi5Vfn_XeYSQ","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":"3xRKUjPJEd1KTfoDbTl-_","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":"TqAejK4GnqjBjJ_ADPpFs","name":"friction","brief":"","access":"public","defaultValue":"<0,0>","scope":"instance","type":"PropertyDoc","description":"

          body friction

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JJwIqFYKfiu2veVwTVKam","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":"4IoD-Nl-xA9b07vHCfSqL","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":"0O66TdmLdvtfz_QalUJ8S","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":"MDry-MJUUtE-D3Vw00s_F","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":"O3Y_aJHC-5SLcKcpIvFaZ","name":"mass","brief":"","access":"public","defaultValue":"1","scope":"instance","type":"PropertyDoc","description":"

          the body mass

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hqoxNBvqRVvNCyqI8cdal","name":"maxVel","brief":"","access":"public","defaultValue":"<490,490>","scope":"instance","type":"PropertyDoc","description":"

          max velocity (to limit body velocity)

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_5pRJxyYkxwX48e-EJyIW","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":"O34yKhWvkxbg1cRIR9ugX","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":"IojAawg7ILibFEtcJuDJ1","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":"zHUXzrLFeP8aPbjvsbkG2","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":"nxBEmZZE0ZhAwckGbcVLX","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":"XfbEGacZr-T-1i2z40baj","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":"Jn3fJWMqjxSMurXKzuqW7","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":"RXbCA90npomH96fP7wC-i","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":"RCfWRYHIVZYOWeC6phWew","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":"FPB-HRnSxURObPq52-rzJ","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":"pSu0yBhWyPmIGz13WxZP4","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":"X4LNcNv-6mbVSJQ6hUau5","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":"n68F5zEArC2WAanPO1YuU","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":"JfaEQlB1x-BS4iweszKC5","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":"pcD58JO_rAOaGELviEHDT","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":"B7YLAqAOYFDpJAuVngwTw","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":"QFWFLVzhYv2mycF5zqu1J","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":"_urWQZQPLoiFMc2SGsDnZ","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":"aUp4kkLMdT6TXrHYfBmbd","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":"8i-uiCPs0cQAvO4jtvU8O","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":"xsulw9l_M9ccPiLK4s6bc","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":"8FI6_yi0lX4FXjTfs9gYo","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

          bottom coordinate of the bound

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pBDB6UbstuHoF8fiW8TCn","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"

          return the center position of the bound

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Av2s1AoUZ9T2HbF4-6dCo","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

          center position of the bound on the x axis

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HewLuhoWOf5isMHy7P9ky","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

          center position of the bound on the y axis

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ymIxVHhGCkN5quwGyEq2O","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

          width of the bounds

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wpSs_zW7i0jNgo97IA-ON","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

          left coordinate of the bound

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"leKLTnoBrsuyfgur1oyxC","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

          right coordinate of the bound

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zkUoSw2tIEFBvwNmnOmx5","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

          top coordinate of the bound

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hSLaqvdJK9lNcr7XoLjwf","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"

          the object type (used internally)

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3Yl1X-2i6DS_O19UXBI3X","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

          width of the bounds

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xaZfGkbKRdgpS0fJJj81p","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

          x position of the bound

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1byekeAwC-iFc8JcDnVcG","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

          y position of the bounds

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g5r-f_EBwnSDGWTTtwIzv","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":"6Zcz3_ncQG15Xang_1ey_","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":"XD4rzdCycxnNV6ZHUZLya","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":"zAssvv1FhK5bRNeSU3Uno","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":"ODXkjQuiduZUDKq70QCuT","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":"8cGYNgFaasJohD4obxAkk","name":"clear","brief":"

          reset the bound

          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MSEcAcwCdOTqvD9WW3Iko","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":"fldL0OcEakjTqOz20G3iH","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":"IOT00im9njK_utmjj37yK","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":"G2GD57ub9mA-gkjM5-3hm","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":"BTd0NKab2O4AXnJv2wl4G","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":"qPOZiOb351JXqEfo6zCuY","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":"l1aIXkaQjG2toNUK_Davm","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":"LegXRhHWxVcxFMB4-VyxL","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":"afmWEWCO2_X8h04TJGBWm","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":"81IF4BP_5m7Q6_qAp4DXu","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":"bc-Od5GNUcdpIB49LFRil","name":"Camera2d","brief":"","type":"ClassDoc","description":"

          a 2D orthographic camera

          ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"IF89Lp03wasHajmQiN8FM","name":"AXIS","brief":"","readonly":true,"type":"EnumDoc","description":"

          Axis definition

          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"oVLxhOIJAL7XTX2jz5pL4","name":"BOTH","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

          both axis

          "},{"id":"4O9T2F4RFV-d7W9-aYclI","name":"HORIZONTAL","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

          horizontal axis only

          "},{"id":"IBRkLECAIsxvDBwCwHlVU","name":"NONE","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

          no axis

          "},{"id":"F7NbsxpwtrhfM66d6bUWg","name":"VERTICAL","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

          vertical axis only

          "}]},{"id":"4kLapoSFRPmPZl8UXZdJ2","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":"hnxsk3QE_nUug1hsHcAY6","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":"4JY6Utu1QmNCnsQRgBNbs","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":"OWG993Qr9T82TfDdbwCqz","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":"CRkiDXO4e7aZPUWREcznU","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":"eQVjArr8v9C4St7cCJyLX","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":"fcGxaFcso0Aqx8FBgClWk","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":"5Rq4rgv8eV9TLovemvl5j","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

          bottom coordinate of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uMnGEeC7-MEKN7bUe_8NW","name":"bounds","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

          Camera bounds

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6h78TWYvBFEcbs0JIY8ig","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

          absolute center of this rectangle on the horizontal axis

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Gi9p6tWoNB853451qXLkC","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

          absolute center of this rectangle on the vertical axis

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8a86J6A_QGVdocT51J6IK","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

          the renderable default transformation matrix

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sHOaf-CKfT1ppoNQLCqhU","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":"Z62nl6yqIo9aEK921YQe-","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

          the depth of this renderable on the z axis

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NnTxUNVxbTUA8KBQPPkgq","name":"far","brief":"","access":"public","defaultValue":"1000","scope":"instance","type":"PropertyDoc","description":"

          the furthest point relative to the camera.

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aPGmSXPsn9_WbaFyN_ECR","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":"czypAlFtwvLeDNRnW62w2","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":"Zlkn481BPKZKYyUuIpvPZ","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

          height of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CTMhZVovEK2LfVAYKbRIJ","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":"FuWtlErSH8xJ_0F7EcL1J","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":"CKFAZ8SiJhjT30NXI1U6j","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":"oUIY2M64GVfnOxA1JCnpQ","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":"qHngpRcyqcpgoqIRJkM0s","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":"fPoGHBcjOHY-lkTq5XKuO","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":"fR6jVlrpUW5VBhvsR4PYl","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

          make the renderable object persistent over level changes

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7vLukg_twIXo_Q_mx02Ez","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

          left coordinate of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zZ7MgjcBkew4bnr-rZWgV","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":"NgZJKxxxMPAxDeRDHqXqm","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

          The name of the renderable

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K0IPjuqFwUoSUubgOF8J3","name":"near","brief":"","access":"public","defaultValue":"-1000","scope":"instance","type":"PropertyDoc","description":"

          the closest point relative to the camera

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zhjAUz8tjCcbFfL3B34pq","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":"Ilp7ygJz3jXlfjUWG6QEq","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":"YhUD2e3K5mEU2FlOekeHR","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

          Position of the Renderable relative to its parent container

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ma7U0CCogIju-cAtT8yQp","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":"0i6odP_DdaM4QX-WZLiVG","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

          right coordinate of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S4Aa4uakGFL5M6FC6RCWH","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":"xjIP7ifBdqjRxJq5S9rpX","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":"wY-BP9EcPEh0SniwoFw6i","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

          top coordinate of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ARqV0JzwX2aAhaLKd42qa","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

          the shape type (used internally)

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xlY4xf9mA0YIxjNzwqVCx","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":"IDoNcCDXZPV7HfcNPu7dQ","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

          width of the Rectangle

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3WefAr4EyaU8-NLR5mT-R","name":"smoothFollow","brief":"","access":"private","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

          enable or disable damping

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L6PU6fMKdaKdEbgxaPIKm","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":"Pvvptc3MLNvQC1fWwrdoG","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":"55y8NSsTKikgESsNFy8Qz","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":"BOjR6FN2K5qFbhqPKSaF_","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":"v2K9x89wEgppGi46oPuEb","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":"_UtN8FsR_L8L6nlI9ZmCu","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":"RfcYbfezIm5jvnb2EsePO","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":"pmgcdnPARlb-aIrs1v7q1","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":"cw98RT5LUTjFaaxmlOw-7","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":"K7Aqn96-wPUZCbah5RkPr","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":"dyyONN-q0bjJTkm5Q31Gx","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":"NxTUDqtAZnKkgizQ80o1S","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":"dg7CJMh11kMWQUu9f5NbE","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":"Ndi-UGLuOjRH6Ggouom74","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":"nmy_jiCo4AtnvD8NS0ImU","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":"0AMeZ0hjyCEa3EUKmU3-1","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":"hdgyxLqkshExUpA29jtrV","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":"D6VM8mGQ7ZAaTOkO1bJF2","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":"cVbnS0l7cHjPxou-Q3aD3","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":"dfjXMsE0ekCpP7QuI9J5k","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":"EZsibx2nzoPOCNlmKynYX","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":"ff0MT72dFUVMrv3OR0TGL","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":"jtZOHtQHwbkF5m-3UmeHE","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":"HK8WsMNGhRS_jHXuyuYSZ","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":"USaqLMhxFHaELiGXTzkYv","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":"qwaR3C5gmigXeFncyTNX7","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":"M5IGfnToWW3LYBeosWw1u","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":"246Sv1rfRPVONDPXI-ZHC","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

          OnDestroy Notification function
          \nCalled by engine before deleting the object

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u0MXCwF6qJemqXZ2Y9qRR","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":"Xlo4KxpWc0nfSVHGiWjyE","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":"P_vOK1L52JrjRFSC4A_hO","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":"9XW6SzZfF1KXKkPA0Yrlh","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":"3ZdniOp3QC2qJpvFbF9-c","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":"PiqwchVZU1Ggg8EDeFILI","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":"UfYEUUraq9-rf1cs8AXeA","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":"u9UCn04qNcaXUqX0ulSMm","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":"sz2xAMcpPIYCk7PoY1Oru","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":"u4dDv4zfHqn0rUr3Lflj_","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":"gaw-2jgVjuWi0pwlfZG2m","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":"e-QrDsOsHnUmUrbDwqs75","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":"ViXXLSL7ALyHfb6jxwTvh","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":"X15HabNssGy9HCXsQAfav","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":"VYMRvRhPGBdcFU-5yG7Jx","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":"SWlflq-YucYFq7O0iwwWn","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":"N5hSXJvkefIWN_JZnfyee","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":"dr3mw4cFAjYcnT-fb_7mn","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":"uPY_GwLl919hc9E45d229","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":"4qrir52eIW7wwfWLasZIR","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":"NKgnFsG6BA6oDnDTbBo5h","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":"cFjei5CMysMSiGSSQPEGg","name":"unfollow","brief":"","scope":"instance","type":"MethodDoc","description":"

          unfollow the current target

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N_EJ_haezmC6bsJmqCRNE","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":"lMBa5V7idm5XwrgiqjyIE","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":"LLV07ud_j9r8NvdEKfa9-","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":"a7m0Y4QOwPgXXiRAu2gSq","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":"hA9kU6XgqEPIESvygi3ep","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":"LqL9iyBYJvXL5ex2F9Pgk","name":"CanvasRenderer","brief":"","type":"ClassDoc","description":"

          a canvas renderer object

          ","params":[],"returns":[],"extends":["Renderer"],"implements":[],"members":[{"id":"1Gcs2dbcpKsZXPqa1A6qr","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"

          the default method to sort object ("sorting", "z-buffer")

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ztt-dP20PvNYO32ch-42w","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

          the requested video size ratio

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MR9w_8GsHKomClHV4-cP5","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

          return the height of the canvas which this renderer draws to

          ","params":[],"returns":[{"description":"

          height of the system Canvas

          ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"CVgzkTZbDXo6L8D-IDKZc","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

          true if the current rendering context is valid

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BO4MlEVFp_-GJOF_1irsX","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"

          The Path2D instance used by the renderer to draw primitives

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lM9z-8ayk2jEPUcW5AgFD","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":"QUdSG7jZFpAKmni55oSxu","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

          The given constructor options

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WoqrermACCR8XOjC7A3ws","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":"SAqM03QVmATbxEIdUkl_N","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

          return the width of the canvas which this renderer draws to

          ","params":[],"returns":[{"description":"

          width of the system Canvas

          ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RyvE8-GdbDkIOLQEVlj9O","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":"zwOmTzTC0Rw3m3XkEl-Vw","name":"clear","brief":"

          prepare the framebuffer for drawing a new frame

          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oRckX1NiH93CUH3p04xX2","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":"SgI6fY8-zusZ0Ulvz8KQC","name":"clearMask","brief":"","scope":"instance","see":["CanvasRenderer#setMask"],"type":"MethodDoc","description":"

          disable (remove) the rendering mask set through setMask.

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nncSMpXEXlc9WHo90c6G2","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":"dUaQeFOJuoPvhlLmI9zVE","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"

          clear the rendering tint set through setTint.

          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HQT6SzDUiPibSI_3SQphN","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":"RzsiFM6BiTtu2YBe4Rw4L","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":"gYQDZtgt_Rbed1b0ktDTy","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":"6QldAHZbGkiIfFLqbrCZu","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":"rcBD52CO4kUxbYtpPxHw2","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":"dOKhJktE841_nAsQSqDt7","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":"z1-gXs0HFxvHGHU9wKmHM","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":"JTOAn3Q7DM4rZjGeF5Uud","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":"g2UK22Ousn9sgIiaiiOi7","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":"9KMg7bf_h7hGbxfOqLa6-","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":"WWFLo-iN6k66raq-B8y74","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":"GaizFveNd2mudxCfmP2zI","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":"tsp_E9hPcsKRkrs5J35Cg","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":"i8xeqvHxIKenGI-9zGhmX","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":"ofSCZUG9SxsNLxizDp15R","name":"flush","brief":"

          render the main framebuffer on screen

          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jOXSCZYo0kFyuEo4OzNdB","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":"SwCg4D0T6OD3ujfVbTgsh","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":"6LrJTSrV8ZN00EC9BxCuk","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":"5O8SrT4X5Cb40JVt6sBb0","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":"A3V6enJRb8pzrOJTqtX1M","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":"HNqeauYRr4hNWucjBCJQ5","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":"acRzpAzaMoIBRxul2C76x","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":"xhM2lpDuHqvYQRANVI-tK","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":"Y99lBU1NdDJWlSTqpriDN","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":"GRw7lD09bR6ODzeitcBzz","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":"kn3yby9uuOYDmsZR9HN43","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":"T0lBjXzxg8mERp9pD1hT0","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":"hHynx4-aoeVhtnUmRgT6i","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":"1E9MsTpgrSMI_iAR_iHUP","name":"reset","brief":"

          Reset context state

          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Bx5Au9HU3IDTaiiyrxvaV","name":"resetTransform","brief":"

          Reset the canvas transform to identity

          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BzPNgri1rOQdkgETleIQS","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":"mmOrvAgW5_zv4Zwlp33gw","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":"_TGwco_5GrUVWdyEwDlKy","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":"z8dWfCJdo9ETHuyjdyLcz","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":"e7y8zMrlZIEF6UQvf1A6x","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":"dZWbC_LqLGSJwz1lEG6A4","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":"hdXYszlBUK2rYg7qNaiax","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":"ZM0rw9yNhyJhgS_umfuyj","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":"ebPiF0ToAaTa2LXNUd5OV","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":"CVhJbmGWzE3Q2udxGuXnt","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":"6OW3FMF63iTjVeQQy7tSM","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":"du0i5j__7T7rf-NFblajj","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":"RGFzMvNgjJAYIxLfbtFN-","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":"VLwb7mAN1niG9NeyD5Z-t","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":"0CqZ5r2vcI8cOxT9-NiwQ","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":"jtIG5bSO2Edq0Vwp1BY27","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":"TQzbdddUqv4WwBjmh58uO","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":"NQihIDdeZW6ms5bjCjDB_","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":"kqZbYnra7ZScdoptdCoDX","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":"9CpsuMNXyCbmOte4V-UOJ","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":"QHWqOkWWGqwR0fCZ9tWbT","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":"x_TzSWjoazF4YOAHpq58X","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":"OlhY0HW3Mhn0XgKHlBx96","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":"rFiHWl61IWl29xvd6G8x0","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":"GBNPaB1X9M5WOvChx7sgy","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":"mR2XSKCRRQrfLW8YsKNJm","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":"quhO74fGf2QHrGWq_Kt0k","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":"YYbZEEJg5rAx1ydihj-Xe","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":"ITRYXp5V48opVftOBWMYL","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":"riiuWykisO_4iG10nM8ZJ","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":"nXsH2cvJSKiKvX5u6ausF","name":"canvas","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the canvas created for this CanvasTexture

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uQitIqMCGBXnNhwK8-jqb","name":"context","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the rendering context of this CanvasTexture

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6dAM421_Ctylxq57dLBrl","name":"height","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            The height of this canvas texture in pixels

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IesZWb8pVpyrzLNKtevim","name":"width","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            The width of this canvas texture in pixels

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SJmskfpPxmOyn8vtApGyS","name":"clear","brief":"

            Clears the content of the canvas texture

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Sf6XBZYnUvY5y0puRnFWP","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":"dzgJdGpApjd6tZAjlf-ge","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":"D19Ix-foClngSMmRfzMby","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":"qrpoK5wb0z4csH3sJ01lP","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":"dTNnXCKrdU53lbDwpB29F","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":"AzD0rE9xnr61FSZC9qUHY","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":"CmgAYX6pfjYxJeOLeZOXm","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":"Wl3pqVwbI7gS814_uAreB","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":"O_8zxDK4dVXEIRHzXZtgk","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":"aSh3I_pnkB0thiyzpfTPy","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":"r8aETYttJhze9jalM_q2d","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":"E7D9MSvJ95h2_nxtzikRf","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":"NWsJOEb4NtFsJElVU2U-7","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":"XCEWTkycZHcBTYivKr5eh","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            pause and resume animation

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oH9hpng2Wz3ze3QCYgXt7","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":"GykMacjMXepNNs4nbXVCR","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":"a4K7JUFvjc_KI34pyiTmJ","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":"ndn4QUCmNUfizXw6PZA5X","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":"lRNX5AKMXso_VN8V6wNLu","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XM8O67rAcmqyrMQlP76p2","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zGSn45IZsryW4iijWACHd","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"G0R7wYQVNZdYSnYZeTDk3","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"631NmLxcm0I4l9sgc7F9N","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d_CuJpOZI3io7MDcKZLhZ","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":"aLeA3ynseSd0GvEb57VJT","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":"6FBfjugIt7121VZwAmmhR","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YLaWzrh2qHFElsBQNn_ZK","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":"d0m1hgIP4dInQ99ORQQl3","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":"gJpBXfoi-8E4727LxUE5b","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":"WEX7EuBAXti5j5eYKE5Ak","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":"sMJfvZbSsu_SzHVqEzNzH","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":"fnL5UJOj1uEM3PGskdg79","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":"MLsajPt4CXstA4Y4gtxG-","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k_HJNay3JOPQbVnAUAZIP","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Gw2X6jlA1iX6_01HKepv9","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":"WrJGwqGUIhcRb_ze_xXKB","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k45AFcS4aOlSnRzdSTh_9","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":"0eXsKBsXxXkmJtjDtLy-T","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":"yyMGJ6St7xv0xFoC1HfZn","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":"EUqEa2x0vkKirdY6o3vjU","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PjyZvfUUMISky_n-jZ3-z","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N54c1iWq52RVte21eC4M_","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":"wDlqkG-RItG06bvK8q1WW","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":"j2AYz-Kj1jDV3s7Glr1qJ","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":"YEHy_ZJc8z1oav858dBhv","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9mnn8mpyVdZf16u0ECazs","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Lm_veWogDhI20LTjXCcyj","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":"thVxFGm21S9D3yQ9Jis7K","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NMYpasR3EgGVFTKSItSLH","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":"lvKkXPpX6AiOaZ6rg7Kj5","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":"pnT2N9thUqMC4jSxfJiwp","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":"I0G-XpshAXyjU8P0nurAp","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":"_3GzRBYkfMc_vXmCh7ds3","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":"p_rnflUQiykgJbAJ2a7wY","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":"qyWPYTjV7TYoRSDTjootL","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":"eJkN6OgYpOW1K_IJMjyfi","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":"qFj8dFpK8Gn8Pni0BqGT8","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":"Al0k_iOc5ONjvahJ-T6DU","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":"_08XT83oxz8cmrtcEzg9j","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":"z3hv8t_rzJcLRsyKAfNqa","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":"mpso_kxTi5hoWqXCMpG9z","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":"AbOHgexq9xhRRgH-IIYWI","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":"l5KVs3EmqbUEVmU25RNLr","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":"nWy9oR8wz6m-ewh-qSAVz","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":"Sm-RDgtOMFo7kbDGwKvnb","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":"d6zmbmKKsHpDgEIWNDZ2D","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":"WHzc4HOIFlWdM_npNFsv6","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":"QyHJ00-dl1LB2kxSA4yIx","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":"s07GKcxgVyEWCOqhpAk6c","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":"FigEnS40Lr_gEYZajGWBz","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":"jqN95bTmDYMcQS3zWGTti","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":"R1tjahj9HNgGCF4HIaqXS","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wuq73n8vKT4lwrMv0uxdU","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":"168OFWzVL3jt9K7FGBe-n","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":"4wuMWkiqegvPl4HMRaRsE","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":"57DiY_TU2YssoPvnMiD6h","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":"wC_bxoh7p6X6pwVHn6pnB","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":"ghDiyzHHkqbwv-p4h4v29","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":"S2whKFV3jnjOk6Oc_WzlD","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":"-aS6EQ9ktWfarxFS__gHK","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":"dpzvIeU8lKj47_IMD5Sba","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":"DV3BU8dbJiobsJMtzji1p","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":"869rTG8gc1IOFXEVB_mqb","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":"kGw_NtFaVZp1-PghSkYkX","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":"RPiiOk7MrYwoLmtVUQiiM","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":"d6H5OgzYkEy3nmAaoD8dm","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":"NCp5AxvJj7wjAfN3g5zrn","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":"KOB3GMEDhn6qAgO-AXC7E","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":"O0Z1WLeZyxGShuvxmDXmQ","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":"kfYu3x_Gz49kz2lgNImj8","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":"v2VJyNVr0jfvNLSH8goDT","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":"5eCNiF5fRon9Dy2EpTdcR","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":"zNJ8kAHkDaTHv4ceeVNYK","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":"1Q9XlK6Kjcekg_DV79hBo","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":"RWVirHeZRcJFlg3Trkas_","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":"OOfDQUFyi0erqIpYtDmY9","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":"VdXRQ1260nrv12wVL9-Xy","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":"AJ_RPqwqzcwa_6CEwjH5E","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":"gMLNqkpxeH0da5XioA6jC","name":"Color","brief":"","type":"ClassDoc","description":"

            A color manipulation object.

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"AOlEy48FFF3P5cQhoI2UQ","name":"alpha","brief":"","scope":"instance","type":"PropertyDoc","description":"

            Color Alpha Component [0.0 .. 1.0]

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9GDbzThpJYdXniwdQb2QU","name":"b","brief":"","scope":"instance","type":"PropertyDoc","description":"

            Color Blue Component [0 .. 255]

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QmPAgNleaOa901K-qcnmr","name":"g","brief":"","scope":"instance","type":"PropertyDoc","description":"

            Color Green Component [0 .. 255]

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4tVmCfCBXX0zHFKaHtGbo","name":"r","brief":"","scope":"instance","type":"PropertyDoc","description":"

            Color Red Component [0 .. 255]

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gEou2-aWn2qJ5TA3SA4QV","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":"6eSTN69YQQGvWhbxAv0Cw","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":"HdP9nyPopJ3tclbF4Yt4G","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":"XcUWJO6x3AkgV2-HtWHP1","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":"LTG1t0FzZGu4t5GeUyHz0","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":"GOMd7oozsS1faXXXn_vLI","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":"xoKqawmSEe-bI0C5R7rRf","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":"Tlw4FuIcTm-40gyCd0Gyw","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":"k1-cZ8HdxxwhLhZjeDYww","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":"luwG2dUnzVomw6uEjKX19","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":"E_lckdjnHFU9Pqq1RzbmT","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":"MELuQTn7_ybeY4C7rBtIE","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":"P0HhZP6YibgtEiU1TDBBU","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":"VWWHOuoz1T6he_J4FE2XA","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":"VNgDewNWdMYydugjAlAi4","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":"5pSXKc4aRIjEjY9wsYutD","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":"kGySJe4h83xBRlgRANmHA","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":"XLEVb2_8_3Dbj3pYwVA4h","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":"gZseTYuLMYM4IeSDDjhes","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":"wMBDNYds1Q-0gxGgkAxlO","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":"5fKlxD4RStOSUifRwD8Yf","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":"mw9fHmab4l5HXbru797Kg","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":"j02ueFyMpU3AH_BOoFZ9D","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":"gdf8CWT8BU6ge2mMUeBZS","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":"6-4U81wAdrcvOHZTVxNvz","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":"nxHFP9QYXsTD7SiuN2joY","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":"Aiyz_GZJZ3BvSp2dhKrEW","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":"4aDmLP4_sH45mOvyyrm7l","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":"DggfeeC1oLPlwxmlWF4ey","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":"dkh4OUKaNiukEozxz0IQb","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":"UWuqO96ZasjMD2kuQeXLS","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wFgvQBovXEBKdA3rBW1ll","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kb3G5hXpkBzajqdbeGk0b","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sW0iQSoVd3DxFkDd_WacQ","name":"color","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            the layer color component

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jVnMZ985_x4xwqH0jJYCg","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LfQhWdvx9KUAmTcmOSirA","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zPx92OyuBxG8E6HhjDHI-","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":"6zCYm66ffMtS0qZBwrta-","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":"s2RjqVzDI5E7maXrKzU5d","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"95HjUksjFyglRgdu-wtbj","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":"8XKapS0rBKTzZWo6IdhcK","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":"xFpDYaZG8fdCal0V4JfEc","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":"hfstSZ5dSq2XtjkwjPil0","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":"jf06C0ZDJURX9olT1G-jT","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":"GwkvSH6KKsoXZliYK8xft","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":"3LqrNBRZkuhGXmuqR577A","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BnEtI3uwXF_JgL0-dJ__P","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5E1RRE4dT05PZL726EyCi","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":"fB9VJ1P5m7Ne3E2ow0BET","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hSTdb4EiYhb_JZ70edZBv","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":"tMsbJ1LX68e9Rp4OwuKye","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":"sUHxDXvAnWdQdki8Y488X","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GDRQuy7TDTK6FRxFNVBRj","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2FNpToWN02CkleAKoZirQ","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":"8Qop59Mu1Phgf_pGmtAN3","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":"o7ryM59tPjPwfbKVoV-Ss","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q78Kfe77W2DVlff8TkPjK","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a8MgLafKVlujNL282tdZd","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":"02f7eJHVUgTLHEvUuGf83","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"E4KDMrKFCTGgvWuIkMH9C","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":"QZ0KJcAreXOy_L1sIA-Cj","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":"tdAo3aw76OXsUcUhMme_p","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":"2HpxldfPgNe7cS8XQU3v2","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":"HGAkIfJp0ckmcGcSH4egT","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":"YaZk619y0gDnk5fRfmAE8","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":"g8GbBM4UNHYy5PZINE2n-","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":"-QYjc4SYndO-H7DqbBcER","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":"IDXVrHUtuzECpgOHUdXRT","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":"U8ilKar7RoE9uUZ2y_KK1","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":"YrqgZRS0c5gQVK4R_KKfL","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":"5Bod6oB7LR2haUS_pfbpf","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":"VxreeRiczR9o-pIO5W88u","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":"UBKA45IIcdUg-_yvlzhpu","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":"ChvE6ho2s5hOLH2N8ymRl","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":"MxnF6c4_1SkGIJKjvIuYh","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":"6iOjaUFwEuYgJD4KYhf4V","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":"qpjumy6VQRMOfIibnt661","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":"sJKkT9gbnJz546WhNMX2x","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PEkUTiOb0MHxis1xaNU4H","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":"L_D_Lxowzu9P0e5aL_aoP","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":"F-LqU5Pw-dUwA92SufHdn","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":"Bs2TTrvQs86lTG8iSKqHV","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":"sF-UNvaH5ui4Ds35LNVZt","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":"8JfxqZig6LSA07DRreivj","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":"kmucuhGFm415b-bWR0Yx_","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":"wkzKJ6rh0M0zTUlsM3Y14","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":"4TVhKQK_NaXhUnLJ9JXmj","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":"-fBk9csjzi6np17ALenRC","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":"rXF1-hDQ00lM-fWl7fTDI","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":"UVvS3gojkHZWaqQYpiosZ","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":"CfxyfbFa5yT55en398CIf","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":"GsJvFs2n2dGJ6m0leLuW9","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":"k8-gMHRdjjSbg2EAJdxmt","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":"0xMPYqkyeNngKR82xObh3","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":"S7SWv6ARAYwUPyG272ztd","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":"Pl3JOY4XWz5EWtB9YNZG4","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":"9aDiXNeoGpP7xzwfRVUvN","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":"oOfYyQatj1agH6qVo9S6F","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":"0pWayfsz3o45U2MW-RD2x","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":"EmulZEDHpbEOh3aaIIlMw","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":"qLINZ7vLurrdj_DzzOC21","name":"Compositor","brief":"","type":"ClassDoc","description":"

            A base Compositor object.

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"OvvVGIUaAZnOYf90hpuud","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"

            an array of vertex attribute properties

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"csDOqizr1kPGsORMuB-nP","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the shader currently used by this compositor

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WfrxvMyKTDg1fzy3d1oq8","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the default shader created by this compositor

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DIgcgun3dnjW6tFX7nIbA","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":"eTLT2u5GHf28cSsplCrzP","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":"p9vyreumtLqN7TsDvAHtz","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"

            the vertex data buffer used by this compositor

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YzXzEQH8D20slGd5Sn9FE","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":"mVXL8eAWRs0c56fy2ZLM4","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":"Wkxt56u4KTw0r9I4mjZn_","name":"bind","brief":"

            called by the WebGL renderer when a compositor become the current one

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4Fcx1KQyMark41UaEq8rW","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":"dYdZFv1dCKxea6DaXWrn2","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":"scOrtsfSVABiy0QX8Aw1y","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":"KB0TWHYYcUmTtsq_8flet","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":"GrBQ-UHfmBPd3-VhVCtI0","name":"Container","brief":"","type":"ClassDoc","description":"

            Container represents a collection of child objects

            ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"iyoJFQ3xb3JZ4nRl1eCGi","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":"CoLoVrvAZhP_7gynzYzNl","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":"CL7-I_UiQA9sWXh10RHpa","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":"eSuAnbPf9Sc4964fHzD8C","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":"MwTT850Ehwq8Cd4yhiVXe","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":"zL3EIM01L2ragvMn5Kk8n","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":"2U5ngwbHXhajouq5ye5eg","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":"JdSsv7q8QKHzMk6Z27Bs8","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":"56Fz84-ulLecEGwJpV9AJ","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":"TyM4TXRRS3p_aKG5uQJn4","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":"DI4h2SSC4z6teRLWSAyNU","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gtwfFnp3gvaDUNgFoQ_rE","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b-r6x6KWiZtoRu5ag_mWw","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BYT7PfTIexFO10DZhHTmP","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":"muDjBlY_ogMetZIPFxvsH","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mjK7RBv2SjnknGLosAMJc","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LPDyJk77gmEM8lLL-yGub","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":"NHuid9ryRD4runhw97g8w","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":"g-3hhHbsJmGjSSHwj07xM","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":"fpLea4r5oWp9dknuPAIoF","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r0cBVMvviGl-xCjtbFZaE","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":"1VGgIA2pAQSxwriJs100q","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":"ih1ZRWCDKvERpT2Jfg7ul","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":"oFfe3BP9IHhFrJKhft_No","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":"-pk9tjBmNM_J3TVjsCG1-","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":"vwBoNIZMqsG02L12wuxn6","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":"cssaASy64iwAoANGXG7mL","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"X_6ClqPr754-STyb6eENM","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9c4zKOh3bhbpjcdvWzzHb","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":"E0jvMfm4QqI7g4FafCmyQ","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r_A6hAYYs_Icywd2gK-fM","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":"IZopOOiLfJ7Vh-UMcQTe8","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":"_3eEsWu-QRwabr1CXDnz8","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0LpRZXiKQoc7u4gIwzevc","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GH9pdFdYopd9nVGXw4cP4","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            whether the container is the root of the scene

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pG69vZLUoJnpTh2iwcDvq","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":"n-oe057b5yCJUX33RcvFZ","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":"I7yT5BXfvk4UAEU18Opg0","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":"BPnJqJyUah-bBz32O1BaS","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EjS3oPacpGThPaBzhTIdW","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pRGj9xMRoGdSzpRaWUyT1","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":"Xv-vNTSiUBeux3BmtZcjX","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"21_bSbyAb0iKyzS7JZ544","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":"PvH4VfTy2-QSnkdOdT-7F","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":"kYCpoIsvOWvINAVFwfN9A","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":"hLEPChDwTYjiovLCYDKto","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":"Nqjf3QwN_AyWTSmlsOBP2","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":"LzK9pZQ70KpYNeERNMJJA","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":"IBwqqsuaHsttAitCMw2WK","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":"b0pgD6s6JaKnmxWqARaaT","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":"5i2Dq3GBx5DvtC9hLzjYA","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":"2HtjhMQvyL1OKAUMwsQLh","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":"P_hyisyWmAc-O_C6YhKH4","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":"EWnAnfWB3qVs_y_XuQnnA","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":"nQvrwAwn35Erht8PGpGo_","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":"zIr1lU7b_1XXcTaCyp-z_","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":"l19WMJ87XhBxDPbMac5jE","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":"zQKNqXUlMQHgy_y9Yk_bh","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":"xTMCEefeIexR4VwAt2L2O","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":"myQ5qGvuXEauFN2AwMyA8","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":"YH2BCP9oydOMqx1AMkeUe","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":"dWL5VnttwGErV1XmgEsDm","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":"tuVajtfORzAUCPBSGo8Ad","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":"qryqGDyIH5zW1gmJTqhYb","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":"aSaOa2ePogIALPjXcP9Kz","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":"vx35pi0OSFDaTqP4rjrSd","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":"bUSZ4W02x15o8E8AZpL3R","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":"P-GcBYghSLtMGjC9ohRYt","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":"hznT9En7FiOeLU_QytnRo","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":"WyOO7uE_i5NE-7WfrI3Ok","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":"JsWi8bWu1bGW6LiH4_dcJ","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":"8tRauqMFdgc87zZAYCxT2","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":"shtksiw-4kpCHGofJOpQa","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":"jp67Y48aHNeSWcPJK7-_x","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":"0isFCxi69Y6cYD9vDiZkK","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":"TlktU7wXAKwe67j99ZVPv","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":"rmAsLKh3TDT_kypA3w3nm","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":"5CjiLw5zcGb0GoH9HD22f","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":"dTBnA2LERjx3TXjUueJEw","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":"eOTPukNYUNmzV-aRYt9Mp","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jWkyNZ19sGOytU4Kxh25R","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":"lLsPC5C9ZXopfg92j8x-b","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":"5biroReaYUhLap9srdJRs","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":"73vO5Wk4W5G9iXBp4KatL","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":"QOP-6iIDiNv9CN90dZZtB","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":"NJZinJvUNmA2GnevkTEYd","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":"ooy_ft89NrxprPWLyqDHJ","name":"reset","brief":"

            reset the container, removing all childrens, and reseting transforms.

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kd4ikCNoXQVLEikDzqJXu","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":"TiApSIHNCRO1ZpU5KuS1F","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":"s0Fk4ZZW82pRCpj4iHoEA","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":"YXc20NtjTLtZG7wOVADJ8","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":"ZMRSVTio0y30fZuDUVsRU","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":"r6LPWTFB9LSm970vkTvbI","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":"Zl1ZNrmHPBrBtn804K_yR","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":"932ROOUVMaAmaD5lzrAEj","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":"-QKefukZUhOR3vinVfuVL","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":"bL7b9vGc3pzCQ0hUkbR5U","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":"6PlYFwsPz---I4czPGooF","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":"NvPGHF9bfYfVu9DsWDtxz","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":"d_b9vTCi8L-7AOkG1kROw","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":"J3I3Y2Q2vaQknHYAsFDi5","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":"YhZE3H8a3jrVyyQKlKAS8","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":"Z0ex9DQUHrPHA21nCZ4s6","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":"mOzZsQdSPmQimxZBSs_tL","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":"N6v6HfjY1qUFQ4Sijk03_","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":"s5FI1RD4gjCCjAcYwGPFn","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":"bDI_1K9PUN0nDahgyOQaY","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":"9OWQLYq3hG5DKwd8j_gUb","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":"Dlkt3ysC7zaWLf48bW-t6","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":"zZQz2I98QX49ExQ9RSzTb","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":"twgOFUJ6T3A7dwqH60NSt","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":"vyjzR7tfSu4ggFApnr_S6","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":"CG-oF-PKKdhT4sT6Z9hRN","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":"JdXp_zjJ_W8JQT9PIvZn0","name":"Draggable","brief":"","see":["DropTarget"],"type":"ClassDoc","description":"

            A Draggable base object

            ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"72H24CMeOXiXe9dPqdMPY","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":"iD6MsliZVkCU-BWxwFq4F","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":"IMnNDLh-HLhUcPhKbcOdu","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":"ICV0LOiNXJfhmbegor69e","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":"Q-QXofvRXk8CLxau4-G5r","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":"7ZXdnyTplJN-YpmG69Nne","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":"ncUZfzslpQ8Ehrd3jj8Ul","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":"POWdx-2omxW29eFiv3Zt2","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZBUVTFMwzAVQdLl9bFAV9","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FxuwmiGI4w3GRYlCHmsI9","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ao3_H6ptUdFaf3Juwzyyn","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UuFsj4iJZVGNXkf-v8wms","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d-kAjD2pXqPvvIVAKTvWx","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":"4Db7G4K6T1ytcjsGgU0RA","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":"DJWb1-gyatLBxC4fdV-7A","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"M-MjLRoffH_5sthrpbLd5","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":"uhoErGYD4zhRlt4REewOv","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":"3ogaLK30f_MBWB1nzajJK","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":"vZo9w9I3yKexVoH5_zENz","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":"GryA228v1hhY7QXkVgxEC","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":"EBttEjLYSU-AP9lTuCOTl","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":"VBRvugVjd0E2-knJVKa72","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dRUqnZuFDVj1KKgK-rYHL","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eUn7cErX4dUof4hXBgG1C","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":"HnRLperDnjbVeG8eydCA4","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gScnMKAI7UJtmEit0fc2C","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":"aPnYKVBjL-zcGymPnmnAE","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":"hF50vgWDpph-3kCECj8zw","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NWv5B7yYAhufyRCuB0bMv","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GB6O-SZ_vnj7T5mDucn2Z","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":"rn8NHaVEfw6FFbIuj-WOi","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":"GP6zNdVZjOMRtMZ0UQ1ZO","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yMdYNxvozUsFfyf7PT19L","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oTNDd6J_pUZN_rzNRM5Jp","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":"HTm3yyJGyIIpzcdVWTYZD","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"puyVqtS60xegbFkwjr7Pk","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":"pJaeVcVUPanfQAPTeQ2Ji","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":"S6_b45aomAaVPH56DwsaQ","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":"x85TiFPqkMMY11yfrZlxJ","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":"M2Qy1GYlqKrdWEIrVTyQ_","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":"1BPSi5dKl-C6K6ze1KTzf","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":"XX32vGKEy5288VoRTJBF2","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":"md4qbC6d1LCKpMHk9cPJk","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":"9TZUFFhp9lN-vUDz_BtFf","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":"OQ0Ep94Lp244MYs7613P1","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":"I-GEJpev2aFMUyt_d279h","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":"KIyBxlo6pOLnIBzuJ3C8n","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":"TqpT4sm_E4EvFz56ec9zB","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":"x2IxmTL9EBw0Uiq-Lgnqq","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":"cvF1Jx1OA0tvEmUpUbY2B","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":"lGBKgF4irNkmC2i-3NBFy","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":"nTr6LN645JQGjYWapD1N7","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":"V1Vuw_w1UoKBKZYSzbgf5","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":"_TOxJzJparF2t4YLEJkbe","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":"Rg5bU3JPWrqOFnXckkDWW","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":"uo2SwNWJ-3awe1Vj5041W","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":"YogGtgcUmVM4wx4-CEKTn","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":"32fn0694ynM0QMUU8QaNx","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9Q2umfKfA5lJLv3bW3fpV","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":"qswuiAMLke88sMu7gdiZ1","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":"rVIxIIqlLB6L2dNgoAGnm","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":"cfqDnd0JkM90hgSZWVUUI","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":"7UyoAVKS7vgfhaLq6uSWn","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":"8koJI0b7Wz-FzaavCO8Ur","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":"8RMS314kth-k1CbQhi2vy","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":"Y6wWvO4VDPMhG01oI2aJv","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":"vJ9eFkNp7QsVYt_tK5JTh","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":"6iNNOCaWbmoqL-VmM3nGp","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":"tPtLaahMXLcbdc5FyTqOg","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":"cFrArQ1cDWJS0JoqW3B3H","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":"bSxK0KWebFRGY6RsD_f33","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":"NcBL5BWx0V_gpvdK0uz2d","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":"aKS2DtMS1A4gMrsEVgEFz","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":"Itb4VUDZrmxtWzyBju91K","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":"sGucms8gV8PgMb0m9h9FB","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":"5Gy9SVtqF8lv22M7wX-M2","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":"soYnmSWsQywUDA6F1fMRN","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":"_JYINLAWKF9PNag_1EK5P","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":"sAvgZdri_WOKtMoknFfjt","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":"vcooUz5hu59CiJQmKzQEb","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":"A0Jtx3szYDgpwfl0p1CQ1","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":"Xj-VzalDvHCYpPNwPBLaG","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

            dead/living state of the entity
            \ndefault value : true

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"79dQe4NjGTzXDAmJIQ3SM","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":"TPR7rS_8_JtU_NyeGHmXf","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":"yQWkyFne_EzmwK4shU4Ji","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":"W6K5irA6gaNIbcH1hRkge","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":"ZFM7vU8FTu1g8oDo8rrep","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":"-vXz2BHq7y9w-zlLC1_7o","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":"rm1eD7o_CvyfK_3jKVmo_","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the entity body object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2iOttb7R5-HAYq9EFQpMb","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rmGGGvZsTROzZ6-AWqqmn","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j7qBi652bUMDXRY7t_BA7","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2HoVqvau3P8cSOfK0t2K7","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jiK7ZJBAYnk_VvtK7jvIu","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Hi6dHBlvdiSOaltfgz5wm","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":"wbv29kIos72Dq5PeVQjf3","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":"TYR1W5MhLzCXeGxVouPZ4","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w6nX4LUtLgPij0Up6tFg6","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"

            object unique ID (as defined in Tiled)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"x9y1CZUwI2QtT2S4dha9I","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":"Xaky6g-46Je3G9afGTXQa","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":"0EaXfZst93GzXkvmAbwEG","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":"JXc8ygKI3werPReUjBaRX","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":"0nW3Ib91YfoaOAOHbxJbe","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":"Icu4HLGvZqiZLRXSn5TMB","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":"n_dPtD8fLtXyiIt-OAoMb","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B_sFmAPzp-WnJpyBSqH6e","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cV7_fYC-qlgD7nvynmtfp","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":"YI9bV01V-YDRwG3GgjBaq","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u4lMA7pIn976UdLN54ODZ","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":"D4bOZKQlYUwcAwgKWPBkD","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":"E_7qTIM4TSOru6YXmhAuH","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aVZnXvlkDk870BhHeZ8I3","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":"ayGPOIE0eTs45_GDgNsAK","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zfUxz-fg_EkgmJd7g5KUg","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":"rs7KriKidKCvspM2L11zM","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":"pP16u52hwMFTRMUe35dPT","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B6Y2NzQPalXWSSlKudvUf","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"

            object type (as defined in Tiled)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aixPU0B58ouNvGk2Qj4ix","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":"_1LHAtHAhJ2NYF4Z0rkoe","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lgatx7nkCP4W-gvXqCFxH","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":"hClqL6HjdlVLZb-JiAHEf","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":"CYf1mZZjHugjuschSrK5A","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":"AXymMR2-q6Cdf5LVTVQim","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":"GO11T7pQ4F-HcYBy-xbD-","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":"w6cSrD5jMHH2ixYo4m6I5","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":"VzVhKlow6HiwlgqBhubq8","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":"BIz4nTpgiUQcsZuDsoLxk","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":"6gQThdMtIYHWv3ZWBOYBO","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":"zdrZteHYDpI4nZ0pO4b-V","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":"OusAkU1P1Db7j43piBoac","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":"Ozcjfw5gaeJdlzYUoJaA-","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":"AjkoNtwlDqB5FZAGGXIfI","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":"znLvgzCNiOWhq6Uhi3H2a","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":"_ug9lxR4eTNhohhzZ9RbF","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":"9XLGsvNO_-hn8SrYHIDJW","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":"fiUgHvl3fI6Q4MdJG_PsN","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":"HvwBWKfCCgUMWb7dn5Lsi","name":"onBodyUpdate","brief":"

            update the bounds when the body is modified

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pccj-6LsKJAxjtLwzZ8ZV","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":"XxkVYr_j2uW691ofKtuq2","name":"onDeactivateEvent","brief":"

            onDeactivateEvent Notification function

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9AXrdV8UY3iOfXBXKtSfF","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xKyk1uuRcA2t_Qep18XXl","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":"0kWQifxXbRfEq0FhaKgvy","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":"AhsfWlwx-zcN-9zdfgizd","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":"9Ey_PVRDZibAb8R9Qo3TA","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":"29X5_V7FTnqkYXIpKC1up","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":"IusG-HLWHof6Hw0aCcfsX","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":"nkC7q4VKvgtSLEzGXhl8c","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":"umyu61gR4jr7y_s19LhG4","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":"qIdTmf_LRGvMydSV7HblG","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":"QGB1upPMm1TFaANMxVQWj","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":"TC8j7Pb6gNpiX5wYq7QL-","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":"0COjZyMiRzWttt3m_2r9M","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":"Xhno5iJ9MSRhpbZ703_zT","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":"OGJTG4oQXD2_ZwMf5rrCa","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":"pjqjKywfS-sa6JsNQXWFZ","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":"JX5MHifZgGutCPyMDuLtp","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":"AZP_sqSFKXjvXvZ2QPtqn","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":"f2_DCMwiXuo4GvDBjzJ9c","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":"ee4TFF0jQQvHZ4M_C6Vhx","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":"96wIFHfIoo_wNqRh5afNZ","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":"w257c-gQnrXI0rEjFErRE","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":"XGWO7_wzRdK80V-R4ZhdJ","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":"Zwhw0zb8ZUogcyvfPQN2D","name":"DropTarget","brief":"","see":["Draggable"],"type":"ClassDoc","description":"

            a base drop target object

            ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"TyrCtfcTeWD-aWTO2SHkv","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":"2v4EYO0UR3Mgx1TIas7MF","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":"BWkF2Ap7mULWDiJZxxiR5","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":"ucirjqHGiWfDIic9faou2","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":"j0lZ-N5AR4a-zCt-yT9H7","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":"a2nJH1kt-Z29z7NRtQbf_","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":"KWh8IVEBAtDO3qD7JvGMY","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":"znjrSe7vLHyNDZMjrV_Rm","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XucS1qwYDvDi2iMg_GbXx","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vpuIEyjufpkn6IAX1myNh","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"t_BOg1NUVP4-U7Q55ZlYU","name":"checkMethod","brief":"","access":"public","defaultValue":"\"overlaps\"","scope":"instance","type":"PropertyDoc","description":"

            the checkmethod we want to use

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eC9BXZVHFsTajddVNUnZu","name":"CHECKMETHOD_CONTAINS","brief":"","access":"public","defaultValue":"\"contains\"","scope":"instance","type":"PropertyDoc","description":"

            constant for the contains method

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5iDEl5JsEHhim85Kfodwf","name":"CHECKMETHOD_OVERLAP","brief":"","access":"public","defaultValue":"\"overlaps\"","scope":"instance","type":"PropertyDoc","description":"

            constant for the overlaps method

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iShqeOhokMqk_Q0m1c92u","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZcCj9buJ3-UcyqOY2xFdD","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lRHuMhWFz8fZkE0sEvBUm","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":"aWfFHgYpgSvbhSYxmmSWj","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":"-c57t_z_vUkeGxRkSQ9Vg","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5-qI3Uxc55vN9slDpNSaC","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":"aZWSV0II9G2V6y1LNcLbe","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":"rlIpR_Hqqii0giJEBu2t4","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":"3SBRJl6NNlkBrBUzIRxdI","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":"gdnT5M3hLsVHtl5DrriTp","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":"YSZ5BustIf36f48adbD_P","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":"vDQzaHqLvJt8iiWlEY5Wc","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w96dbz7jSW6UaWuS84cKw","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ERO9r9y_E8usAdnfsI95M","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":"717Nu_WXsm_wu4XDW_omw","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v6-zlLeFeSj-KbzjxUGrz","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":"64izsh1EFDousY94AFVcA","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":"arx1dn25bjo2VmHiTk3WZ","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_8WbYR7VUAlKYgZlhgfEy","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lGhAOWunRYogWG-np7sEo","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":"wuQH4nqFQvsXFyLwKOaNh","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":"GK905oCGCAXQ6_Xt-7NsX","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OikJI1CC5IbPiVxZ3SgvH","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hGmL2ArWUuuCnM_1vF8--","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":"Su-ZA0h6XB9SBU4YUEWv_","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wbzdF6CufqApKeWhumk5f","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":"uN5viYxYjzsk_HNz3b8kQ","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":"nDzRNpR1Cys2pPrh8Zxuh","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":"31nbQcZFb8ebNYri3RAod","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":"TFayno-mVOEaf_pchHx6S","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":"EzuJn5XX-_9m_rY5GFEzi","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":"hAXjCxPuDY5Z7idNcEmHL","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":"pWdziQGVWyonSRtPA26EB","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":"YbzRF-p-uuJJ2bSs8EZnC","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":"mN3MHF3y0KlN05W3t_li8","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":"LdVWIo574kHvDjl6IYI__","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":"oVpUaIViRLKpgY1ckj31q","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":"jVQ-PHVQoQEcBqVmC_yav","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":"mXBNShamRsirV-dzPo4gs","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":"idOIWOe1wFg-h9OY6vs0G","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":"zrVNkVv4n__j0-sGyqzpe","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":"v0o_iSeKsT8P-85X0rMTA","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":"1gxrf9wnyRYnvkY0aCI4f","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":"x_SIINh-31qI7q8DeUcGk","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":"WTDlsvc7lkSsWvLUQ1KT1","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":"wm-hO8SDbRWJuYQ-EXg09","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":"Mq_KjcPqeIr_xGWfwVgtb","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hB53bixj5-MMqHg_YNmHm","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":"JquDVeVTKQbykMR7HqK8B","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":"ng4dJs_Lmzvxe--9oMeqA","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":"t9XMEw2vXHvHHe5R1nthk","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":"twXPchymaNBwSHGgFdLx0","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":"20CxunUthI4DazTD3F3xd","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":"gkgLtuser4vaDcMMhWmiS","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":"DzvBrEwtl-Dd3mpZRgWnp","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":"jVtVR8LKl80qH_1fA2LCL","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":"6vISI0upWiROxI9Hud5m5","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":"ajdpWx3JIE5MpaR09RoMR","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":"QP4chZQJl5OWkqOSmtfRd","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":"nQ0MYpFhbfKqBdHe6Nql2","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":"nOPbz2j6WAC6Hdp-ey58c","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":"pIIPn3SKQTBTHlLiUqnqd","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":"bcwQ_-2-bhNkBdiv-M7Cc","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":"RG36ak3f5iNjlHcu--52t","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":"8n0zPVc4nYUM1cW723Vja","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":"8RMMhrfnghhbCkQDre6rF","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":"EknHn4ODrhMgs5tLLzAuk","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":"4Weyib6yhnAlpUKHi1O1J","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":"Ppmxih5dbGEemxLuyUJYF","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":"tDC_89KSbq3XQjGiz-0DE","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":"rTolNGZcdbl26FApnRg4i","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

            dead/living state of the entity
            \ndefault value : true

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QZTGDdma6l6eiMxi7WQyj","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":"hIZG3xIoAWXf1SX8i5v3_","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":"GfxRnvD9RyEh_RmcQYBLI","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":"NTIJNDPxGRGEXxPvmDdAx","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":"WfXOLqBuhoMe2-2nIqr1g","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":"BYT1NYcTjTF6TB9m7Skhh","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":"kmKME2nJ8yr_u2pYp6eVB","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the entity body object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y2_aH4bl4cK6H1eYhohOy","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qirRlFvTlSZjQPwFryTv-","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SORJuwSWdTAZ67eItAibA","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rSoUTYhIBm_XGkdFbdLsZ","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XJP1gM4i9dg7dHsc5FjFe","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wi9Q72ayFXhk3py6LL4Iy","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":"pW-RJwObx4baAJmrPQi93","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":"KewrCr7KM2aBbQps7453H","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yavlJtGpU-52z2Us46cjo","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"

            object unique ID (as defined in Tiled)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aJcdyF-KJs2kTzmm0beCD","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":"OHEWLgRK5SEmhJk77gAvD","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":"vKBTwqZwy1UihgSqAyzs3","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":"OEg8nUyLWX0aXUtUjOOd8","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":"jLQmuWMj7eKT_2JK-KSqy","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":"yUMze7rgzwWjkh1wRyusp","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":"GH_mzAnijsc40AawjZmzb","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GQRPr2GQr7V7i3puLdxrg","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fSTiBWt3Zg6oFx69BlD1f","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":"iwgdDz073kApZHHQHPZz0","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tp9ZuI9LNSsR19HX6Tx5k","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":"XSfdWGp4pZVrbTCv48dSk","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":"Oh2-AYjPvMICcrLJtKm4B","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-I7yy6kWEUNGqQWLH5BhG","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":"mnwtS63KsHp95p9PbM591","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pzk99AVoYSVdg1RNTOlmA","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":"H9oa4dWzw6ITN1MNEQmi1","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":"LXuLq_dFlBGzXabkvXSUj","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fvs93yvwBCoR1ihmYv87X","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"

            object type (as defined in Tiled)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AmW3eI7o7xOVk_3eMbrN4","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":"yI1BL9stDQuZkxudqRIem","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7pjT-EvSfC8n8IWCMwfvr","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":"TTPr7Rif-00DBZsc_1roP","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":"6-oLUbvRPxhBKcRITEb9Y","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":"e4JfbRHr7oF6MhCnRi0pH","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":"VCqMLvCaWyEqpVpkO0Tlq","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":"cCFD_r8Hm7oKBJdmkcHcA","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":"-HUuiwrzkBrBTLILx3hAu","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":"nAqq7xukXNB70nD5_ojve","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":"FMI6fUjNIlsh6y5216rWD","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":"2pz86LloXtmi5JgP-l37V","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":"23qbeyKz1Fs9HuQ8aFfeU","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":"AIZi5ySVvw7c4sqxl0EuK","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":"zggbQfeUVAWwk40BnOWOx","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":"OmnaBp2fasXIpa4gFA20-","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":"xR-7F06B-wtkqTmL5KypQ","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":"OeGt-mgnZ8buoZGHNLBPo","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":"cLhPoNSpjG-rKqasFuWfR","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":"HpYhXUFjz9Be05GOATCcH","name":"onBodyUpdate","brief":"

            update the bounds when the body is modified

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XrYYtYayXRVwVdRl_KUPn","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":"wxkih-WffS2zFzAr6Cr4l","name":"onDeactivateEvent","brief":"

            onDeactivateEvent Notification function

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cNdzUZ4Lckat-uRRG6Ar2","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YiLDuuuadX9TK_AK_Jdxb","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":"Owsvbq4d5C8WWIhIp2-Hi","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":"uxDXpvnEFHI6Wb_rWdN1n","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":"nZ24qGFUsW8eHSxSpwW3g","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":"JjN4oXrjcoV4HlZ2qzeNk","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":"R6slvpPKR73utDIcdgOlR","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":"Xx9ANhKkNdRtotYZW5yfw","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":"bt2h11D-2U_QC-8y7mM0c","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":"h5_n8ZtSalg1ZE9ZpWayk","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":"E6hOYf-LSWPL8-sJQs5QV","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":"SOQliOfRDdBTBj9CgjP2R","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":"Q88S3J3eIFSavEDEXrV3a","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":"PCv2DVKpwztaWE74z63IC","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":"xjdFNgatPuzJTExD3PStj","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":"Dg4ou6JbKFh93hiqbjSq9","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":"PsAEEsMKJz8SJkq3_WjVW","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":"VoWLQWXYIkU9unlHLvq5Q","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":"hOmEzOZH1UUcRkilUvhMg","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":"jd3ef0TWap89c4IPT6KTi","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":"32OmOErqaGdTb1blZ06jM","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":"r0-AeRS_PsUod7i5NNEH3","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":"WsUGcBz7Vgdya8yMYzhxM","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":"hxr0QXR-LLoNdZfcn72r-","name":"Ellipse","brief":"","type":"ClassDoc","description":"

            an ellipse Object

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"SC2yg_uQdXvfYV6GK3kDq","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            the center coordinates of the ellipse

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"91HPYw7wmgB3oWZ9Fc9wn","name":"radius","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Maximum radius of the ellipse

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EwKYFveVHBYNEjeWNfB7m","name":"radiusSq","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Radius squared, for pythagorean theorom

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WHfcE8U3jyd2fkKktEaCK","name":"radiusV","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Pre-scaled radius vector for ellipse

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I46gSX4yDiTBY_0sWf5nN","name":"ratio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            x/y scaling ratio for ellipse

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F-bahH9R8QO2FhoeGAUiC","name":"type","brief":"","defaultValue":"\"Ellipse\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4Qpf0xgW3p8NUdlYIRq24","name":"_bounds","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

            The bounding rectangle for this shape

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Oy3q1vY3_LDFJvi9-DDI-","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":"oZgsXca6AOFiJTAG2DdpZ","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":"RSqgbqV-EbRqt_ANp0Vtk","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":"tJNzKrvGZIupDGJ3dICP3","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":"BDuOVDarx7AdxSJPfNxK5","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":"0dSaWmcEASr1MdgSVCLuR","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":"6d6JdVB_9m6oKsMV5GXWz","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":"EaM85T5-CXn1-3mbd4DAp","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":"egZmPirvAaen88VWL47Cc","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":"K_ZReTrFAeWqHj8YAsSDh","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":"7DOtkjlCDzwg1cTQ1OL8p","name":"Entity","brief":"","type":"ClassDoc","description":"

            a Generic Object Entity

            ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"HtcjhAJs-eCxVbAum0njF","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

            dead/living state of the entity
            \ndefault value : true

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ly_nFqQGPpS1ZzMIHwQr7","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":"GERszQw-4bkq3gua_6SJH","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":"C0qSrW3HMKTtLytB39S7c","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":"6Xdy3kFyodXweOEhu27Oz","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":"1pupFz9dY-BsAmQ5qccyv","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":"XI1HtYTJiy42OfqAagtZZ","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":"zNmPV1tPmcLYcef4TCB5g","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the entity body object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"M01gMAcBwfJqrj_46E69n","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EffMLu5FFe52TlCEBzg6e","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"l7LPMEzRpqQKWXD_s65ia","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"399Z5g1LQnRsU_PqVOU0h","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fqCo2tlJmyVj79zQxLdnp","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IEGgc0Rm2Mro7rNEm2N0E","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":"CD2nxjVKMcbWgPzJjLyWe","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":"cmGCcJpgRSjWxBXlkdI5j","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"czejLjxom86jdoVYFE5_e","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"

            object unique ID (as defined in Tiled)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fsmCSj7MZTvedQ0v0oXht","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":"0nwWrO-CAJOrIBvC39RxB","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":"epj2kFnBqZeUD8fb9LTlC","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":"yPE_hAfNJi6O2DhkkbdNd","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":"LBavgYzA86fT9NNsGQEyn","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":"nRTO8QV4n_6eaoiha66Ay","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":"Fjsltt_pqqxxpzBfddjXV","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LidZRzCZj1kHLL9rwzozZ","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ilnsENd30nWKKMacge-sk","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":"lXhN7WHTwfdEny8lx6PKC","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hETXnUsKRnS4BUCHP3BTu","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":"Pplj2a-WhKuJxB6mbtnBK","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":"9d13Cl3s1ZY3MaADr9-4F","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Tct30Q2iRwlR6JUS2yGTM","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":"moo3RmRE-0Ss8BTUohnyh","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r7D_tKg7Ywa5D7H7f_5td","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":"jIankfsbDVWKN2RlJP-Kp","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":"JtGNhmt0PF6o_n7m3DBUO","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AkoqgffXAZXEk6HZ0n-xM","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"

            object type (as defined in Tiled)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7gxgLE1AAKGimQQqZCTD4","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":"JKkoDepbE_ezDQ70I-c1-","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xOBFsaSaXMDazxpug582s","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":"vmde5CFwRH6IQ5NL3S77f","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":"waYeSnHQbEnGMMNe_IiQD","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":"1N2ple_0Hhit44O68dJUf","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\nthe 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":"WI2RPW3PwAeQ5oEQXKClr","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":"SI45N4lCX-x0rMknrjCti","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":"uHkYK9gYE14W8KDEDsPyk","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":"ORRfmEF71s6_Kd1kInJWC","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":"zPQrdMHvBSDimfMHCivVT","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":"WP9U5Y6PNTjaB5bshONgZ","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":"DtqIzFlKUvKSBbsd6WM2v","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":"_xKKxUJPQyg81nyKwALCY","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":"VRhSnuAwzmt3TZTNnGJmc","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":"MU8MUHGiALte7u1ihQ3A3","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":"duRWJX__6wv94EazLFF9Y","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":"oC4PRsPjW1q24Pk5M_2n8","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":"iikdBScwjGQJ_OHI2X2HI","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":"sLDA746q0Uc9_ziiOW0XF","name":"onBodyUpdate","brief":"

            update the bounds when the body is modified

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zCrQ5FdL917ohMNvzSy4y","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":"ymEeJbORRen6LtZFbwGfA","name":"onDeactivateEvent","brief":"

            onDeactivateEvent Notification function

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kk5DxOgZ7hTOXrSpM8QFZ","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"M-CaRrOMoZrcEFOIxhHdb","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":"7ro4OijIer3rLwCECaoQW","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":"1f6xFef-W7nPe3AmFgdTE","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":"V7t37gCGjn97NxUg-wJ9P","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":"PJF1FjTeHKNGe5btxgMbv","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":"p3oaHXjQRPSRAbC3I2oSd","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":"K9MUg3xjtwQUPTKh9ZxOm","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":"J783G9Z1pzHgDJWaIPVZq","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":"7tfz9KSZ18ccJrlXw_5hR","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":"DyhKOnB4s53heHqRfzjDF","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":"MCv67mSj0IkItDEE9kZpY","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":"4Qgg7ch5_jAxb-0UYvzKM","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":"6J1kvapYjQqv9tHHvMYzP","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":"Ump9ikxkCTfYJ8Mcv9KcN","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":"gkd8T0MKQwGgENcK1ELYK","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":"4ZAWiY81AsslroQdDbt2O","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":"Umg0kUJ_Uc3BeAYu_b3UB","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":"7TaZi_1h2ANOEe3_tPv-W","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":"qp1FOSER7mxtKTs1CAL71","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":"QhdW1xJJKBJ6Yub0_ik7i","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":"28KmZhCl7u6pHix8A4vpI","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":"or0y_fa030xqB51F-YG4C","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":"9e_y2F6prp4RZWObkYTK8","name":"GLShader","brief":"","type":"ClassDoc","description":"

            a base GL Shader object

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"afAw6KXuoa4qLwqyOn9gf","name":"attributes","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the location attributes of the shader

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KqxSvfj_RR0tjZC1nVYZb","name":"fragment","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the fragment shader source code

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1PdWhls2Z5QppveUZBRCW","name":"gl","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the active gl rendering context

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xxjZr6i-iTWUibImI2McZ","name":"program","brief":"","scope":"instance","type":"PropertyDoc","description":"

            a reference to the shader program (once compiled)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rfjkDIQ575pSf2uv4oJln","name":"uniforms","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the uniforms of the shader

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wieHDHA2H8pzL494xhOkp","name":"vertex","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the vertex shader source code

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mN2bn8sjOIN_dGCiJ7W8y","name":"bind","brief":"

            Installs this shader program as part of current rendering state

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qIH6LLR7k6-yar_zC_5bK","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":"wkGxIKKSrX7hKDIQrRXx5","name":"destroy","brief":"

            destroy this shader objects resources (program, attributes, uniforms)

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RUyT7LlSDmXXA0QPZJGdB","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":"uv7N_waEYLVFVCEwjIH3w","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":"90yg8gk_N5QpQ5f6UhsvE","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":"IPxt6JhrXtUO3_Q73y1Ot","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":"58P8-RHrw9YWV5OCCauA7","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":"S-F5bSNXnbGanz3d-D_Iy","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":"vqrIikJALJyKEtGY4hKdg","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":"nDcVfHLhUeR3GajRaSJrG","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":"NeP6dXOrL7-IzmJ4JM7JN","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            pause and resume animation

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cyQp7WcrRsmGyFTx04t24","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":"w3L4oObpesSuuMzu5es2k","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":"cjqLvCqpN1dmy4G9vmcJv","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":"_ruOHAac66BtVs4GXxgPJ","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":"7sS3AsbAURTK1vFR8pSub","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D_Qta-mywvnuUFZT56QxS","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LkNidh3S00YWpfL3p05tq","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bWSRmSD2cHUwpkgBeej6z","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uQLHZVxSvkYb2a1_TR6d2","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"G-VerojpPZcPsmpJ6S7iO","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":"2ANkAbnhbMDk07vav_XvY","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":"Ozqew6ha89Ja_DQpc4DdJ","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"89a3NFO01x9JbiBPNxcRc","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":"Lg4Cve_WMmv_SVsHSZV2B","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":"nHJRjQLUrPHKZS_qwsL9U","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":"bbqJq3qNYN87dcpFJ6yQZ","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":"VomkOaZUp_zVYliPhnnz8","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":"7XPNVNdGyiF8aaTGDo15q","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":"s54xj5E__bz_FxVbRj20J","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PQdc67vLulDQL7fjku7fM","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xEn-0nmrINLnmjRzJb-kx","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":"4eKyC8YgL5noMOG1IjVNn","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JalS_LuBrkELNmbQ-fhHk","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":"Xmm1g8OOFRLDuTjX-tAjq","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":"e1PyGSg3zcTXD0ecDTM66","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":"S8R0m95wpFt_uOBLbpQPi","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P53qNkeImHNuIzprkIozA","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"thxRGlCUwghBTS44lh7Zy","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":"vchzjfekSXB6ChywJ-3MG","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":"cjwm9iAxMoLw1_74PSu6k","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":"hL2524fUPqC0jrdtQgFHj","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hfT2-I9HH9nonR1Zs8Dw1","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q0E6Wk-LruVPhAGveq2MJ","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":"KpWCp2SD5LYS8T-mj3ORO","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"twsfvaekuLVMwcArzQ2Rv","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":"2kYkWGX9cKTKB48gvi1DS","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":"y5b95ObMlZ3c_ucf8fx5S","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":"VKX6sadbnChDKob9E4zoc","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":"H1J44_FhTrtkInbFVH1fH","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":"YmjdMleAyO4QkfXJ9csNP","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":"_h409y0Rt8OwnS6m-mUfR","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":"j1BgUnLzLOIfuDEw9bpHc","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":"B-iivwrZ14S0TWk9sAXCS","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":"Xv6e2PDIobShJX4fTJeWi","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":"1eytU3g3gFEELLCTQNDUS","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":"ZXoCYnPunJ42e3eAyEW48","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":"kBv5E6c9Arc5em-hN0Azd","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":"PqfhOTOXZXC8sFejaoPC4","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":"zbe_6fG_P9JDlGkP93jp7","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":"MBXdIpu4ej08U-VTB6TJw","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":"36KUzz8dzPw6P2HEM9HiD","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":"ks_DwNjNu6yBSUd_Y2XXO","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":"LMehegUvtLB6mm10Vq8zN","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":"7OwL2NaDA6FbH69yEuS3W","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":"GA5Hv1IfTQtcfAH401Pml","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":"jYOOQNUZKBRYPN2cG5MzC","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":"9A30EQei_SpZQcFQoKjM7","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":"ohVqe60LO1E9NLFJQaPkI","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wnNUpmZaMmXvEx7rdJnic","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":"ZOLbrmBkbORGRwH6Jxyjj","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":"9r3EnX3hKv8kjbmeLQIc-","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":"_Dmv0KmWOpVbLdgY5NscA","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":"_M9_p4Nfk-hDskrcmp2EE","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":"Eb1LwI-1nXWzd_5CqyDeR","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":"vD09g04TkYrG9pYzK3R2V","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":"Itk3MEjXou_uxNW3DFGv_","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":"4tBJzH6IgYWQQmWFMpLm3","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":"Y7Akz2AkLraNiT1gMAJ2e","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":"OiWWtXpfgNbYjRb3DWX5y","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":"H1ACv6SR_Ykz3keq1ll4l","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":"PPztH81zYZBYJtesXvTzk","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":"V2WszqdffJSN0sdjNLble","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":"NJkL8SmlrUW6OIbPSOGCe","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":"uHjZ9abgtROQI2bEHzqfP","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":"2KGZYHN_xXXB5DLxi2Aiq","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":"e0tAl-KebmLnjIzBwymQO","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":"cSHWexSLond2s-u06ZNAz","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":"LCf1-8hbfj7qTTx8cAVRE","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":"0zjNUtKYhVop4sjQKEqC3","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":"wMZJm2CvI2nY_VLnnI1mE","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":"CmBMFZqEx2sJa8lYJAs6k","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":"9fyVz8x4IasCN3nCsGl-2","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":"1rudKZYp93HkqZ6rPw-7E","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":"V02y67iiv3tXPXbuiIFSN","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":"IUbwXZFwffloRsEJMTQIm","name":"ImageLayer","brief":"","type":"ClassDoc","description":"

            a generic Image Layer Object

            ","params":[],"returns":[],"extends":["Sprite"],"implements":[],"members":[{"id":"r3-NZ6LhTFS4z-F9cTey_","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":"5cQkNUL2RRN_upjsaEB9F","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":"E0324IOVaVT6V5Xg7AsoI","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":"-h8q24AKE80eQADUZI83w","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":"GjRRJZG884_33F3vWN7Ng","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            pause and resume animation

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dS_YNtU-Lbt5kWmwRb9-W","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":"pmRe4hZN9ieAyAa-F6fGb","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":"5Ld9qqtAouz5FzwNgidVx","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":"LJtvAKc3Jw444T9aW3onP","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":"T-zuQkcufH9d1qp4drlJd","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2xhOGpLq_PzsQmzvwxBZm","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Iun0wzMrXGBHPrs_ZEDrL","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L6jNTeCKCkjNUmuC6Wary","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ojyzpq3Ro334zqR3ja_OF","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QklbFs-tK6nAMT5I4Ud9Z","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":"H5278KNQZE3v_EuLhTYpz","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":"QjGQFcbnGEAXSQ-0WrbmW","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bRPQ7BqoBaWTmcNrhU9t6","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":"pnMtYgU_XlxEXV-G-IaDq","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":"1Zbmll90wOwrIrEnDUBOX","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":"PXrac6bDbkL4Wby6fGTm4","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":"Js3ZEENeQnTAvulzt-Pak","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":"doVG4WNbGZgAN69oluhli","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":"6pGEeJdcOvccZlws1GgFU","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ulS2uDkBfYb44VG-1NOkt","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AJpadC7hfgiYS92sdpDYJ","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":"b8pONIFXVJXU8y7CyZ_HV","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q4qab1dAlTkRfBw1Yi1Xo","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":"oQ4PqXM5Q0mWQoQOsdUC5","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":"Eu7GPHXiscPox3dk2F0Hn","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":"gEdOnkXAaRjpFr-mAgye7","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nDWNJTv1Hb7TuyM9qWYRJ","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":"GMRECjo0neg2-018ah3St","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":"XEbl8-y5MarLFLXmVMmVt","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qKPXCwf_XJOETj8aOgg9c","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":"e_OOVr87_DSb2m45orQY4","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":"al4WnzT9BT3IADdUM9QY2","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":"SQrsN1aaHKqVZfP2AMx8q","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PKicYsk8ackc7wS6XWnCo","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oq8YtkUnzt-eit8zgsowt","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":"K-k9m6C195kqO2mzujhlG","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WMCXmZS3ehvhJAOZAEz3s","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":"Sy67C4RklcRURDtzS2V9g","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":"p24Z8rbCACPTKqetXSrBi","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":"mNAaUlmIrdVNmbIglcPv1","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":"JLxlBynCSPPDKeLX03e6M","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":"ziA4y9CCvVIxSIPs9u6PP","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":"JNmVge86t1GDithm5-sB6","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":"cKL-3JBPulmLqy8np0Soa","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":"PX214wlc28lC-hB3tMdRW","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":"sZnBG1jLiGiGeQSAY4nRF","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":"r-y72CoTlzWjdFspZSWXQ","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":"DS94VtHr9miN4LWHrQrUJ","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":"Enr3yS25-3vxOyQ26fZxm","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":"2uemgSMqFRo1nKgojjMH0","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":"mjCoZWZB4mh9HTjvRiL7o","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":"2ifWsAKfH_mWaMEw6zyxl","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":"cekuuRforB1FB3kUmr1eb","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":"FmFazD4CXl5cHSgz1cboC","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":"gCC_bMBfsZeiQhcV1LBNl","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":"rfpc9G9Gyk2BA3qHAE14j","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":"BpjjmYpvqmhVI4zjRYheF","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":"g96GQNq9aZT_cYDUl-U-p","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":"5ZwZWEEbum3GJtwidJFlN","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":"sZMwmXiLHeU9EoImK7xnc","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K9UBLCKH6ZfF4FZp024CD","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":"rYSNVwrWIuLivsR74X_DI","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":"K5niZ5wYpISHLeF0uHJgJ","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":"nRmGC1tog6Pnt37wXvunP","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":"oU0xFiSr5jKJOGxQpyGGb","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":"Me2XPi6jKk65qxfF0ttUY","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":"cRzZognaQkaxiOlfwKjU_","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":"92VivIKUPpvMUIuDai7gl","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":"dw4tCCaHD1Ng0ZkOPXxrP","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":"bwc19ngRoxSxOLlwWBzva","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":"U0nqxV5_30nCphAk4fIWJ","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":"kMaA4CCWPcv2PKBmhWkQR","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":"P7tOWEYqEofe5M0GsFD5g","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":"TEpVAYovlIR-zg2y0Pw9f","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":"8XdsjPfWAZvGSjfZblcw8","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":"Efckoq1d15i1Mkc2KsI2n","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":"t8s3UwvRBxrxUmax3saVH","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":"VEq-EuD4PShZd5nhkQj8J","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":"lmnjx_nam3hDFJMraEAjk","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":"JVGzH6yIab0LTFqAv8ald","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":"C4sIGdDS8a2oF3XDFDjMp","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":"x5OIk5W3mJMlN--od0Kz7","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":"ndskGAq603Eq2zAO43c9g","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":"9aSI252VjJdOAHW74XduC","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":"gchCcrAmG3RtSdPJld20U","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":"uRB8TcRaUSDSFzLBT86Iy","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":"msGU6abW2UXwwGZEdRiar","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":"3fbpkfphQO2f-CVAmtjW7","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":"WTyjH679BKgSacbNAAmBD","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":"adFvf0IkWbsc6662GcZQS","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":"uhVMuj99ZC9TE_OPHEedq","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":"4YtUAeWM2uUpIZNVUN_yA","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":"GHe1EI2UvERnQe1L0zPfS","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":"MpFTxnBc6VM4UaBTQb0sL","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":"k3JrR657iGLZY-cU152su","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bxmBMVILNKT1ZzK8vbnV1","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mAkYP3qZpxd8-fu-mWt7F","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OQqQeh0ztyV6KFKqFxgi4","name":"color","brief":"","defaultValue":"\"#FFF\"","scope":"instance","type":"PropertyDoc","description":"

            the color of the light

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B_BJBED0WzsBuUQCaRBWJ","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9FUQAZI5VoIX0qI4jkj64","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"h6aoGqmrUspzAVlqvLpAy","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":"4VpDc55t_Czcv5IM5iZXN","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":"6LPNfNfLX27GlhdloDDxi","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VarndjT0wBQx6LAvjP55q","name":"intensity","brief":"","defaultValue":"0.7","scope":"instance","type":"PropertyDoc","description":"

            The intensity of the light

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jyTQueqMoU-Ss4F7FKcbv","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":"3xsVJk-q1bSLN5oe3TO64","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":"AvwRAYHE3XlI8FqG1163W","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":"t8_cpmKEDh-yTIEkwme-_","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":"S0RfRqv178LPoyx3YBy44","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":"SzuJ_pXPVRcAeAW1ed9st","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":"lC45FhRaxvNusLgMUP6MW","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0bgMuKsYlUuGR33Dhh7w3","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IfNORSodAtBtvTH5kn9hb","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":"w5-L4pTBGPLkVxY2G4AE_","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"deSafxALKiQj2qiSSmkNE","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":"3gG74dLm6lIHr4gxbMqqq","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":"T8SsZYlMi9WpG92B9PB1O","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S2nYCsAeES8VQLkuMGwvo","name":"radiusX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            The horizontal radius of the light

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bgbV0elUXki39-MxR9J1M","name":"radiusY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            The vertical radius of the light

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"54vFdSeihqAlGprdFYJKy","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_UlDFHQBK8o2VQaPZJzVK","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":"b6mD7u6a-ElcdSllNGa03","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":"fgEuuk11ue08pjQ8JJKXu","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UP4cPmZW2qt8NNOHsUM_o","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QpdpzuUauJreniGq5Iy6x","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":"r9YGZfrThijPAnmtBDy6h","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PrRc46i0CeTVhqOK-eJNQ","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":"1T_a-ncZ3AKqAriGUvp0-","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":"ECaEUKNi06GM_-tcnuAZh","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":"UKt8W_n6F9qCHpJjANidU","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":"f1deX96eXp2QDssvYM-1-","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":"v7kpbtzMzU0lPi_FVG5ub","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":"4qafftiNkh742vq2cU_GM","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":"VWrcvuZxkN3iZ4rObMG3N","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":"PaE-1x0F-J4z37jO4Ffpn","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":"K9pXUN62r8g4bT5eIOFlx","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":"7t_ZiJwBV5GQ6p6iIR8sZ","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":"tNNV1soh2QWJxXeKwdXRm","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":"uTHNjoAnKLE5R-yfeIc2Z","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":"utg2GHO2v4GC4gmJ6hanN","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":"0eAxrsGIEcIszDIOWKCgQ","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":"3Ar6uKImKL4oRSofhv9vj","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":"fWoFF9xVaaiGcdiGNpJ_D","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":"gUrP6SM9o1TbWUU7gGDSm","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":"jUn1j782LKE9lz_UvS5gF","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":"Zj4EhAKhXflGvY2wAQS9T","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S0tmpDUtb5bPhc7eHIRsI","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":"BAtnaUfgcx9ZE891s-4Ce","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":"aitHMLr9kE6Fzqg6BBjJT","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":"EAH9CH3VTOkJEzxU8i7rM","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":"E7MqBSmPY2muQCmff-3fF","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":"XWwfVzE46ldAGvijcYqRd","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":"wKJnMgwxNK2ViGx7PT67W","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":"I2SLKxvAyoE-xPa2WAB6W","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":"hnjX7BodsnICLpi-mX2a6","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":"VGpWuQdlPFpipEjCrLydP","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":"LYme2cE2cbaObEfP-SgoF","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":"wq5-01uWMGwAZ5O5HTF6k","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":"b0x8vDR4wGhpCZmqHzdMO","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":"BT2jzHtYru_QmQj8uAMA9","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":"aqVXRMlv0jkufBOJbXd3j","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":"qHglBTP6dt2PfoEsbKrP4","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":"4e5q3xza88Za9vIgLkJ6g","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":"HQRDZosXuTkyZsCRLkfJV","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":"-XX6GSvIaBkks95WnhBog","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":"L_a6o7ZR4ArYTG-EPvKVG","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":"34dPalr8ldP14DR0KIyW2","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":"tOEfN8z38hT5hx0dsFxF0","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":"lp9c-XCA7oaDejBlJJfDK","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":"hwYZYJFCAQyQ_U0A9lk2f","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":"6p6tH6_RuY3G0UNKMNPhm","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"

            origin point of the Polygon

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C43bld92Hpj0tgFB6GKa9","name":"type","brief":"","defaultValue":"\"Polygon\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6BB2G9d-15aza5JJ3nV6s","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":"dzxDuKPZuclsbMz2Cx45r","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":"KFwdKOc-WGwOYty_tBVgp","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":"q94Nj_igONNZZDtRgT58K","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":"MAvanoQj5zXY_4qXu3or2","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":"3n7cJy2RavxAQmqlVgcwg","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":"jVYSO5PpkDd88y1EzEfmx","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":"zStqO-55MlltYpF8TbHp5","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":"fxdPns9d-5ttLIaCrQOQs","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":"M5qyG8XyF_zdbksybWRL8","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":"91IxJd28JtN_3ct-2Omhp","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":"29omUHPPyEMHdUipBB1Cq","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":"ck7dgdjF1kVObba-drTwd","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":"16EDjdk7cB4Pmto5uwgVo","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":"BlpY-E4NMU5tdNMvp06jY","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":"AIO9q0xsCFKPCzWJs3VTr","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":"gWCi5OtkzXSbI80aFMIm0","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":"QuwNsFzybdM4bcGqq_Hkj","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":"MftK9YkI1KejDDoiYkH-1","name":"Matrix2d","brief":"","type":"ClassDoc","description":"

            a Matrix2d Object.
            \nthe identity matrix and parameters position :
            \n

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"wW8tyj1dSu1WwDGthVbra","name":"tx","brief":"","scope":"instance","see":["Matrix2d.translate"],"type":"PropertyDoc","description":"

            tx component of the matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xGVxEVnuHLtI9cffDtenA","name":"ty","brief":"","scope":"instance","see":["Matrix2d.translate"],"type":"PropertyDoc","description":"

            ty component of the matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MZVTUyoyEG8lQQCM4chhn","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":"I6iNyo6wfUi1YCTTkzoQb","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":"tN_nr1BGHrOCssD67iwwQ","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":"VrkwpHlnO0pJJPmWKCaRh","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":"TF51ejnc7NqJc-d5zN7B7","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":"2vdVzXPMiCmdhTvQa4etL","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":"N1r56O1zXpLWvdmf-jx6d","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":"mhU7IIuQS8APxvOPF3FJk","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":"N3f5mPC_T6O_0eEx1zqu4","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":"DI9CLJAFewh-_xN8Kj_HV","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":"TwASCb295a4TtfTAv33P4","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":"inQ5Trf2aXp06KizAYR17","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":"d4MONkTl2DTtmx2ANdqao","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":"pDJ993g1Nr5i_UGfaUdVy","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":"2S-45eSCtCuqz3PRclgGI","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":"Lt3hMv6sZV9vRUFgBv_c-","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":"x-juIlBlh0TSw996g9uUG","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":"aD8bTNk1dgGP0kk2GF6MQ","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":"pu8ktAt5U1vI56Ii9Zt3Z","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":"yzhf9k4qJIDOk0RIw7RpC","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":"m-nhzVMDhgHx4og21CepE","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":"u97cPrB408GtDhhgkbBKP","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":"KH2ZiA_71M0KrTP0nSap4","name":"Matrix3d","brief":"","type":"ClassDoc","description":"

            a 4x4 Matrix3d Object

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"JeExfDOR_48DR3F9kvnjP","name":"tx","brief":"","scope":"instance","type":"PropertyDoc","description":"

            tx component of the matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3HVRsqaasrvGr0dIGYXk_","name":"ty","brief":"","scope":"instance","type":"PropertyDoc","description":"

            ty component of the matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2yIcv4e5uM9yDVpbo2bG6","name":"tz","brief":"","scope":"instance","type":"PropertyDoc","description":"

            ty component of the matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5FTFrlxjZSYEVbvOsyiCl","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":"Pvf4ls2tu8e6xAoeVAKYw","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":"b2S7nnm2niIAWyx2mEP5f","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":"2_aCD9hmMvyfrzAIs3hsw","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":"Qws0ZTb-LxYJPB_N9izG1","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":"2f4Kn5X6NIjDu6YkFj_ds","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":"fJcYHsclihCUBJ-jFQip9","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":"pZR0I4yGtnyCUNZzhz3bN","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":"OoNcc8LoXOeJvp4cWDaRy","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":"-oz0zjK3C5_raPqx9myIG","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":"E2UyW9ai2FZ4ViJ6f6vPk","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":"CNLWJuu_LVtC2Z0DDSmhq","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":"38RW2ElTGepezqODTtVRV","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":"oD7uIrnYE00tcTcx2MYgX","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":"u3qzzLpR1YveyIKjssfFa","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":"K2Cm-LvBGFbLmOWZ3hR1I","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":"Cmaglp9HWrADwvqf3Sufh","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":"FwonBrVSkdYIEjlZ8A6uR","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":"t6uQhwsDHKc4rLr0lDFTK","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":"KJ-kfzK_5ouizEaxOI2OW","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":"5joaPHO0DuDx_tU13ITFW","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":"cSza903D4uxUGGkWIuWTf","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":"oxNM6HWU0IdFkUST5UbNY","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":"-wcuCk2rb8C3xVig8VILX","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":"OEAPmSu5T9hoAxDaBrW80","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":"NhcWQHxJ4r5njvfE5xCzP","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":"82eMu_-u-eukoWzBKK1OJ","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":"ssFC5Lc2OMFF5fLECmvP_","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            pause and resume animation

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5H66BbUtiLNw1rA6NVct1","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":"fVrzSP6hCMCdC4Y51xXb5","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":"Gkidhv2UC7ifKhf0Y9w84","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":"_zyFks7hhqfOaakwLbFwp","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":"gKfeghuPJBqGXU70t6uHH","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rSUcHXYrPP6tPCnhBjZLt","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sd8zVWRee5uw2K-o6v2FQ","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7MG1bvFSxi-bapSWV_MCG","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xPv6Z7g8OGWiRsf-b8CUk","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Dhzdu6LBncrPAlXjzqRdQ","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":"TpQqsH2Zhn9BtH_deL_kF","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":"cacSo9x_DC4YmQWVlrLRQ","name":"height","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            height of the NineSliceSprite

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hxcvEsxGDqpIQ-bzEYks7","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":"BjaBg_niKuksbB7zfyitv","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":"10lpTYeGnL1kOQ1zSSJz1","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":"wOAcLkMpRCiJxWgEWtjqi","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":"p_LGBxfsLgR7UPAWVKJjE","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":"gHq3oRkA9wVyp3vVXo77k","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":"PFha74po1K0HUwASs8_sa","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Vs3bs-kUsiVDg1SAFtQib","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KojZSWwdrwlqKK2x4PIO3","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":"HJdXFInPNjpEAAgVKTlTf","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yjfqkfnVjdX2aD2jWp_kT","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":"PRqpKgoPWcpOtU5Q3nDr6","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":"wlOc_90V1weOJbdgP2YNT","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":"uiW1wbltpBCel-mZzkT6F","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xp3JIiPrOJqBkNTibN_7B","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iNdx8PeBiM1eYoXWjPW5r","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":"kti_UFYiT6GWmPo0_Hxqh","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":"8oegLZOzFohWXy_mx4j4f","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":"GvVWSZIfde-nBaElQkHbu","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UnQJHIQDMVxB0Auoqmcot","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I9TyOvk2sv3LqRZT2zXbm","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":"tqItvKmGASbwyIHa_Duvk","name":"width","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            width of the NineSliceSprite

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y_7-85iOVukUQHTT_uWvd","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":"8fONV2ycbK0wRp5gX6VvO","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":"nuy5CpkmofMtTLvR9gUUh","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":"ti5CxxvUdixscfiXbFOii","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":"13IEDYU2zGqEikF3g_eNp","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":"cDOocbvsh3EMNrehQbadN","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":"VoQqIQ_P85FTdBObCQbDZ","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":"kmuuitI4NApABu0s3vjuo","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":"oxUb8E4UY3mne_BsHXF2A","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":"Dc4wQ4ywn2BeZuGUqDi8J","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":"QtX5VBmQoDfXdsSNroUDO","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":"NeIpkd_xDG51j3fecNWfW","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":"EBIrhiuKZA4-WE3lxntPx","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":"AfviZxTJcph_GLw8CvbV1","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":"WpoBpk0HRu2LJMKOgGQum","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":"EO8F_WTbJ9FjVPUL12qHh","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":"5mzRSeXRtw6sLzCOQi1Rg","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":"FCwq0n1Qjqr8jpdcYtaWG","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":"gaYGaX1kaX--6UvYprC1z","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":"cl2-yD5GCZ02QFb8C0w2u","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":"3cNuXxKk-IkvA7Ru0QgTb","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":"a6y0vcq_VSiX37ScpWq53","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":"s3Oja4hxn5O_eoqxNvbnA","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":"M0JBurTBxfLLIgtwBDnUO","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ib-K9tTr3RHO16dZRgUBF","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":"c3O9dHYgjqkWCl6vkgZVD","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":"qwGV4iqae9rMn1zHDkYlq","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":"7O_BV-JSdzdkfkh-7GqoT","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":"j7-wPMRfO1zgiyVHU2-Gl","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":"k9cglViIZ_2mKpHRzx0p_","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":"2bfNSli-K-GGRRbOBsErE","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":"bIaAoINnBxj9o6ziaC0OT","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":"EM9CBGlsza-ElVZ76vQQj","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":"W1iT4BzkE5WUfoI-PDWZh","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":"lvTkdLqsG9rkzi-2NHsI8","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":"mfjkUD8AxTWcPW9wTUZBB","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":"By689kXvwmzAWiYuhiwU_","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":"ty9kjcbz8jz7h4_9FRRkb","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":"1Z8WpL83QjNYf21kL6Thw","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":"HI9zPLSdoC2FI-azc9gaW","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":"TqLQT5RsCf4q1BhfDMXVV","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":"5Bgw2poibrekM7JMfGo3C","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":"op-kMzkKD1WCYKWpp3N1B","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":"S5G4UzwIkMGRrLl3i3hHO","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":"uirJX-5XqNVmBDi4pS0Ob","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":"EnUVmU0h3roC_UUZzRtAr","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":"rZWlVQnuj-ZgqSr1xe3PL","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":"e5W74LKC9vx3kOuIG5-LT","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":"ow3b4NsEeG9mts7Xvrusc","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":"xkO5ydIdcFobqUyhARyWU","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":"fnTUo2yhtiAFYd4Y1SmlW","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":"CkadwizwgXRHDIP8MsTRr","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":"b4msN-qPAAqZvkl3SEZs6","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":"O2U122fySGJbXbm-xX6B1","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":"0Qn8KCUwabpBkUBE4lkM0","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":"AJhubw-tzeLIu7IgGMSNW","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":"SFHXucvKTi1gCUUrXhbmd","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":"iX5APpRR0oyRGPG2_re3j","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":"Od_iXAEVF2Aple0iRVj8Q","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":"r37lPoUn7-xpoRNI6KYIj","name":"x","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            x value of the vector

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jSD4wOTtGuLhL9cXZu6gA","name":"y","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            y value of the vector

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WW4n2x9MyERjqy8D52qER","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":"wKPGOSAo--ANxcr4ltYld","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":"KeZuu047_V93w5ea6JyOP","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":"l1tLtmOXAUQiSa9eSbvFd","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":"8cmJyUBGHnfhR7dCrT7qa","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":"aTVhuQVT6SFXvdsuKweVQ","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":"AKSjQp8mQCd0hRIjCi8fT","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":"wXUjf8tjKe83eRvV6_e-W","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":"4xvv5wgftW1M8HxBOCBUm","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":"WwCWCG8-ioR_tNmgIflZg","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":"yqGlWnrbzNjVVlBpQ9vlD","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":"7Wt1dw62ePjNqlwsczggo","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":"Yu4u_c5sQ_bw2BH4-77Hi","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":"3vnOqB9QR1JEhBkQO088N","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":"irws6qmnLzG-Js17bWnYU","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":"sdjXRdste_1_o_kFCCT8d","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":"3hdq-zyWxh8MAaweM7XpF","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":"sVLy1tf2rkiYMhHTX93gP","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":"SMH6D9r14cbCA2JoIMm3f","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":"TAA4BdnQPzo2XTqvAmTLa","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":"i1EeBQ4LmVmZbf8t_a3lm","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":"OjKwMrHF5n-bwcNDnhhm5","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":"yrxEK9lji7fvuyRa3NmKO","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":"wBrr_eHEdYvuAMsasTqAc","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":"gMhO8_f4GgwCSvljZ2OX9","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":"cOsISPZQ6wTW1kfIzcmce","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":"vrUZcUajofVZRRk_AwYlC","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":"heupeVlFWvgt5cRjUdQqJ","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":"u21BWO9vVgL6VyErI1A2Y","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":"1n6cc3TJ5qGBAtiTOCm1v","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":"z9z2xpJkyWBzwzynyG6pv","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":"O-a7fWQJCrYLcWjqKiZDk","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":"-3UR7c2GNstk6f2ZU1bju","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":"uJuMYZKZFkaqereWzkZ5e","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":"SnBBi1achEyHRwsiFZmYl","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":"mXsvNzYFwmZM55w3cozS0","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":"s5qnACCjaoijmTomcmG3E","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":"z5AOYAfoblrUj1Lsb45Wk","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":"KmurDSNje8RCAc1oLwW2P","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":"I-UUNy-CaGtJcsnf3c4h-","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":"CwV30V0xvaM54kD5ywJZo","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":"OA5yuqQsyWKXR7wIF1jZx","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":"6Egvhr4-rsyV5AfCqOs1Z","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":"fj0eW3Z3deNSK6LzznpoZ","name":"x","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            x value of the vector

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yVwhF0GcpQvEFVD3angaw","name":"y","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            y value of the vector

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V2iCVFW-AQAjTeD956FFd","name":"z","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            z value of the vector

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IDdJKm3bi4YvSbmnqVZd4","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":"1VqAubfl8ImQw7yhp43ie","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":"aAK1u5mcu2wmoZi9dI7Ed","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":"P08gIf62eTrW0-djzPYjr","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":"LTXEHF7RIdxm5PZd-slzG","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":"0xWCtHwZBYC5EYyr8tYAk","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":"nLvPC4aoNAiEInpjZ1upR","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":"y_E5_yt2n-Rl-u9fqwsGx","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":"QL9IcEJ9k1D6DmGK96fse","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":"wg2F01vwp3VrL6W1lLWj_","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":"bxYhZs8mutwNk2lg5QmwV","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":"5KsOiI5nkvvF9yar8BG01","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":"IZOP3mbOM-bcnrEwbvYrR","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":"WShEwkDg5mEEz4KCiT1X3","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":"YAVBmsipa94bs4loRxbqT","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":"E60Jn2JwZa3ARrZ44JEpH","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":"aKf1sm7MqQKk9DZ4pCNWx","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":"hzWnPW7ksA3I3FhysKtNI","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":"DDNagL1GhX0CNhypmZcB3","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":"mhVH55jyqnlwPuYRoSm7k","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":"GYhTKdV28D4SpXdLSTkCu","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":"fQY3G-On2Rs_j0uOVa7eq","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":"2gIr9WgCBVJOdpEh5jWO0","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":"gsOSrwZ5Oz37GW9wpaMqR","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":"n_Poas_xYcgS6nQofwvFJ","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":"kERyQoUBdL1M2BFN7IaHj","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":"YS7jc11-c1-AeQZThymwP","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":"qwAzXE6ON8DOpRuBctIJH","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":"bHmANr1JrAuvQIQjlf_C2","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":"ryXKGbE27k0fE-SlatRXX","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":"Bi9B2kE20H-kARjyH9y9U","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":"a0uSQofj9cqh-Ka2GgXk4","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":"TRmDiTPKhRN2WFu2f_DV5","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":"7UT896kcwVtHmIalppzn7","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":"tWqevn23CHZZ2oROO-MSN","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":"l_GgxkQh6oPnc1eEOJCXY","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":"mMY_z8Lva8awf3gpQthzE","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":"pFBUCxusr0OGVK1PXH8S0","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":"SHyH48m5M7kSsYIPkFY1j","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":"IiGQ-aF4zjk0TBoZfjdbI","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":"WX5XiG2rIuK1z_yturyIl","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":"hvUF5UaU6p4nZOD4rAG74","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":"abc-i8FARQ_Ff39MwRO-w","name":"Particle","brief":"","type":"ClassDoc","description":"

            Single Particle Object.

            ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"AnW1gqRLIwLZSBZCE_QdR","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":"2w79z447_T8lrehfpMakV","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":"3f0Y0DtQI26lvBUY0AkmK","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":"zJj68iLxbkzjgbxejM8bq","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":"3UYT6mIvErvBA3F8J4BW4","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":"zgiCb_DpM8PZke1kJAnHE","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":"MzFVhS9HBproflUVx48mi","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":"Ej55RBTlh7i7-9pf4UjQz","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3H0KgK7xvy4XOEvMZZwbR","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uGW_AhqZ7AKpiBytj1_DZ","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uXqbVDGoeSiKvvUq2TtWQ","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_9DsUyw1zoEmRWcIJ_RPr","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Kj2O34_51xMnMI3cSArg2","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":"t2RmnrORI7oXUTNEgLUTe","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":"SYk6DyxD4nXrTM3XpXpsx","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YOCGj3R6zvmRH-TGl7sRa","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":"EkrfbZ-J0XCu5VvUxndjP","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":"2X_n2owzEK5ExzYkiXuP1","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":"mR--YdRmNDnBBf7v4CPqw","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":"75jB_eO5JRFIPUTPdol3e","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":"TmJafNB55afiqlYzAb2iX","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":"AiMmmQI2ydeoTTn6hA682","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"THiDIQETTbEsOgT6nP99D","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Sdgkz5OE5SOWoxPci1teo","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":"DqPhuFUWY3J3ngM1Su0rp","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_T79o7oOlYeNzcmnFMbAA","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":"WkhbL83Wr6pizTrX_6DGB","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":"5Xk0sOGugVhs0CVZufNZ5","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KNP76UK4o5eLo-hH6fdiz","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"npp2pUqDqYppVpZGA690k","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":"rZLGtyTh9-aY-LgzuUQEc","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":"0XkbuT03JftAiyUwfhdvg","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ItRm6dJYE-GcDTxlz9P5G","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e71tag5U1ha0tZXaIfhdo","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":"DKCxGAqXXVzjPNTcTubLN","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qlq0dNG_ESv_8kAYYkbJj","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":"wrgcxdw_uD2LYSg9JkWX6","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":"DcgKSe5saoF787LMuJRIp","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":"x1JQWaVfFbFrzHc9MqPjS","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":"OD8RCjWFZ4DLLjHAWH8he","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":"0vtptChQ_jfcdwwnwCPPW","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":"_iR5tb08GhHPY-XmwtpxJ","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":"ABFzNK8MfvuObbc8C1Zaf","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":"Ib8-0nNc1YeCUCLeIlsBz","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":"PnM3MSV7E_thu0yeNjBXM","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":"PAUL5I9c0LgiFVRFHFGli","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":"KApfqr-pz1iSP7P9rOYXQ","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":"X4nYzfsHvt92B_Acp6mdG","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":"I7C3V_7f2wILrAo52A7IE","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":"32dFleev_9fFXcReB4-pD","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":"_qEzOE4bLJZMHArVAZKFB","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":"TUbcce-zo7kavNCIz8E2J","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":"V3LRLeoTtX22VneQBoBC1","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":"42Zp7dnFMDpZFtR1Qb_kx","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":"5pYVrPgYNVFdy4hmTAKlQ","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bDoJbkM2J8j0ooziNHDI-","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":"yieiZ25bDbVGEXEO-r88k","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":"1pbfEM5z46Bw_gbSdgdRP","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":"coJcQYXVwxLUWazJVriLX","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":"2tfMTDsUtVLyzpu4_S_ef","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":"SEBMbA9HNExDDIRXue5vy","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":"PKDEKUSe55IfVwLB7b0fs","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":"qHnvYq9_WznPPfN6JxcGP","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":"py0S_SeWM7XHA7gRrhEeg","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":"l8Z59bRHqCf9sTvfcnyzZ","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":"vKS_WcLEX8hL3GWXEFlwW","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":"q98rMJdrDp8tW4vSlq2eI","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":"D9SZKx3gst4Wu0Py7C_dh","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":"PY5xPQf0mNs4nIdNTdhHY","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":"Ny4u53bhh-dXbu1BiygpV","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":"McNs6lUzXKxmzXa6LSOaW","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":"sdgTp0sAcaFrCVZ5MpXJE","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":"FlcD0mljtzLpnJC8c3Wud","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":"1fVFZ23p99LvPu2mxYRDf","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":"RJNN0uuzQlLlCRtaSTGTH","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":"DEqgZhakGkuK9XG11EDsV","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":"2_mxrzhW1-Kimmc7aSADC","name":"ParticleEmitter","brief":"","type":"ClassDoc","description":"

            Particle Emitter Object.

            ","params":[],"returns":[],"extends":["Container"],"implements":[],"members":[{"id":"LrtRMvfzEYnBi2xiT4s-c","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":"g_HGGNs1Pf2gwW9RbiU-H","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":"VilS4UpqIbMCl_SVyVTIc","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":"nTiZohLM8MH3s9ke9N3B_","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":"z13fy3R6h8S-k74vphkPq","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":"nv4Vd1Dj3aZywrb_jom_m","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":"BVoY9Na8lh56MVBwvy25b","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":"-TyqRy1s8Yxifmpqt4l-T","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":"v95Bk-f5i9iaW55uo0xj_","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":"gmEiZ8ncYV84IDrL2EwA3","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":"8_FDkpI08-KgbBqUjKl8e","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"X_XK3hu-yU72pViDoTHVr","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"f0xAOIn-TYW-4_Z9e4K9M","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uYk6nq23bq1lUhHaKdJdw","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":"CRyXyllxfGT0pOKzLp6z0","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oSTAa8YiJXVRylCuSfsAr","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jNbHdyOBnwUXj2mz9jh0L","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":"77Or4gWpsLtIaHMEdpwHe","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":"CIu4Yx-ND-xyrZV6fBcMk","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":"fdEhLL4e7DvNghDj3Oqkq","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cGTk2Kr0Q1AUL6zC6ZHaw","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":"JHj4iIUJHnMIxUTPC59bX","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":"wMwEsmKMXOcVUS1lkd-PZ","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":"t0ZPGDa4Ny-ZcOxnJ_cIr","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":"JAZq3SclbGKIMv1hhdjnp","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":"TrhSdx4p8sRilskf4bIae","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":"YUhl6aY8uY_piBqDs8Kul","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rRiiIW4CHrBGy3NYEXH4X","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qV7ifs5HdcYs2wQS0PmlP","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":"X8Q3vk2L8-5i3XK5fH2wA","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oecOyiqnUUv_RNpkqxjwV","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":"lVU4LzEKtPBG18IZWyjKO","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":"o5hbs_WyYiaHqUQew4YNK","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HIx3d9EIQU1CvW0UEsaqQ","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WljYoExrgWkAbPUtP14xo","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            whether the container is the root of the scene

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YJJIbRVgDx1djtDVckyL0","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            the current (active) emitter settings

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dEN1ouD2YSKKlowlCsLdX","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":"9AmJV0FfmZGP5w7VhQpDu","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":"x_SUW-Mz966hDcXYWw8Fs","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":"p5ukZDyKzI2vPIKBqBTPs","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"m6i7aPTWnyg3fnNq5NsEt","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AwBX9N3xMIjaBqjs7cRwM","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":"Qa15ESJBDM6VnXN91HezF","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yq09hOaioMzecM2jDb4Fn","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":"0sbOYih1uss1ziDmfwbqq","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":"p0ae6RB4c8X9vgoSZcXeo","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":"bEe_r-SFfShj-2AX9O2ZB","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":"qN5xOVmjjE_vOdRqX_bBU","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":"0fyu69EpeAofBjgvnEPIb","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":"YKnRWeQNEtu-4hmKG0d7a","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":"zYYiKs3-C5WlrM1CGlS7v","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":"rzrgrmCYbyUoDi881IDeN","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":"7xua6GaYVmWPpKRyCMV6F","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":"QHfpVvMjx0XF4T_xsprhJ","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":"isDanLOZQsMZpiqqredSb","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":"JEuUwP-qgea1dYlTmnc29","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":"4w5Tdc3dla6qwaT5g92p-","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":"13ZiwLSYJAvHkcjS7khD9","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":"C-2kTkvY8vvOVdomj58V-","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":"evpAdXANzHWtkGj1R5F-r","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":"vg2go__MyoTcMqj6MvPO6","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":"lCgFltkt_2wJRKdW2ifAL","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":"x--AEWJcRYoQ57Fqm0o1U","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":"tCKQHs4bvTOOrPcWQG_Fr","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":"TJmZ2mhLXVUKpd7LZLLa6","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":"VS3pLt8CELZoPci5n5brC","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":"0xxO71X7VUk6-kGQKa7sq","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":"bibD4ieXoXstFGkBOKMr9","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":"qvLsjaakt7z7dGXec9YE3","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":"Oub_BMjNl781PyO_eiFPv","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":"YKIeMC4xC6PGF0tvLMZkL","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":"SuNpcmPDpO7vsGIa8geWr","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":"AHC9kBVaxSNZgtPWSrYPE","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":"spyqzhAJM2DwSzjE2JX__","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":"uMlaiK0aS9XvCubRiJLMU","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":"VNwNwlWD4XStNtRPkCvoU","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":"mYCFkME2qiQXkL9-T2t2E","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":"ad3apQV_89qLvjlzhfTj8","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":"o61fh6bcOnMnE3eIDyLjJ","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":"2LKP0SXN3l8-BQFLzJf1k","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":"0Cu-9JCV57UcEGmNQvrjX","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":"ulZethBSQgzMaIiVXdJDo","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":"Opsj9jJmNHLwXdcnLOcVQ","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":"dEhLH4DPfc4znHNU3w0LF","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":"O0DROBgxvEejig1usgW4x","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SFPCOIssLJsWhj_nd1olO","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":"2DCr5pN3Qm6AQVHjw57T4","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":"0bmuoRAAWsPlGwqifFfpE","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":"laH2bLYrVqm1zO0MFvdji","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":"LsVel4dghsj9p2dpgx2bA","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":"mJGL3YqH__ucU97YQ3v1O","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":"QWvHvrqkfgwHdoaCzuY3T","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":"6ZZQeeSDLENqVjXWCumHR","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":"zCnAsoxTBWYpL1BlwfoSE","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":"6HceqfjaCij1Fq-ZxmYKP","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":"_O2Vf6zJKoB6OSg0mEfiC","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":"vLIxL9WWY9ErqSFG-lhQM","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":"WplKO4auLGrxXwlv3G1B0","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":"H3K_9OpJtvOeBL3MX29Jz","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":"1kvZeXwRLw8D3KalSTigY","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":"rnZzhsKXvPwTWX6UIS8AI","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":"Spr7Rjf247wscdW0W0eVV","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":"RSohQmK8Ohg-Ev_rCIW0-","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":"jWG8KRshK7Ywy4pygdzvj","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":"oncRfMoqp3KlPvxHTnlWy","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":"PhJYWrZLXHF-cH9jFSgWQ","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":"1UrNilpsn5Im9Xb55-oyd","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":"PHMbGL-DoGy-FbbXBL3x7","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":"a6rkyzpft_VY9W8hha5rY","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":"rzE1L5utBMc_Mv1GnoQpZ","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":"jTRnaRmfdR40YZ5r19Ha0","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":"NzQK5rUMuPv4sg6cNK7k7","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":"ycDoM2_-WvuHECD67X-kL","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":"BqHuVLz9gPhc93HqPiuoz","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":"aCEBec3pYVyAozc0iCWzt","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":"aAXdAvgBftUCz3gTevFGR","name":"Path2D","brief":"","type":"ClassDoc","description":"

            a simplified path2d implementation, supporting only one path

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"VB5fGUyASMY1AW0Ps_bWS","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":"98ZUqX565aNgJ_7hYwNgs","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the points defining the current path

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BLPH6aDIr47acUn4QnVeI","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":"orIgT4qcrei372lE3yV4T","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":"KlrTpmRBTY4uM3-h_ujnF","name":"beginPath","brief":"

            begin a new path

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eaX8AfPJWIk8WunFaXEC2","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":"yEsHJmh2KdB6Om-oXDXUe","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":"1e9dbdbDLLpYiQ4wjn3RX","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":"n1eSy8T5Xxgbu3rdLyNtl","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":"CbD4Me3-M03EjLMN4Zc8A","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":"_7dgLD3syENjZchw2CNF-","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":"I4NiHmfdbZ3LBkcCKrOvB","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":"GK2hb3-2MEApHZkGVG1Y8","name":"Point","brief":"","type":"ClassDoc","description":"

            represents a point in a 2d space

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Baj0Uj2DGZOP--khgNgTy","name":"type","brief":"","defaultValue":"\"Point\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mzK-KayzRqkf_fgA2b2A9","name":"x","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

            the position of the point on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BlVeu3vYfCx14MNlytbwo","name":"y","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

            the position of the point on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NvIj3QuD9sk7UV2eiW0Am","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":"5uR8UartGZo3n-mmvmTKK","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":"AcdatI1NFK6KeOYJUQgF_","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":"9a3zuv1OjseiJEdD9IKUY","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":"un7ZboB8lU6V4A979-RPL","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HDrRCNMnqKc5s86rspV2a","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":"DdRF6sEwNM5_ZWpNCI0RT","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"

            return the center position of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EPZCKhAxJN3rXHpYIBa3C","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            center position of the bound on the x axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GaOQiAa7weLqwmT8DLmmW","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            center position of the bound on the y axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pkJQXmNEFY2ansez35RNw","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":"wsPU0ZVgBSoIWi86nZorW","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":"HXJ-fobXmB-lqNkJzn4RC","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":"975FREJokxCYL6HuXN0sl","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":"ILIWbfjk4YuCgqDaYNu1c","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":"rhStj-NbvE3GoAovkMCDq","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":"FNm-ackFyD1FAWYWAEy57","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":"B5Hpzfy_5FscN3Hou7sM6","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":"4AdMsjzZOaXNbtRIU6DGf","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":"Xn8ZW2hfJq_Q5HdiDtXBX","name":"gameScreenX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

            Event X coordinate relative to the viewport

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"E5OyVMFVIEe2i8X8uxj8a","name":"gameScreenY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

            Event Y coordinate relative to the viewport

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sxAfGPzLnakjuSbpoqPGA","name":"gameWorldX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

            Event X coordinate relative to the map

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r6XfxeAARzJEkUEdrmctC","name":"gameWorldY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

            Event Y coordinate relative to the map

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eqy0FRaqJ4lg1A1n8E0t9","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":"vKQ1ppKdf4FYRoqJtNP55","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":"WRHbMA59b5t5SRm_zpnYU","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the bounds

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"30e3QQRBM3V_9xfA3a-kE","name":"isNormalized","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            true if not originally a pointer event

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c9kvlNspSaSb_Uw2mH707","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":"Oxx-_9NTabBlY8A3XR6Rg","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YRUbpU1ML7NihdvyjxqAU","name":"LEFT","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

            constant for left button

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p9WU0dwKqIoST_Heeli-l","name":"locked","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            true if the pointer is currently locked

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TqzcwDh4JGPRJn2PxImV9","name":"MIDDLE","brief":"","access":"public","defaultValue":"1","scope":"instance","type":"PropertyDoc","description":"

            constant for middle button

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FYjQsKFE1E4cF-2moE-gs","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":"SC3vk_8PTNW46vFXRJT4-","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":"Bxv6CffAVQY1pAsvDM9l0","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":"5xlu2O6ODY-zHHkFiNRFM","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":"0OcsS9ofHjsSt0a3hSr44","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":"9-7MfjE4HibK9MdahZN9q","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lAlrSy3m-9I9cd9Kj4cOL","name":"RIGHT","brief":"","access":"public","defaultValue":"2","scope":"instance","type":"PropertyDoc","description":"

            constant for right button

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6UykgfyVOux7LKxnO6df1","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Cz6B4DkIOWtzkC9-sHOee","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":"cnu3WlDnfKNRGjxxtMuyp","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the bounds

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mxjw18kZqcrtBsz70zQyh","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

            x position of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BMMB3XeEOSMXu_S1qdNUY","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

            y position of the bounds

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ix6xHWfMLTyYvAPaPYeRO","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":"HVazIzaUGIThJ0oRXNzIy","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":"AKlTtOzjvyfZvD4nT1j43","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":"sBldLlnS0i1XgOQ_TuwLp","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":"Pie1EXr4llMQQ0_5y9aHA","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":"p3MDSoQZRqeprfi0yH9pk","name":"clear","brief":"

            reset the bound

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DoLaeK06EveRN4loa7abo","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":"oGT252n3iIMKll-qZ7ta9","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":"woMhGLTr65xGRM5Lgp-Bo","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":"32-jPGQdRU9UHMiVkzXbd","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":"Du0-zT0t1kSzDayoaJlzT","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":"zR2DpI6HAa4imG4oxQ5r0","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":"YV_brMQgOCdce8mHzRSwp","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":"AaVwQNwFb418uiGJbMEWB","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":"OTL_UG-i6HpFXIGIhigM-","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":"06DpZ3BhpZW-S3BCD3RHQ","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":"fNS4WSMQ-4U5ORs5ezAKs","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":"Tm22qccK3_tEEqG8BhKiA","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":"T8X0nnh6RnidJ-EVuKy3T","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"

            origin point of the Polygon

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"umZx4HuCorpdngRMPW0KQ","name":"type","brief":"","defaultValue":"\"Polygon\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SzlH-Zm97uSFhRjfI2vaw","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":"fyDVhnm_7C2eYi7cKn33K","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":"NaD7CptFruwD1vIzLTWUu","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":"RoTo--uYX8-dhodGJYem0","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":"l5dsQcyd95Rk4VE_7T_Vx","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":"1Qy8Q2gwYjRpXBXIR15ag","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":"XMruaOmdacBN3Tr84Qr-8","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":"Wz_YdmzeAXpP5DKvCBSFg","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":"ViOGFiXIniOX4qeqw7diT","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":"Cdey0rKlWkEeW0KNCuNxu","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":"-CxYTvlnGP576YxYZP64W","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":"jStUuPTEmPoMCx-uNJGIN","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":"pTHRRLZBpa0JxAVkJr17b","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":"0sjdNEE7-_e_N58OkaZ0m","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":"P7DMrEnFdaptrJuWG0N9Q","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":"0OnFVIqXKMJdk2aE7VrR1","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":"xqM-F6YGAr4Wtseih7bkm","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":"tYBgB7QwIoCn55E9MdKVX","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":"2GVbXtayIW7K9gR4S63EI","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":"tieSAchEW-sK7YQ6-gBsE","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"

            an array of vertex attribute properties

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Vqc9E-DT6tNf43X8JerT4","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the shader currently used by this compositor

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YGgWfy_FKTtec1Ca0U4_n","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the default shader created by this compositor

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aIrg8x3QHTES9fM5VwaMJ","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":"AoQRfMQzFxyFnKV2S6RSP","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":"T_WzYZ2KMUgcmVjCO285x","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"

            the vertex data buffer used by this compositor

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XmNhIaAQCtuk4FyN5gXo7","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":"I6lnRAIJPQle3_7RmM6FG","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":"ZLDkGeDCbyLDwEe0VILpi","name":"bind","brief":"

            called by the WebGL renderer when a compositor become the current one

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RzmV_QsCW-PEcEIxS29RH","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"jKZIBNVQLvNxZWvlmN-JD","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":"2O_bHur9eepkM4CVj54lV","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":"94u34sKc3pfeCFC-EI1Zz","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":"tTDHu3fQK7h0DFXx7hak4","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":"vEgaKvsd5HrimZ3ZH36uc","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":"FhXawnkhIkL-vumdQetGf","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"

            an array of vertex attribute properties

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Eyp40OhoJx41CSCiNnoSS","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the shader currently used by this compositor

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RiX-SgL4CIdPvGuu84Fh7","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the default shader created by this compositor

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tfFSqaSqT4BJ2J67GQHtd","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":"OXP4ivC6WnzD8KrQ0jhJI","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":"qK0gpTGS00AdSCeqq8Lkv","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"

            the vertex data buffer used by this compositor

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"THjL1-BbmJ8xc7X116HlL","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":"nNkLtX-FJuBroEwQy2Tjx","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":"y1Cs8O6cav_TFxPzSiEaB","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":"W4QM0KlFRClCTzZpFhgJ2","name":"bind","brief":"

            called by the WebGL renderer when a compositor become the current one

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"moOm7KVloCJfzf_hmGyaH","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":"yBiZIkycyhW01SFd-4ge6","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"IiXVHvj_CYyq6y4XSmBea","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":"oYMHmrWn-nkeccvho4WSj","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":"qQQQLgxhqyfYooXU7PIbl","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":"-YJPv8cINuCKsMNENB46I","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":"ZE5JgUF9ADSEcPJDrGl38","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":"85sN56h0jFFrUQpiNBK2E","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":"IbWW7pTC9A6eMKZdsnc5p","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":"cnoqXyj4JA8eq3EpsBiPd","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":"KHJYNBIcHGyXMqB7dvUNR","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":"kH_M0LedBEzqUyEsN8BrV","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":"6vbI6pxGYe-kmW_7HW1l2","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":"KXkRdBQPkd-40HNwnxpHn","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":"KIgwCEWWzE0hpmrmWQHHz","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":"OUg0-kiwy5mvxgBHurt8f","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":"E-S15BFrascvFLDUlBNLM","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":"XnI9xsi_hGqQ8M7Ap8jvk","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":"VzN6F0Fs69EPxQc2_ulLr","name":"Rect","brief":"","type":"ClassDoc","description":"

            a rectangle Object

            ","params":[],"returns":[],"extends":["Polygon"],"implements":[],"members":[{"id":"wjXWEWmPRloWEjfLTp6G3","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JFj7Oezuyn5dgR_Gfrlpf","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N6COanJvbJDI-tl_kOZSZ","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WbgJqfuffoHL3NhjixHjw","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YJys2Viq70H9E8WQyhfkq","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dkeEW1INQ5Xr6l_BXmgK9","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":"9NuDHaSmHOJDVQwPgBtsM","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"

            origin point of the Polygon

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8fkzpPaK-NwYlbeGToYuq","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OFaS1yTCO5sUVb31WwLsj","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iFspJROQqct9AhZS5-Keb","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uD_I-om7bWA_s8oIgnPng","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vrxgadXR0fFPQHKZZ57-2","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":"Z1kbK3kwV04MHD2_mF7qa","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":"fKfqmEbPspv56qojm1j-a","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":"gntZqagzZKoi2mZDsIFYp","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":"RUg36XaRqh-EgpfXFoqtt","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":"3qxZoJlnGmNf6Y5oUbq27","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":"6OW6DehlnBHYPh31b8mHQ","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":"ogB1Y4Dj4RN6cmGwcrWF0","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":"d3WnvytI1-AR69en02yX1","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":"ueR8_3W50cgMJjc56kF4h","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":"Jd4rXBeGaiaFZR2K5ytE4","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":"XecFSMKK53HhOPjGkOWlY","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":"WIC0ajJvTu7Wn5xVkmXgm","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":"qxDxhtwZGxi2TAuxs0OKO","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":"y6kFQQ2rzWotjgbXtsPzu","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":"SNGswgns8qY2oV04_mX3B","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":"TL_ilZ4QGMfM56J92X2aT","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":"J65A4zdQTuP0kTk3UDVYS","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":"4RrI1Cwyyb4bNuE9L9cXn","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":"5lsY3eFyoKI-AWON2p2Qq","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":"NX6W1sqtTsa5V4Lixaecy","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":"9WMIDQAAmAct4ghOrq81u","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":"r8aGowqbOlISBuwFFe2ZS","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":"_SkKOSfleWNkbT6at66bE","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":"OcovvLRlWD-FkXcqFXeAJ","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":"kH-Fw_kkN18xjOg0A35JN","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":"gpGEbBf4tNL9w3As0xItv","name":"Renderable","brief":"","type":"ClassDoc","description":"

            A base class for renderable objects.

            ","params":[],"returns":[],"extends":["Rect"],"implements":[],"members":[{"id":"WRBig614uGv6gG1a2VAbs","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":"tLB6svxddnDninWIHL63i","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":"EOiMM_FCeFWeeGWgj1dZK","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":"NKgCABSrbaGqcwqt_h4u2","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":"z_Mb78d2hlXeeqp9gesqi","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":"Io_aiszSg6FlI_ykvX3FL","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":"_TddBnKgVGxOSgzdfOEbH","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":"c0_SNLpLFdHe1Wy3m2epH","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-uOUHvlwOiRkPeJjXSDcG","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K-AvEOdiFQhvYcCc04ku7","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n0a7pNLaG3KdckNxssOSS","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oNJvUDS-shjEjgPDHFGhC","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"h4eOL7btXzQXnzsb7v7DN","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":"Y3n9dCEIoAR-kIRhjqFo-","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":"ub_xGbdFz5iG0I6FzQwdu","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Fg-BciME-u6mlCyS5sSaZ","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":"3PSyz9KhDkdfNjmu3J4GB","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":"siXdODHAkzpHStDBQCsh8","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":"2C0nbAq8qqTkugTU6iFPb","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":"ms3l56jna01hnpelsZe5G","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":"znoaDKjpKFh8RMeP2zp9h","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":"-iaBf6zLJfKN1mVjO-y5a","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UPPSrFMEFQz4UNSXoSgxU","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VckOaEhguy-QysVbqPYBB","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":"3IgNI2OmUFUI7f45Yv2m8","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"x_YioCZHe1cwEtj1MNdEP","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":"G5yr0vuZ2ey5dWHmKZVRJ","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":"a88urAMYmB6HWAT55Mcd9","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XX17_i2Q7kA-oLsnYsGlV","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6Z5cFs8K0Qbt1qsAPsrBH","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":"JvpO3NNDqncyKdQn1HwdN","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":"_sBeTcH1UYnL6puBYVvIb","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RfGaO6R5jfVzaNcgjGJIe","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s3Nq2e-hFLSWwzzyZIbZ9","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":"-_nJD7_zHH5H-5MRuB0Gq","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RQsOZ3nwgYaoWGSuAcUFq","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":"uJK-ZmKasF_bStHzH-BPk","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":"xVu1Jgi9itNUNQcn8lRPV","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":"LTm833-ACQPkSeuCnkyKI","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":"aFHPhyPicBvs9JSrhTDc4","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":"Jxbi5Gs9jXyZ-sms6HZF9","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":"Hu0wUkERxX-taQrX_IGJh","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":"utHjURAZnG9lWiRdI1GJ0","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":"AfFLcqDO5Te5cWijF6G0x","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":"7k1WnEd-ZSIejXLdtdOF7","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":"EvBjB9jKbk3QTyhpt1IWt","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":"F0C3dXg4gAx5p-T59ycOv","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":"QmSZ3WOv9P_CqmEIatTzl","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":"rqQoHfOXo58QmPJt_QWtK","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":"9wgqabFRIQbJtBvQOgci6","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":"AGSojwPkPqb5uBWBDu5UV","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":"D89Jg3EJILRdqB6qSdwcG","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":"m13RUzS2PXTY9NTryFaI0","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":"rVjCxA64A0le2hF5Qp3lc","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":"Xe0C0Qj4nE-PF5fgiRC6r","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qHHsET-ElR_wWNI3cWg2X","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":"ZLZ4zPpvlIJhSrrYY982n","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":"nm5f18hSMqDKoK4tR9Py0","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":"LbucbeKMoAmCUlS4zujVw","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":"i6Rh2iq0FxYyxolSBdOCP","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":"iT7MWppiwxDIHhMK9Ceki","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":"-zR6WTQ7A3Dz1on0isV8h","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":"YqmBGBpIu0LZXFLbRgTax","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":"EtK28-2keKXgX4TOu6vc8","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":"_OnbzdWpHQAt0Sju4Gz9f","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":"TmVCRPst-zt2OkKcG9ihU","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":"DCgPXvFUAT4MtrccKFa6Z","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":"lzjNSilvwMDXew6WyNvht","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":"Ju6kqRACwDRaade04JWhF","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":"B-wgvjQYuK1VtM9G-GXJn","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":"MO2eJD8GSOvRS_msDkPOF","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":"_M2zN9-WwEW0hAsWFYS1I","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":"SytA-MAit55-tauWYwka9","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":"cHH5Q2Jn9qRXJIqiS0frD","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":"1LeiU6pIzB7zpSpLfZcsT","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":"PX76qOZrWweiQYv27oq3S","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":"oxCeIP6cpSPUWMGWKtRn9","name":"Renderer","brief":"","type":"ClassDoc","description":"

            a base renderer object

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"2Sm4RRHvR0J_mnZYtnDGn","name":"getHeight","brief":"","access":"public","deprecated":"since 15.12.0","see":["height"],"type":"ClassDoc","description":"

            return the height of the system Canvas

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Epg7Qee2JLx7xYfj7UtzN","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"LsinH9oFkR1Z4eYVEqAFo","name":"getWidth","brief":"","access":"public","deprecated":"since 15.12.0","see":["width"],"type":"ClassDoc","description":"

            return the width of the system Canvas

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"P58njgCHho7ujmEDr_HmH","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"hmodZUw1-f_yukGs4Ue1E","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":"7N6t7DTJIM1u457mtC2HK","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"uWVLd306VajRZeaSxwzK6","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"

            the default method to sort object ("sorting", "z-buffer")

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ikNHC7-sBVzZMsKrBb4Y8","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            the requested video size ratio

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"R8uUOTh6MZHu6KVe2BEuk","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            return the height of the canvas which this renderer draws to

            ","params":[],"returns":[{"description":"

            height of the system Canvas

            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"q-4AgZyEInGG1lv05ljzy","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

            true if the current rendering context is valid

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VXj0Vj3hr30TmCejQheq7","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"

            The Path2D instance used by the renderer to draw primitives

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"19abWx4tn5MxuEBsD9nwd","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":"lWkdh5G7XrRAGG2KfvpSS","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            The given constructor options

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4CeVe-M7Wj3tP0SW6XPtJ","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":"zFNcmPMtOAKkpGYUJSVgg","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            return the width of the canvas which this renderer draws to

            ","params":[],"returns":[{"description":"

            width of the system Canvas

            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"IfKIh9THvrnkuh4WKqUuR","name":"clear","brief":"

            prepare the framebuffer for drawing a new frame

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"152CsYxlRNtg0bRo0WRPc","name":"clearMask","brief":"","scope":"instance","see":["Renderer#setMask"],"type":"MethodDoc","description":"

            disable (remove) the rendering mask set through setMask.

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zmnrpUqwHw0s2HPOUCIU0","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"

            clear the rendering tint set through setTint.

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"55478QcKnaNrv9nNOLmQM","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":"raVeKhYivunY_lvYVDBiz","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":"EMGkXF9OLjpnHSKLmcn-7","name":"flush","brief":"

            render the main framebuffer on screen

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q2IUAhoTqIk_I71hMe60E","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":"Ks4i3YeDTlF68k3U-Zo_X","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":"9XnaDs_rIvSsbRVYj2TVm","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":"JxvyaawQ9t4z9vcNU7FTO","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":"yXmpREWd-mEQ6A802xB4l","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":"ICEIly8kxru05hvlCHF14","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":"9hXyDzh6kimDKVBD8F4aW","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":"kNQmujI0mvK44uNOFkpjy","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":"mNr6yQy3_V3TUwYkWCiVR","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":"aQoLwWXZIu6Fz_WNuotyx","name":"reset","brief":"

            Reset context state

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xJP_IWb9NdxvizKB-fCuF","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":"flD5B7ra5fuvpfZHv2GdN","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":"l_P06A1WZ8F7SoGL6d1Hs","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":"YHvht1q98jcBVHfTxAHVn","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":"xawNqQuRoF8ZTbusfgRwV","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":"UgWvt9amaeCxumLUNKbkH","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":"0p5qiUfADZBY_5uOcN1Nx","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":"APpmNyV2wYMkYWdPaZTVq","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":"KfkbNxNY51lk-ixvJWUlA","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":"AO9g9EevFdYPGxQmevKPW","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":"3s5TLB5vdLKI9PpDRX2oR","name":"ResponseObject","brief":"","access":"public","type":"ClassDoc","description":"

            An object representing the result of an intersection.

            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"enyvUfiG3HrxXo_0mxjf2","name":"a","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            The first object participating in the intersection

            "},{"id":"-WIhbLZfmi0emP9czI0Lg","name":"aInB","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Whether the first object is entirely inside the second

            "},{"id":"wDYJs3p3nRAdq-XD51NNF","name":"b","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            The second object participating in the intersection

            "},{"id":"6Alka7nz6utk42WErjMOJ","name":"bInA","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Whether the second object is entirely inside the first

            "},{"id":"rj4f2ffWBc7ipRD9FgadK","name":"indexShapeA","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            The index of the colliding shape for the object a body

            "},{"id":"ldj7bbHTEziyKz8ukCS0f","name":"indexShapeB","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            The index of the colliding shape for the object b body

            "},{"id":"yF9iK6f5Y5ty7S4TfjtRt","name":"overlap","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Magnitude of the overlap on the shortest colliding axis

            "},{"id":"2ELi9wJtssap7L7sqf-WJ","name":"overlapN","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            The shortest colliding axis (unit-vector)

            "},{"id":"1TiLoDf028HTtXw3MdMo9","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":"ydQSpsORFfpOukFupWdJe","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":"LUg26RX616FSf0WTfctb1","name":"RoundRect","brief":"","type":"ClassDoc","description":"

            a rectangle object with rounded corners

            ","params":[],"returns":[],"extends":["Rect"],"implements":[],"members":[{"id":"luauQVNTYvEvV5gJ8_qhu","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9W3t84Ua0lSewy7ZDBQCy","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZlUjVbv-9N4nFV6ROXHK7","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FHEeE4b2REN9a3IKpE1mC","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"23UVmI8ZAADm2dRe13tQg","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0IAiXRYvy6QNSb4qmVzAp","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":"mzdqf5NvoW3aEQ-IHFMjz","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"

            origin point of the Polygon

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rS0Pm2a29jacgE9jhwq0b","name":"radius","brief":"","defaultValue":"20","scope":"instance","type":"PropertyDoc","description":"

            the radius of the rounded corner

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wz90xI12Bcd1iJ3cxC3og","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nY49cscYeLCAZ2gdKLy4W","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nEvxzbuRfm9tyE2dzS9Y0","name":"type","brief":"","defaultValue":"\"RoundRect\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gXXD7RGb0Ciijab_NEg5i","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wsNURVySwAqOxQ7J26LPZ","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":"96EY7Oq60gdCmrfpKO0Zo","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":"Bu801V4vdRp4DXS1XBJUx","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":"EF3aro-CGaEVMUYoFeYjO","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":"Ehr1yKkhlvLQ2PP-0iJCj","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":"6tuGsTW3A1eOEyT91aJKv","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":"F8MBtbfLZjTicrnrd-1_f","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":"nU7Urjd5ge3aDmB52hLU_","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":"eAFowyz9lTW9jhgPmtuCL","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":"q88esf3uoQTjrC3DGe3sY","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":"IW--XtbsYvmy3UwLgwm8E","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":"lXTKBwTSmkftn-j4-CEzN","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":"i4hypZLVEGgeGY1l4b_G5","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":"Ec6zd7S6PYpGQAkzX4-2V","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":"fdWlWXWRFvhqicbPUqvyV","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":"6Er6Q93Czt9ex1oehuf21","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":"ehkRrMI6w4_MC9UWYiaqc","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":"Kqv-OppyPO5RE1uT9grB1","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":"4asptnTRIq16e0cwBjt6h","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":"5mflrygOrEKNDvCUySI0m","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":"xg6Fahd3_4gYGHZjp1ovk","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":"g4kcsSG8UmhhDa_749NEX","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":"Kf2lyoBz4RH-QJozAv2kT","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":"UtMTHE4qPuAN2pLoFgDAc","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":"wajtiUvKZuZLiEbxOTUGl","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":"vmoXDnLFrTKlJoVBA8fJj","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":"a0FnoRUtTmUfXKe4wRIsG","name":"Sprite","brief":"","type":"ClassDoc","description":"

            An object to display a fixed or animated sprite on screen.

            ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"Dia6ponQNRD54hcdR8BVo","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":"yBS7WJwWtzX50Z4fdDCrx","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":"DbPQRLqdpQp-8ab9avKza","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":"hvKqW1TSaIJpaHRIYmwpS","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":"b_5Fbcg3gMw-qm8MGbBhW","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            pause and resume animation

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"00cidAbuYuyPwXVTQadWG","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":"fHXGo6ftCZIZw0biAiqvD","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":"jg5Bw_xi6xbXhlRC0w6IO","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":"x7DWDB0K1AkGDzxIPlKRO","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":"n7ZbZd1QE_2U4isw5G0-w","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-DM_H-NK7kzFAYWyr1-lE","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WdvbYpn8PpbsU_39sbjCz","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ywndBCpNksSAr4D3DkbJ4","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"t7HEssU7XnLZUqunF-MTH","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ChfmdkRg7yECO9ktlyMml","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":"WxerGCBouscqkwozLXaBB","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":"3kswPtqUlbFb85PJ0DtSO","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CH5jDPMEYDzzQ8QAEECQn","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":"iI_1vKd-riiXqtkbuKfEC","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":"Rf7PPW-uCkBN_c0zCxUeE","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":"4WRvht10qjAeLcdvH1r_K","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":"bXWJumCMgRXhR0KsxMoY-","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":"hrMDlh87QuXHs2tL1OwRZ","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":"P1imjVU9ffWK_SgsO-Bp1","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1kOaKTrZpufZLrF2tO8BU","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sgpqThuV8wpMRp2V8kJC_","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":"KxvTwHnFV3H6fH6eWghVI","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S3vtTSZNblQqcK_g0XqmS","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":"-dMe6T-OB9_CZmNrUECs1","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":"5c-Q9D_XjJ_E5hwL0EKIK","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":"NUrT5BVjFxOs9k1ZTyVva","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_j3dZfOidvTDUHwtkw9XV","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"G1xJ2AcgxeYiqXtKEbGd1","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":"Uy6Xkp4-T2DeJT9S8ocNH","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":"NsJrc_-OVPfpCvnsri8km","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":"qcc_MwGOKsBHX04okRbbq","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8HVqkkF-xUdz0AMLg29Ig","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NKM8pkqFpOEE7sq-cwJ4G","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":"vC7mT4BvQIcOtErV5hhbB","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8Vq7-_Ey9nUh55tctCAOj","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":"llcAoXgHER15bqhASQme6","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":"TtZ6i7QbSrIB1xozUgBhB","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":"8pOakhiEP7i8Mo65I-E1j","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":"Mf4LA2Yr5we-B-SSMqKOp","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":"YLo5lZCGxbP-BIdQfrJqd","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":"dV5ilWB0xudS2qD_0YgP4","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":"wtDsx_F6IuC0n940XNUUt","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":"dZDeQMbmm-9hCTvxIZuQ-","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":"k3PNC9XoahSYkOt67sddY","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":"iStegz_ykzFG6eRtb7-K2","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":"3OXMAdX9ZKunXUZ3QalEp","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":"JNyrnie3sVx7xS7GWBT7N","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":"nh6ast6G1K_pw2-8csYG9","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":"Wc3WK9c0z-kIfUWfCLeI_","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":"nJ4FBBvuYxKtJVJNenyz4","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":"27f1tsi52eOuLo5Qhd7_L","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":"lnQbHHOJcmbeFKquI1XKj","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":"joRYlgejiQxJ3ed-DFtca","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":"x3B0-aGlls37rj1U_b-jQ","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":"IvNL3S7Q412QAx51JRcSf","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":"RFVVnio_OMGKS3ZFsSjYr","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":"21NOxF77_gNyo7twv46gL","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":"62RGyGYA3YfG51cnsJe4I","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aqDoIq0AB0Ud8IYv0zpFI","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":"rLfylHrA81IH8KeZebZHB","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":"Rb6a0X_NSUzvJ9vEWBUjS","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":"hVllZy0tEHa3hXJ2o979f","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":"E4DrEXuvbZ3SCslJ7ATQ3","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":"ADJ5mHa1vtHodx517t43S","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":"aeroffnokJfjiopXK-2dy","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":"hJ9BNTJXSgGRmjX0gzGdC","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":"vgeYoqvaOV10nusqiZtk2","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":"-W7yKwluwfM3_Mp3xRsKZ","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":"ZWQB-pgpUCfjP0FjqPv7F","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":"gUPV6lLwNGYbqdvI7EBpm","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":"Z6zTokLHICfFHJeQdhDso","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":"_BysXqw9kATD2ih49uqwj","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":"vyvQlB7PKW-IYDspFF6b4","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":"6wA-eEfielD76zF6X1fuP","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":"Ad7S3EHsH0KfjpoO2-0YO","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":"ISIdyhGir6060tn1L-u9i","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":"UroE6fTofG98k4BDGxqG5","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":"xp5Qee7WUr_xvEj9fM1b1","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":"A9aXnWLO1BlrLrNp1h-5z","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":"ZC8skmt8UYZz3cypzd1YH","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":"DMmXm0zOZPLMe1U9atiqM","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":"tTpA28yHiORMoQ0cnCJaC","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":"5pG80itSKG_jIEzlF8hHp","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":"ZAE5owQspewdC2SQrBmTQ","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":"O81Gukpaqq8ublcxGFEPJ","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":"6yDR4vt8-0BzYqfN19BX5","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":"0vNTPjcnuiE10lZkZThvc","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":"E9kOWOUxzTwBOwnNgeYwR","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":"Tyk5BKhY4iCz7pGB9vrbW","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            The given constructor options

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U8CcleFP3564mVCaXEukC","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":"FQz9dnshA_TTT1Xr1omD0","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":"uhnN0rP9BvKkG5x8QBkxh","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":"HjWlTbnzZoc7-agS8Fj-c","name":"Text","brief":"","type":"ClassDoc","description":"

            a generic system font object.

            ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"3NhiflI0VnKiPyk-0RaPX","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":"FIbG1EW8s6umKbRVxJFJh","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":"1HyIJuzo09hnhzH1s80K5","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":"EUZDrLShcvdNI47ZQtvzz","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":"rLGfAAq7GG-696FnynCss","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":"Tm8ULWNCFhE8nNXrfHH1Y","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":"8sE83Gh5jcx541k1n13qB","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":"NgVPx4UDW08Qcfd16NwpU","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Mgt-oLQ4Ls2fZuV9TE1P6","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the horizontal axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8T8vDXse3q1rvYYGS4SDA","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            absolute center of this rectangle on the vertical axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p4eQqvz-Sb9DovnbwcHES","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the renderable default transformation matrix

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uPDhu2HHwbg60ceg9PnZt","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

            the depth of this renderable on the z axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2X5LKsj_MAzvRHaahTS6h","name":"fillStyle","brief":"","defaultValue":"black","scope":"instance","type":"PropertyDoc","description":"

            defines the color used to draw the font.

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MHwiK7Y4rKZaFQQ5mcfZN","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":"iFHPXNMq1nKwG0t0BiUqX","name":"fontSize","brief":"","defaultValue":"10","scope":"instance","type":"PropertyDoc","description":"

            the font size (in px)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VVmVNkwuklgC0BmHmVVPq","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":"9h_mMp8TGfAYOlX9Q1kzv","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            height of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zNO559XW78506MV471EUq","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":"SoRDJ6qaGUDuAsWv-XXwx","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":"ALn3BHeII0TEWCPBd9Cai","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":"KotEYt0_q7YhyjScL7Zta","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":"N8EjJd_HwH9ypf1-HjWkq","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":"WqIUiJfa5fvM6rceMqZ16","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":"iokm1I8i_VDrOprlklDHb","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

            make the renderable object persistent over level changes

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"36nbnff4LwEuGCu_86bTI","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Fe8VZb34cT7a6-_t2rcNV","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":"kTsvRpEiJgsn07gmMteWR","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":"5eYsDg8LgjyMnH-lu12lj","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":"nVlPp5tZww7cQNtrbULk-","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

            The name of the renderable

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r08mU3UIbvoOLXUo2wUJ9","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":"IzG1nHSlSi4u6s4Bx2xL_","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":"6TRzkDbJOFXls2T6RaSYD","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

            Position of the Renderable relative to its parent container

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6UCIZSotRO4K9F8L96Qsz","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WtaVplP6X6xdcFoAtDN1_","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":"QyuVmYZdYFJBsWv0xFzAa","name":"strokeStyle","brief":"","defaultValue":"black","scope":"instance","type":"PropertyDoc","description":"

            defines the color used to draw the font stroke.

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JzpVRLqZ0GKMwWxsPU6ys","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":"-he16sIbnKJXdlysx1pkt","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":"RHNU_6LCViyY6yfwvcnwC","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":"PX6SylpRXL2MO-B2EUCET","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VkFSmGzhyHeJcxLwUhLm5","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

            the shape type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z0vkTJE07cXT9GYFu7JnS","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":"7T4nSWOMtea74sush60MF","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the Rectangle

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rin6_tN4y4OWcXKIaJtgr","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":"aYSooxQYeoLO2_HyXPYIh","name":"_text","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

            the text to be displayed

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kVUZAm-VHoVBfi8v55Pzr","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":"E-3jaZm7nvPXVBTlHO8cl","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":"R4ytiNr7PTArSJfYzJ2gI","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":"xlcL7TnfC9knnt1da5zfZ","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":"Z9aIowBZv7UbNhDKQyu3q","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":"iXiss0JNPYrK_VNaHCQRD","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":"9m7dqts3xb6zN-63uK95P","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":"udNw79HpVx7o4mzDO7jhD","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":"-W5fgQRG3__GKg2rPPsfs","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":"cm8Ob9XOJWV1K5h0XMmb5","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":"4jbjyRKBARfOwpU3ckLOL","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":"fEIdpO7lQjbq16V-ecuq0","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":"sgg6yM-ejv-Ndltr8OL7G","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":"kPREe8Gl3Xc2QP6j-Pb58","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":"j4KBe6GkCKRmxW-qwSzog","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":"O4rkycbNV530vf-ztmsP7","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":"PGiQQrEy7cqTsU0NLs8Pn","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":"TGcZ6uQhxcLLBr3xYNfpj","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":"p59Wf1NR_M991lY2K9ofk","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":"nEbstBXia79PaNFMtwMVB","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":"jtzTzuNmk8uXSDgrugY8C","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":"eZ7Aoo5fDxCx_RXmlNjoh","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":"1Ipf7SJvyvSVEr3no2rhZ","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":"90nv7WieuCOiV7M9l3Svt","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

            OnDestroy Notification function
            \nCalled by engine before deleting the object

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DvqvjQW1BEUbZsmIVFPfR","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":"pMDQnwtIYDt_zXVrVNQGS","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":"nqKKuOvyKPSZsSIc_re0A","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":"s7STSIjVjR5B0plQ7ELJQ","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":"Xs1sd7Z_BkYsV1YDutfMr","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":"vtiFB8e6CAWhYvESOuY4J","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":"vfAOZysOGs3iLap18h3bM","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":"d9q3m0Xm4Ot50s9bJAhy3","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":"O2019RXFhFQeiHb4BRXfU","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":"QjS7V8-sx5LMD7qG2hivr","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":"_Z7vF3WVvqIutlxl_l52Q","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":"gXfQhTAZW46XbQEcP--dq","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":"-7enlTMKbxIjGoC3fAilo","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":"dwXJLiPQ5sFjnK072LMc8","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":"chVstZsj0eP2A95Lm8k1h","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":"8hmsjGQtgndLic3qJhH8F","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":"PsjrdpiP4U9-rP6u4f8DZ","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":"4v58RTH9Z3gUVfCjYdJcO","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":"VpvnHB6rdsljyH0oHAsjW","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":"Ty0hyKx6qirOtCx-DRcb2","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":"tblygpS8QN5S49IMWayi9","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":"2nYDI4vrMg6HvPi4nWkQE","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":"zDDV2chZ4msQduu1VpT6P","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":"iIWe_kGkApoHu7ogNE5oi","name":"TextMetrics","brief":"","type":"ClassDoc","description":"

            a Text Metrics object that contains helper for text manipulation

            ","params":[],"returns":[],"extends":["Bounds"],"implements":[],"members":[{"id":"qlHuOuW2uoLFGldaOFfIp","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":"sCDQNU7Z8_Xi2OgwGS5BE","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

            bottom coordinate of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MK5G8G0b5LDcNlBT2m1LQ","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"

            return the center position of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XQe3oo_aajNw8vlXnDiUh","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

            center position of the bound on the x axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3nH6gc35BF_tJQ2DuUFnX","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

            center position of the bound on the y axis

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gpi-W1e8BzY3FT5Ks-etb","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the bounds

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5tBOvuyIJHkEirAH-DTnB","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

            left coordinate of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xWG6V9SUrQxsUVrzGRpN2","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

            right coordinate of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BYz3izve4S0MnssmU-MRS","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

            top coordinate of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TpeWr5Osp3tV5HsDYfq5A","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"

            the object type (used internally)

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cwXAnw1jtsLv05N06xa9q","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

            width of the bounds

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MCtJ0S1ON3nuJUytDL8ju","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

            x position of the bound

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"X7w6o-ygYGeDfmuVWrNrZ","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

            y position of the bounds

            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uFgmIqMi613AAY3m80UCz","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":"u6vRwYPi9CU8OK1NfSJLq","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":"dK7X8-_o25LeZGVXCz7gl","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":"By979uXYpwqDi_udRNOxw","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":"EI23XkXUpqeA4Iqeb4H-3","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":"nCkIxTGpBhfN8he9UHKU0","name":"clear","brief":"

            reset the bound

            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OYzfLkzusbHr4KQC27PsG","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":"O8Hz-5_ASUp5M-awWiv3_","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":"DedvBgF7q2fRCF5ktmZt6","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":"Ogo2XleFWHteioUUFscEh","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":"RTYKpnuXH-PmtuC_QpXYr","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":"CaW_YQaSFt2Lu9bbK6rAK","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":"36-5nJ215r8zH3mJ-mt9g","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":"KfGuqjdhN37u1y1vzDjmk","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":"cbuIKvziXdTRRlvPTZVNf","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":"_m_2xPSG-cJfEdVe15goC","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":"ZUiOPbfezjYuQMN4zvrFw","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":"7vgK3BWYioOeDuHK4oY6z","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":"FaGpuy3ew4VoPttnMAGet","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":"Sr40cN8FQ6GM8nsvuNvJe","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":"vtdl3e9oOyLq6PCQas8pA","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":"ciHrTcM6FlkS9ATTgICPc","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":"6Zb-gtOEA99mGpOPmPbaL","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":"0B_SzVj-f0HFUpIh20JD9","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":"sIt6nAKV441OZGKfHyim4","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":"QiYOO2fZIFIoMqG4XAHv_","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":"cgH9aG9Baij016nCVeZC5","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":"Z6_Bf60fSSvLegCbeD28b","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":"FMKfKKuLPZkfnMTIJlnJZ","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":"Ydj-bWiGr3FKmpJ_2SjKT","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":"eihzW9qzkLtnQ0uMgl_A7","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":"s9NzPBsOSpZMmxjv0n8Vj","name":"Tile","brief":"","type":"ClassDoc","description":"

              a basic tile object

              ","params":[],"returns":[],"extends":["Bounds"],"implements":[],"members":[{"id":"qOqFBn1RzV2NnU3QwmYxT","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

              bottom coordinate of the bound

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Smq6wfJ-80Ys2D6APt8sE","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"

              return the center position of the bound

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DNJlnAd6u4Z5s-ZbTEPce","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

              center position of the bound on the x axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S1egeTtJgJ_Xcy8OndJED","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

              center position of the bound on the y axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c5L5s3eCWzyIR-8iWdCdp","name":"flipped","brief":"","scope":"instance","type":"PropertyDoc","description":"

              Global flag that indicates if the tile is flipped

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z4KlTHJH7EF-0-NNkCgnW","name":"flippedAD","brief":"","scope":"instance","type":"PropertyDoc","description":"

              True if the tile is flipped anti-diagonally

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MRPbWZFyXrx8LesKEqohk","name":"flippedX","brief":"","scope":"instance","type":"PropertyDoc","description":"

              True if the tile is flipped horizontally

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rpO1Wi54bKRiU9FmoHhMd","name":"flippedY","brief":"","scope":"instance","type":"PropertyDoc","description":"

              True if the tile is flipped vertically

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hAubOqCBGLTGdmxsvg_fq","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

              width of the bounds

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FXY3WH-KlEY-tlzsdEtqH","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

              left coordinate of the bound

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QnwVTpy6G0l2vrIOQ0D1e","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

              right coordinate of the bound

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V6dzmZBu1ZvHNudZcGJER","name":"tileId","brief":"","scope":"instance","type":"PropertyDoc","description":"

              tileId

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"h3D7MNqyGsBWp7Ambz7is","name":"tileset","brief":"","scope":"instance","type":"PropertyDoc","description":"

              tileset

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NanhyurhnwDu5HfuM9ZKp","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

              top coordinate of the bound

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0uU-hW8wuUJDxiPaRzkQn","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"

              the object type (used internally)

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hxJSfXera9XwIkog1yICL","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

              width of the bounds

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dv_3fnfS1tURBgTLpGV2V","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

              x position of the bound

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-9oz1bp4BOndTr-x0bWTh","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

              y position of the bounds

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cisFZaCl4xdI4-zBzA5Wm","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":"3VwZTMSdlS0KZWRLyUH3l","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":"y6MMkG69fxdgDpt2sDD5A","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":"2Ga9MTvCmon_Z1anSFtw6","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":"W5YFzjhAOhSsnKFwgnXQH","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":"bUQLBMrZZki-mr9HwgykQ","name":"clear","brief":"

              reset the bound

              ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"h5xdHq7f49BNvDbcued62","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":"-6DIszmrLflXo5rqgcxJs","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":"hQhFCzp50TUcqXJCS1Xx2","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":"NBjxrr8-4Okd-pHZHqIsF","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":"s_YBZQ1l9oUYxEjW7jjyz","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":"nFN_xiGWh9r77X8bSheyR","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":"Ux8CBA0W7KN2ABJ7I6ZFZ","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":"USZ79ICCIn0OS1cvf8DQg","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":"LcScobFGJoBK6jiNoYgU8","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":"QlhSvvKvsHx2dRcrmT870","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":"vjLjMAdIPHDn8dfe32KYl","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":"anKyXWK4v7fwG6eVPO6IT","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":"G26WdPp4aey0lRasNPOA1","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":"hQ-uB0P3a6aPAX2uCCPY4","name":"interpolation","brief":"","defaultValue":"false","scope":"instance","see":["tick"],"type":"PropertyDoc","description":"

              Enable/disable frame interpolation

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uYxJl8G1r_wF7hFUgMasI","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":"n5IZlRE4VzGede9sSDzG5","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":"2lcOP1TwNEuyDNqjOVC3h","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":"8kbCm4qkrVYwBQaRdK6om","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":"ut0KZ3ahT6XVdcIQCM-tI","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":"gZDVw2QCXLcov7TtJ8e_l","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":"3xSRtJyy0GWOPyHneBTCS","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":"Wm-fUSr1SBspYE97k2qA8","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":"URz71hb07gjMCebBr_2zM","name":"TMXHexagonalRenderer","brief":"","type":"ClassDoc","description":"

              an Hexagonal Map Renderder

              ","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"8ZcI2ZsLvCTFPuVIWf6CP","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":"TBHNwG8BM1SRsVo3gkGKC","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":"HeXa5EstmgFhgmkxJZhOd","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":"8Gxq8WtZ1cBepJeA0jzGM","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":"NYxaOhe8YEmtZV-p_o0Pu","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":"YQuUdtjZmNUfcQCju_dmy","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":"Eth9bSjhDbQobiIEsFz7m","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":"du8pgZSnwGhECRu0OGawr","name":"TMXIsometricRenderer","brief":"","type":"ClassDoc","description":"

              an Isometric Map Renderder

              ","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"FXlnQZNhQe02mMM1iGJtL","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":"5kaXSwtCg-4LRZCF6MHyE","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":"DAud5KcpCVZdp0r5X9LJh","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":"9V1jI7yzcw0ybryyYvriQ","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":"v0pXFbcf_cUZdbBb5sAB0","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":"LBJhSNRaT36-_6INiAJIE","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":"oT-fclStvbx1O0OFPviAo","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":"V4iOxMdSvPYjWYsKHlh1x","name":"TMXLayer","brief":"","type":"ClassDoc","description":"

              a TMX Tile Layer Object\nTiled QT 0.7.x format

              ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"1aKnwGiDP7vXq8mg8mrfP","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":"MGujPe2ddhR2SclHqZKmU","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":"UBP4JYNfTdS9_io2wzWD5","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":"cvD2LVr6yAzsl_5WJZPs2","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":"moMA2tBEoFEOIP3Wpv5qt","name":"animatedTilesets","brief":"","scope":"instance","type":"PropertyDoc","description":"

              All animated tilesets in this layer

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_F9kf-BKrYlLl-rxvltAC","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":"rVG9P2gfpWwevHUQ6elWY","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":"k0Vd4QqKvpbZyoxY0orXo","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":"h_lbUY1-VtSm3kQRe_HFM","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

              bottom coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kSZoJBQgZZXKE97nMUfhA","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the horizontal axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Nss7OOlOZHf39dfCSVHM3","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the vertical axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6WFneftFb86DGx86G2-xZ","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the layer class

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a3eaB-0alZyzRu-3rmmam","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the renderable default transformation matrix

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S-lK5u7YFgKS8sluALfVo","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the depth of this renderable on the z axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b0JbkCEMczMIwCwKBYKet","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":"e9ho0f7yU5YnwZlaTYWvi","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":"WdJP7voykuQKOepUnD5cB","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

              height of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3yp1AEBMhrdMnjQo8FyZt","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":"TeTXhiz61NKahZcsawyJ8","name":"isAnimated","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              Layer contains tileset animations

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IUqVSopJrhTVL5uH2x25S","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":"LNZIIPO7yPWmIg2I-uLdC","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":"CVy1XhZ0CayfJN2HoECyJ","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":"SGDdtFuEizZHsWlOQFGpW","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":"YqwZJ-JLZykhI7siL2cBo","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":"quQbSXudFvyqmu_zegri6","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              make the renderable object persistent over level changes

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XQC0JtrIwZebkdhw_iYmE","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

              left coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-WsJW4LXnf1AA3j0XBnbh","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":"isuu-55RDztiBi5Wf1WHF","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

              The name of the renderable

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"unGImjExazBa0Ow_dF0TQ","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":"JDi75W6LGPiR2aKrXL8GB","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":"E7w0iFV_iFJ4RgTndI4z2","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

              Position of the Renderable relative to its parent container

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3Uy-ABqC_sti25vPHgiFo","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":"KdP6CSkWhl2EflLTSbFT5","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

              right coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mtNVKUZCdD0Y4q2x45mKP","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":"qpRBOscjCjgM0pcEs92_p","name":"tilesets","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The Layer corresponding Tilesets

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s6XF4T2QrgtZdHFXII9AR","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":"PwQOmoibbHL0iHeQy7B3l","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

              top coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mbFfsVfbGBFbk0GgMPHZI","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

              the shape type (used internally)

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mFGRmnO4qMBlNOsFmxsgd","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":"EMpznrieh7avkmTRuS1J8","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

              width of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WbzGu9DpsMp-W5d61rP0H","name":"x","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

              Horizontal layer offset in tiles

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XLHxg3VZoQTmqN9TaCRzU","name":"y","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

              Vertical layer offset in tiles

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pv3Cu8EYMEdgVi2l5RD26","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":"_3-u7Qr1dTtmsaB4JBXey","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":"W83_wcbGRxZT4AazDJ3j7","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":"FUzA9Bp6IYeHaHS12Quq2","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":"FzhJwJBusRaNHyp22xUFz","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":"_1dfaslHdpmbp2SaYntKe","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":"RrwrOSzSKfiWW7wEnRYpi","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":"dcjfaWEyySeBLPwVaaA0O","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":"Ej4H4BQaly8ZvnTRM0ux_","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":"vEIqEP6wVk5K4E6_cSSYu","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":"4sMDFO1775TD_70R3kx5R","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":"naiQeuCkU5Uh6GCS6KG1G","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":"Cvpmg21WecREhFRDEKI8p","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":"Jjzfw8YusTWwJXipa8p15","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":"UAPzur3fDzFb8mJ2oys5t","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":"z6PREP-Wk3zmF3WIMWc33","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":"64tCt0sAAYMyxn7W4ED71","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":"VYf-saLDWOWxjNgzSvtzT","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":"8HKzKEOqliMtAixYmPBP1","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":"YfcZaOv2UWaZ9IKh1OOOx","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":"DF6-uMK0lPZEwhU5mB6fz","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":"-xAOlBR_aTg8iP6PZipc6","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":"JU2nSDB0yPyMGp4Uk6AeR","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":"gbTsnw3epXx_bYBIY9yGB","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":"Qi-HANfvSl1hLNlpJgfpM","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":"lILkDAnbtKgedNEDH59AB","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

              OnDestroy Notification function
              \nCalled by engine before deleting the object

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wahOD2hxDOlTc_gQYBf06","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":"QAiuiW1IFYwpeKWgKwisv","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":"2I9tCNRh1Si5_GJWii30h","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":"9-QreaE-nIavQ1T3VY1bm","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":"-giNvH-ikDhnbVL5WZG3g","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":"B40hqE7W_DKeAOkNny_w1","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":"qsUlriYTDBpz298eCwX4F","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":"8_1jeoyNPCp8DLnRDNfFM","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":"LJKwFExrTBXYeogAfsrXN","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":"GXh6MF2n5HxEx18fzqb6L","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":"eiHNuan3IckP-orGqafRV","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":"ZH8MqltASZ4Y6o7qP3v4f","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":"x0D4B8HJrvyG6zvTmqdcf","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":"BVyPQIM_ym-o89KUu_Uq4","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":"pNU4ByMCHelcm2Mx1cmQL","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":"QuhlizYbyEOrvJEkWsGWg","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":"L8x--xy7bv6sBZFUSTnHS","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":"1jA8AQmHlDV-kKJ20MNB7","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":"A4SVn4Py3Ym35DqfgCgW9","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":"ayOFIFVH_4t-fTpmHdEaO","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":"LIsoI1Bx0rlRKhrRzIRqK","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":"R5JjrMD-EUAmdn8ePsqZj","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":"AyYCOWEZPuPGKCbf4X0M-","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":"8oo6QnBvE0ykA4m-zpqRA","name":"TMXOrthogonalRenderer","brief":"","type":"ClassDoc","description":"

              an Orthogonal Map Renderder

              ","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"ZPO370tKKox-wZlO7lZFP","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":"K5xvqgWpC90bYnNblSskT","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":"QTZTmGySHFQBOeQgwvuxu","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":"QYGUa2GTyZ1x6wXa-Dqge","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":"tLUunpkRY7c4cxwrnz1pG","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":"Q_S0E2LqUV2anRvcvWfVo","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":"tv9vJ8N1l1MLNaiWc8zyo","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":"khWQ8XLEC6yGiMBY2NVO3","name":"TMXRenderer","brief":"","type":"ClassDoc","description":"

              The map renderer base class

              ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"-KoZl_Ke6iCcTQqs-BTfj","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":"ClrngLyBGxEzd7M005Cbb","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":"B4e4KTTrC3FxM5yWgrjMG","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":"6nPfYlo5rTyuVArlQP-_t","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":"Wx4KuY29UN1SlfvsKDgDb","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":"9VeXG4rxSihzzcxH9T_5L","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":"AGu49cRCyWzx2uTst_jXJ","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":"9lcK3qGkG82CnplS6Nowm","name":"TMXStaggeredRenderer","type":"ClassDoc","description":"

              a Staggered Map Renderder

              ","params":[],"returns":[],"extends":["TMXHexagonalRenderer"],"implements":[],"members":[{"id":"ROU2h7mJ80sBez5jUzOfh","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":"JrUG7e50Arv7s9MI8mBO8","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"TH73jFZVUXqzRr1TiGc5u","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":"bLZuOIwxz9vLlfLM_ChVD","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":"A_fjD6yPlpR1a2Pyze1QS","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":"nMRShBrFXZGayL_a3r6IX","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":"GSHxTQ1hf1zaVunNmI91L","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":"PEVWZHgjn9yuapR7EzaFa","name":"TMXTileMap","brief":"","type":"ClassDoc","description":"

              a TMX Tile Map Object\nTiled QT +0.7.x format

              ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"AGbV2cTn4qXIw6eIH5ceu","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The map class.

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NZkhQriFjxehVCwrMcy7K","name":"cols","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"

              width of the tilemap in tiles

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Luy7f6gDCPJopl913T7RD","name":"infinite","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

              is the map an infinite map

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zvk3Fhv748Gpn-hPRP7j9","name":"name","brief":"","scope":"instance","type":"PropertyDoc","description":"

              name of the tilemap

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vXwhLq1aCE_H6dReJqdyg","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":"XsKsYjmGxQ-lEXLC7KfAN","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":"9bI1SdS1Bk30pDBSMfIKE","name":"rows","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"

              height of the tilemap in tiles

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U5FbipwWRm21qbnTMKvpA","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":"KCneUjtjjhqo2Bkf2-gUf","name":"tileheight","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"

              Tile height

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-EiSDsI4gttTJWiwNo0bC","name":"tilewidth","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"

              Tile width

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ylmprKjeg-uvB16YWYSMU","name":"version","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the TMX format version

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"174DQEv02eXu-heR7hrWS","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":"p12DUambSIO2dVHPDOKzN","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":"GoxUIANOG8SsPRfAU8XB0","name":"destroy","brief":"

              destroy function, clean all allocated objects

              ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"99Jpbsw-kz1_IBkloHvnf","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":"dtxAudlt7AkjpE77P8fGy","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":"9naC-p7oq_D4YYN4CWQKh","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":"yaCyXOw-X0rJT8_hP3J45","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":"KYXYx6Z1iBwERnjjxyDOp","name":"TMXTileset","brief":"","type":"ClassDoc","description":"

              a TMX Tile Set Object

              ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"ih77_IuF8QH-PAwCZ-6rs","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the tileset class

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NpYm5Z8zymok9t05063WS","name":"isAnimated","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              Tileset contains animated tiles

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I2IwklLcnBDp2K3okLBo7","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":"U6CnpQx3nDMcnohkYOiX7","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":"Rm4oCwZTu5Crsi1fvRX5Q","name":"animations","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

              Tileset animations

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i1Ine35xRDglFgDwB8148","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":"2iak2lgKkiHid1wkDzQtf","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":"2S_2muKb3g5K0r-Oqdyjm","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":"lJfMFrBxWQK2Tr_A8dZ1I","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":"vCYvtTiHZcnZdDLjlE3TZ","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":"mF6X_X3NJTBFPcg1cR3gz","name":"TMXTilesetGroup","brief":"","type":"ClassDoc","description":"

              an object containing all tileset

              ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"RIAGb4kfsPWaENOfuKsdL","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":"v1X7I22WnSzm0Pn0ewKsP","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":"_8SVrXiElaz0asU4g80gJ","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":"kLHwY-BbSOoXuoOmRHvO-","name":"Trigger","brief":"","type":"ClassDoc","description":"

              trigger an event when colliding with another object

              ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"qqBZJxVd3RNrCsrGeAHC4","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":"ae3SFWrBjpeVMNrmWGb9w","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":"Qrsts5IpGtNWiLS7HJd4c","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":"TO1LDvKdSUb7T3u2OXGEU","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":"OVPMC58cXmL0l8VpuSgEW","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":"gVmtETeKSMxpbhL0EFHpN","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":"PgLqxWPC_jbN9v6KG8ED5","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":"fLM5kv5VG1haKDKb6B-rt","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

              bottom coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sJ8SfsWRRamp4l66VVCEy","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the horizontal axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HhVhiEoSdzeX_kIh07Ly-","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the vertical axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e0y3c2dymBu5QoIr8O_q9","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the renderable default transformation matrix

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ny-xuCGM978ZTfV5wVvoy","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the depth of this renderable on the z axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xSHx7Fj1NJTaJRJp_5QRo","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":"To1kk-Vl0bg0Z8vtuaafW","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":"PHRCaL9-yabqm-zACfMOH","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

              height of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z20yz36XYFeO0xdyGw03m","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":"TuVgBEZewdwKsj9ca-mTV","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":"Suo6QgXVrZkVIBB5C5I5b","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":"f_0_YfDNtTpsJQuVQkTwB","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":"o5OZeVkFP--WoxhLnxg_W","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":"LL88Vf136rGeESVHksHhA","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":"8UZZaSMM8tyTKX0gw-eXU","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              make the renderable object persistent over level changes

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jNHTQxBD2ntOIGEvJanws","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

              left coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vzK-KHJZrArHN1H5I3Uyw","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":"uJ8KMCudUWJibDWXPXccC","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

              The name of the renderable

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9YNxLpMBB7qw04mdW1BXw","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":"sRWBEK8Wr9HLgBLKLcvkz","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":"TwFWc9pPOTi0Btl38gD-T","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

              Position of the Renderable relative to its parent container

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N446xTRcDmEPAZ93xHkKA","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

              right coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LGqWt0fLtNBGRdY98vfKm","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":"fHkppFBc3K4kqENks8R0r","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":"Tl1gLSs_5dsJapBk2t-I5","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

              top coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WjIClzErqkmCwjgTbWGnO","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

              the shape type (used internally)

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Gn0gNPO1v5J4Dll1RjARs","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":"7sbU-AjkCUmcTrz-9Wx72","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

              width of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-XDoZDI1_fJuk_ppdYY46","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":"ora8f39Swyo737ix0RWC_","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":"R_ZFfZy-4yHw_ZqQf5l0s","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":"xb8pG-N7P9AdHTIlsy-ZQ","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 | 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>"}},{"identifier":"settings.duration","optional":true,"description":"

              Fade duration (in ms)

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.color","optional":true,"description":"

              Fade color

              ","dataType":{"tokens":[{"value":"string | Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"string | %1"}},{"identifier":"settings.event","optional":true,"default":"\"level\"","description":"

              the type of event to trigger (only "level" supported for now)

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.to","optional":true,"description":"

              level to load if level trigger

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.container","optional":true,"description":"

              Target container. See {@link level.load}

              ","dataType":{"tokens":[{"value":"string | Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"string | %1"}},{"identifier":"settings.onLoaded","optional":true,"description":"

              Level loaded callback. See {@link level.load}

              ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"settings.flatten","optional":true,"description":"

              Flatten all objects into the target container. See {@link level.load}

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"settings.setViewportBounds","optional":true,"description":"

              Resize the viewport to match the level. See {@link level.load}

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"Nuh54wku1OqsLvYrMHdhd","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":"vF0X4_O4MFeurzyrWw0qF","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":"JD9bslE8TcNZ7ivJ_03L6","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":"eaa89neCbBdom2uDuvPun","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":"V5E56TF_3sNwLl0ueMLqA","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":"6NM_a-ZqVD-erxc5eCuFd","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":"DCB2KDvNSoTXJoYTtY_wY","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":"_4w8Ee4uGpiKDsepKmNkP","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":"4NMiEhHAA_KkxdGAW9wCk","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":"K4aRpA_penrF3y9-ThQsJ","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":"l9iMs_DkC5gAbzBITzk3B","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":"HTFqpxXuBXwL78Z3keckv","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":"Kc-gwWpPPxLDu9azC3vSc","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":"GHfiTcZj1VuJx5hgSlA-M","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":"Jgiv16hs84fIt3gv0ARic","name":"onCollision","brief":"","scope":"instance","type":"MethodDoc","description":"

              onCollision callback, triggered in case of collision with this trigger

              ","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":"N2EPvrb-mi2HrfvE7alfA","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

              OnDestroy Notification function
              \nCalled by engine before deleting the object

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oV6hvOAbKHLUYJ27uSF4a","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":"toqtEMn8P6Xf92nrK7-aE","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":"toOR9xizFJbO6sK-Qhmvy","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":"IHVY4e9Zjt_a6EP2iJgxP","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":"TAv6xImtb70Ss5IztY7Hr","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":"olQD-VmMKcoDAJY4HSVF1","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":"GdIPPlgEBEXYJyim23t0Y","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":"_FLR_qiAAj7ZisxuzUz-v","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":"1Tv4sls12C4kCnjFsqe9u","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":"D9HcvrLJjxoX9kKUPXmiv","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":"_uljBf0NQNBGfqvPhzZib","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":"f-a3pVVezE03NkfaARyl2","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":"D5LvgqJ6D0EbEWwsLzeiU","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":"3sDiKHN-2mT5Rzh56NRQp","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":"-YM-oY4t93cM9bbbKHjSq","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":"eOmynhaGbWwaxnG7mFXl7","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":"tWC69NTN0k43ByLXWEhtP","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":"jJaNp07nvvzTIhs3b-PvP","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":"-bt17KCuZIRM_-Z96vlIK","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":"Biurav5Dqrt4gcVTZwKOy","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":"SUnXbXz6-RDHIo_s_ILt8","name":"triggerEvent","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"

              trigger this event

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hIZN6nF_3Af1eNncfuQni","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":"-fd-y9TzxA4Wz_S-QOXAO","name":"Tween","brief":"","type":"ClassDoc","description":"

              Javascript Tweening Engine

              \nSuper simple, fast and easy to use tweening engine which incorporates optimised Robert Penne...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"g6zxlpap5rH6DZg4HIfjg","name":"Easing","brief":"","access":"public","type":"EnumDoc","description":"

              Easing Function :

              \n

              \n Easing.Linear.None
              \n Easing.Quadratic.In
              \n Easing.Quadratic.Out
              \n Easing.Quadrati...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rSO5cpNAvQOA_XvGQWJqR","name":"Interpolation","brief":"","access":"public","type":"EnumDoc","description":"

              Interpolation Function :

              \n

              \n Interpolation.Linear
              \n Interpolation.Bezier
              \n Interpolation.CatmullRom\n

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Jj2wnL00HmPt7s0m58mK_","name":"chain","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              chain the tween

              ","params":[{"identifier":"chainedTween","description":"

              Tween(s) to be chained

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LzY-fkbzMFO-BmmzSVf0-","name":"constructor","brief":"","examples":[{"caption":"","code":"// add a tween to change the object pos.x and pos.y variable to 200 in 3 seconds\ntween = new me.Tween(myObject.pos).to({\n x: 200,\n y: 200,\n }, {\n duration: 3000,\n easing: me.Tween.Easing.Bounce.Out,\n autoStart : true\n}).onComplete(myFunc);"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"object","optional":false,"description":"

              object on which to apply the tween

              ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"NXgwDn-zsqu2MtqTJOrzH","name":"delay","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              delay the tween

              ","params":[{"identifier":"amount","optional":false,"description":"

              delay amount expressed in milliseconds

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Qz5Fape9wmLa2loa-R2al","name":"easing","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              set the easing function

              ","params":[{"identifier":"easing","optional":false,"description":"

              easing function

              ","dataType":{"tokens":[{"value":"Tween.Easing","kind":"canonical"},{"value":"Easing","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ro3KNRAEU6JStYYvh9UEv","name":"interpolation","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              set the interpolation function

              ","params":[{"identifier":"interpolation","optional":false,"description":"

              interpolation function

              ","dataType":{"tokens":[{"value":"Tween.Interpolation","kind":"canonical"},{"value":"Interpolation","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bI8UcXxfPrfVsHjM5h6fR","name":"onComplete","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              onComplete callback

              ","params":[{"identifier":"onCompleteCallback","optional":false,"description":"

              callback

              ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FnBj6gJ4i9Ouf9PWw_--n","name":"onStart","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              onStart callback

              ","params":[{"identifier":"onStartCallback","optional":false,"description":"

              callback

              ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JJVvunRND1sj5P9IXOuwg","name":"onUpdate","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              onUpdate callback

              ","params":[{"identifier":"onUpdateCallback","optional":false,"description":"

              callback

              ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"htSiBojM8q0_fAL_FUcBW","name":"repeat","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              Repeat the tween

              ","params":[{"identifier":"times","optional":false,"description":"

              amount of times the tween should be repeated

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZPsYqYQnKsCyQCIbUHJx1","name":"start","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              start the tween

              ","params":[{"identifier":"time","optional":true,"description":"

              the current time when the tween was started

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Q93Yn4bb4SO-r4fKD6kPh","name":"stop","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              stop the tween

              ","params":[],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Pmk972xAxiRrxjZuTz8be","name":"to","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

              object properties to be updated and duration

              ","params":[{"identifier":"properties","optional":false,"description":"

              hash of properties

              ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options","optional":true,"description":"

              object of tween properties, or a duration if a numeric value is passed

              ","dataType":{"tokens":[{"value":"object | number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"object | %1"}},{"identifier":"options.duration","optional":true,"description":"

              tween duration

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options.easing","optional":true,"description":"

              easing function

              ","dataType":{"tokens":[{"value":"Tween.Easing","kind":"canonical"},{"value":"Easing","kind":"link"}],"template":"%1"}},{"identifier":"options.delay","optional":true,"description":"

              delay amount expressed in milliseconds

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options.yoyo","optional":true,"description":"

              allows the tween to bounce back to their original value when finished. To be used together with repeat to create endless l...","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"options.repeat","optional":true,"description":"

              amount of times the tween should be repeated

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options.interpolation","optional":true,"description":"

              interpolation function

              ","dataType":{"tokens":[{"value":"Tween.Interpolation","kind":"canonical"},{"value":"Interpolation","kind":"link"}],"template":"%1"}},{"identifier":"options.autoStart","optional":true,"description":"

              allow this tween to start automatically. Otherwise call me.Tween.start().

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"psWYzSkrZHwkTHZmvJcxE","name":"yoyo","brief":"","access":"public","scope":"instance","see":["Tween#repeat"],"type":"MethodDoc","description":"

              Allows the tween to bounce back to their original value when finished.\nTo be used together with repeat to create endless l...","params":[{"identifier":"yoyo","optional":false,"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

              this instance for object chaining

              ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"4EaOAWieiEczLxUgJ3c6F","name":"UIBaseElement","brief":"","type":"ClassDoc","description":"

              This is a basic clickable and draggable container which you can use in your game UI.\nUse this for example if you want to d...","params":[],"returns":[],"extends":["Container"],"implements":[],"members":[{"id":"mdwTMCcYypgUdCQUrb55_","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":"Zca58TdmXQ7zmj2jVkcKJ","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":"9S-mLK-KcF_J60hUPLtip","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":"O3q_70UzXelH9avjJoVEq","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":"ljBiW7YpyxDwRZHWMFIW3","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":"kJ8FefMctBUybWrqlCZTX","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":"7VaYdJ1znD7zZJxHSj0OM","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":"aczQbbfAbeMvXCIAhqU_T","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":"o3LzF6qXzTVU87mzu2swF","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":"SGa2JOEx-E21droIbi1RT","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":"hLv5bLTzyIO_n9VXiGqIy","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

              bottom coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AQ0oMR6fRassjqZN58927","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the horizontal axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6QUSOD0fJbv234w8mTYqM","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the vertical axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZsVcBAlOkTrVEDAFLfAFz","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":"6DpDhbM3_RheZu7b5dA2M","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the renderable default transformation matrix

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gzMQ9Men8OEP3WFrYFUcY","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the depth of this renderable on the z axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0EBk4mvcVxFJP-jdJOPjf","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":"uLLkmHlHJyWGICcVsuYFR","name":"floating","brief":"","defaultValue":"true","scope":"instance","see":["Renderable.floating"],"type":"PropertyDoc","description":"

              UI base elements use screen coordinates by default\n(Note: any child elements added to a UIBaseElement should have their fl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g1UUvE-hOqEpUGKglAnnu","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":"7SiNR_XqinuDoMhjDfR2_","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

              height of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3F8ECuicke-qcR5nQw5rk","name":"holdThreshold","brief":"","defaultValue":"250","scope":"instance","type":"PropertyDoc","description":"

              Tap and hold threshold timeout in ms

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mUkZ7ZS2sgo9GglkGESCX","name":"hover","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              true if the pointer is over the object

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4_wOf8NH7owm9ZouN1rPq","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":"PHdr9Q9p3X-Bp4jrdAniA","name":"isClickable","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

              object can be clicked or not

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qMlQhhXSJSKOSb8Sa1Izp","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":"TT7jwSVRSqkbg9s4hhoRX","name":"isDraggable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              object can be clicked or not

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"klfww2oOwNwvY-32srFK6","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":"LDn06nNANMj__D6btAd33","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":"fupU9n6Jnek_evLCN7Udd","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":"8mDFfxvuRY3WF2cLxHXbH","name":"isHoldable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              object can be tap and hold

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1NyNcSGdqWSISxBnSBTBN","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":"B_dG0IvO_5QxzoXJCd6ao","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              make the renderable object persistent over level changes

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bkA340P99wbu2ZszhO9kp","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

              left coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zUDrENVVUXxOYhykr37XS","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":"kkfV4H98HIBoQ58Nc7xW7","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

              The name of the renderable

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lotXzUwqRqm6s1Av5Doc4","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":"5OLibfMR2l-ofOEYQ4KnI","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":"M7y3dXpTr_ymiacmx8MW8","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

              Position of the Renderable relative to its parent container

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FXSpbDOGVi9Gh4o8olF-v","name":"released","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              false if the pointer is down, or true when the pointer status is up

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZPshUxAEDreynZaGG5INl","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

              right coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"A6x9dOSO4LzdVUEDcn_Jr","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              whether the container is the root of the scene

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6gGr8JKxTv7gwQo0cRJJo","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":"Jf7qx8okFC9iSfP1cSDst","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":"BZq7ESrGNGQ-mOTH6LRQr","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":"IUyYiv7-Pa-za57eIgOOi","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

              top coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fV66AYVgJbwJWb4A6A6jM","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

              the shape type (used internally)

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U49vnKTEXHIfJQfVaccEA","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":"jfHQvW3kNS04idwTLCccV","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

              width of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jfwCMVSvMIpjQqX8xmaQw","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":"lJuLWmnfl1-Gh2Rq4JjWf","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":"GfNH6yFrCJPxqd10lblcY","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":"0khRC-dAzq5H__du-gs50","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":"pmjLKdMfZecQ7x1CrkYtd","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":"WT8O2TjBLsd51KsKBhFNN","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"

              The x position of the container

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

              The y position of the container

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"

              width of the container

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"

              height of the container

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"66fbYNYfK7i-mHVwIf9HF","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":"IHAY7z6iHG1eoBnzJ51wj","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":"o0vnfYjWHjiLFG8M13pZF","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":"wlvQ_mjonL45WzjpXV7lE","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":"q3q_xzALQtcO4UhOHDXv7","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":"pwVPNLUcrqwRgW6BPSKau","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":"suLfGFLPpTXo1LpYeSwws","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":"yKCTztFwMYpw2Mt6ybGot","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":"ftFjHGs37vLNc90nlmF8C","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":"hgfaQpP0lTFitIKvHySCT","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":"OHvM8x4d5nBrkWQudlklj","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":"I2-Dj2OvFqYI6v9x7jgUU","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":"HDfAOja4RoiGD31SdEPeq","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":"0v-XPBdzOdfvzNGcna7Pp","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":"BSXBz6YfvLFc9K-kUQze5","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":"s11Bn301b5XClQTHoSWYS","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":"gKyjFLrhEb-69meMaGvb2","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":"AwReNwnTY-LuUwC4pEMk0","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":"61rlsn8LiCnp49Ji2QPz9","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":"iFbzpKJGqDzVIXxCUbjgi","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":"7URFDhA0jLY0rEV5k3ZIv","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":"TZU0ESoYut8KRCGlPp6Y6","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":"xNNr51Sg_CD9V-_nW6ezk","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":"TLg5yjJoHVPDQDgNhi93X","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":"_V_F-rreO8OFZVCU-GfNa","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":"X32MmIYfH5S0X4gyGYHic","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":"b8bmsVMyC4rXpXkztTJST","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":"_i2jhZbqhpK1Bk8FaLsLa","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":"JLH-rigtJY7OV_1V6zIZ_","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":"jxE5RgnBxnCzPvvdFv1C6","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":"8SV6CVTKVe92HlTuUUAso","name":"onClick","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the object is pressed (to be extended)

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

              return false if we need to stop propagating the event

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"1I2FKIeeUkqOzz8Zs5TYF","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":"9RsnvNrtorEdmnl8DPqCL","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

              OnDestroy Notification function
              \nCalled by engine before deleting the object

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mXkGnU2o15jTI-4R-kuh1","name":"onHold","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the object is pressed and held
              \nto be extended

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VerLd4AxuCZIHH0lmUyJX","name":"onMove","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the pointer is moved over the object

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"jFZSVfcAfnKDTHEW6abMM","name":"onOut","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the pointer is leaving the object area

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"6Azudjqd9bynw6u3lc6OK","name":"onOver","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the pointer is over the object

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"UtshCvXzfmnxv__xw_jEC","name":"onRelease","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the object is pressed and released (to be extended)

              ","params":[],"returns":[{"description":"

              return false if we need to stop propagating the event

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"vlQZNlj4hvaJLF8GVxvIX","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":"xF-yzcX18yphnYamhNs_q","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":"Nwmb7YFMcqLV-f71JWVnD","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":"0ME0f-z1kLDyF9XazIqe_","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":"C6AFF0Wrm1prW-eNv8i-I","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":"anMSO-4C0nfVxaGgVSTJH","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":"sVGDOshAejKcNHdncuZ8r","name":"reset","brief":"

              reset the container, removing all childrens, and reseting transforms.

              ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pLdRAHOYteUTZy_9wQrDU","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":"aPAozDzX8E9S0AURUUc1v","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":"UMCr7Y0wM5bKB6jqYZRbW","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":"kj6qNa3o7uwulREonASpa","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":"MZVy7nvR9e2EbRICBfbHu","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":"6rF_E2gL2T5KIw39XsjIA","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":"E7UAfYn_IW8z1iEUGwyB8","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":"RJY84Qyb4mNtm3acMQuu-","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":"SU1RTihntE-Uka8GB9NN5","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":"5qbeV51-O9exDSgaIMrTS","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":"ffAvmD0iWpq8-4SstKEMf","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":"rqa1n48G6Bmf7kgwhhHvx","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":"imUhFCLTIAgllBICKy8QG","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":"u1mH5aDQRzl3_YxGUWafP","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":"tQh1y9qzgtidF-kmfKKbv","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":"Linn6-8mjdJXzbP9-4I-u","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":"agfEo5YSQ5ddUYmU9I6Dx","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":"Jn6YlLzLh4mTNRw4JGsgp","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":"jfzxV_2E73wnONF_AWEXw","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":"-00wOSpYoNxTLhBNZeQi3","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":"LYnGlZOGPYGomel3oebHj","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":"8Ym3wU2cUogEGbwW-k-NL","name":"UISpriteElement","brief":"","type":"ClassDoc","description":"

              This is a basic sprite based button which you can use in your Game UI.

              ","params":[],"returns":[],"extends":["Sprite"],"implements":[],"members":[{"id":"6v53Gj2YUUUS16gISJ5_6","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":"UD-Ch6zwu7OE8HzN-lZcu","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":"ZV9YvWTi2M6uuS9QxxGfe","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":"7JFNuqPAZOZjuBzsZ2jOd","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":"khbipaUPbh_V9gzrMdlNF","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              pause and resume animation

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"63r9RnJ6QcYcy5IwGiC30","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":"FIrpkKdli2OxiCX9nADHe","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":"ngshgmGdGWvPXZiA8amFt","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":"ztX77ar13Fi2Ghtt9d7wq","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":"tx4hrjOgiNEWskNyH29MQ","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

              bottom coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9Q1jE_lVGhf86JW6VRccl","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the horizontal axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pqkY9ON2dAPdB80Le2ere","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the vertical axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a7HhNtF029HZLIyBTdbKw","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the renderable default transformation matrix

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mQpIv7sfcLqI54VmnyP6n","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the depth of this renderable on the z axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2IVZk5uP2S1-0yjkUknrO","name":"floating","brief":"","defaultValue":"true","scope":"instance","see":["Renderable.floating"],"type":"PropertyDoc","description":"

              if this UISpriteElement should use screen coordinates or local coordinates\n(Note: any UISpriteElement elements added to a ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4nY7Yf4SQw-x7F2SWvHVC","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":"9AIH0MtsLRxRRsIZrbYyd","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

              height of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gmag-S1hbspxTOup2Xtg5","name":"holdThreshold","brief":"","defaultValue":"250","scope":"instance","type":"PropertyDoc","description":"

              Tap and hold threshold timeout in ms

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EcnExtaHR4_e8Zwbs-IDo","name":"hover","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              true if the pointer is over the object

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EccLpjG9vTWwuB6YIvsDC","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":"mjj0gDP2klIfrsCqH4jDr","name":"isClickable","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

              object can be clicked or not

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9Q8cKWU1UINB-J0ZwQswq","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":"aS8WGebTta1nvlb6QMRBO","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":"wuDa-sG5-lbtDrkteu_am","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":"rF6_cQOd1e1HOArDlFrYH","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":"rhYHvpK0xZxdPv42j3uBI","name":"isHoldable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              object can be tap and hold

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qOB6C3_kVcmrsbAfvnocF","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":"v7SSzHeeqT-L4gIFQ5NiN","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              make the renderable object persistent over level changes

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ruh5x_rxBFjoAJw-cmrTB","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

              left coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mrRu3LmMhZlo_kHlnkdXS","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":"x0YfROUTBtEv6_GU7y7oj","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

              The name of the renderable

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U0ldfFiE9gWbx6jdEC5XO","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":"V29Xe2KoU206lMYv7AQgf","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":"O8OTfA3PyNlJ3D6HDg_Xw","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":"S_K2uw6cqPfx-ii-pTiXU","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

              Position of the Renderable relative to its parent container

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MHICbVmlzB2hRFmEoYF47","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

              right coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v28kLu_H9snLDk-lOR6OU","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":"5bHJXHga6OnzXRvtBbeJM","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":"tg0QMfZp4kfuV387fPNoe","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":"klOkMhQ4TqmoG6208Kbvf","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

              top coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qQzJErsyBM7aiU8PfTBl-","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

              the shape type (used internally)

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VlyoK11rngbwIBH9Wk2B2","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":"pK1cSSgdead0QhsA88bxR","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

              width of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xaw-qTAqhRogeY9ID0S8o","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":"tNTxFCgNZxH7X3cVOFQ-b","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":"o0AhIJwcVRVx9iFyixVmH","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":"Wbht5wfMjSKUn5SytPeKe","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":"NVWqnQ8LgRkWAKUeUA375","name":"constructor","brief":"","examples":[{"caption":"","code":" // create a basic GUI Object\n class myButton extends UISpriteElement {\n constructor(x, y) {\n // call the UISpriteElement parent constructor\n super(x, y, {\n image: \"button\",\n framewidth: 100,\n frameheight: 50\n });\n }\n\n // output something in the console\n // when the object is clicked\n onClick(event) {\n console.log(\"clicked!\");\n // don't propagate the event\n return false;\n }\n });\n\n // add the object at pos (10,10)\n world.addChild(new myButton(10,10));"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"

              the x coordinate of the UISpriteElement Object

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

              the y coordinate of the UISpriteElement 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":"Zl-LGz-DqrmbkIt7dUYOJ","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":"1YpD8m-BZQ1JV_erRCtR0","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":"T2jrHwZ8ebFwR-bPH9HMy","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":"QAmn1PeOEYa6H0zl0rAnH","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":"60YXdt2O8WjQgEmViG0rj","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":"gfxR-Ard2RSSo9AoNrzNi","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":"QhLduvw8LPamzu21hpbZ-","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":"GyhRt-qWSFaL0yRBPf1um","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":"8P7MeKxC8iszgfH7MKwcY","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":"D8WC9dk3rzwVUpaNf-3A_","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":"_Q6YUlRF-2LLAcyydsnNh","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":"gJ0FNGMKc4A4OMmjOVSb6","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":"RP6mtzm5xfx67AnwRa0a-","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":"B9ZN87Kv9fWPLNe6vJg_B","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":"5Q2hCBSzEPTZsW3-UpYfu","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":"y1fA_fpgjbW59md9dG3Co","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":"BkX3WCccBpmGuPOxMdijZ","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":"XO9-0EvXgD9tv3-zzo9u9","name":"onClick","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the object is pressed (to be extended)

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

              return false if we need to stop propagating the event

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"8JfKODBqaY5Er1rk1b3g6","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":"n6ni-_S9O6bpXCBwc_yrx","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

              OnDestroy Notification function
              \nCalled by engine before deleting the object

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-ZfpeoSnGPjPscacKIQpU","name":"onHold","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the object is pressed and held
              \nto be extended

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2EvosU1QT5XCyPtFB1mLZ","name":"onOut","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the pointer is leaving the object area

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"yY9df91pfn-KzY11e7zlu","name":"onOver","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the pointer is over the object

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"C0le_CvAF-X-knMHKp_te","name":"onRelease","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the object is pressed and released (to be extended)

              ","params":[],"returns":[{"description":"

              return false if we need to stop propagating the event

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"wPV_7Sh2zsUY_MgXQjOXn","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":"RlLyazR4uKIXkbvbHJzYJ","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":"r2a8uKj4WyLAril9AwTp3","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":"PwdCuJwcgMVViVPbYZVEs","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":"vA8PQHG7EieksL5mUj5u7","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":"s-rg6AsAOivZ-BoSQwxJj","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":"vGtp4r_0Uk1svdl0JBmVO","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":"q_NCiNfV0-fbNjIwU2nwn","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":"kbWip4bj30WtVyxtVAdqo","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":"7P1x0Oa5KPFuQS2kFFdiI","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":"86zQvnoZ-8wRmZHQYus7L","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":"05MZm8nG-nd1XuMEbyLXe","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":"SbxHEYWF9hi7DarPfhrWb","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":"zTRpoQcWYXzqGFRPpPEFE","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":"pYVlaOVK06-6sj12ouxNz","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":"bPKyp3EkYlTywl_foTdRr","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":"5yK5jv7IBmTARzvBx-Haj","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":"rfNYqZ2Cv6-03LwrrQfJl","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":"XmScT9IzkVhv9mItvVkFT","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":"_0o14xseUwTiHQsMqg9-H","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":"Ca9VPjFDS5xeVMbI96rJU","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":"PTFLrofe2Ok3WHd-XI1F6","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":"3LHxiJC1_Dwxioa_4EA_l","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":"BfwUhtQsBvWu4YE6LfwLZ","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":"Apf2eKORAF0gI3FmJ6GO3","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":"szox1DLqtBajSxjUTYAT_","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":"Yxp3M1D7dtcy-v6ccS9sL","name":"UITextButton","brief":"","type":"ClassDoc","description":"

              This is a basic base text button which you can use in your Game UI.

              ","params":[],"returns":[],"extends":["UIBaseElement"],"implements":[],"members":[{"id":"hC-dJZ9gAaV77JY9b0b6x","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":"Lw3B48yjuumHEhHX5H1pj","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":"FepdFz5oGNJC0--ryZXFr","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":"OmJ7-aNfuJXYC6XDJmmBY","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":"DIqd8SoDbGYjB8cyoWk93","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":"WjUL91vTWlm3lDCvRDR1r","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":"6UtrpBy5LKHVhrVOECoBA","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":"DRGhrifGzVpuSfcdM9-l-","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":"u6Dkfsd2q3yc1B7JZPWIK","name":"bindKey","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The key to bind the action to

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zo9zuVg-f-gJxH0JUfzuw","name":"bitmapText","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the bitmapText used by the UITextButton class

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cmft6PI45FpVw4N8P31NA","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":"Eshfb0VzvzhGJEREwTZm6","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":"0vblkLlZxl6dhyXEFU4bm","name":"borderStrokeColor","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The css value of a color to be used to draw the border

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bS7C6vpQhiKVLb1LwRZDL","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

              bottom coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yMPQZkZjmWYL7YhNeDpQ2","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the horizontal axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3GwQZVlFUnCmH4bSAYZvO","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

              absolute center of this rectangle on the vertical axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"f_gePj0FZ22vhAXxK1h3R","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":"FbXXC4poUfU4vPCSE4HYl","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the renderable default transformation matrix

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wWPRb2kP-2W-CCwJqX98W","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the depth of this renderable on the z axis

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"thPSpdXpaOQk3m0qCscty","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":"I3mO76ShYv34UFJnK2FxZ","name":"floating","brief":"","defaultValue":"true","scope":"instance","see":["Renderable.floating"],"type":"PropertyDoc","description":"

              UI base elements use screen coordinates by default\n(Note: any child elements added to a UIBaseElement should have their fl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y6dGEdts2d8tYKofeQn4q","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":"DvzEK_Qg4SDpI8_uq7qDI","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

              height of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xdiXbVqswA_aayTL20uT-","name":"holdThreshold","brief":"","defaultValue":"250","scope":"instance","type":"PropertyDoc","description":"

              Tap and hold threshold timeout in ms

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Yu68qTxvacHWINRcxdLTY","name":"hover","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              true if the pointer is over the object

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qUMhSi338IGM-luQHAWdW","name":"hoverOffColor","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The css value of a color to be used if the pointer is nothovering over the button

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"do_bkJ8NoUTdqz_bg0Bz2","name":"hoverOnColor","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The css value of a color to be used if the pointer hovers over the button

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lYTHzXDBTnjxz0nURl8-s","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":"ECLM0RhEbfqKpk9hBn4Vy","name":"isClickable","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

              object can be clicked or not

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CeGQ7QpylaOx2PYfPir_K","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":"Cxv7NSeAN7WabB3gjvU_m","name":"isDraggable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              object can be clicked or not

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-Mfh-V8XWKW1B291VzIVd","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":"GYXe9fJr2C278g0m5LrIf","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":"M_19Gj8jwUrjHUjYVbylG","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":"kaYkdgFu37x4lhJfQ4YNp","name":"isHoldable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              object can be tap and hold

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"90YCZlXdUalxD1CGejNea","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":"z6UXl9eqaj8m8V3TlqqMD","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              make the renderable object persistent over level changes

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"t8YHo7XlXZR6Ux24hWDpw","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

              left coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qw6yoiRHUJQNQ8oHD1K4T","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":"Xqf0DuLKOXFR4maEi8nSI","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

              The name of the renderable

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"l7BjPuT_LDibToPAHbQ9a","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":"QQE-TxcCkKTYDAlEdVODD","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":"-OscWFm2TA1tUANuvaerv","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

              Position of the Renderable relative to its parent container

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XWjXGqWlKY5IrPZqXbG-9","name":"released","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              false if the pointer is down, or true when the pointer status is up

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SQ8BQI6bNLSPCfHn_LiEq","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

              right coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"x42uKbkUmTz-SOYdjQWBA","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

              whether the container is the root of the scene

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-K7tUi_-IgOGhafvC5oKV","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":"dS0QX4MPP6xN8k5wTwnEY","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":"M7EbuGZz8raWHROqm2tfi","name":"textAlign","brief":"","access":"public","defaultValue":"\"center\"","scope":"instance","type":"PropertyDoc","description":"

              Set the default text alignment (or justification),
              \npossible values are "left", "right", and "...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zW7ukuq0LVJkMrPagMCxX","name":"textBaseline","brief":"","access":"public","defaultValue":"\"middle\"","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":"OJ0UE17sYt5sNJetWtJ02","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":"5a3t58ZolEF4Na9R39noZ","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

              top coordinate of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qwlZdRKo5rPKuMfTvvakA","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

              the shape type (used internally)

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kJP5mJkBG5AGz2gViU65l","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":"tEQmGpqXNINe6afJeDJ7e","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

              width of the Rectangle

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GjViD6YgkBCQVIOHK4C0m","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":"qJitvNK16acgMpEKHFqZm","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":"g79DY9Pq6q-1mULWtNpLY","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":"jzZsg9nn8aEyNoldjdYsO","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":"Kqf0Ax4PA0Ff0FFr7VI7i","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":"Bbahzley7_z1UYoXHFGMs","name":"constructor","brief":"","examples":[{"caption":"","code":" // Create a new Button\n class PlayButton extends UITextButton {\n constructor(x,y) {\n super(x,y, {\n font: 'my-font',\n text: 'Play',\n // if you omit the next two, size is calculated by the size of the text\n borderWidth: 200,\n borderHeight: 20,\n backgroundColor: '#00aa0080',\n hoverColor: '#00ff00ff'\n });\n }\n\n onClick(){\n state.change(state.PLAY);\n }\n }\n\n world.addChild(new PlayButton(15,200));"}],"scope":"instance","type":"MethodDoc","description":"

              A Bitmap Text Button with an outlined background border, filled with background color.\nIt uses a RoundRect as background a...","params":[{"identifier":"x","optional":false,"description":"

              x pos of the button

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

              y pos of the button

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.font","optional":true,"description":"

              The name of the BitmapText font to use

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.size","optional":true,"default":"1","description":"

              The scale factor of the BitmapText

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.text","optional":true,"description":"

              The text to display

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.bindKey","optional":true,"description":"

              The key to bind the action to (default: none)

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.hoverOffColor","optional":true,"default":"\"#00aa0080\"","description":"

              The css value of a color to be used if the pointer is not hovering over the button

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.hoverOnColor","optional":true,"default":"\"#00ff00ff\"","description":"

              The css value of a color to be used if the pointer hovers over the button

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.borderStrokeColor","optional":true,"default":"\"#000000\"","description":"

              The css value of a color to be used to draw the border

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.fillStyle","optional":true,"description":"

              The css value of a tint color to be used to tint the BitmapText

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.textAlign","optional":true,"default":"\"center\"","description":"

              horizontal text alignment

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.textBaseline","optional":true,"default":"\"middle\"","description":"

              the text baseline

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.borderWidth","optional":true,"description":"

              Width of the button

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.borderHeight","optional":true,"description":"

              Height of the button

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"fOR_jRR4W3-VKKn9Sw1Sz","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":"sdUe13extELYPyccM_eLN","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":"L7rNpfqyey9PCMQewWssX","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":"HnmBWQ1yiJvkKFF_-jAo3","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":"7044tMOQdskmtwgyEVLOR","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":"jy-46qT7iRKNpBC9EJwNr","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":"KNmgz6pwqrLnbjnY7Nc7Y","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":"V91QiTdTFiXkYHoKuE63F","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":"1oWHHjIyORIgFoTMPzOOz","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":"AuN8TMgo8TsH5YRi0Khoe","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":"rnOdLnJqQDLu7wW2s_v6G","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":"J87xD_viansyUkG6QP9IE","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":"gjunrea0cAtRhncbsrW3l","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":"omCHW61zSxcq6458RotEz","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":"P8FcWlE8DvWo6j0vaBawR","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":"F5-tQr_U1J0VO5iq4sHpZ","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":"FIUoZqBdTpQVcI74DKSNs","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":"PAMiJs6QL5JkuuWS2k5gY","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":"5cJRPYbsU8gdJNESwBiHT","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":"VOuA39d5lbzPSPkTRcmTt","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":"vFZbzJMsn-pcZm7aVLh8X","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":"D2KU0iWqt_X9ZSklNrML6","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":"DKwHV6MOxHRXUTeSs38n6","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":"w9U9wEahfLdz0VCXCZgZq","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":"bHsMeA_Dd0u0JBzUjbDmf","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":"n5ja-MS2iaYYBFy564F4G","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":"EpzX3eYdPok32Fhr54DAT","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":"bMp4QCArqK5fiI8SiK7X-","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":"_3qMUZ_qLaCB_-VZY7-yf","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":"gDI3ubRxDCb3CA1slOA-o","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":"3FvcCpDUI_0QZ3HT3Mozg","name":"onClick","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the object is pressed (to be extended)

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

              return false if we need to stop propagating the event

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"EXieZ_aF7bw918DT1_fD_","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":"2l45rBXM8_ftcqKIBntl1","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

              OnDestroy Notification function
              \nCalled by engine before deleting the object

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S-AP0-rLs3KQhHTchYCZM","name":"onHold","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the object is pressed and held
              \nto be extended

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_wgqgOSMxPQzvyB4AHvVl","name":"onMove","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the pointer is moved over the object

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"OjioGeik4ABq6-UJodY6L","name":"onOut","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the pointer is leaving the object area

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"zvTH7dZKcT3WJXjvKduJa","name":"onOver","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the pointer is over the object

              ","params":[{"identifier":"event","optional":false,"description":"

              the event object

              ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"HWMiWafXV14gchV5EwjLr","name":"onRelease","brief":"","scope":"instance","type":"MethodDoc","description":"

              function called when the object is pressed and released (to be extended)

              ","params":[],"returns":[{"description":"

              return false if we need to stop propagating the event

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"w5Qk288ycZRPSbV0JF_4h","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":"YyCg92AbR122hGS2tqvVa","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":"FSHKg4ITstCf2hiTEEMKN","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":"LK3ATKhIWRNDwFh9UCrle","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":"RFmZPRyB6Rp4EefCl07xR","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":"5X9bxS_Xrtr_xO1YkzFf2","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":"XbpBame2cOEXNHPv6iC7l","name":"reset","brief":"

              reset the container, removing all childrens, and reseting transforms.

              ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SrFPX4miQ6y1AkWhHyFhd","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":"FmzQqvFwOcgHf_j3rlgmT","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":"CQKa8P3536tnHExTTmNUn","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":"doAQ4dO3x4LXc6ehz87ZP","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":"N4qmw5Ft22meuVEv9T2Co","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":"wFqfp5ocit-dIoen8fADz","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":"c5cX6r8GEO6WnC8KOt3bb","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":"SeKpVl9rdrPmf7qz1cYo-","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":"ExfjyaYv18pB_dKPdcOnP","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":"QxTnjhgNMIBtluqe3Kxy5","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":"HrC_MdKE3v5xmYdzeIvWl","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":"Om6Zk2WyFZNZl1AAn5VH3","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":"iY_cVUNMLVr2PSPqPN5hS","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":"8RQnaOf-Zc8vtSdN_0R0o","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":"D_XwuRy8i0WFuNgL3AoQK","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":"S1oqpISotOpcBLwfnsCbT","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":"nggR-F7RZuKnndxgTao7m","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":"SP3n7tJRp3IM888MLLwRV","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":"y_YAzwh831dOwBtfVJ8WC","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":"hilCYBfyfWtXhKMLU5CbZ","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":"TVyxsgsQYLZiRRN9ND5bG","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":"RVhqqt1yqdYQVR7lrXPgh","name":"Vector2d","brief":"","type":"ClassDoc","description":"

              a generic 2D Vector Object

              ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"PkD8bY0gZeH4uWGJEsxK4","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

              x value of the vector

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6U4aqueX1zuLH-Er5ZoPT","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

              y value of the vector

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Iz1oaeSz2nDWH0t5SPRGd","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"DDRQMFYEWtp3U_AWU2X-R","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"

              Add the passed vector to this 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":"-Lky01_S1jXlFuu74cgQC","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":"zbKA3wCI71-CluN5bvIuE","name":"ceil","brief":"","scope":"instance","type":"MethodDoc","description":"

              Ceil the vector values

              ","params":[],"returns":[{"description":"

              new me.Vector2d

              ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Uw_-v7hulNuPWLDZ3wjCJ","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"eLWisUUhL3X8aeEq2Papn","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.Vector2d

              ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"IP80oZCCUOHc6cDzShoI8","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bEwHDH7CyarMwNwDEWoEx","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"

              return a clone copy of this vector

              ","params":[],"returns":[{"description":"

              new me.Vector2d

              ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0ofwq3sRCJ70t2gUXGRxZ","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":true,"default":"0","description":"

              x value of the vector

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"0","description":"

              y value of the vector

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"S5NLqFDwd7SKSHemRLYJd","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":"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":"dPlYePltSzGeu0Mle2Qwn","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","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

              The cross product.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rwnli9QTnx0tWA0GXv-co","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","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"L9aFddpi9cHYcQNH_lz_7","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Aqj-tcMDHcuU8CdJXvQlx","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","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

              The dot product.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"WX-CY83oA8wbFbZ7FLGjB","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"

              return true if this vector is equal to the given values or vector

              ","params":[{"identifier":"x","dataType":{"tokens":[{"value":"number | Vector2d | ObservableVector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","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":"O7ke3qurvkSZ26cV7D4pS","name":"floor","brief":"","scope":"instance","type":"MethodDoc","description":"

              Floor the vector values

              ","params":[],"returns":[{"description":"

              new me.Vector2d

              ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Arp9foI5D7a18S353yR1B","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4USPL9Kol9iYXtsq2HrvB","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":"eGm3qaN8HbBCtpfX3xC7l","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":"00vV7JcMy5CzISsvWmuAY","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","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}},{"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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5UGEIw0hnsKosv9vsI73E","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","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":"Sdd-dpL3jx8UaxnlcX5HH","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","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":"hT8y0jWq1S2RZIFtqmZTe","name":"moveTowards","brief":"","scope":"instance","type":"MethodDoc","description":"

              interpolate the position of this vector towards the given one by the given maximum step.

              ","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}},{"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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MHFRsCZ2TIdWd1SbKUE3Q","name":"negate","brief":"","scope":"instance","type":"MethodDoc","description":"

              Negate the vector values

              ","params":[],"returns":[{"description":"

              new me.Vector2d

              ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"EgbnaN3tZTnJpQPPEqaiN","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ys19Nvkkb19AESsW_aX7u","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":"40yf8q22wWLuyvwW6fEKJ","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"NHV_FeOs67YOqTVsreb70","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":"o2cNXHW6xjyOv3-1b09Qe","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":"sQ4DWejilPeiupThl2LhZ","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LORc0SIPu87z2VPdhHWht","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"r8PMTYX_OIPjayH1IlsgU","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","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":"DOXMfsgZRiQ-cdX1tKpf1","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":"nlMMW7YoKl-WOq_L6OQZd","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":"AfNWjArHr6s8N8C07m44i","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":"S0gsaqzZxwsZ1tAYTWyv1","name":"sub","brief":"","scope":"instance","type":"MethodDoc","description":"

              Substract the passed vector to this 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":"AFPGm8oaTIApGWbQm592e","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":"Qi9G5qJmnRjf-rA_coCLp","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":"VNx9ztHNWJZahsNBw1GV4","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":"CU6oh7Xip9VB80MR9GJF4","name":"Vector3d","brief":"","type":"ClassDoc","description":"

              a generic 3D Vector Object

              ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"kVZp0r2g8wjLY7tutOor8","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

              x value of the vector

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7oZrV2bzKr1d3lRILhq40","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

              y value of the vector

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6ZJcw545mdxf7D66ddHpq","name":"z","brief":"","scope":"instance","type":"PropertyDoc","description":"

              z value of the vector

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Dql-FaBQyASavG8-5sjv4","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"l0I8Twi9uK3Cq3NIPPkpM","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","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":"ZsMzvaWRnwqVRKeINMSOQ","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":"tqxgBcQCScYGfu_D9mHp1","name":"ceil","brief":"","scope":"instance","type":"MethodDoc","description":"

              Ceil the vector values

              ","params":[],"returns":[{"description":"

              new me.Vector3d

              ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"y7v90HVS7a2MFZnvdxffu","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"5eZzaQS99CfX5wmdTg6Wy","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.Vector3d

              ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BC1I1iq2ubBxhWf6__-tR","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"s-yjVnf7cCnz5Sxl6WCMM","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"

              return a clone copy of this vector

              ","params":[],"returns":[{"description":"

              new me.Vector3d

              ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XcmOj-NOm954Q15XY7DIH","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":true,"default":"0","description":"

              x value of the vector

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"0","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":[],"extends":[],"implements":[]},{"id":"wGHBFYi04ZCWSfOSFDjN3","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","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":"jXqbeH4W93Ww07SJ7OIKx","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","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"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":"wNUaPoCkk69WNxP4nLUS6","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","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9ZcYSPiVXp8QbXJdPcT0L","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"78xJTeOSVheJeblYB-j3o","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","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","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":"GNCdz3kTX9ylRcb2eBjg3","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"

              return true if this vector is equal to the given values or vector

              ","params":[{"identifier":"x","dataType":{"tokens":[{"value":"number | Vector2d | ObservableVector2d | Vector3d | ObservableVector3d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"z","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":"uL0sy2lVsAayRnoMnQjp-","name":"floor","brief":"","scope":"instance","type":"MethodDoc","description":"

              Floor the vector values

              ","params":[],"returns":[{"description":"

              new me.Vector3d

              ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"u5IN_YvYu_MZMCnvlJCKb","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"meKsAuPjj7EL7alMjeUe8","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":"CS9ciIt_5ib6nC-ig7Wu5","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":"UrP5PO0UEnt8eS--GoB88","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","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}},{"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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jJzJWOWMKLxgUL1oc5fq3","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","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":"AGqV8OSPV-PaTFNN0pVDI","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","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":"rY1dJ5-wJNsgb1lkGBrmd","name":"moveTowards","brief":"","scope":"instance","type":"MethodDoc","description":"

              interpolate the position of this vector on the x and y axis towards the given one by the given maximum step.

              ","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zUtjJTDTDooUS46ovRQbE","name":"negate","brief":"","scope":"instance","type":"MethodDoc","description":"

              Negate the vector values

              ","params":[],"returns":[{"description":"

              new me.Vector3d

              ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"x6uCBQS0dTzgU6S3ZakjW","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xvHchOpnvnEHo4rQM55NE","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":"6Dwk1QBJ21ivGoI3c-oj4","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"CVIUvXFolcX5rgRtzhBhY","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":"S55-pDiftXmZ1xV2hh9i6","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":"IZ-7hOt6GEixKOr5pdZyl","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"

              Rotate this vector (counter-clockwise) by the specified angle (in radians) around the z axis

              ","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"yo3Xsqiq_mhBoFA-eZEsL","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LoLkzmogC2tCJJ_89uLPy","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","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":"fLWZYdGWk3G4Pt1OPeMrW","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":"urJxWLjQiSNxEEAhMlEal","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":"OmmTUgYYOBLjHlZZWYqny","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":"cJrt1FZ4JGFsxDzdizppP","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","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":"yMrBY5ilf6Fq-Z6KFze2s","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":"pHPyejdFkgIqKfXacP0IG","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":"BY81ZxZx8TN5v4ceBZuW8","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":"8NJ5THBz6CuCFk2h2Bzo9","name":"WebGLRenderer","brief":"","type":"ClassDoc","description":"

              a WebGL renderer object

              ","params":[],"returns":[],"extends":["Renderer"],"implements":[],"members":[{"id":"Oq4rqiepRww89UE053Q5E","name":"compositors","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The list of active compositors

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qneqF3lctrp9uIiWeaEdU","name":"currentCompositor","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The current compositor used by the renderer

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"npEMDJXeEySlZPwGNnzZy","name":"currentProgram","brief":"","scope":"instance","type":"PropertyDoc","description":"

              a reference to the current shader program used by the renderer

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Lkj890w0jbwYJuuc26BnQ","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The current transformation matrix used for transformations on the overall scene

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IzZn-YKctHxXDf-Gy9FXu","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"

              the default method to sort object ("sorting", "z-buffer")

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FlCdx5cen1UDLjPDRpNDb","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

              the requested video size ratio

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"renAq0nCB30vN8cnAalNw","name":"gl","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The WebGL context

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MgND4V3Itz6pcXYdzRazL","name":"GPURenderer","brief":"","defaultValue":"undefined","readonly":true,"scope":"instance","type":"PropertyDoc","description":"

              The renderer string of the underlying graphics driver.

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IpgntK3EbElMAX6LxZe5l","name":"GPUVendor","brief":"","defaultValue":"undefined","readonly":true,"scope":"instance","type":"PropertyDoc","description":"

              The vendor string of the underlying graphics driver.

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jyCQUANbqkoHyx2F4LFbB","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

              return the height of the canvas which this renderer draws to

              ","params":[],"returns":[{"description":"

              height of the system Canvas

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iHtrlmgjq0l2SfKML5COE","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

              true if the current rendering context is valid

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2z2GLI4gG0tV8uweIZGgv","name":"maxTextures","brief":"","readonly":true,"scope":"instance","type":"PropertyDoc","description":"

              Maximum number of texture unit supported under the current context

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-HkXH5WuA3kiGqPB7lN8Y","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"

              The Path2D instance used by the renderer to draw primitives

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BPaZ8za9vzRHbf53rn9fR","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":"Y7zHlK112xXM8q9aitjO3","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

              The given constructor options

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KS_znDRNcypZo_dV98r4F","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":"2aXOk4dUtEpJBAuT_mxU9","name":"vertexBuffer","brief":"","scope":"instance","type":"PropertyDoc","description":"

              the vertex buffer used by this WebGL Renderer

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SYrjV3notFIxXM45JxzE8","name":"WebGLVersion","brief":"","defaultValue":"1","readonly":true,"scope":"instance","type":"PropertyDoc","description":"

              The WebGL version used by this renderer (1 or 2)

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MoMNC9FNqOm7mtYTiyp0d","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

              return the width of the canvas which this renderer draws to

              ","params":[],"returns":[{"description":"

              width of the system Canvas

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qSFV_clbfLptPyJNsTXAV","name":"addCompositor","brief":"","scope":"instance","type":"MethodDoc","description":"

              add a new compositor to this renderer

              ","params":[{"identifier":"compositor","optional":false,"description":"

              a compositor instance

              ","dataType":{"tokens":[{"value":"Compositor","kind":"canonical"},{"value":"Compositor","kind":"link"}],"template":"%1"}},{"identifier":"name","optional":false,"default":"\"default\"","description":"

              a name uniquely identifying this compositor

              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"activate","optional":true,"default":"false","description":"

              true if the given compositor should be set as the active one

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"nPRr8UXG0Pe5GfdUlZ0j8","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":"0k1oZq83QKyiiVpIcq3Cq","name":"clear","brief":"

              Clear the frame buffer

              ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fBDaQf_Yatnr4QVThE3lu","name":"clearColor","brief":"","scope":"instance","type":"MethodDoc","description":"

              Clears the gl context 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":"9Fk_BAfT4RCpB78twTenJ","name":"clearMask","brief":"","scope":"instance","see":["WebGLRenderer#setMask"],"type":"MethodDoc","description":"

              disable (remove) the rendering mask set through setMask.

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nw3qRPfkNzQolh_KLh79Y","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":"6Uml8Qzyi3QCS8xTzgC0i","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"

              clear the rendering tint set through setTint.

              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vvdSbu_Io4ZQQF8xxyBej","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,"description":"

              x axis of the coordinate for the upper-left corner of the rectangle to start clipping from.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

              y axis of the coordinate for the upper-left corner of the rectangle to start clipping from.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"

              the width of the rectangle to start clipping from.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"

              the height of the rectangle to start clipping from.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"zALt6DHpCEAPV5ThnoSGA","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":"fYnNhYMjMKNAah5G1B_Hy","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":"caXCBge21ah8YmsSv-tBD","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":[{"description":"

              the patterned texture created

              ","dataType":{"tokens":[{"value":"TextureAtlas","kind":"canonical"},{"value":"TextureAtlas","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8c-t8Z6NdtTjoZPVS1bG2","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 to the gl context

              ","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":"L31ZL7TJQzG6SR4uma3wl","name":"drawPattern","brief":"","scope":"instance","see":["WebGLRenderer#createPattern"],"type":"MethodDoc","description":"

              Draw a pattern within the given rectangle.

              ","params":[{"identifier":"pattern","optional":false,"description":"

              Pattern object

              ","dataType":{"tokens":[{"value":"TextureAtlas","kind":"canonical"},{"value":"TextureAtlas","kind":"link"}],"template":"%1"}},{"identifier":"x","optional":false,"description":"

              x position where to draw the pattern

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

              y position where to draw the pattern

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"

              width of the pattern

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"

              height of the pattern

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"UdF-XGYgFwf-Ye10QjchB","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":"fSDnm40IcVSRbc0DEQeAH","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,"description":"

              arc radius

              ","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":"jrTuxb47Py2GM7lTcYRfu","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":"nkl8frvCgY0VDVuwaDxHW","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":"G0Il6qKAi7_fkrkvlgVe5","name":"fillPoint","brief":"","scope":"instance","type":"MethodDoc","description":"

              Draw a a point at the specified coordinates

              ","params":[{"identifier":"x","optional":false,"description":"

              x axis of the coordinate for the 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 point.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"9tIhq0gt4exhj0LShxxL6","name":"fillPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"

              Fill a 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":"YIBckaH1fjDELMXaj1nqY","name":"fillRect","brief":"","scope":"instance","type":"MethodDoc","description":"

              Draw a filled rectangle at the specified coordinates

              ","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":"HIUH_SuarHmmp_1o9pJid","name":"fillRoundRect","brief":"","scope":"instance","type":"MethodDoc","description":"

              Draw a rounded filled rectangle at the specified coordinates

              ","params":[{"identifier":"x","optional":false,"description":"

              x axis of the coordinate for the rounded 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 rounded rectangle starting point.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"

              The rounded rectangle's width.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"

              The rounded rectangle's height.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"description":"

              The rounded corner's radius.

              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"lyDzNKQtBHedITgm1XURB","name":"flush","brief":"

              Flush the compositor to the frame buffer

              ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SjFRF0ss_gOTCv3p81VcF","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":"zi2EbnClsgi37_DlKskm-","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":"wWRlAF7RUylQuE8OcnciD","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":"alx4v1vijYvzSdQcmuK36","name":"getContext","brief":"","scope":"instance","type":"MethodDoc","description":"

              Returns the WebGLContext instance for the renderer\nreturn a reference to the system 2d Context

              ","params":[],"returns":[{"description":"

              the current WebGL context

              ","dataType":{"tokens":[{"value":"WebGLRenderingContext","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8rnPNUj90t13aRltELqVU","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":"glgkCr4ZRQfEp29M-Juen","name":"getContextGL","brief":"","scope":"instance","type":"MethodDoc","description":"

              Returns the WebGL Context object of the given canvas element

              ","params":[{"identifier":"canvas","optional":false,"description":"

              the canvas element

              ","dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}},{"identifier":"transparent","optional":true,"default":"false","description":"

              use true to enable transparency

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"depth","optional":true,"default":"false","description":"

              use true to enable depth buffer testing

              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

              the WebGL Context object

              ","dataType":{"tokens":[{"value":"WebGLRenderingContext","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ueUHKDVSb8gZBwQ8VmPwt","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":"ZFE71QbSazFnqQG7V_Ow1","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":"Ul5qvgG4HPFlH8EEKPU-V","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":"xyb7GYftLyF00drxMeGOz","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":"qWtqbtzqTxR2f-DNbps7Z","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":"oAbOhWLhM5ed-NBrfAr9U","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":"spxwsLzZmPvwG6G_F76Jb","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":"awGYQHMfi0PzHlvRfSAQy","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":"xY5-51PSBS9X-R0i4WpAI","name":"reset","brief":"

              Reset context state

              ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MuzUIz8b2s9FSiwMQDRLe","name":"resetTransform","brief":"

              Reset the gl transform to identity

              ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SFlKJSTfykZp2XCJ9P1jv","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":"41O9S0GBsqRUQsoK4YNWP","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":"3-ci8d8ruvUDc_GZtOktM","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":"NdMACYJubh_OLycFa9m4l","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":"NKLE5GfLBVC5lCQcFAcxw","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":"8-7H8Jaoex_X2PQFCI7sL","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":"AnXBpuHE5eiAsx_vdg0GG","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":"UKlpxNvXoLBDWMrrBBOlP","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":"gl","optional":true,"description":"

                a WebGL context

                ","dataType":{"tokens":[{"value":"WebGLRenderingContext","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"mg8I7Zyf0VR07HPoCNUe4","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 string.

                ","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}}],"returns":[],"extends":[],"implements":[]},{"id":"y0hlnttlPTUZG7tVUs9Jv","name":"setCompositor","brief":"","scope":"instance","type":"MethodDoc","description":"

                set the active compositor for this renderer

                ","params":[{"identifier":"name","optional":false,"default":"\"default\"","description":"

                a compositor name

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"shader","optional":true,"description":"

                an optional shader program to be used, instead of the default one, when activating the compositor

                ","dataType":{"tokens":[{"value":"GLShader","kind":"canonical"},{"value":"GLShader","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                an instance to the current active compositor

                ","dataType":{"tokens":[{"value":"Compositor","kind":"canonical"},{"value":"Compositor","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"sd1T5yK5p9gwbWrguMHZC","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":"CJLCcbqBBFqXEdG0UucIS","name":"setLineWidth","brief":"","scope":"instance","type":"MethodDoc","description":"

                Set the line width

                ","params":[{"identifier":"width","optional":false,"description":"

                Line width

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"4CcRTcA1aMWU9wnPh7KJX","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":"

                a 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":"OCbStU4MmGOpMDfyW45l7","name":"setProjection","brief":"","scope":"instance","type":"MethodDoc","description":"

                set/change the current projection matrix (WebGL only)

                ","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":"nH_fgWLpFuUuRsjVejsLj","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":"Fmq0vaw6DXe22b9T5fa6c","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":"cMFrRWqivYdGav_XZ3qd0","name":"setViewport","brief":"","scope":"instance","type":"MethodDoc","description":"

                Sets the WebGL viewport, which specifies the affine transformation of x and y from normalized device coordinates to window...","params":[{"identifier":"x ","optional":true,"default":" 0","description":"

                x the horizontal coordinate for the lower left corner of the viewport origin

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y ","optional":true,"default":" 0","description":"

                y the vertical coordinate for the lower left corner of the viewport origin

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w ","optional":true,"default":" width of the canvas","description":"

                the width of viewport

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h ","optional":true,"default":" height of the canvas","description":"

                the height of viewport

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"bexAvjzTddDhdyeDpY9Vo","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":"BoyYyIHvMwbyAvc4lh1rX","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,"description":"

                arc radius

                ","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":"PPpSTUpLeQ85fDsPuzc5H","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":"GgNuNolqv-jFKacwsMP9E","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":"nB7cP_fFl4XBOs5FuaUsj","name":"strokePoint","brief":"","scope":"instance","type":"MethodDoc","description":"

                Stroke a Point at the specified coordinates

                ","params":[{"identifier":"x","optional":false,"description":"

                x axis of the coordinate for the 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 point.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"VdaNKnSYrPJ5RoVUwsHsg","name":"strokePolygon","brief":"","scope":"instance","type":"MethodDoc","description":"

                Stroke a me.Polygon on the screen with a specified color

                ","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":"WZ--yhkL4WVRQYmeDjJto","name":"strokeRect","brief":"","scope":"instance","type":"MethodDoc","description":"

                Draw a stroke rectangle at the specified coordinates

                ","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"}},{"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":"YstwUa8rIUuPICiBggwdA","name":"strokeRoundRect","brief":"","scope":"instance","type":"MethodDoc","description":"

                Stroke a rounded rectangle at the specified coordinates

                ","params":[{"identifier":"x","optional":false,"description":"

                x axis of the coordinate for the rounded 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 rounded rectangle starting point.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"

                The rounded rectangle's width.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"

                The rounded rectangle's height.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"description":"

                The rounded corner's radius.

                ","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":"okFIz4UxkXvvga2WlAcL9","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":"lZCWYeCOgppv6x7XxjZN-","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":"OR7Y3ym7IWGLxQS8pZAXt","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":"SEwJTF-2n0-OM0gP6W96J","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":"vwzHEeNjJMmISvZ2BYPOe","name":"transform","brief":"","scope":"instance","see":["{@link WebGLRenderer.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":"Za4APBgrP99e_t7JVFlOE","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":"vyIfK7W7_2P97ldY_Sisk","name":"World","brief":"","type":"ClassDoc","description":"

                an object representing the physic world, and responsible for managing and updating all childs and physics

                ","params":[],"returns":[],"extends":["Container"],"implements":[],"members":[{"id":"WYQWR-NRPp279skdo_ZM_","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":"ct8RQV5gevnhmEvwaMnEy","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":"y9EdUUoFiDqtdHdgKG-Tk","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":"TvxHxfU3bXe1PYsY-sfB3","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":"G0QueWPcVFVxFP7tdmnqX","name":"app","brief":"","scope":"instance","type":"PropertyDoc","description":"

                the application (game) this physic world belong to

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"agHiwPAsR6arK7RwXesvc","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":"OMB_1GTwdT4mSs4wO7QVe","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":"zcK3sI6A1UGjlz5dMqIqn","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":"gWeHaJtT3Tm4uXQwewOSJ","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":"1sFPp6-yEeNmDDuAAETcy","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":"X_REvcB0PlBMuDoQrSr4R","name":"bodies","brief":"","scope":"instance","type":"PropertyDoc","description":"

                the active physic bodies in this simulation

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cMH3Csl-0J1hDXNMptAgG","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":"JbpVTeuDlPXCIdr07QTYI","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                bottom coordinate of the Rectangle

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lZ-lLG4Tn5-PCmbLoIHUt","name":"broadphase","brief":"","scope":"instance","type":"PropertyDoc","description":"

                the instance of the game world quadtree used for broadphase (used by the builtin physic and pointer event implementation)

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wnh2rBhu4-QDuBdcnHaHu","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                absolute center of this rectangle on the horizontal axis

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PseCxPMVKf7SuWxSY9fY-","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                absolute center of this rectangle on the vertical axis

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9Wdr0v05dK1Y-VXlPYtGa","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":"KagKO-ob-Dvl2YlcCLtxh","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                the renderable default transformation matrix

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zKgdyqVNLIoN8557ATYiz","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                the depth of this renderable on the z axis

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zxdDHwZimnItCTv1tRfww","name":"detector","brief":"","scope":"instance","type":"PropertyDoc","description":"

                the collision detector instance used by this world instance

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"upQ8-8qEyxxz_g5XKgKw_","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":"i9PVHytAticyPW_-oOubq","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":"koikyGYUeuEiHPy3kqFc-","name":"fps","brief":"","defaultValue":"60","scope":"instance","see":["timer.maxfps"],"type":"PropertyDoc","description":"

                the rate at which the game world is updated,\nmay be greater than or lower than the display fps

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vhKT3uDHWE9PfGFCdkiF2","name":"gravity","brief":"","defaultValue":"<0,0.98>","scope":"instance","type":"PropertyDoc","description":"

                world gravity

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HXbMBUsNnJFC3Qv5dcxiN","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":"NaJMZNDrCTzBIsdR18zQu","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                height of the Rectangle

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DoyFbnUSAGfvtJ8SxGHgA","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":"k_P1FyUYcYR59kwRn44B8","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":"QXa5s--xLMCEDm_H0LJph","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":"-IYEtl93TOeKIWg1wx4WN","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":"MWfkaMquOeNF6lp5OM5B7","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":"dy93jA49H0dAvHG3lj3-2","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":"BNsGQQiL0no5ze-C33Oz2","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                make the renderable object persistent over level changes

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jelIkBDkWxLdVnUteXtwb","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                left coordinate of the Rectangle

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3u3jPi3XUytnWN3Q1K31S","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":"FyZqyFkiDvuSjTn_dKbnN","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                The name of the renderable

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fxp1CUbaKlN_V8tjpEdDj","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":"48cn8i7ScEEirO2f4MW4Y","name":"physic","brief":"","defaultValue":"\"builtin\"","examples":[{"caption":"","code":"// disable builtin physic\nme.game.world.physic = \"none\";"}],"scope":"instance","see":["Application.Settings.physic"],"type":"PropertyDoc","description":"

                the physic engine used by melonJS

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TC1L3wG3bkXKhbd982i8l","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":"3-fbP2PJFUu0jYaKJ9Hwn","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                Position of the Renderable relative to its parent container

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5Lj0K9b7TPLUTGjRhG82s","name":"preRender","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                Enabled pre-rendering for all tile layers.
                \nIf false layers are rendered dynamically, if true layers are first fully r...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wu2kixBbHzmrUcxCxb0pq","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                right coordinate of the Rectangle

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8-MTtIV83mNcqdxO1Z2tK","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                whether the container is the root of the scene

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4CbIfdTarnFWtAA9Gk83d","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":"vIoCn86AGxu6CAQ1X61kI","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":"Iain8IHYVrGTUM9pYN04R","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":"31zm3ovBo2L-BeXK-moWW","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                top coordinate of the Rectangle

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RLJO0bjH7jGwzcew-j1LQ","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                the shape type (used internally)

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hWoqo-fvAn44_4b6MSbBp","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":"B5Y14pBmZ-o2smqUD6a5v","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                width of the Rectangle

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Qgq7yvYl8-Tyf9nUNJ1M_","name":"addBody","brief":"","scope":"instance","see":["Container.addChild"],"type":"MethodDoc","description":"

                Add a physic body to the game world

                ","params":[{"identifier":"body","optional":false,"dataType":{"tokens":[{"value":"Body","kind":"canonical"},{"value":"Body","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                this game world

                ","dataType":{"tokens":[{"value":"World","kind":"canonical"},{"value":"World","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"vlReeI0sfj4nHdGjPatvp","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":"XaJ9gSbUN9gINfKfYiydR","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":"dAbjy3Fml_D_5KiGtO5ga","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":"0OoTIfPytsj-OFJTv-Hau","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":"eXMkvVav-YytPyJ-vsFmi","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":"SVig-3WuA7JtLPCgxkjSs","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":"ViFABpEVGqczIEgQx0rBt","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":"a1TKzJD1x0Qna1NTLQS8I","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":"Xzpje6uzpF3fhhf6XZzjW","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":"SuleONsGxXHOCqs89C3ci","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":"0rt40yJNp2fKWsjrlU8_3","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":"xzp--FNX62q3wI0YQkT0v","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":"08KrmxspySb94DW9XAnP_","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":"_7nmR2o-9MkyIqqih-ppy","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":"5rlE9SNmyKRPhj-R9ncfn","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":"Y_IUV5NmS1eetOZDyLb9C","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":"-LM4FFahXIfxWOCMTnv8h","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":"xQgr6kBSJC4bOtPlWmvqU","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":"oJaNxV8XDOKiWyWlqMmnR","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":"2mxkZhlM1FGNjxX06vcj5","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":"RAPkxj261jisjoZGE_dfr","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":"EuFiJibhWFUWHjmlX2vjg","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":"51LsMQLLG5HwuE41b0JTb","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":"vvTy4PabH-UbhHaWyxS6x","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":"h71bljp9gNrpX8-7fa7os","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":"v3_vAd_hs__zrR-x7LR0n","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":"o9yER6s92L0Aq8wb4qYD_","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":"YUTImem-xf49j_URarhgI","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":"AL-knfziR-8K4LOj9vsoW","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":"7-wS5YqJf4IEIS0UFmMtm","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":"duKrhzr4U2A_nN647eICt","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":"JWTlqDTYQxL4hKEQ6Lv53","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":"kG_Z7Vz9r0okV9Nu8b48Y","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":"SgypP0Rw647pMwilvTOUF","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":"fuAtymDQl-oFBfukhI06h","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":"v4_9RkSMhYf8vY6MndYFc","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":"pxGVOgXGww8w0eVeLCkdZ","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":"TfQb1iOXsUgv-ceR4pGdE","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                OnDestroy Notification function
                \nCalled by engine before deleting the object

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T6afNqpw2p8K5DFcVyBcZ","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":"LkfpwItpWrrLfKDea0lVh","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":"tFjFzpKFmlpD6keGPV_cL","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":"a-Ke55TVPMpFsjEJLEm42","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":"fEQG666KhSDCE0mxq41xZ","name":"removeBody","brief":"","scope":"instance","see":["Container.removeChild"],"type":"MethodDoc","description":"

                Remove a physic body from the game world

                ","params":[{"identifier":"body","optional":false,"dataType":{"tokens":[{"value":"Body","kind":"canonical"},{"value":"Body","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                this game world

                ","dataType":{"tokens":[{"value":"World","kind":"canonical"},{"value":"World","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MIeqm9UljYVwgiUP8qwA0","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":"Mb5QPZZxmcPBVYgL7fdFZ","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":"RWfSs416O1MfyOzcN1sGz","name":"reset","brief":"

                reset the game world

                ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8cWLkDhsBw-OYWpkFe0QD","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":"q6w-Xqt_S7KHsnQ8AHY12","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":"_hOsyq9yoJv6IPJICMCIL","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":"3UVmqc63r28wODJfKxvGx","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":"r0co7t5nEr8r0DT8lJ0n1","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":"oZeUxE4b1YRSaR-VsGLAo","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":"040opQyytUMVJ0wf13Tkx","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":"Ent--Um6_0FYEpT9wUu0K","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":"Xe-86qqLG_VvJ0Wwak5vL","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":"Y1kuPFfb7d5whqQQfCfXz","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":"T8p0AqQ-nZdNDTWVrHvPa","name":"step","brief":"","scope":"instance","type":"MethodDoc","description":"

                update the builtin physic simulation by one step (called by the game world update method)

                ","params":[{"identifier":"dt","optional":false,"description":"

                the time passed since the last frame update

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"KwQ4uZZ8T0aZFZDQPvYg-","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":"niyWteF-DRnf6Jd_9MVlN","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":"SmjxkF_1Lv_NHAM6jF_Bk","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":"CR_ourTS9oGxj1a26UBkC","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":"ir43KvWa2yeAMOnWwMHZL","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":"cHY_wPm0u6u20o_cF-4as","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":"7FLfkt78ZXdC-1EYkJxBE","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":"-sf7RSp7BW_m1Cx_aQ9OG","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"

                update the game world

                ","params":[{"identifier":"dt","optional":false,"description":"

                the time passed since the last frame update

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                true if the world is dirty

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"OH0b90MhVWUQosdPAyC35","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":"SLhro3RtZ1kMO0WJyGb3y","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":"FL_V4-Qh2a_8u4kjwlG-f","name":"bodyApplyGravity","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"

                Apply gravity to the given body

                ","params":[{"identifier":"body","optional":false,"dataType":{"tokens":[{"value":"Body","kind":"canonical"},{"value":"Body","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"huas9bva4eqJzc7i2aiI_","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":"tz7GboYYDNTVLh2WuDbn2","name":"AUTO","brief":"","defaultValue":"2","readonly":true,"scope":"static","see":["Application"],"type":"PropertyDoc","description":"

                constant to auto-select the renderer (Attempt WebGL first, with fallback to Canvas)

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IZvBoSDGPrD8-f-fkd_e7","name":"CANVAS","brief":"","defaultValue":"0","readonly":true,"scope":"static","see":["Application"],"type":"PropertyDoc","description":"

                constant to select the HTML5 Canvas renderer

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"viD3geuqexuQ7IN8Hu5uu","name":"version","brief":"","defaultValue":"\"__VERSION__\"","readonly":true,"scope":"static","type":"PropertyDoc","description":"

                current melonJS version

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aQoGr7xirdJ9Iq4-fCA-f","name":"WEBGL","brief":"","defaultValue":"1","readonly":true,"scope":"static","see":["Application"],"type":"PropertyDoc","description":"

                constant to select select the WebGL renderer

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZY7lBmkpuRKeULiQjke2w","name":"failureLoadedAssets","brief":"

                Assets uploaded with an error

                ","readonly":true,"type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xtg5WNITc0fkt3MEWfUde","name":"imgList","brief":"

                where all preloaded content is cached

                ","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gV0o4H6VOT-DCIoY7AYvP","name":"initialized","brief":"","defaultValue":"false","readonly":true,"type":"PropertyDoc","description":"

                a flag indicating that melonJS is fully initialized

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TlsMwqps9HQ6T8p5_ieUG","name":"parserInitialized","brief":"

                keep track if parsers were registered

                ","defaultValue":"false","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T4hvIOst2fNWGOhQX90Ho","name":"parsers","brief":"

                list of parser function for supported format type

                ","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WbckzIcqRK7xzrPxHknLK","name":"skipAutoInit","brief":"","defaultValue":"false","see":["boot"],"type":"PropertyDoc","description":"

                disable melonJS auto-initialization

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"swtk01_StiFvvwnBW_iUG","name":"boot","brief":"","access":"public","see":["skipAutoInit"],"type":"FunctionDoc","description":"

                initialize the melonJS library.\nthis is automatically called unless me.skipAutoInit is set to true,\nto allow asynchronous ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cmk0sx-WYijDGJFju047O","name":"consoleHeader","brief":"","type":"FunctionDoc","description":"

                display information

                ","params":[{"identifier":"app","optional":false,"description":"

                the game application instance calling this function

                ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"qsLzOyo1cZP8S9uxCfNJt","name":"warning","brief":"","type":"FunctionDoc","description":"

                display a deprecation warning in the console

                ","params":[{"identifier":"deprecated","optional":false,"description":"

                deprecated class,function or property name

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"replacement","optional":false,"description":"

                the replacement class, function, or property name

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"version","optional":false,"description":"

                the version since when the lass,function or property is deprecated

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"huiYgg4PoWFFeg4e3eX0P","name":"onresize","brief":"","access":"private","type":"FunctionDoc","description":"

                callback for window resize event

                ","params":[{"identifier":"game","optional":false,"description":"

                the game application instance triggering the resize

                ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"i04lAYIraLbxGW_FXgoFX","name":"scale","brief":"","access":"private","type":"FunctionDoc","description":"

                scale the "displayed" canvas by the given scalar.\nthis will modify the size of canvas element directly.\nOnly use...","params":[{"identifier":"game","optional":false,"description":"

                the game application instance triggering the resize

                ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}},{"identifier":"x","optional":false,"description":"

                x scaling multiplier

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

                y scaling multiplier

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},"registry":{"pkg-L6WxLA5jl8avWoHdX2ShB":{"uri":"/melonJS/docs/melonjs.html"},"MNsGh-wpZpzzNJh_BsRfD":{"uri":"/melonJS/docs/melonjs/audio.html"},"f1-xBTH8VE-xCgkIumXnO":{"uri":"/melonJS/docs/melonjs/audio.html#stopOnAudioError"},"e5r4x9f7TxU1EFBXG6GmV":{"uri":"/melonJS/docs/melonjs/audio/disable.html"},"y0Qblv-yYZ437okc4lYXE":{"uri":"/melonJS/docs/melonjs/audio/enable.html"},"s5eyvd1NKrwpf9_bt6TPU":{"uri":"/melonJS/docs/melonjs/audio/fade.html"},"KiEEI15GTv1w7trNCkhB6":{"uri":"/melonJS/docs/melonjs/audio/getCurrentTrack.html"},"TJdJcuuSMk_EAXgwjvM7d":{"uri":"/melonJS/docs/melonjs/audio/getVolume.html"},"V5jFtEnLaokIMuY-6-mqs":{"uri":"/melonJS/docs/melonjs/audio/hasAudio.html"},"QqcO_Az3vlw5h2Rp2mpEF":{"uri":"/melonJS/docs/melonjs/audio/hasFormat.html"},"4iXfwPU00RvRu69TQBVWg":{"uri":"/melonJS/docs/melonjs/audio/init.html"},"q_bL_bEFJmn8_H7gCVa99":{"uri":"/melonJS/docs/melonjs/audio/load.html"},"mOo_qGQc7UDf0u2tXU1VU":{"uri":"/melonJS/docs/melonjs/audio/mute.html"},"OGTYa2Hmnp-acDEqeuZec":{"uri":"/melonJS/docs/melonjs/audio/muteAll.html"},"FueS5nIyMi83Mqfplr1Vi":{"uri":"/melonJS/docs/melonjs/audio/muted.html"},"VLMYR1CtaNhEq-rHHvVIn":{"uri":"/melonJS/docs/melonjs/audio/pause.html"},"mC0JlFpSjXQGRA54RlrE_":{"uri":"/melonJS/docs/melonjs/audio/pauseTrack.html"},"6Sw_x6pJSlfOZ-S8IqH32":{"uri":"/melonJS/docs/melonjs/audio/play.html"},"Pkmhhl8Db5ouiTMvJjg-C":{"uri":"/melonJS/docs/melonjs/audio/playTrack.html"},"WVmybg7MsayKmBCdbqC5f":{"uri":"/melonJS/docs/melonjs/audio/rate.html"},"A2dmhuF2-m1of7ATCPuHJ":{"uri":"/melonJS/docs/melonjs/audio/resume.html"},"dA21jtUJbvcTzKc2dnSzG":{"uri":"/melonJS/docs/melonjs/audio/resumeTrack.html"},"bWUkLjnjYT47gcqJiwEcW":{"uri":"/melonJS/docs/melonjs/audio/seek.html"},"G4l0nhkfytUrLr6k8X4Nd":{"uri":"/melonJS/docs/melonjs/audio/setVolume.html"},"gzvyyPOT6i_CQpl8Jt4Rw":{"uri":"/melonJS/docs/melonjs/audio/stop.html"},"9Hm6tD3zZ6npsOY_Arnca":{"uri":"/melonJS/docs/melonjs/audio/stopTrack.html"},"AdCBPmx8qwdX1Q6cczdgw":{"uri":"/melonJS/docs/melonjs/audio/unload.html"},"3daeKRXdDO7Rt0HwoRrcr":{"uri":"/melonJS/docs/melonjs/audio/unloadAll.html"},"0A0XLHfIP9A0PYvC5I2nO":{"uri":"/melonJS/docs/melonjs/audio/unmute.html"},"fJY01islkkuWxRV3kc7z_":{"uri":"/melonJS/docs/melonjs/audio/unmuteAll.html"},"Acw1RhN_Z_Sx7oQLPoj1s":{"uri":"/melonJS/docs/melonjs/collision.html"},"vTBP_x-6HjFQw5k_pZcXu":{"uri":"/melonJS/docs/melonjs/collision/types.html"},"cvKI7icUcJyqnP9D13jGN":{"uri":"/melonJS/docs/melonjs/collision/types.html#ACTION_OBJECT"},"UlAtBCdRLdGLGjnuLMJj1":{"uri":"/melonJS/docs/melonjs/collision/types.html#ALL_OBJECT"},"UgKw4CM1umxDUjIHCkRjT":{"uri":"/melonJS/docs/melonjs/collision/types.html#COLLECTABLE_OBJECT"},"usJlkPM6HTB9aLQGfoM3z":{"uri":"/melonJS/docs/melonjs/collision/types.html#ENEMY_OBJECT"},"KtI-RbDxupaqF9PmDyTFW":{"uri":"/melonJS/docs/melonjs/collision/types.html#NO_OBJECT"},"f4lFrhHc1wQ0CCgf_U46z":{"uri":"/melonJS/docs/melonjs/collision/types.html#NO_OBJECT_"},"ZREx9yQjbO9Us3XdjxBvP":{"uri":"/melonJS/docs/melonjs/collision/types.html#NPC_OBJECT"},"cMaFbLHPumd_fZsntXJ0R":{"uri":"/melonJS/docs/melonjs/collision/types.html#PLAYER_OBJECT"},"E2JFomk_62jFvpSR1nmVf":{"uri":"/melonJS/docs/melonjs/collision/types.html#PROJECTILE_OBJECT"},"iajqvY46kINisSKS2Vnyw":{"uri":"/melonJS/docs/melonjs/collision/types.html#USER"},"iHz0KH9rQbT0lHyV92v3I":{"uri":"/melonJS/docs/melonjs/collision/types.html#WORLD_SHAPE"},"i5a_WXMEh7FLK6WBtVHyu":{"uri":"/melonJS/docs/melonjs/collision.html#maxChildren"},"PKmnLLigxnBHDCz_GXLsn":{"uri":"/melonJS/docs/melonjs/collision.html#maxDepth"},"CKtWIRheV1Sl4t-migRuc":{"uri":"/melonJS/docs/melonjs/collision.html#rayCast"},"MOM6LiylbWgYAnjJcAs5O":{"uri":"/melonJS/docs/melonjs/device.html"},"B_0lXkbRACSEZU384ynrL":{"uri":"/melonJS/docs/melonjs/device/platform.html"},"3cJH4XAz8u81xw_Qow-KJ":{"uri":"/melonJS/docs/melonjs/device/platform.html#android"},"jzIyhVpq426VayI2LG5uA":{"uri":"/melonJS/docs/melonjs/device/platform.html#android2"},"oxeaKDkhrRJT-lv8J2iJD":{"uri":"/melonJS/docs/melonjs/device/platform.html#BlackBerry"},"ZfZ6r4RiVIMdpX8YtaP5n":{"uri":"/melonJS/docs/melonjs/device/platform.html#chromeOS"},"HlRWIvBijC7fLTC2Ess7U":{"uri":"/melonJS/docs/melonjs/device/platform.html#ejecta"},"4ZioyeegxVAqx8TyO4Dvt":{"uri":"/melonJS/docs/melonjs/device/platform.html#iOS"},"g06XmBC8P8F9dPY25Trqo":{"uri":"/melonJS/docs/melonjs/device/platform.html#isMobile"},"og9XEMWsRC2ZmsXUCKY3m":{"uri":"/melonJS/docs/melonjs/device/platform.html#isWeixin"},"gLvynEYKNLBMEbDo6BOR8":{"uri":"/melonJS/docs/melonjs/device/platform.html#Kindle"},"f2LF5Ao4H-2yBtMIwRaJH":{"uri":"/melonJS/docs/melonjs/device/platform.html#linux"},"eRxLSPK_jpIzatZs3Ryrp":{"uri":"/melonJS/docs/melonjs/device/platform.html#nodeJS"},"i1aHbPGFc-VgsaBFH3vDN":{"uri":"/melonJS/docs/melonjs/device/platform.html#ua"},"qvL4k6APDHSubX3BP5Jsx":{"uri":"/melonJS/docs/melonjs/device/platform.html#wp"},"sVuIHnLK2Lsbhdmh7yThu":{"uri":"/melonJS/docs/melonjs/device.html#accelerationX"},"j43nAM7hwHoLeV45-4RxQ":{"uri":"/melonJS/docs/melonjs/device.html#accelerationY"},"nyQ8GLNBozVKskByquBDP":{"uri":"/melonJS/docs/melonjs/device.html#accelerationZ"},"RE8Bmy_IbNu0YS30rDVQ7":{"uri":"/melonJS/docs/melonjs/device.html#alpha"},"aX4syVX0pPPwUC1Ckhg0R":{"uri":"/melonJS/docs/melonjs/device.html#autoFocus"},"2MmDcwj5iZ94-QFvkgNt-":{"uri":"/melonJS/docs/melonjs/device.html#beta"},"MGE-NEu7DRW-BGCciwTDh":{"uri":"/melonJS/docs/melonjs/device.html#devicePixelRatio"},"gm5JJf6kwMRtp1VHqpRIv":{"uri":"/melonJS/docs/melonjs/device.html#gamma"},"PWEMyFYeUFEQ-WlyvwHXK":{"uri":"/melonJS/docs/melonjs/device.html#hasAccelerometer"},"Jj29dOhFKke3VFXBg2Dyt":{"uri":"/melonJS/docs/melonjs/device.html#hasDeviceOrientation"},"HdXT26-npDyK-vxs3z_j7":{"uri":"/melonJS/docs/melonjs/device.html#hasFullscreenSupport"},"RzT3seKjjx9Uy0P1q2WHA":{"uri":"/melonJS/docs/melonjs/device.html#hasHTML5Audio"},"DSx4ehTs65_GIe1dlRpBd":{"uri":"/melonJS/docs/melonjs/device.html#hasPointerLockSupport"},"1tV8hJ_44s9lSZ9_b3-SA":{"uri":"/melonJS/docs/melonjs/device.html#hasWebAudio"},"DC3NKZA3rcYThIa6ivr9y":{"uri":"/melonJS/docs/melonjs/device.html#isMobile"},"K1cXXPWrOrMJ1Smjg-O_w":{"uri":"/melonJS/docs/melonjs/device.html#language"},"mLykYiZtwI4K2d1_6DYuR":{"uri":"/melonJS/docs/melonjs/device.html#localStorage"},"98hizMd9RZPVoWZKxDNx3":{"uri":"/melonJS/docs/melonjs/device.html#maxTouchPoints"},"eoo0loXjkfqk4fTxcLqQQ":{"uri":"/melonJS/docs/melonjs/device.html#nativeBase64"},"HWQIooKQRcF6BELACEvYT":{"uri":"/melonJS/docs/melonjs/device.html#offscreenCanvas"},"PA0sG0WyxVkdt7wLKxuWS":{"uri":"/melonJS/docs/melonjs/device.html#pauseOnBlur"},"MNg4EEG-au4Q-zBNkTXWo":{"uri":"/melonJS/docs/melonjs/device.html#platform"},"vZdjGfzSfcZvoiPIGHR4D":{"uri":"/melonJS/docs/melonjs/device.html#pointerEvent"},"9vHNV8gDwtRrN18rJld_u":{"uri":"/melonJS/docs/melonjs/device.html#resumeOnFocus"},"Lj1xaw5rU58AqhNBoeuku":{"uri":"/melonJS/docs/melonjs/device.html#screenOrientation"},"s6_yNOuX1zt2jxwqS0BmE":{"uri":"/melonJS/docs/melonjs/device.html#sound"},"AdF_zyhvy_OmzSeJPEaMP":{"uri":"/melonJS/docs/melonjs/device.html#stopOnBlur"},"WHDKHDFd-zl-QUvv4XXV6":{"uri":"/melonJS/docs/melonjs/device.html#touch"},"REKH4os23niQIWY16XJ3g":{"uri":"/melonJS/docs/melonjs/device.html#touchEvent"},"I2joj4kyEXZ3D6HJWr9hM":{"uri":"/melonJS/docs/melonjs/device.html#wheel"},"DLzPTaefYSCOowOAibZKV":{"uri":"/melonJS/docs/melonjs/device/enableSwipe.html"},"rEdj9esLNzuPsJhHSw9kI":{"uri":"/melonJS/docs/melonjs/device/exitFullscreen.html"},"epnCrdV_-VVac6TlBEsb4":{"uri":"/melonJS/docs/melonjs/device/focus.html"},"rN2JonIIjqY3oc0yi-aa5":{"uri":"/melonJS/docs/melonjs/device/getElement.html"},"60cTMutldhITujwC-w-vq":{"uri":"/melonJS/docs/melonjs/device/getElementBounds.html"},"PNs2z91N51a2DoM0V4CKR":{"uri":"/melonJS/docs/melonjs/device/getParentBounds.html"},"crUiI-6IfE2V9tEHBSCYu":{"uri":"/melonJS/docs/melonjs/device/getParentElement.html"},"oqfsS4wNRzDwmDpH9HQ2i":{"uri":"/melonJS/docs/melonjs/device/getScreenOrientation.html"},"RWV7wZHO34kFBUJfVem9J":{"uri":"/melonJS/docs/melonjs/device/getStorage.html"},"2P5K1imjFl40GYC9LQf3x":{"uri":"/melonJS/docs/melonjs/device/isFullscreen.html"},"VT6782dpK8_V7eP5MrUQs":{"uri":"/melonJS/docs/melonjs/device/isLandscape.html"},"U8KExO51vcco6KVKfpzlt":{"uri":"/melonJS/docs/melonjs/device/isPortrait.html"},"5xhMpZQjhBtEaFrK6_9UJ":{"uri":"/melonJS/docs/melonjs/device/isWebGLSupported.html"},"hZgoGspisA_do7w2WyLcW":{"uri":"/melonJS/docs/melonjs/device/lockOrientation.html"},"r7KZqlg-Ovj2Y3mqrXHEf":{"uri":"/melonJS/docs/melonjs/device/onReady.html"},"OCpxhl5dfRteUSxJbTBpx":{"uri":"/melonJS/docs/melonjs/device/requestFullscreen.html"},"ssRoDAuy1Tf5yFZtgsq8H":{"uri":"/melonJS/docs/melonjs/device/unlockOrientation.html"},"5QUCiuBDYC4mQCApaFwZn":{"uri":"/melonJS/docs/melonjs/device/unwatchAccelerometer.html"},"u1FgxqE-Q-2d-7OyXWUDt":{"uri":"/melonJS/docs/melonjs/device/unwatchDeviceOrientation.html"},"xaqrZRRrNvTWObl31u98r":{"uri":"/melonJS/docs/melonjs/device/vibrate.html"},"kjtzRojOYBO3oDNRcoUzK":{"uri":"/melonJS/docs/melonjs/device/watchAccelerometer.html"},"4zc8NDo7K2PzF7FBT5Ss6":{"uri":"/melonJS/docs/melonjs/device/watchDeviceOrientation.html"},"-K7Ab5qPxMisOIdCBlfrd":{"uri":"/melonJS/docs/melonjs/event.html"},"AOOY21sSPcB0cNggCN1SQ":{"uri":"/melonJS/docs/melonjs/event.html#BLUR"},"fv82KXq9YMs9v8uQEmiDP":{"uri":"/melonJS/docs/melonjs/event.html#BOOT"},"diON7PIWkuVBEU-hs0EqY":{"uri":"/melonJS/docs/melonjs/event.html#CANVAS_ONRESIZE"},"CoeTyHF4KdGr1IxZQu_-P":{"uri":"/melonJS/docs/melonjs/event.html#DOM_READY"},"nttwKJHwix3z-Ew0cEmEq":{"uri":"/melonJS/docs/melonjs/event.html#DRAGEND"},"-TO9GH9tSdtxAb5GpUFL5":{"uri":"/melonJS/docs/melonjs/event.html#DRAGSTART"},"OSiMv_Sxn2uyI5k-BkjXV":{"uri":"/melonJS/docs/melonjs/event.html#FOCUS"},"eXUC86uvwPBmTtH3TUItz":{"uri":"/melonJS/docs/melonjs/event.html#GAME_AFTER_DRAW"},"v7TGYetgxCboIuCDvWhcG":{"uri":"/melonJS/docs/melonjs/event.html#GAME_AFTER_UPDATE"},"VO1rM52Il1Iijl9qfjI2c":{"uri":"/melonJS/docs/melonjs/event.html#GAME_BEFORE_DRAW"},"1AAU4Hwc3wjdTXIOTy30X":{"uri":"/melonJS/docs/melonjs/event.html#GAME_BEFORE_UPDATE"},"8k8skTyk6Wyns-kwKIeaZ":{"uri":"/melonJS/docs/melonjs/event.html#GAME_INIT"},"3JfkYgXPU4KvLvS7saTel":{"uri":"/melonJS/docs/melonjs/event.html#GAME_RESET"},"JipUF3bNVso8qbO7iBdNS":{"uri":"/melonJS/docs/melonjs/event.html#GAME_UPDATE"},"NI3WQXErAbs968zwakoDh":{"uri":"/melonJS/docs/melonjs/event.html#GAMEPAD_CONNECTED"},"CoTWAhMxMsN7Clo5YRaZh":{"uri":"/melonJS/docs/melonjs/event.html#GAMEPAD_DISCONNECTED"},"fWSrmen19G5XInL6IyW-W":{"uri":"/melonJS/docs/melonjs/event.html#GAMEPAD_UPDATE"},"23675U4YJbNOZcLmVT9Py":{"uri":"/melonJS/docs/melonjs/event.html#KEYDOWN"},"ZQipCRcLWsrrOwk0rduax":{"uri":"/melonJS/docs/melonjs/event.html#KEYUP"},"OyDUAK-W_kl1DzdFSFs_4":{"uri":"/melonJS/docs/melonjs/event.html#LEVEL_LOADED"},"oBQG6KplTmueFLO_Oiou2":{"uri":"/melonJS/docs/melonjs/event.html#LOADER_COMPLETE"},"nsGrzxXnWiSPGs0OceOqQ":{"uri":"/melonJS/docs/melonjs/event.html#LOADER_ERROR"},"CdSvmArXP80PfcYgQsLZa":{"uri":"/melonJS/docs/melonjs/event.html#LOADER_PROGRESS"},"IhbvnupsVoWOXaFBAIOH3":{"uri":"/melonJS/docs/melonjs/event.html#ONCONTEXT_RESTORED"},"Iqieas0XHGkf0Dxwnfk_w":{"uri":"/melonJS/docs/melonjs/event.html#POINTERLOCKCHANGE"},"9hWBY23QIILLoEmVQBh0e":{"uri":"/melonJS/docs/melonjs/event.html#POINTERMOVE"},"UuaYBIxNSp_feH3egOJgC":{"uri":"/melonJS/docs/melonjs/event.html#STAGE_RESET"},"uEO8wK9G7jI1XEWP264E_":{"uri":"/melonJS/docs/melonjs/event.html#STATE_CHANGE"},"2W-LORCt02A2m9_MMdZgT":{"uri":"/melonJS/docs/melonjs/event.html#STATE_PAUSE"},"nXEtecBkO0xIKYAmzOGqL":{"uri":"/melonJS/docs/melonjs/event.html#STATE_RESTART"},"eNptu6Gbkar5nzwGjT1Xz":{"uri":"/melonJS/docs/melonjs/event.html#STATE_RESUME"},"Ng9nLYdjQoQ6F2l_g_wR3":{"uri":"/melonJS/docs/melonjs/event.html#STATE_STOP"},"cqAyGNu9x4PjYPnfWIhkx":{"uri":"/melonJS/docs/melonjs/event.html#TICK"},"YdCfVLuCkh-dp1ZofL-2J":{"uri":"/melonJS/docs/melonjs/event.html#VIDEO_INIT"},"czqz_xXp5PxzirBwhJpA-":{"uri":"/melonJS/docs/melonjs/event.html#VIEWPORT_ONCHANGE"},"czO0Xn1LodBOdX8ut91dK":{"uri":"/melonJS/docs/melonjs/event.html#VIEWPORT_ONRESIZE"},"Vg8ZZSfrF76ZYI9IfLnrm":{"uri":"/melonJS/docs/melonjs/event.html#WEBGL_ONCONTEXT_LOST"},"9srY1W4HdKwjrQ92bwpIk":{"uri":"/melonJS/docs/melonjs/event.html#WINDOW_ONORIENTATION_CHANGE"},"cxoTgrL2YBvslRK0Qcd7t":{"uri":"/melonJS/docs/melonjs/event.html#WINDOW_ONRESIZE"},"T0gNqkQadvYB4Q6lVLdfT":{"uri":"/melonJS/docs/melonjs/event.html#WINDOW_ONSCROLL"},"r54Gh-uD7FhQ456__i7gl":{"uri":"/melonJS/docs/melonjs/event.html#WORLD_STEP"},"Xi0qebk_gqo8kb-KXkmZ3":{"uri":"/melonJS/docs/melonjs/event/emit.html"},"JQ56fLAhofT5kwUJLvGyi":{"uri":"/melonJS/docs/melonjs/event/off.html"},"r_5bKOfwAetenC8cDFCzZ":{"uri":"/melonJS/docs/melonjs/event/on.html"},"rwZLUh9ozjEDBxcSjLGXP":{"uri":"/melonJS/docs/melonjs/event/once.html"},"xjWLQ24oC5madf1bdyFJf":{"uri":"/melonJS/docs/melonjs/game.html"},"F6_N573ALKKMegH1r6VYg":{"uri":"/melonJS/docs/melonjs/input.html"},"NEJyL5nDClpS7IC6rnUmv":{"uri":"/melonJS/docs/melonjs/input/GAMEPAD.html"},"pWlAIBkjoee4UlhXt0KTf":{"uri":"/melonJS/docs/melonjs/input/GAMEPAD/AXES.html"},"uSdz1XSA3JB8_aWRbVydC":{"uri":"/melonJS/docs/melonjs/input/GAMEPAD/BUTTONS.html"},"LGhKYraUbvEQFgdJcJMX1":{"uri":"/melonJS/docs/melonjs/input/KEY.html"},"ki5eGz33K1zUt9v9YROMD":{"uri":"/melonJS/docs/melonjs/input/KEY.html#A"},"0rnSSSJrMvWSe2KCQxw9y":{"uri":"/melonJS/docs/melonjs/input/KEY.html#ADD"},"mYi5BrA_dhAcSCWMSm7_V":{"uri":"/melonJS/docs/melonjs/input/KEY.html#ALT"},"YCL8WZe08NbBFqRIFlMdy":{"uri":"/melonJS/docs/melonjs/input/KEY.html#B"},"gKN5qPgotAHRQN4UcD7C-":{"uri":"/melonJS/docs/melonjs/input/KEY.html#BACK_SLASH"},"eAAGndbabDkYLTxEOzv3V":{"uri":"/melonJS/docs/melonjs/input/KEY.html#C"},"lXesbGIJR7_gU0_LBBujA":{"uri":"/melonJS/docs/melonjs/input/KEY.html#CAPS_LOCK"},"nZoZItnOw9UTgbxYLA5xp":{"uri":"/melonJS/docs/melonjs/input/KEY.html#CLOSE_BRACKET"},"LFE5hclPLhXxf4YbQgLn1":{"uri":"/melonJS/docs/melonjs/input/KEY.html#COMMA"},"fZ0CCeDuJXrXy7d0DGQNo":{"uri":"/melonJS/docs/melonjs/input/KEY.html#CTRL"},"u6vju5i4-USJ5KtjYwSjA":{"uri":"/melonJS/docs/melonjs/input/KEY.html#D"},"eEOR876zQ8AXQyTF7I836":{"uri":"/melonJS/docs/melonjs/input/KEY.html#DECIMAL"},"FbTLolW5kdAiGWGNESE0Z":{"uri":"/melonJS/docs/melonjs/input/KEY.html#DELETE"},"jHfcZjJmqc3jXku_twB8t":{"uri":"/melonJS/docs/melonjs/input/KEY.html#DIVIDE"},"6genEOJcd3zXTSUZatPkV":{"uri":"/melonJS/docs/melonjs/input/KEY.html#DOWN"},"C3g5L9V7tXB0_m7Y4xpxt":{"uri":"/melonJS/docs/melonjs/input/KEY.html#E"},"3ZY-2YqyKa-FA7UsCBdsK":{"uri":"/melonJS/docs/melonjs/input/KEY.html#END"},"CVvGTHpLkiQccPsnqvvze":{"uri":"/melonJS/docs/melonjs/input/KEY.html#ENTER"},"TEeUq637eLNQaposRIPQL":{"uri":"/melonJS/docs/melonjs/input/KEY.html#ESC"},"8XuTLVuCcdsULrBDJRhoT":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F"},"bVLR7Am2jf0WMMA647c8o":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F1"},"6TqEuabyhwHdeZAtjfTnC":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F10"},"RkwLVpAgF187_dLcK8uzg":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F11"},"oxu3Ygzi4l0VOMTO6iWpJ":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F12"},"D_E05RyPlRGxIfBlKe-7A":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F2"},"dtpq7skrgtEiBmuI-toaU":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F3"},"L-2_yxgTqAxboN-z9POQw":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F4"},"UrMOmIw3Sm8WmhJkZ62Ki":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F5"},"WbWUpCPDn3FD12a-MtKkn":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F6"},"IywJm8DN95uAOlRvd0pQd":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F7"},"c9bWBpmEyF0SAU4oLRl4y":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F8"},"-St-550U7rM9cw3wIlwhu":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F9"},"TTfT-u6i_VJiojzbfh87w":{"uri":"/melonJS/docs/melonjs/input/KEY.html#FORWAND_SLASH"},"0mZCDkA2izv36ejWc4sUn":{"uri":"/melonJS/docs/melonjs/input/KEY.html#G"},"KT4ziTl9K5E0BXQ3vFHsP":{"uri":"/melonJS/docs/melonjs/input/KEY.html#GRAVE_ACCENT"},"2uCyZLuvC3BSsS9-qsvLF":{"uri":"/melonJS/docs/melonjs/input/KEY.html#H"},"X1RmQrlQITLD8ckoPoxN6":{"uri":"/melonJS/docs/melonjs/input/KEY.html#HOME"},"53JNSLH3F96HER03fzKq4":{"uri":"/melonJS/docs/melonjs/input/KEY.html#I"},"0DVO5siFWpp8LRWRm754C":{"uri":"/melonJS/docs/melonjs/input/KEY.html#INSERT"},"sc8vd_AvqdPROuVebibJm":{"uri":"/melonJS/docs/melonjs/input/KEY.html#J"},"bOUUuGtR-TGM7R5CD94OJ":{"uri":"/melonJS/docs/melonjs/input/KEY.html#K"},"JWos-Cn6AuIz0RHI_WSqh":{"uri":"/melonJS/docs/melonjs/input/KEY.html#L"},"mI52aoERplGLu3GnoeRcp":{"uri":"/melonJS/docs/melonjs/input/KEY.html#LEFT"},"4z2-VGo6miJS0a44FFnth":{"uri":"/melonJS/docs/melonjs/input/KEY.html#M"},"Rtqzrb6rfKRTon0Ki7O5I":{"uri":"/melonJS/docs/melonjs/input/KEY.html#MINUS"},"bpVS5QBZbZISjRDAB35-A":{"uri":"/melonJS/docs/melonjs/input/KEY.html#MULTIPLY"},"w1G1zhvnTwgLVgmBI_8GB":{"uri":"/melonJS/docs/melonjs/input/KEY.html#N"},"0RlgkEYXYCmJuLKN17CJc":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM_LOCK"},"3hZ4NVWY4sDy7iDz06oSc":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM0"},"xLFNKTL038_CTC-deXopK":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM1"},"AID8udLpT5A94udxRqa4s":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM2"},"WBOTMn1G1jXQbVR4IOuIX":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM3"},"cuz6B0Zeu0az3u-vzpCCX":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM4"},"Qm9Iuy23Gh4FDCTwMiELg":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM5"},"4_AVmeK_Jydd19Av-zp_B":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM6"},"qwd6iQR-qUaUl4VcxlXSn":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM7"},"-cRhmlSrqV5f7veT0svse":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM8"},"w1V7gmEm1WZTk9oFLgIpN":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM9"},"fKhQbdeMhEr8qVrCe9Mam":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD0"},"-BeAXkxLxWTU_vEwDIeqs":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD1"},"-xxoylS3w5tDp0uscRrBJ":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD2"},"uV1CiyCqQb8A3jIuTsg0g":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD3"},"8jz87I7hNKQcA8PXdIS1v":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD4"},"fO952akGGW3-ljEOnNclo":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD5"},"CsmDLM0qgg5lQ95ZIgiz9":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD6"},"EXbklo_DAXtMQ56NNiylg":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD7"},"RDfKPHOtcMgXffPkLP9_5":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD8"},"6RGspa-fgmbW6mzVgnRvt":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD9"},"X-6FuG92ucqRH0Z_6cMJT":{"uri":"/melonJS/docs/melonjs/input/KEY.html#O"},"JsTPInbFYDeW8dUcpIJan":{"uri":"/melonJS/docs/melonjs/input/KEY.html#OPEN_BRACKET"},"mNdtWnvIYnNoIlIuL_t5x":{"uri":"/melonJS/docs/melonjs/input/KEY.html#P"},"q4KoGFH9lB0fsiarAZzXR":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PAGE_DOWN"},"-aGUtDpJs127PbOcy8-sh":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PAGE_UP"},"Gok2mD3kM9V7MYGiQvJIZ":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PAUSE"},"2yQBgLegDzNCdBL6GLQk7":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PERIOD"},"Bd_MbyOyy9pB3vEJsc2qm":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PLUS"},"cQeiY4WLhp2H311EcHGsP":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PRINT_SCREEN"},"BBCS_pKpzPJGLT97KLwMN":{"uri":"/melonJS/docs/melonjs/input/KEY.html#Q"},"CFk8Pvt75Vo9CWeBQsxlX":{"uri":"/melonJS/docs/melonjs/input/KEY.html#R"},"9wzl8wZiqXBvsgMGhy7g0":{"uri":"/melonJS/docs/melonjs/input/KEY.html#RIGHT"},"9FEEdhBhyknjo68asWcUT":{"uri":"/melonJS/docs/melonjs/input/KEY.html#S"},"nQLUyTn9O5Y6qt_wy8sfn":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SCROLL_LOCK"},"WeRc_QmpagN0aRL2pVJBo":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SEMICOLON"},"4xjw-kBiDVqGCwQCvprki":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SHIFT"},"mUy0JWllXkS80k8O-CBfb":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SINGLE_QUOTE"},"vttKEDgeJCFPs638lV8Ro":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SPACE"},"CnoWacpAK8FcT64L76g8F":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SUBSTRACT"},"6jt2GB8AiE_URKirR91e1":{"uri":"/melonJS/docs/melonjs/input/KEY.html#T"},"GWg8VUeGLmRCVDdH6yG3t":{"uri":"/melonJS/docs/melonjs/input/KEY.html#TAB"},"aF87XarNewSYyK29uevQF":{"uri":"/melonJS/docs/melonjs/input/KEY.html#TILDE"},"eT7QH-aKL4RkvfrI-yKHT":{"uri":"/melonJS/docs/melonjs/input/KEY.html#U"},"k_8KsxH-08by21wkVnEGf":{"uri":"/melonJS/docs/melonjs/input/KEY.html#UP"},"6H0_PhQ7yXQr-oM8xhMgT":{"uri":"/melonJS/docs/melonjs/input/KEY.html#V"},"aTvQo7z_dJP6QXHVTxaTU":{"uri":"/melonJS/docs/melonjs/input/KEY.html#W"},"WYhv8iqTjN3lcD2j6J94d":{"uri":"/melonJS/docs/melonjs/input/KEY.html#WINDOW_KEY"},"lLybxVPYE7fo5--wDCyCE":{"uri":"/melonJS/docs/melonjs/input/KEY.html#X"},"cxVNwekTw6WjmSapH-5_5":{"uri":"/melonJS/docs/melonjs/input/KEY.html#Y"},"sa5fVKgNjdX-DI_9nE-OR":{"uri":"/melonJS/docs/melonjs/input/KEY.html#Z"},"k8NLDgKWqBncWuYPPPGEl":{"uri":"/melonJS/docs/melonjs/input.html#keyBoardEventTarget"},"9MX7BYmYqfK020NgiGa3z":{"uri":"/melonJS/docs/melonjs/input.html#locked"},"vL1hJIE2RgNaKuTBbcL1Z":{"uri":"/melonJS/docs/melonjs/input.html#pointer"},"kkz3esU2ETYT4mfzwWxsE":{"uri":"/melonJS/docs/melonjs/input.html#pointerEventTarget"},"FFsQKvZYt1zKikps_KDJG":{"uri":"/melonJS/docs/melonjs/input.html#preventDefault"},"_G3acHqhLAXbHZwYtd_fE":{"uri":"/melonJS/docs/melonjs/input.html#setGamepadMapping"},"ACQDZmLXlkw2tK7P1h2p7":{"uri":"/melonJS/docs/melonjs/input.html#throttlingInterval"},"F1a7SQepE445Op7ITyvo6":{"uri":"/melonJS/docs/melonjs/input/bindGamepad.html"},"owqdyGg0FJnj52c6GoQEV":{"uri":"/melonJS/docs/melonjs/input/bindKey.html"},"zqqTVXYFun7r5b1Ha1ZJg":{"uri":"/melonJS/docs/melonjs/input/bindPointer.html"},"hDOSCkBrNMFjSKDiPowAO":{"uri":"/melonJS/docs/melonjs/input/exitPointerLock.html"},"JenGPW2onK2JFpeX18CtD":{"uri":"/melonJS/docs/melonjs/input/getBindingKey.html"},"zG7A5SPxh8IQ3LErg1jNN":{"uri":"/melonJS/docs/melonjs/input/globalToLocal.html"},"6qSBk9gJE3cjlNLGNNMdH":{"uri":"/melonJS/docs/melonjs/input/hasActiveEvents.html"},"yVwUCy0_FCWlluniwzjxQ":{"uri":"/melonJS/docs/melonjs/input/hasRegisteredEvents.html"},"ldR4JoBOz3-fOGDcwJmb8":{"uri":"/melonJS/docs/melonjs/input/isKeyPressed.html"},"coQt-g6ovyUGE5_kyHidI":{"uri":"/melonJS/docs/melonjs/input/keyStatus.html"},"IRJ0A71J0XJKBVhAC8N84":{"uri":"/melonJS/docs/melonjs/input/registerPointerEvent.html"},"A6XLGuUzrVcEyf-9bAMTa":{"uri":"/melonJS/docs/melonjs/input/releaseAllPointerEvents.html"},"8_cdYr_UygIScy_TbKCMt":{"uri":"/melonJS/docs/melonjs/input/releasePointerEvent.html"},"-YUOnNgxONSMYL_dFlT7G":{"uri":"/melonJS/docs/melonjs/input/requestPointerLock.html"},"136PRu32r5INzWU0fc4Db":{"uri":"/melonJS/docs/melonjs/input/setGamepadDeadzone.html"},"Dat_XRSDT8agvgiBokmkY":{"uri":"/melonJS/docs/melonjs/input/setTouchAction.html"},"tb-0JtBjGOUvNpXxobzvs":{"uri":"/melonJS/docs/melonjs/input/triggerKeyEvent.html"},"mDbML06lCCvoU4rWFmdtG":{"uri":"/melonJS/docs/melonjs/input/unbindGamepad.html"},"Dq5STkdO-DxZ9_BVtJ1Cb":{"uri":"/melonJS/docs/melonjs/input/unbindKey.html"},"cwe7hI6wqGBVngbTji0Xq":{"uri":"/melonJS/docs/melonjs/input/unbindPointer.html"},"nUWsAtN4zgfBlBOCToyaF":{"uri":"/melonJS/docs/melonjs/input/unlockKey.html"},"bTkcpvAFwH5z2qYIrpVGU":{"uri":"/melonJS/docs/melonjs/level.html"},"GLcJ1jV1NlK0OHqgDVn2d":{"uri":"/melonJS/docs/melonjs/level.html#add"},"M80ggZa4i63VTMBcxSmvd":{"uri":"/melonJS/docs/melonjs/level.html#getCurrentLevel"},"D83xFgSgTlh_iZTpzw3Ya":{"uri":"/melonJS/docs/melonjs/level.html#getCurrentLevelId"},"gHZN9tbf5LkFy5Rceij57":{"uri":"/melonJS/docs/melonjs/level.html#levelCount"},"pKfxqJwq1JFSMQTVKIwOP":{"uri":"/melonJS/docs/melonjs/level.html#load"},"UWQJVMIKfgpwUtY4CQkF4":{"uri":"/melonJS/docs/melonjs/level.html#next"},"dpLUgmDpMuVJkeEtnayka":{"uri":"/melonJS/docs/melonjs/level.html#previous"},"_tpejw6iPGbrPe8bDK3e2":{"uri":"/melonJS/docs/melonjs/level.html#reload"},"7fM8w6IWcyp4MVvz0bf7G":{"uri":"/melonJS/docs/melonjs/loader.html"},"RXN5ATz9FA0NDDxJkiT7X":{"uri":"/melonJS/docs/melonjs/loader/Asset.html"},"wbLqy-JTJmxNJ0bofkMzZ":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#data"},"d4qOh05h7Hl2BzH4xvNPt":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#name"},"-2GbEkdRVLUG07fJT6ZoT":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#src"},"4-9Yuk1hbDtwqGsXeXUzv":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#stream"},"IFMz5_v3wK54rK9rP9wIh":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#type"},"v2JMHEhZPbwt8ZxAZNe0m":{"uri":"/melonJS/docs/melonjs/loader.html#crossOrigin"},"sEa4jATea0aVRJCzdHUPZ":{"uri":"/melonJS/docs/melonjs/loader.html#onError"},"2K15jvtf8F1o4shs2j_2z":{"uri":"/melonJS/docs/melonjs/loader.html#onload"},"hhH6isQLezGQFj2M8Mpmn":{"uri":"/melonJS/docs/melonjs/loader.html#onProgress"},"vWa41KdDt4CS_zq6660yT":{"uri":"/melonJS/docs/melonjs/loader.html#withCredentials"},"uN7YvwwXmxRcEXfPrRCfr":{"uri":"/melonJS/docs/melonjs/loader/getBinary.html"},"F-X2wH4835QaGkv_18qe4":{"uri":"/melonJS/docs/melonjs/loader/getImage.html"},"yTykAzXji3DmxA1HCER6b":{"uri":"/melonJS/docs/melonjs/loader/getJSON.html"},"PaUzXsNaMGVNXagtjulKx":{"uri":"/melonJS/docs/melonjs/loader/getTMX.html"},"XgqTtQObBaMfFy0HIvbLv":{"uri":"/melonJS/docs/melonjs/loader/load.html"},"kI9wYBExq53yEKbLXiaeS":{"uri":"/melonJS/docs/melonjs/loader/preload.html"},"2rCEW-_u0nfiboO2F3BAT":{"uri":"/melonJS/docs/melonjs/loader/reload.html"},"JPNbO18Cz7n-P5XJwR85x":{"uri":"/melonJS/docs/melonjs/loader/setBaseURL.html"},"9LEPpySu66PMm23SfWXn_":{"uri":"/melonJS/docs/melonjs/loader/setParser.html"},"X5FaIlhW_mVQPQmGMAjrn":{"uri":"/melonJS/docs/melonjs/loader/unload.html"},"2Q40U5nfAfFiQ0dvsFYkh":{"uri":"/melonJS/docs/melonjs/loader/unloadAll.html"},"nGJPNf2dZpKjpdqouSz5X":{"uri":"/melonJS/docs/melonjs/Math.html"},"dM60qDGcI4tXvrNXGysQ1":{"uri":"/melonJS/docs/melonjs/Math.html#DEG_TO_RAD"},"ViQm7KzmT_z1AvbeIBF_U":{"uri":"/melonJS/docs/melonjs/Math.html#EPSILON"},"QyviMWDP7qXfse5utvbxQ":{"uri":"/melonJS/docs/melonjs/Math.html#ETA"},"Vy0ffPDswDIMK4ofmwSE2":{"uri":"/melonJS/docs/melonjs/Math.html#RAD_TO_DEG"},"A7GgvjQWQI7MdVdoeGNUb":{"uri":"/melonJS/docs/melonjs/Math.html#TAU"},"6O8QSDAJRBuwAN-ovscTi":{"uri":"/melonJS/docs/melonjs/Math/clamp.html"},"ejNZg0G5EuF0MgAXRm5gq":{"uri":"/melonJS/docs/melonjs/Math/degToRad.html"},"CdEpT-f1x8QkLP0MBvf3A":{"uri":"/melonJS/docs/melonjs/Math/isPowerOfTwo.html"},"GI_CNEfQRiNpI0xOKEFmT":{"uri":"/melonJS/docs/melonjs/Math/nextPowerOfTwo.html"},"ZtUm4x3u_ZXGrhVZdSLjv":{"uri":"/melonJS/docs/melonjs/Math/radToDeg.html"},"KTtsRt4ndu0BXrKYhcgXU":{"uri":"/melonJS/docs/melonjs/Math/random.html"},"3FhGSWAKH_ivbnSr4Pvss":{"uri":"/melonJS/docs/melonjs/Math/randomFloat.html"},"3YVfnRqitcGqTHXWzeBI_":{"uri":"/melonJS/docs/melonjs/Math/round.html"},"jDFTUQLdcA5DV2Hz1dJRf":{"uri":"/melonJS/docs/melonjs/Math/toBeCloseTo.html"},"CUJcaigx9HyZ5-JHiYvWn":{"uri":"/melonJS/docs/melonjs/Math/weightedRandom.html"},"XsXFxm_c58vmlPNoiOPYB":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html"},"EK0uQcIy4aYJhF2kfWC_k":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#angle"},"DYf1nmw8_1sLt17zlI-SA":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#angleVariation"},"oGXD81_-B69_CAFxDKBCT":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#blendMode"},"sA9fcE5cGs-sYFX5B-7fj":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#duration"},"oFBb3I8z8Z8uRvx3jaAu7":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#floating"},"vwehfuAxmKebr0mjbkh4-":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#followTrajectory"},"w74K_SP8nd1S37cPOMcye":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#framesToSkip"},"msfZj74hHHf-VUE11h7Gl":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#frequency"},"f1MvnihAggq23_Omod1R9":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#gravity"},"J0STLzq1fxnLH8aaUCc1e":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#height"},"Ymt7GI1IT7nBIlNSpHOrX":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#image"},"acj1OuLBdivIddtyWx_IA":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxEndScale"},"_0TBtISjZoX_Z_SeAaeYC":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxLife"},"04HbIXYoTlqBh_0S3_eRH":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxParticles"},"4jtcW5eYcaUeaFBN1adUb":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxRotation"},"Ssu0TjOmu-vt1QAGTfCJZ":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxStartScale"},"zUgpg65193xmuKU_ENfXr":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#minEndScale"},"y248QAseEDuoJRDTT4W8P":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#minLife"},"wa4GljkvrW_oxdGn3cncd":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#minRotation"},"gOGLcrzmkAYeOxw4NTaNo":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#minStartScale"},"nOTNrq0c6ayiqvgqGCsUF":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#onlyInViewport"},"J3V2CtniNvPjvIExLQNnC":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#speed"},"BBrlUe9ktSVBhJlkxnoff":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#speedVariation"},"NWAhOuFEJTPSfR7jcVjSk":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#textureAdditive"},"9nwIGNGFFUnrayW73ilJC":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#textureSize"},"iqQx0b1um-Wy6FTUaM8F8":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#tint"},"u9LJkof4WM7OZZi2XjRc8":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#totalParticles"},"ln5IZT3POPBc-HZhZN6Jp":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#width"},"MRTtDoFeOj2fxgO-f358n":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#wind"},"UcdNaE1JqZsT5cx560Sgd":{"uri":"/melonJS/docs/melonjs/plugin.html"},"f7r_wKUPIlFPDHahIOXfB":{"uri":"/melonJS/docs/melonjs/plugin/Base.html"},"W1CmRusz6n3DcCbvC0YfK":{"uri":"/melonJS/docs/melonjs/plugin/Base.html#app"},"z3SqGV44gYsabRDmaakux":{"uri":"/melonJS/docs/melonjs/plugin/Base.html#version"},"dBULBqomyLNW8Qt--S8MP":{"uri":"/melonJS/docs/melonjs/plugin/BasePlugin.html"},"UryDXElGCOJF6uF2XWOv1":{"uri":"/melonJS/docs/melonjs/plugin/BasePlugin.html#app"},"_kGDccW0CpNLY8xgnWWzL":{"uri":"/melonJS/docs/melonjs/plugin/BasePlugin.html#version"},"316-z8ShLfLDdcfMbOKno":{"uri":"/melonJS/docs/melonjs/plugin/BasePlugin.html#constructor"},"m19M6aFH5fiAnV0qh0gAH":{"uri":"/melonJS/docs/melonjs/plugin.html#cache"},"AL5yJKIz2vu-qZnzQc_5x":{"uri":"/melonJS/docs/melonjs/plugin/get.html"},"sklehmj6_1-KSTWS2UP9Z":{"uri":"/melonJS/docs/melonjs/plugin/patch.html"},"AeKk9C22hgtMaBGoQOn1X":{"uri":"/melonJS/docs/melonjs/plugin/register.html"},"VVkDC0c1eYKZzAUUd0sfn":{"uri":"/melonJS/docs/melonjs/pool.html"},"hUDMo24V70eaWQCZG9MOw":{"uri":"/melonJS/docs/melonjs/save.html"},"IU7FRVv6dh7rXdV7PGXCu":{"uri":"/melonJS/docs/melonjs/save.html#add"},"8wR38BlfUzh26lRf4VSGp":{"uri":"/melonJS/docs/melonjs/save.html#remove"},"0iFKQsBvtSCUNzVzgkgZU":{"uri":"/melonJS/docs/melonjs/state.html"},"XukGczzlG5cWXWATZXUAa":{"uri":"/melonJS/docs/melonjs/state.html#CREDITS"},"S5TVKYxhb--NeEmwWH1be":{"uri":"/melonJS/docs/melonjs/state.html#DEFAULT"},"2ls-Yx7wbzMqlkez-gIUT":{"uri":"/melonJS/docs/melonjs/state.html#GAME_END"},"iw6a8-APNJ9HCQeAld6pL":{"uri":"/melonJS/docs/melonjs/state.html#GAMEOVER"},"wNkwpnKnagQLWvsv5Ilv5":{"uri":"/melonJS/docs/melonjs/state.html#LOADING"},"hVV29ldRSEtywRzA4VnU8":{"uri":"/melonJS/docs/melonjs/state.html#MENU"},"3RrdcealKE3-RGc0JsVkN":{"uri":"/melonJS/docs/melonjs/state.html#PLAY"},"fWUvI3nFLxDbP4OGrFTDA":{"uri":"/melonJS/docs/melonjs/state.html#READY"},"DnTxHvbCoBS1wfHDOaKfs":{"uri":"/melonJS/docs/melonjs/state.html#SCORE"},"_35OOsnjo2v3_7at0ZUy1":{"uri":"/melonJS/docs/melonjs/state.html#SETTINGS"},"GpTZAu4mJmEXLDnWyP0h5":{"uri":"/melonJS/docs/melonjs/state.html#USER"},"K9q7mDmwwEPKnHe1WikT5":{"uri":"/melonJS/docs/melonjs/state.html#change"},"5R_u15QEb77QmtUPfsv5e":{"uri":"/melonJS/docs/melonjs/state.html#current"},"6mGQNu_xuK7WSejH6m55H":{"uri":"/melonJS/docs/melonjs/state.html#isCurrent"},"ruoYN4Ii9UfyE_2I7LOcR":{"uri":"/melonJS/docs/melonjs/state.html#isPaused"},"ifWH745ZGorOplnkESThW":{"uri":"/melonJS/docs/melonjs/state.html#isRunning"},"FX3_8ImhYUi2TYpunIqqo":{"uri":"/melonJS/docs/melonjs/state.html#pause"},"LBRvhZSpunagPVSB5Lncc":{"uri":"/melonJS/docs/melonjs/state.html#restart"},"8bMTDKLjGqDyJGHKWmf3O":{"uri":"/melonJS/docs/melonjs/state.html#resume"},"YshSr5rbtpGK9I2tjGeTK":{"uri":"/melonJS/docs/melonjs/state.html#set"},"ELvLwmVpXjdZ_UjU0tZQ6":{"uri":"/melonJS/docs/melonjs/state.html#set_"},"52SXAh4Cy_7uoWGRKSgN4":{"uri":"/melonJS/docs/melonjs/state.html#setTransition"},"XorpM3oBv4NpAHXNOKqtA":{"uri":"/melonJS/docs/melonjs/state.html#stop"},"fxYj14iaNQamNH7Jg19KI":{"uri":"/melonJS/docs/melonjs/state.html#transition"},"7oDe18VFOq5BNe9azbUbb":{"uri":"/melonJS/docs/melonjs/timer.html"},"KiGluKths4wH_U2uY9IoP":{"uri":"/melonJS/docs/melonjs/TMXUtils.html"},"KWFR_BXG8ZZyKq698cp_K":{"uri":"/melonJS/docs/melonjs/TMXUtils/applyTMXProperties.html"},"S-0l69Iy9a8_gOksBF5ko":{"uri":"/melonJS/docs/melonjs/TMXUtils/decode.html"},"e6HI9SMTrozf8GS0sbyE0":{"uri":"/melonJS/docs/melonjs/TMXUtils/decodeBase64AsArray.html"},"wmpXulvRxhhRoVfDw0Zfz":{"uri":"/melonJS/docs/melonjs/TMXUtils/decodeCSV.html"},"uPaQuhTSLT1Xol_XfGoGN":{"uri":"/melonJS/docs/melonjs/TMXUtils/decompress.html"},"h5gPivdDAoF6AacZLoE64":{"uri":"/melonJS/docs/melonjs/TMXUtils/parse.html"},"LqI-fpaOaYrkAfaia4Ld0":{"uri":"/melonJS/docs/melonjs/TMXUtils/setInflateFunction.html"},"VYgw9Vyyi1jQvF7Gupr5r":{"uri":"/melonJS/docs/melonjs/utils.html"},"58mHd9dCHGMaTcwp2TJcp":{"uri":"/melonJS/docs/melonjs/utils/agent.html"},"IQNrB1dGoaXGldT4_68ox":{"uri":"/melonJS/docs/melonjs/utils/agent/prefixed.html"},"EGpEELaY8BW99vmBynEEN":{"uri":"/melonJS/docs/melonjs/utils/agent/setPrefixed.html"},"J_3Xku1mDH_bsQr9yf9mD":{"uri":"/melonJS/docs/melonjs/utils/array.html"},"VeTJEWFHCEmxWXCsktyK5":{"uri":"/melonJS/docs/melonjs/utils/array/random.html"},"83L1q7_xkUFv8f1i4ALVr":{"uri":"/melonJS/docs/melonjs/utils/array/remove.html"},"Kp3aSRb4cY1VwjaleQ6Dj":{"uri":"/melonJS/docs/melonjs/utils/array/weightedRandom.html"},"91EBojdvCjtbaRe_PbX08":{"uri":"/melonJS/docs/melonjs/utils/file.html"},"uvy6Fzy2WhG0u-J6uqdOI":{"uri":"/melonJS/docs/melonjs/utils/file/getBasename.html"},"IQu6LPXHY0dJ2v4xNTzUS":{"uri":"/melonJS/docs/melonjs/utils/file/getExtension.html"},"oRHLTw5AdsoQY9uKNpkZR":{"uri":"/melonJS/docs/melonjs/utils/file/getPath.html"},"Ibn60tN0NDigkXHAgYkt7":{"uri":"/melonJS/docs/melonjs/utils/function.html"},"yYvAoj8OXoPjgeeRFcqgU":{"uri":"/melonJS/docs/melonjs/utils/function/defer.html"},"XCdePtmKlWAJDf3ljlqlM":{"uri":"/melonJS/docs/melonjs/utils/function/throttle.html"},"p02BOXGSb8IyteY692Tjt":{"uri":"/melonJS/docs/melonjs/utils/string.html"},"pqbDitsdhJ9RrV43vUEUw":{"uri":"/melonJS/docs/melonjs/utils/string/capitalize.html"},"hmxRVOFK6xfAL6cxYQvHw":{"uri":"/melonJS/docs/melonjs/utils/string/isBoolean.html"},"1NfgcXo3KvQzK6rCMPrqg":{"uri":"/melonJS/docs/melonjs/utils/string/isDataUrl.html"},"lhpfAV8V-sy7W_xt5Cg6f":{"uri":"/melonJS/docs/melonjs/utils/string/isNumeric.html"},"NThMllgCnlgSmCqrOezfk":{"uri":"/melonJS/docs/melonjs/utils/string/toHex.html"},"tfFT1_bEOcJaueZysrC9o":{"uri":"/melonJS/docs/melonjs/utils/checkVersion.html"},"ABtudh13db3wVRSbZEhnq":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html"},"j_q6jQk5AjqEIetk1isX7":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#debug"},"Z5MDrli3RCAcnJ9sTP2t8":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#debugToggleKey"},"cADJ6_ioOaYRhfbM8juKJ":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#hitbox"},"Jh9hwgcSpx1DKaIZvfFvG":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#quadtree"},"B8aizaQqTTaJL8Ytxuf_R":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#velocity"},"l5Fzkexge9yq7bT_2PpUX":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#webgl"},"595TTo-jfJm0xAEbJalmP":{"uri":"/melonJS/docs/melonjs/video.html"},"mVMC3Smc2mJxnLnBuytVO":{"uri":"/melonJS/docs/melonjs/video.html#renderer"},"0WAa4LBmgpiiEaOIufTeA":{"uri":"/melonJS/docs/melonjs/video/createCanvas.html"},"dS8F9Z6ejPsDwQPQe7ZIl":{"uri":"/melonJS/docs/melonjs/video/getParent.html"},"1bdHPN1CiVZ1OMFqDTQOm":{"uri":"/melonJS/docs/melonjs/video/init.html"},"LYgDL9QzG-s8MocHcJOha":{"uri":"/melonJS/docs/melonjs/Application.html"},"orZtd25uJGrAitcyUVmP5":{"uri":"/melonJS/docs/melonjs/Application/Settings.html"},"vWrpzDPuSK5K3F6zGCxsU":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#antiAlias"},"_SMWORYvAfjaBQmteIl_P":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#consoleHeader"},"_7ZPkttOLGoIq9AwCfYP4":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#depthTest"},"niPcGKntwJm421KXZOzIz":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#parent"},"dLuNslAlf1g_iORvtnP3Z":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#powerPreference"},"saX9Pi8-eyBm0hJu250EL":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#preferWebGL1"},"l6QGKw3p07ujXaAfTUzbL":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#renderer"},"FuI2CKUuxaTVbXPsOTmNr":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#scale"},"FHDdgSuj6uwY-yFh_WXBD":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#scaleMethod"},"RrvffoRxphWWe-X52lFWy":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#scaleTarget"},"6fjpRLr7o3lkY327g27W-":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#transparent"},"K2yb8AQBZoplE17e5-z2m":{"uri":"/melonJS/docs/melonjs/Application.html#isInitialized"},"HGUQ-mRr-6-v8AoV6UlLv":{"uri":"/melonJS/docs/melonjs/Application.html#lastUpdate"},"xmqKPbF5YK_9kwjuu1m40":{"uri":"/melonJS/docs/melonjs/Application.html#mergeGroup"},"5E_-If5It6ZzHc0Z4pkdl":{"uri":"/melonJS/docs/melonjs/Application.html#parentElement"},"aaueizq5_zJIgJ5P9RiW9":{"uri":"/melonJS/docs/melonjs/Application.html#pauseOnBlur"},"FNfn5rbEEEuF6Dj4Y7rcp":{"uri":"/melonJS/docs/melonjs/Application.html#renderer"},"mEn5IbQU27eAhvDbryJQi":{"uri":"/melonJS/docs/melonjs/Application.html#resumeOnFocus"},"r4gFGfKobSPwB--ssp-vA":{"uri":"/melonJS/docs/melonjs/Application.html#settings"},"5oOs-YZne4PUg9QuELCmJ":{"uri":"/melonJS/docs/melonjs/Application.html#sortOn"},"-rn4ygbBYhE11naC3AyZ6":{"uri":"/melonJS/docs/melonjs/Application.html#stopOnBlur"},"JBZAaY0ClHMYNlsDO5qYw":{"uri":"/melonJS/docs/melonjs/Application.html#viewport"},"ltr48C1i1Qn0qKbMqGTl3":{"uri":"/melonJS/docs/melonjs/Application.html#world"},"TNubkdwDuoSgxeDCH2q8k":{"uri":"/melonJS/docs/melonjs/Application.html#constructor"},"uaVFUNOPbYEEAwQGtb0Vj":{"uri":"/melonJS/docs/melonjs/Application.html#draw"},"2U1LxR6NELR8L-3pf6Wln":{"uri":"/melonJS/docs/melonjs/Application.html#getParentElement"},"38g0rv1D7v06xWfKKiYzR":{"uri":"/melonJS/docs/melonjs/Application.html#init"},"-GQ3qIE9Fv44RNluMLz30":{"uri":"/melonJS/docs/melonjs/Application.html#onLevelLoaded"},"REuxBdizEZi4vQHEZtkEo":{"uri":"/melonJS/docs/melonjs/Application.html#repaint"},"jJ8t6cp356CNuU9tHD0sX":{"uri":"/melonJS/docs/melonjs/Application.html#reset"},"fLPsiSeHLbHz_JT65dw0j":{"uri":"/melonJS/docs/melonjs/Application.html#update"},"EYLfmw6BySCvSOH8lcUN8":{"uri":"/melonJS/docs/melonjs/Application.html#updateFrameRate"},"zOJaZBjzUWX-SjuCN7der":{"uri":"/melonJS/docs/melonjs/BitmapText.html"},"JBcWHlwcvfLeSJfWPjZF6":{"uri":"/melonJS/docs/melonjs/BitmapText.html#alpha"},"_0OITouMmN73YPPJF2fY7":{"uri":"/melonJS/docs/melonjs/BitmapText.html#alwaysUpdate"},"Esfe4yJc3zduXJ12yZD2I":{"uri":"/melonJS/docs/melonjs/BitmapText.html#ancestor"},"VeJWKznL5-f0A-dAqxjxZ":{"uri":"/melonJS/docs/melonjs/BitmapText.html#anchorPoint"},"SCAGEo5ZxsiLKaxeXf9I2":{"uri":"/melonJS/docs/melonjs/BitmapText.html#autoTransform"},"sweFcABFS5HkGtvHJtHeM":{"uri":"/melonJS/docs/melonjs/BitmapText.html#blendMode"},"IqkeawHlw6rOo23gggqJv":{"uri":"/melonJS/docs/melonjs/BitmapText.html#body"},"G0rvgHSYqsB0tzYFfKjv_":{"uri":"/melonJS/docs/melonjs/BitmapText.html#bottom"},"jOfqsXuBgjAVMLleDvrWZ":{"uri":"/melonJS/docs/melonjs/BitmapText.html#centerX"},"bSjrTxUke30rEM3jJOz2V":{"uri":"/melonJS/docs/melonjs/BitmapText.html#centerY"},"lRBKHoN3kED9Hb6XAOp64":{"uri":"/melonJS/docs/melonjs/BitmapText.html#currentTransform"},"f2pPat4CPpxNS45_0Dxso":{"uri":"/melonJS/docs/melonjs/BitmapText.html#depth"},"Z1Hu3LnbnW1pHZrX7nqi0":{"uri":"/melonJS/docs/melonjs/BitmapText.html#fillStyle"},"f9y35Yc4K5Dzc_a29Bjgn":{"uri":"/melonJS/docs/melonjs/BitmapText.html#floating"},"9jQCz2TJyEfGssMXc9-Ur":{"uri":"/melonJS/docs/melonjs/BitmapText.html#GUID"},"zUbEDVBMQD_SM3x39srjo":{"uri":"/melonJS/docs/melonjs/BitmapText.html#height"},"fkcppk8F7ZtAWg5Io_52h":{"uri":"/melonJS/docs/melonjs/BitmapText.html#inViewport"},"5uKFBF5KSR8-1OT-ubmYv":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isDirty"},"4y4BCgz5SjFcy7jzQtmXR":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isFlippedX"},"ktbZi9GekjALwW8YdK1-G":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isFlippedY"},"rlzgS3fesqeT4B5ZI-Cb3":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isFloating"},"gMAuUrnSyb_8cK7khs6oy":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isKinematic"},"SZAyq9Kk1G_Gz3yBknDsS":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isPersistent"},"cONSU9ptPPWSK4wE-r5RH":{"uri":"/melonJS/docs/melonjs/BitmapText.html#left"},"8xUQSabEt4AoXk6Hq19Ke":{"uri":"/melonJS/docs/melonjs/BitmapText.html#lineHeight"},"Z6s9VdyeGnqeMiyz5-FpE":{"uri":"/melonJS/docs/melonjs/BitmapText.html#mask"},"OxEOXOxtWzBqXxw-6f76R":{"uri":"/melonJS/docs/melonjs/BitmapText.html#name"},"wbXv69m8t0oksSqUY3iu2":{"uri":"/melonJS/docs/melonjs/BitmapText.html#onVisibilityChange"},"u2ul4yPZXdHhRtNaJmN2M":{"uri":"/melonJS/docs/melonjs/BitmapText.html#points"},"PKnPf9hF4K1xxkfmbk-Kh":{"uri":"/melonJS/docs/melonjs/BitmapText.html#pos"},"wsAloiHcj4gY-91_KWR0U":{"uri":"/melonJS/docs/melonjs/BitmapText.html#right"},"4KEmOsJt2RWytGpcrfvpv":{"uri":"/melonJS/docs/melonjs/BitmapText.html#shader"},"RPiPFvyIpEE6lqC4k-46k":{"uri":"/melonJS/docs/melonjs/BitmapText.html#textAlign"},"mKqB-q6q06y8D9WC2Pmcp":{"uri":"/melonJS/docs/melonjs/BitmapText.html#textBaseline"},"krLadPC1RWx_YlIyVS2T5":{"uri":"/melonJS/docs/melonjs/BitmapText.html#tint"},"ViJswbCQpUa4QhqzOyqLQ":{"uri":"/melonJS/docs/melonjs/BitmapText.html#top"},"pmFNZwo8_whZwCN99nbkv":{"uri":"/melonJS/docs/melonjs/BitmapText.html#type"},"SsTreVWdnvEPt64WznJxn":{"uri":"/melonJS/docs/melonjs/BitmapText.html#updateWhenPaused"},"M0_BGTbuDctyc-Hertq1W":{"uri":"/melonJS/docs/melonjs/BitmapText.html#width"},"NrH9Ag1L1TptnV-gl5Z6v":{"uri":"/melonJS/docs/melonjs/BitmapText.html#wordWrapWidth"},"aqdRqMOnXzniwu13LNM8o":{"uri":"/melonJS/docs/melonjs/BitmapText.html#_text"},"pL5-UReqlqPHevpBfW8B0":{"uri":"/melonJS/docs/melonjs/BitmapText.html#fontData"},"eV1Z3m8GbncJiB6VJSkzd":{"uri":"/melonJS/docs/melonjs/BitmapText.html#fontImage"},"Cr6At6WXUEgupN3Qca8Wp":{"uri":"/melonJS/docs/melonjs/BitmapText.html#fontScale"},"76pnCujSmr8aC4UkjTxSD":{"uri":"/melonJS/docs/melonjs/BitmapText.html#angleTo"},"8SnWPy-zRrpW7qX9sbW2q":{"uri":"/melonJS/docs/melonjs/BitmapText.html#centerOn"},"mNjizrHBhJcAqQxVueweU":{"uri":"/melonJS/docs/melonjs/BitmapText.html#clone"},"BnSC0UQE3CfoSAJ9PEwEs":{"uri":"/melonJS/docs/melonjs/BitmapText.html#constructor"},"PRdnPj5rkEy6EcXB3VKd2":{"uri":"/melonJS/docs/melonjs/BitmapText.html#contains"},"sFStDj-VkTVXueKczkWL3":{"uri":"/melonJS/docs/melonjs/BitmapText.html#copy"},"ehpZ2ggzQpmv1DhqzTzZ7":{"uri":"/melonJS/docs/melonjs/BitmapText.html#distanceTo"},"LO7z091t5E14Mu2SAfngv":{"uri":"/melonJS/docs/melonjs/BitmapText.html#draw"},"vW5u3Va6jrbj7r7l7vXWv":{"uri":"/melonJS/docs/melonjs/BitmapText.html#equals"},"M0KaLPH53tBn6_BwJLZnV":{"uri":"/melonJS/docs/melonjs/BitmapText.html#flipX"},"YL1gr6yy-VhFCK5CPygbu":{"uri":"/melonJS/docs/melonjs/BitmapText.html#flipY"},"0iUKISqssNc-EcHc6qWNq":{"uri":"/melonJS/docs/melonjs/BitmapText.html#getAbsolutePosition"},"QFV4oxWFqA4883ie0QSs3":{"uri":"/melonJS/docs/melonjs/BitmapText.html#getBounds"},"nL9g-tG2HciHOVmg_JAjg":{"uri":"/melonJS/docs/melonjs/BitmapText.html#getIndices"},"C4HHe6HKCZ7e7tJH0Z3JQ":{"uri":"/melonJS/docs/melonjs/BitmapText.html#getOpacity"},"ZqfDLmfYTPuBUDjYg2mdb":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isConvex"},"3_bmM16afVd6qxj2imwX0":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isFinite"},"GjPFls6nCI3cdINRQeT9z":{"uri":"/melonJS/docs/melonjs/BitmapText.html#lookAt"},"w7Bsf7eWeoMQ53qQCecRa":{"uri":"/melonJS/docs/melonjs/BitmapText.html#measureText"},"TZEg6_QIQ8KSLWkDeKfqI":{"uri":"/melonJS/docs/melonjs/BitmapText.html#onCollision"},"2drYLOSJ5pkgZCFkeWOss":{"uri":"/melonJS/docs/melonjs/BitmapText.html#onDestroyEvent"},"408PovSYLbZnwP2NJggjd":{"uri":"/melonJS/docs/melonjs/BitmapText.html#overlaps"},"tL6YGLk2TbrY5rTP4yK0g":{"uri":"/melonJS/docs/melonjs/BitmapText.html#postDraw"},"M4o6ymk-jaQZdu9t6Jejm":{"uri":"/melonJS/docs/melonjs/BitmapText.html#preDraw"},"MXJlU3UXhXgvS8Er-bbod":{"uri":"/melonJS/docs/melonjs/BitmapText.html#recalc"},"xDT2tC3bdJkj1vXvJfr5b":{"uri":"/melonJS/docs/melonjs/BitmapText.html#resize"},"53yCgrnx2CszPbpCUKXKk":{"uri":"/melonJS/docs/melonjs/BitmapText.html#rotate"},"Xnp0hFr7Snnh9IwQbvj0B":{"uri":"/melonJS/docs/melonjs/BitmapText.html#scale"},"0xmP6Qw3dw3IKJJnMzG9q":{"uri":"/melonJS/docs/melonjs/BitmapText.html#scaleV"},"uPob1oao9dZF3Kz_Y7l8X":{"uri":"/melonJS/docs/melonjs/BitmapText.html#set"},"8sBnBEv8Yj10dI2XRWFiV":{"uri":"/melonJS/docs/melonjs/BitmapText.html#setOpacity"},"MnVSpv_OJPg9HnaU1wcqn":{"uri":"/melonJS/docs/melonjs/BitmapText.html#setShape"},"r_HqMLFxO6-o5JFlRvyy1":{"uri":"/melonJS/docs/melonjs/BitmapText.html#setText"},"QPk3F-woaUp_hbxQdFoDH":{"uri":"/melonJS/docs/melonjs/BitmapText.html#setVertices"},"o-6s1lxm5Vllxft4s2Wb8":{"uri":"/melonJS/docs/melonjs/BitmapText.html#shift"},"3nByTNdmU4QZ0-M6TJuN9":{"uri":"/melonJS/docs/melonjs/BitmapText.html#to2d"},"XTljZyHviQI5hzj-R-FUR":{"uri":"/melonJS/docs/melonjs/BitmapText.html#toIso"},"0okjj5fXyE7I9BQeHTxXx":{"uri":"/melonJS/docs/melonjs/BitmapText.html#toPolygon"},"BMUzRMMQs2qEdoMp7jasj":{"uri":"/melonJS/docs/melonjs/BitmapText.html#transform"},"A-pyP7b_lBxDqgaYUJoLd":{"uri":"/melonJS/docs/melonjs/BitmapText.html#translate"},"hjbptci2R_0IY-uhyvpVU":{"uri":"/melonJS/docs/melonjs/BitmapText.html#union"},"fckKSLv09T7JqwAl1MQtY":{"uri":"/melonJS/docs/melonjs/BitmapText.html#update"},"KhGb-4gcRjOQFNTkFcV66":{"uri":"/melonJS/docs/melonjs/BitmapText.html#updateBounds"},"Zt5l3SKncvkSu4OrTB7M2":{"uri":"/melonJS/docs/melonjs/BitmapText.html#onAnchorUpdate"},"FH--RSSkS0ryIBs-kFx1d":{"uri":"/melonJS/docs/melonjs/Body.html"},"pOjjjUPoVNLeQUZN-5jrR":{"uri":"/melonJS/docs/melonjs/Body.html#ancestor"},"5tj9z9toG1xg7wg4PNyMI":{"uri":"/melonJS/docs/melonjs/Body.html#bounce"},"bFJFGIEkWwwVXuzr-Y-Xc":{"uri":"/melonJS/docs/melonjs/Body.html#bounds"},"jOxuyKEwyPTDovHJZ0sP7":{"uri":"/melonJS/docs/melonjs/Body.html#collisionType"},"Hjkjdx4bTBi5Vfn_XeYSQ":{"uri":"/melonJS/docs/melonjs/Body.html#falling"},"3xRKUjPJEd1KTfoDbTl-_":{"uri":"/melonJS/docs/melonjs/Body.html#force"},"TqAejK4GnqjBjJ_ADPpFs":{"uri":"/melonJS/docs/melonjs/Body.html#friction"},"JJwIqFYKfiu2veVwTVKam":{"uri":"/melonJS/docs/melonjs/Body.html#gravityScale"},"4IoD-Nl-xA9b07vHCfSqL":{"uri":"/melonJS/docs/melonjs/Body.html#ignoreGravity"},"0O66TdmLdvtfz_QalUJ8S":{"uri":"/melonJS/docs/melonjs/Body.html#isStatic"},"MDry-MJUUtE-D3Vw00s_F":{"uri":"/melonJS/docs/melonjs/Body.html#jumping"},"O3Y_aJHC-5SLcKcpIvFaZ":{"uri":"/melonJS/docs/melonjs/Body.html#mass"},"hqoxNBvqRVvNCyqI8cdal":{"uri":"/melonJS/docs/melonjs/Body.html#maxVel"},"_5pRJxyYkxwX48e-EJyIW":{"uri":"/melonJS/docs/melonjs/Body.html#vel"},"O34yKhWvkxbg1cRIR9ugX":{"uri":"/melonJS/docs/melonjs/Body.html#addShape"},"IojAawg7ILibFEtcJuDJ1":{"uri":"/melonJS/docs/melonjs/Body.html#addVertices"},"zHUXzrLFeP8aPbjvsbkG2":{"uri":"/melonJS/docs/melonjs/Body.html#constructor"},"nxBEmZZE0ZhAwckGbcVLX":{"uri":"/melonJS/docs/melonjs/Body.html#contains"},"XfbEGacZr-T-1i2z40baj":{"uri":"/melonJS/docs/melonjs/Body.html#forEach"},"Jn3fJWMqjxSMurXKzuqW7":{"uri":"/melonJS/docs/melonjs/Body.html#fromJSON"},"RXbCA90npomH96fP7wC-i":{"uri":"/melonJS/docs/melonjs/Body.html#getBounds"},"RCfWRYHIVZYOWeC6phWew":{"uri":"/melonJS/docs/melonjs/Body.html#getShape"},"FPB-HRnSxURObPq52-rzJ":{"uri":"/melonJS/docs/melonjs/Body.html#removeShape"},"pSu0yBhWyPmIGz13WxZP4":{"uri":"/melonJS/docs/melonjs/Body.html#removeShapeAt"},"X4LNcNv-6mbVSJQ6hUau5":{"uri":"/melonJS/docs/melonjs/Body.html#respondToCollision"},"n68F5zEArC2WAanPO1YuU":{"uri":"/melonJS/docs/melonjs/Body.html#rotate"},"JfaEQlB1x-BS4iweszKC5":{"uri":"/melonJS/docs/melonjs/Body.html#setCollisionMask"},"pcD58JO_rAOaGELviEHDT":{"uri":"/melonJS/docs/melonjs/Body.html#setCollisionType"},"B7YLAqAOYFDpJAuVngwTw":{"uri":"/melonJS/docs/melonjs/Body.html#setFriction"},"QFWFLVzhYv2mycF5zqu1J":{"uri":"/melonJS/docs/melonjs/Body.html#setMaxVelocity"},"_urWQZQPLoiFMc2SGsDnZ":{"uri":"/melonJS/docs/melonjs/Body.html#setStatic"},"aUp4kkLMdT6TXrHYfBmbd":{"uri":"/melonJS/docs/melonjs/Body.html#setVertices"},"8i-uiCPs0cQAvO4jtvU8O":{"uri":"/melonJS/docs/melonjs/Body.html#update"},"xsulw9l_M9ccPiLK4s6bc":{"uri":"/melonJS/docs/melonjs/Bounds.html"},"8FI6_yi0lX4FXjTfs9gYo":{"uri":"/melonJS/docs/melonjs/Bounds.html#bottom"},"pBDB6UbstuHoF8fiW8TCn":{"uri":"/melonJS/docs/melonjs/Bounds.html#center"},"Av2s1AoUZ9T2HbF4-6dCo":{"uri":"/melonJS/docs/melonjs/Bounds.html#centerX"},"HewLuhoWOf5isMHy7P9ky":{"uri":"/melonJS/docs/melonjs/Bounds.html#centerY"},"ymIxVHhGCkN5quwGyEq2O":{"uri":"/melonJS/docs/melonjs/Bounds.html#height"},"wpSs_zW7i0jNgo97IA-ON":{"uri":"/melonJS/docs/melonjs/Bounds.html#left"},"leKLTnoBrsuyfgur1oyxC":{"uri":"/melonJS/docs/melonjs/Bounds.html#right"},"zkUoSw2tIEFBvwNmnOmx5":{"uri":"/melonJS/docs/melonjs/Bounds.html#top"},"hSLaqvdJK9lNcr7XoLjwf":{"uri":"/melonJS/docs/melonjs/Bounds.html#type"},"3Yl1X-2i6DS_O19UXBI3X":{"uri":"/melonJS/docs/melonjs/Bounds.html#width"},"xaZfGkbKRdgpS0fJJj81p":{"uri":"/melonJS/docs/melonjs/Bounds.html#x"},"1byekeAwC-iFc8JcDnVcG":{"uri":"/melonJS/docs/melonjs/Bounds.html#y"},"g5r-f_EBwnSDGWTTtwIzv":{"uri":"/melonJS/docs/melonjs/Bounds.html#add"},"6Zcz3_ncQG15Xang_1ey_":{"uri":"/melonJS/docs/melonjs/Bounds.html#addBounds"},"XD4rzdCycxnNV6ZHUZLya":{"uri":"/melonJS/docs/melonjs/Bounds.html#addFrame"},"zAssvv1FhK5bRNeSU3Uno":{"uri":"/melonJS/docs/melonjs/Bounds.html#addPoint"},"ODXkjQuiduZUDKq70QCuT":{"uri":"/melonJS/docs/melonjs/Bounds.html#centerOn"},"8cGYNgFaasJohD4obxAkk":{"uri":"/melonJS/docs/melonjs/Bounds.html#clear"},"MSEcAcwCdOTqvD9WW3Iko":{"uri":"/melonJS/docs/melonjs/Bounds.html#clone"},"fldL0OcEakjTqOz20G3iH":{"uri":"/melonJS/docs/melonjs/Bounds.html#constructor"},"IOT00im9njK_utmjj37yK":{"uri":"/melonJS/docs/melonjs/Bounds.html#contains"},"G2GD57ub9mA-gkjM5-3hm":{"uri":"/melonJS/docs/melonjs/Bounds.html#isFinite"},"BTd0NKab2O4AXnJv2wl4G":{"uri":"/melonJS/docs/melonjs/Bounds.html#overlaps"},"qPOZiOb351JXqEfo6zCuY":{"uri":"/melonJS/docs/melonjs/Bounds.html#setMinMax"},"l1aIXkaQjG2toNUK_Davm":{"uri":"/melonJS/docs/melonjs/Bounds.html#shift"},"LegXRhHWxVcxFMB4-VyxL":{"uri":"/melonJS/docs/melonjs/Bounds.html#toPolygon"},"afmWEWCO2_X8h04TJGBWm":{"uri":"/melonJS/docs/melonjs/Bounds.html#translate"},"81IF4BP_5m7Q6_qAp4DXu":{"uri":"/melonJS/docs/melonjs/Bounds.html#update"},"bc-Od5GNUcdpIB49LFRil":{"uri":"/melonJS/docs/melonjs/Camera2d.html"},"IF89Lp03wasHajmQiN8FM":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html"},"oVLxhOIJAL7XTX2jz5pL4":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html#BOTH"},"4O9T2F4RFV-d7W9-aYclI":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html#HORIZONTAL"},"IBRkLECAIsxvDBwCwHlVU":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html#NONE"},"F7NbsxpwtrhfM66d6bUWg":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html#VERTICAL"},"4kLapoSFRPmPZl8UXZdJ2":{"uri":"/melonJS/docs/melonjs/Camera2d.html#alpha"},"hnxsk3QE_nUug1hsHcAY6":{"uri":"/melonJS/docs/melonjs/Camera2d.html#alwaysUpdate"},"4JY6Utu1QmNCnsQRgBNbs":{"uri":"/melonJS/docs/melonjs/Camera2d.html#ancestor"},"OWG993Qr9T82TfDdbwCqz":{"uri":"/melonJS/docs/melonjs/Camera2d.html#anchorPoint"},"CRkiDXO4e7aZPUWREcznU":{"uri":"/melonJS/docs/melonjs/Camera2d.html#autoTransform"},"eQVjArr8v9C4St7cCJyLX":{"uri":"/melonJS/docs/melonjs/Camera2d.html#blendMode"},"fcGxaFcso0Aqx8FBgClWk":{"uri":"/melonJS/docs/melonjs/Camera2d.html#body"},"5Rq4rgv8eV9TLovemvl5j":{"uri":"/melonJS/docs/melonjs/Camera2d.html#bottom"},"uMnGEeC7-MEKN7bUe_8NW":{"uri":"/melonJS/docs/melonjs/Camera2d.html#bounds"},"6h78TWYvBFEcbs0JIY8ig":{"uri":"/melonJS/docs/melonjs/Camera2d.html#centerX"},"Gi9p6tWoNB853451qXLkC":{"uri":"/melonJS/docs/melonjs/Camera2d.html#centerY"},"8a86J6A_QGVdocT51J6IK":{"uri":"/melonJS/docs/melonjs/Camera2d.html#currentTransform"},"sHOaf-CKfT1ppoNQLCqhU":{"uri":"/melonJS/docs/melonjs/Camera2d.html#damping"},"Z62nl6yqIo9aEK921YQe-":{"uri":"/melonJS/docs/melonjs/Camera2d.html#depth"},"NnTxUNVxbTUA8KBQPPkgq":{"uri":"/melonJS/docs/melonjs/Camera2d.html#far"},"aPGmSXPsn9_WbaFyN_ECR":{"uri":"/melonJS/docs/melonjs/Camera2d.html#floating"},"czypAlFtwvLeDNRnW62w2":{"uri":"/melonJS/docs/melonjs/Camera2d.html#GUID"},"Zlkn481BPKZKYyUuIpvPZ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#height"},"CTMhZVovEK2LfVAYKbRIJ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#inViewport"},"FuWtlErSH8xJ_0F7EcL1J":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isDirty"},"CKFAZ8SiJhjT30NXI1U6j":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isFlippedX"},"oUIY2M64GVfnOxA1JCnpQ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isFlippedY"},"qHngpRcyqcpgoqIRJkM0s":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isFloating"},"fPoGHBcjOHY-lkTq5XKuO":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isKinematic"},"fR6jVlrpUW5VBhvsR4PYl":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isPersistent"},"7vLukg_twIXo_Q_mx02Ez":{"uri":"/melonJS/docs/melonjs/Camera2d.html#left"},"zZ7MgjcBkew4bnr-rZWgV":{"uri":"/melonJS/docs/melonjs/Camera2d.html#mask"},"NgZJKxxxMPAxDeRDHqXqm":{"uri":"/melonJS/docs/melonjs/Camera2d.html#name"},"K0IPjuqFwUoSUubgOF8J3":{"uri":"/melonJS/docs/melonjs/Camera2d.html#near"},"zhjAUz8tjCcbFfL3B34pq":{"uri":"/melonJS/docs/melonjs/Camera2d.html#onVisibilityChange"},"Ilp7ygJz3jXlfjUWG6QEq":{"uri":"/melonJS/docs/melonjs/Camera2d.html#points"},"YhUD2e3K5mEU2FlOekeHR":{"uri":"/melonJS/docs/melonjs/Camera2d.html#pos"},"ma7U0CCogIju-cAtT8yQp":{"uri":"/melonJS/docs/melonjs/Camera2d.html#projectionMatrix"},"0i6odP_DdaM4QX-WZLiVG":{"uri":"/melonJS/docs/melonjs/Camera2d.html#right"},"S4Aa4uakGFL5M6FC6RCWH":{"uri":"/melonJS/docs/melonjs/Camera2d.html#shader"},"xjIP7ifBdqjRxJq5S9rpX":{"uri":"/melonJS/docs/melonjs/Camera2d.html#tint"},"wY-BP9EcPEh0SniwoFw6i":{"uri":"/melonJS/docs/melonjs/Camera2d.html#top"},"ARqV0JzwX2aAhaLKd42qa":{"uri":"/melonJS/docs/melonjs/Camera2d.html#type"},"xlY4xf9mA0YIxjNzwqVCx":{"uri":"/melonJS/docs/melonjs/Camera2d.html#updateWhenPaused"},"IDoNcCDXZPV7HfcNPu7dQ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#width"},"3WefAr4EyaU8-NLR5mT-R":{"uri":"/melonJS/docs/melonjs/Camera2d.html#smoothFollow"},"L6PU6fMKdaKdEbgxaPIKm":{"uri":"/melonJS/docs/melonjs/Camera2d.html#angleTo"},"Pvvptc3MLNvQC1fWwrdoG":{"uri":"/melonJS/docs/melonjs/Camera2d.html#centerOn"},"55y8NSsTKikgESsNFy8Qz":{"uri":"/melonJS/docs/melonjs/Camera2d.html#clone"},"BOjR6FN2K5qFbhqPKSaF_":{"uri":"/melonJS/docs/melonjs/Camera2d.html#constructor"},"v2K9x89wEgppGi46oPuEb":{"uri":"/melonJS/docs/melonjs/Camera2d.html#contains"},"_UtN8FsR_L8L6nlI9ZmCu":{"uri":"/melonJS/docs/melonjs/Camera2d.html#copy"},"RfcYbfezIm5jvnb2EsePO":{"uri":"/melonJS/docs/melonjs/Camera2d.html#distanceTo"},"pmgcdnPARlb-aIrs1v7q1":{"uri":"/melonJS/docs/melonjs/Camera2d.html#draw"},"cw98RT5LUTjFaaxmlOw-7":{"uri":"/melonJS/docs/melonjs/Camera2d.html#equals"},"K7Aqn96-wPUZCbah5RkPr":{"uri":"/melonJS/docs/melonjs/Camera2d.html#fadeIn"},"dyyONN-q0bjJTkm5Q31Gx":{"uri":"/melonJS/docs/melonjs/Camera2d.html#fadeOut"},"NxTUDqtAZnKkgizQ80o1S":{"uri":"/melonJS/docs/melonjs/Camera2d.html#flipX"},"dg7CJMh11kMWQUu9f5NbE":{"uri":"/melonJS/docs/melonjs/Camera2d.html#flipY"},"Ndi-UGLuOjRH6Ggouom74":{"uri":"/melonJS/docs/melonjs/Camera2d.html#focusOn"},"nmy_jiCo4AtnvD8NS0ImU":{"uri":"/melonJS/docs/melonjs/Camera2d.html#follow"},"0AMeZ0hjyCEa3EUKmU3-1":{"uri":"/melonJS/docs/melonjs/Camera2d.html#getAbsolutePosition"},"hdgyxLqkshExUpA29jtrV":{"uri":"/melonJS/docs/melonjs/Camera2d.html#getBounds"},"D6VM8mGQ7ZAaTOkO1bJF2":{"uri":"/melonJS/docs/melonjs/Camera2d.html#getIndices"},"cVbnS0l7cHjPxou-Q3aD3":{"uri":"/melonJS/docs/melonjs/Camera2d.html#getOpacity"},"dfjXMsE0ekCpP7QuI9J5k":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isConvex"},"EZsibx2nzoPOCNlmKynYX":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isFinite"},"ff0MT72dFUVMrv3OR0TGL":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isVisible"},"jtZOHtQHwbkF5m-3UmeHE":{"uri":"/melonJS/docs/melonjs/Camera2d.html#localToWorld"},"HK8WsMNGhRS_jHXuyuYSZ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#lookAt"},"USaqLMhxFHaELiGXTzkYv":{"uri":"/melonJS/docs/melonjs/Camera2d.html#move"},"qwaR3C5gmigXeFncyTNX7":{"uri":"/melonJS/docs/melonjs/Camera2d.html#moveTo"},"M5IGfnToWW3LYBeosWw1u":{"uri":"/melonJS/docs/melonjs/Camera2d.html#onCollision"},"246Sv1rfRPVONDPXI-ZHC":{"uri":"/melonJS/docs/melonjs/Camera2d.html#onDestroyEvent"},"u0MXCwF6qJemqXZ2Y9qRR":{"uri":"/melonJS/docs/melonjs/Camera2d.html#overlaps"},"Xlo4KxpWc0nfSVHGiWjyE":{"uri":"/melonJS/docs/melonjs/Camera2d.html#postDraw"},"P_vOK1L52JrjRFSC4A_hO":{"uri":"/melonJS/docs/melonjs/Camera2d.html#preDraw"},"9XW6SzZfF1KXKkPA0Yrlh":{"uri":"/melonJS/docs/melonjs/Camera2d.html#recalc"},"3ZdniOp3QC2qJpvFbF9-c":{"uri":"/melonJS/docs/melonjs/Camera2d.html#reset"},"PiqwchVZU1Ggg8EDeFILI":{"uri":"/melonJS/docs/melonjs/Camera2d.html#resize"},"UfYEUUraq9-rf1cs8AXeA":{"uri":"/melonJS/docs/melonjs/Camera2d.html#rotate"},"u9UCn04qNcaXUqX0ulSMm":{"uri":"/melonJS/docs/melonjs/Camera2d.html#scale"},"sz2xAMcpPIYCk7PoY1Oru":{"uri":"/melonJS/docs/melonjs/Camera2d.html#scaleV"},"u4dDv4zfHqn0rUr3Lflj_":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setBounds"},"gaw-2jgVjuWi0pwlfZG2m":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setDeadzone"},"e-QrDsOsHnUmUrbDwqs75":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setOpacity"},"ViXXLSL7ALyHfb6jxwTvh":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setShape"},"X15HabNssGy9HCXsQAfav":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setVertices"},"VYMRvRhPGBdcFU-5yG7Jx":{"uri":"/melonJS/docs/melonjs/Camera2d.html#shake"},"SWlflq-YucYFq7O0iwwWn":{"uri":"/melonJS/docs/melonjs/Camera2d.html#shift"},"N5hSXJvkefIWN_JZnfyee":{"uri":"/melonJS/docs/melonjs/Camera2d.html#to2d"},"dr3mw4cFAjYcnT-fb_7mn":{"uri":"/melonJS/docs/melonjs/Camera2d.html#toIso"},"uPY_GwLl919hc9E45d229":{"uri":"/melonJS/docs/melonjs/Camera2d.html#toPolygon"},"4qrir52eIW7wwfWLasZIR":{"uri":"/melonJS/docs/melonjs/Camera2d.html#transform"},"NKgnFsG6BA6oDnDTbBo5h":{"uri":"/melonJS/docs/melonjs/Camera2d.html#translate"},"cFjei5CMysMSiGSSQPEGg":{"uri":"/melonJS/docs/melonjs/Camera2d.html#unfollow"},"N_EJ_haezmC6bsJmqCRNE":{"uri":"/melonJS/docs/melonjs/Camera2d.html#union"},"lMBa5V7idm5XwrgiqjyIE":{"uri":"/melonJS/docs/melonjs/Camera2d.html#update"},"LLV07ud_j9r8NvdEKfa9-":{"uri":"/melonJS/docs/melonjs/Camera2d.html#updateBounds"},"a7m0Y4QOwPgXXiRAu2gSq":{"uri":"/melonJS/docs/melonjs/Camera2d.html#worldToLocal"},"hA9kU6XgqEPIESvygi3ep":{"uri":"/melonJS/docs/melonjs/Camera2d.html#onAnchorUpdate"},"LqL9iyBYJvXL5ex2F9Pgk":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html"},"1Gcs2dbcpKsZXPqa1A6qr":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#depthTest"},"ztt-dP20PvNYO32ch-42w":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#designRatio"},"MR9w_8GsHKomClHV4-cP5":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#height"},"CVgzkTZbDXo6L8D-IDKZc":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#isContextValid"},"BO4MlEVFp_-GJOF_1irsX":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#path2D"},"lM9z-8ayk2jEPUcW5AgFD":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#scaleRatio"},"QUdSG7jZFpAKmni55oSxu":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#settings"},"WoqrermACCR8XOjC7A3ws":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#type"},"SAqM03QVmATbxEIdUkl_N":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#width"},"RyvE8-GdbDkIOLQEVlj9O":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#beginPath"},"zwOmTzTC0Rw3m3XkEl-Vw":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clear"},"oRckX1NiH93CUH3p04xX2":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clearColor"},"SgI6fY8-zusZ0Ulvz8KQC":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clearMask"},"nncSMpXEXlc9WHo90c6G2":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clearRect"},"dUaQeFOJuoPvhlLmI9zVE":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clearTint"},"HQT6SzDUiPibSI_3SQphN":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clipRect"},"RzsiFM6BiTtu2YBe4Rw4L":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#closePath"},"gYQDZtgt_Rbed1b0ktDTy":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#constructor"},"6QldAHZbGkiIfFLqbrCZu":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#createPattern"},"rcBD52CO4kUxbYtpPxHw2":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#drawImage"},"dOKhJktE841_nAsQSqDt7":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#drawPattern"},"z1-gXs0HFxvHGHU9wKmHM":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fill"},"JTOAn3Q7DM4rZjGeF5Uud":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillArc"},"g2UK22Ousn9sgIiaiiOi7":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillEllipse"},"9KMg7bf_h7hGbxfOqLa6-":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillLine"},"WWFLo-iN6k66raq-B8y74":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillPoint"},"GaizFveNd2mudxCfmP2zI":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillPolygon"},"tsp_E9hPcsKRkrs5J35Cg":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillRect"},"i8xeqvHxIKenGI-9zGhmX":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillRoundRect"},"ofSCZUG9SxsNLxizDp15R":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#flush"},"jOXSCZYo0kFyuEo4OzNdB":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getBlendMode"},"SwCg4D0T6OD3ujfVbTgsh":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getCanvas"},"6LrJTSrV8ZN00EC9BxCuk":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getColor"},"5O8SrT4X5Cb40JVt6sBb0":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getContext"},"A3V6enJRb8pzrOJTqtX1M":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getContext2d"},"HNqeauYRr4hNWucjBCJQ5":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getGlobalAlpha"},"acRzpAzaMoIBRxul2C76x":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getScreenCanvas"},"xhM2lpDuHqvYQRANVI-tK":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getScreenContext"},"Y99lBU1NdDJWlSTqpriDN":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#globalAlpha"},"GRw7lD09bR6ODzeitcBzz":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#lineTo"},"kn3yby9uuOYDmsZR9HN43":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#moveTo"},"T0lBjXzxg8mERp9pD1hT0":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#overlaps"},"hHynx4-aoeVhtnUmRgT6i":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#rect"},"1E9MsTpgrSMI_iAR_iHUP":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#reset"},"Bx5Au9HU3IDTaiiyrxvaV":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#resetTransform"},"BzPNgri1rOQdkgETleIQS":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#resize"},"mmOrvAgW5_zv4Zwlp33gw":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#restore"},"_TGwco_5GrUVWdyEwDlKy":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#rotate"},"z8dWfCJdo9ETHuyjdyLcz":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#roundRect"},"e7y8zMrlZIEF6UQvf1A6x":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#save"},"dZWbC_LqLGSJwz1lEG6A4":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#scale"},"hdXYszlBUK2rYg7qNaiax":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setAntiAlias"},"ZM0rw9yNhyJhgS_umfuyj":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setBlendMode"},"ebPiF0ToAaTa2LXNUd5OV":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setColor"},"CVhJbmGWzE3Q2udxGuXnt":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setGlobalAlpha"},"6OW3FMF63iTjVeQQy7tSM":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setLineWidth"},"du0i5j__7T7rf-NFblajj":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setMask"},"RGFzMvNgjJAYIxLfbtFN-":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setProjection"},"VLwb7mAN1niG9NeyD5Z-t":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setTint"},"0CqZ5r2vcI8cOxT9-NiwQ":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setTransform"},"jtIG5bSO2Edq0Vwp1BY27":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#stroke"},"TQzbdddUqv4WwBjmh58uO":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeArc"},"NQihIDdeZW6ms5bjCjDB_":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeEllipse"},"kqZbYnra7ZScdoptdCoDX":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeLine"},"9CpsuMNXyCbmOte4V-UOJ":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokePoint"},"QHWqOkWWGqwR0fCZ9tWbT":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokePolygon"},"x_TzSWjoazF4YOAHpq58X":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeRect"},"OlhY0HW3Mhn0XgKHlBx96":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeRoundRect"},"rFiHWl61IWl29xvd6G8x0":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#tint"},"GBNPaB1X9M5WOvChx7sgy":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#toBlob"},"mR2XSKCRRQrfLW8YsKNJm":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#toDataURL"},"quhO74fGf2QHrGWq_Kt0k":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#toImageBitmap"},"YYbZEEJg5rAx1ydihj-Xe":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#transform"},"ITRYXp5V48opVftOBWMYL":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#translate"},"riiuWykisO_4iG10nM8ZJ":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html"},"nXsH2cvJSKiKvX5u6ausF":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#canvas"},"uQitIqMCGBXnNhwK8-jqb":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#context"},"6dAM421_Ctylxq57dLBrl":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#height"},"IesZWb8pVpyrzLNKtevim":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#width"},"SJmskfpPxmOyn8vtApGyS":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#clear"},"Sf6XBZYnUvY5y0puRnFWP":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#constructor"},"dzgJdGpApjd6tZAjlf-ge":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#getImageData"},"D19Ix-foClngSMmRfzMby":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#invalidate"},"qrpoK5wb0z4csH3sJ01lP":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#resize"},"dTNnXCKrdU53lbDwpB29F":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#setAntiAlias"},"AzD0rE9xnr61FSZC9qUHY":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#toBlob"},"CmgAYX6pfjYxJeOLeZOXm":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#toDataURL"},"Wl3pqVwbI7gS814_uAreB":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#toImageBitmap"},"O_8zxDK4dVXEIRHzXZtgk":{"uri":"/melonJS/docs/melonjs/Collectable.html"},"aSh3I_pnkB0thiyzpfTPy":{"uri":"/melonJS/docs/melonjs/Collectable.html#alpha"},"r8aETYttJhze9jalM_q2d":{"uri":"/melonJS/docs/melonjs/Collectable.html#alwaysUpdate"},"E7D9MSvJ95h2_nxtzikRf":{"uri":"/melonJS/docs/melonjs/Collectable.html#ancestor"},"NWsJOEb4NtFsJElVU2U-7":{"uri":"/melonJS/docs/melonjs/Collectable.html#anchorPoint"},"XCEWTkycZHcBTYivKr5eh":{"uri":"/melonJS/docs/melonjs/Collectable.html#animationpause"},"oH9hpng2Wz3ze3QCYgXt7":{"uri":"/melonJS/docs/melonjs/Collectable.html#animationspeed"},"GykMacjMXepNNs4nbXVCR":{"uri":"/melonJS/docs/melonjs/Collectable.html#autoTransform"},"a4K7JUFvjc_KI34pyiTmJ":{"uri":"/melonJS/docs/melonjs/Collectable.html#blendMode"},"ndn4QUCmNUfizXw6PZA5X":{"uri":"/melonJS/docs/melonjs/Collectable.html#body"},"lRNX5AKMXso_VN8V6wNLu":{"uri":"/melonJS/docs/melonjs/Collectable.html#bottom"},"XM8O67rAcmqyrMQlP76p2":{"uri":"/melonJS/docs/melonjs/Collectable.html#centerX"},"zGSn45IZsryW4iijWACHd":{"uri":"/melonJS/docs/melonjs/Collectable.html#centerY"},"G0R7wYQVNZdYSnYZeTDk3":{"uri":"/melonJS/docs/melonjs/Collectable.html#currentTransform"},"631NmLxcm0I4l9sgc7F9N":{"uri":"/melonJS/docs/melonjs/Collectable.html#depth"},"d_CuJpOZI3io7MDcKZLhZ":{"uri":"/melonJS/docs/melonjs/Collectable.html#floating"},"aLeA3ynseSd0GvEb57VJT":{"uri":"/melonJS/docs/melonjs/Collectable.html#GUID"},"6FBfjugIt7121VZwAmmhR":{"uri":"/melonJS/docs/melonjs/Collectable.html#height"},"YLaWzrh2qHFElsBQNn_ZK":{"uri":"/melonJS/docs/melonjs/Collectable.html#inViewport"},"d0m1hgIP4dInQ99ORQQl3":{"uri":"/melonJS/docs/melonjs/Collectable.html#isDirty"},"gJpBXfoi-8E4727LxUE5b":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFlippedX"},"WEX7EuBAXti5j5eYKE5Ak":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFlippedY"},"sMJfvZbSsu_SzHVqEzNzH":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFloating"},"fnL5UJOj1uEM3PGskdg79":{"uri":"/melonJS/docs/melonjs/Collectable.html#isKinematic"},"MLsajPt4CXstA4Y4gtxG-":{"uri":"/melonJS/docs/melonjs/Collectable.html#isPersistent"},"k_HJNay3JOPQbVnAUAZIP":{"uri":"/melonJS/docs/melonjs/Collectable.html#left"},"Gw2X6jlA1iX6_01HKepv9":{"uri":"/melonJS/docs/melonjs/Collectable.html#mask"},"WrJGwqGUIhcRb_ze_xXKB":{"uri":"/melonJS/docs/melonjs/Collectable.html#name"},"k45AFcS4aOlSnRzdSTh_9":{"uri":"/melonJS/docs/melonjs/Collectable.html#offset"},"0eXsKBsXxXkmJtjDtLy-T":{"uri":"/melonJS/docs/melonjs/Collectable.html#onVisibilityChange"},"yyMGJ6St7xv0xFoC1HfZn":{"uri":"/melonJS/docs/melonjs/Collectable.html#points"},"EUqEa2x0vkKirdY6o3vjU":{"uri":"/melonJS/docs/melonjs/Collectable.html#pos"},"PjyZvfUUMISky_n-jZ3-z":{"uri":"/melonJS/docs/melonjs/Collectable.html#right"},"N54c1iWq52RVte21eC4M_":{"uri":"/melonJS/docs/melonjs/Collectable.html#shader"},"wDlqkG-RItG06bvK8q1WW":{"uri":"/melonJS/docs/melonjs/Collectable.html#source"},"j2AYz-Kj1jDV3s7Glr1qJ":{"uri":"/melonJS/docs/melonjs/Collectable.html#tint"},"YEHy_ZJc8z1oav858dBhv":{"uri":"/melonJS/docs/melonjs/Collectable.html#top"},"9mnn8mpyVdZf16u0ECazs":{"uri":"/melonJS/docs/melonjs/Collectable.html#type"},"Lm_veWogDhI20LTjXCcyj":{"uri":"/melonJS/docs/melonjs/Collectable.html#updateWhenPaused"},"thVxFGm21S9D3yQ9Jis7K":{"uri":"/melonJS/docs/melonjs/Collectable.html#width"},"NMYpasR3EgGVFTKSItSLH":{"uri":"/melonJS/docs/melonjs/Collectable.html#addAnimation"},"lvKkXPpX6AiOaZ6rg7Kj5":{"uri":"/melonJS/docs/melonjs/Collectable.html#angleTo"},"pnT2N9thUqMC4jSxfJiwp":{"uri":"/melonJS/docs/melonjs/Collectable.html#centerOn"},"I0G-XpshAXyjU8P0nurAp":{"uri":"/melonJS/docs/melonjs/Collectable.html#clone"},"_3GzRBYkfMc_vXmCh7ds3":{"uri":"/melonJS/docs/melonjs/Collectable.html#constructor"},"p_rnflUQiykgJbAJ2a7wY":{"uri":"/melonJS/docs/melonjs/Collectable.html#contains"},"qyWPYTjV7TYoRSDTjootL":{"uri":"/melonJS/docs/melonjs/Collectable.html#copy"},"eJkN6OgYpOW1K_IJMjyfi":{"uri":"/melonJS/docs/melonjs/Collectable.html#distanceTo"},"qFj8dFpK8Gn8Pni0BqGT8":{"uri":"/melonJS/docs/melonjs/Collectable.html#equals"},"Al0k_iOc5ONjvahJ-T6DU":{"uri":"/melonJS/docs/melonjs/Collectable.html#flicker"},"_08XT83oxz8cmrtcEzg9j":{"uri":"/melonJS/docs/melonjs/Collectable.html#flipX"},"z3hv8t_rzJcLRsyKAfNqa":{"uri":"/melonJS/docs/melonjs/Collectable.html#flipY"},"mpso_kxTi5hoWqXCMpG9z":{"uri":"/melonJS/docs/melonjs/Collectable.html#getAbsolutePosition"},"AbOHgexq9xhRRgH-IIYWI":{"uri":"/melonJS/docs/melonjs/Collectable.html#getBounds"},"l5KVs3EmqbUEVmU25RNLr":{"uri":"/melonJS/docs/melonjs/Collectable.html#getCurrentAnimationFrame"},"nWy9oR8wz6m-ewh-qSAVz":{"uri":"/melonJS/docs/melonjs/Collectable.html#getIndices"},"Sm-RDgtOMFo7kbDGwKvnb":{"uri":"/melonJS/docs/melonjs/Collectable.html#getOpacity"},"d6zmbmKKsHpDgEIWNDZ2D":{"uri":"/melonJS/docs/melonjs/Collectable.html#isConvex"},"WHzc4HOIFlWdM_npNFsv6":{"uri":"/melonJS/docs/melonjs/Collectable.html#isCurrentAnimation"},"QyHJ00-dl1LB2kxSA4yIx":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFinite"},"s07GKcxgVyEWCOqhpAk6c":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFlickering"},"FigEnS40Lr_gEYZajGWBz":{"uri":"/melonJS/docs/melonjs/Collectable.html#lookAt"},"jqN95bTmDYMcQS3zWGTti":{"uri":"/melonJS/docs/melonjs/Collectable.html#onCollision"},"R1tjahj9HNgGCF4HIaqXS":{"uri":"/melonJS/docs/melonjs/Collectable.html#onDestroyEvent"},"Wuq73n8vKT4lwrMv0uxdU":{"uri":"/melonJS/docs/melonjs/Collectable.html#overlaps"},"168OFWzVL3jt9K7FGBe-n":{"uri":"/melonJS/docs/melonjs/Collectable.html#postDraw"},"4wuMWkiqegvPl4HMRaRsE":{"uri":"/melonJS/docs/melonjs/Collectable.html#preDraw"},"57DiY_TU2YssoPvnMiD6h":{"uri":"/melonJS/docs/melonjs/Collectable.html#recalc"},"wC_bxoh7p6X6pwVHn6pnB":{"uri":"/melonJS/docs/melonjs/Collectable.html#resize"},"ghDiyzHHkqbwv-p4h4v29":{"uri":"/melonJS/docs/melonjs/Collectable.html#reverseAnimation"},"S2whKFV3jnjOk6Oc_WzlD":{"uri":"/melonJS/docs/melonjs/Collectable.html#rotate"},"-aS6EQ9ktWfarxFS__gHK":{"uri":"/melonJS/docs/melonjs/Collectable.html#scale"},"dpzvIeU8lKj47_IMD5Sba":{"uri":"/melonJS/docs/melonjs/Collectable.html#scaleV"},"DV3BU8dbJiobsJMtzji1p":{"uri":"/melonJS/docs/melonjs/Collectable.html#setAnimationFrame"},"869rTG8gc1IOFXEVB_mqb":{"uri":"/melonJS/docs/melonjs/Collectable.html#setCurrentAnimation"},"kGw_NtFaVZp1-PghSkYkX":{"uri":"/melonJS/docs/melonjs/Collectable.html#setOpacity"},"RPiiOk7MrYwoLmtVUQiiM":{"uri":"/melonJS/docs/melonjs/Collectable.html#setRegion"},"d6H5OgzYkEy3nmAaoD8dm":{"uri":"/melonJS/docs/melonjs/Collectable.html#setShape"},"NCp5AxvJj7wjAfN3g5zrn":{"uri":"/melonJS/docs/melonjs/Collectable.html#setVertices"},"KOB3GMEDhn6qAgO-AXC7E":{"uri":"/melonJS/docs/melonjs/Collectable.html#shift"},"O0Z1WLeZyxGShuvxmDXmQ":{"uri":"/melonJS/docs/melonjs/Collectable.html#to2d"},"kfYu3x_Gz49kz2lgNImj8":{"uri":"/melonJS/docs/melonjs/Collectable.html#toIso"},"v2VJyNVr0jfvNLSH8goDT":{"uri":"/melonJS/docs/melonjs/Collectable.html#toPolygon"},"5eCNiF5fRon9Dy2EpTdcR":{"uri":"/melonJS/docs/melonjs/Collectable.html#transform"},"zNJ8kAHkDaTHv4ceeVNYK":{"uri":"/melonJS/docs/melonjs/Collectable.html#translate"},"1Q9XlK6Kjcekg_DV79hBo":{"uri":"/melonJS/docs/melonjs/Collectable.html#union"},"RWVirHeZRcJFlg3Trkas_":{"uri":"/melonJS/docs/melonjs/Collectable.html#updateBounds"},"OOfDQUFyi0erqIpYtDmY9":{"uri":"/melonJS/docs/melonjs/Collectable.html#draw"},"VdXRQ1260nrv12wVL9-Xy":{"uri":"/melonJS/docs/melonjs/Collectable.html#update"},"AJ_RPqwqzcwa_6CEwjH5E":{"uri":"/melonJS/docs/melonjs/Collectable.html#onAnchorUpdate"},"gMLNqkpxeH0da5XioA6jC":{"uri":"/melonJS/docs/melonjs/Color.html"},"AOlEy48FFF3P5cQhoI2UQ":{"uri":"/melonJS/docs/melonjs/Color.html#alpha"},"9GDbzThpJYdXniwdQb2QU":{"uri":"/melonJS/docs/melonjs/Color.html#b"},"QmPAgNleaOa901K-qcnmr":{"uri":"/melonJS/docs/melonjs/Color.html#g"},"4tVmCfCBXX0zHFKaHtGbo":{"uri":"/melonJS/docs/melonjs/Color.html#r"},"gEou2-aWn2qJ5TA3SA4QV":{"uri":"/melonJS/docs/melonjs/Color.html#add"},"6eSTN69YQQGvWhbxAv0Cw":{"uri":"/melonJS/docs/melonjs/Color.html#clone"},"HdP9nyPopJ3tclbF4Yt4G":{"uri":"/melonJS/docs/melonjs/Color.html#constructor"},"XcUWJO6x3AkgV2-HtWHP1":{"uri":"/melonJS/docs/melonjs/Color.html#copy"},"LTG1t0FzZGu4t5GeUyHz0":{"uri":"/melonJS/docs/melonjs/Color.html#darken"},"GOMd7oozsS1faXXXn_vLI":{"uri":"/melonJS/docs/melonjs/Color.html#equals"},"xoKqawmSEe-bI0C5R7rRf":{"uri":"/melonJS/docs/melonjs/Color.html#lerp"},"Tlw4FuIcTm-40gyCd0Gyw":{"uri":"/melonJS/docs/melonjs/Color.html#lighten"},"k1-cZ8HdxxwhLhZjeDYww":{"uri":"/melonJS/docs/melonjs/Color.html#parseCSS"},"luwG2dUnzVomw6uEjKX19":{"uri":"/melonJS/docs/melonjs/Color.html#parseHex"},"E_lckdjnHFU9Pqq1RzbmT":{"uri":"/melonJS/docs/melonjs/Color.html#parseRGB"},"MELuQTn7_ybeY4C7rBtIE":{"uri":"/melonJS/docs/melonjs/Color.html#random"},"P0HhZP6YibgtEiU1TDBBU":{"uri":"/melonJS/docs/melonjs/Color.html#setColor"},"VWWHOuoz1T6he_J4FE2XA":{"uri":"/melonJS/docs/melonjs/Color.html#setFloat"},"VNgDewNWdMYydugjAlAi4":{"uri":"/melonJS/docs/melonjs/Color.html#setHSL"},"5pSXKc4aRIjEjY9wsYutD":{"uri":"/melonJS/docs/melonjs/Color.html#setHSV"},"kGySJe4h83xBRlgRANmHA":{"uri":"/melonJS/docs/melonjs/Color.html#toArray"},"XLEVb2_8_3Dbj3pYwVA4h":{"uri":"/melonJS/docs/melonjs/Color.html#toHex"},"gZseTYuLMYM4IeSDDjhes":{"uri":"/melonJS/docs/melonjs/Color.html#toHex8"},"wMBDNYds1Q-0gxGgkAxlO":{"uri":"/melonJS/docs/melonjs/Color.html#toRGB"},"5fKlxD4RStOSUifRwD8Yf":{"uri":"/melonJS/docs/melonjs/Color.html#toRGBA"},"mw9fHmab4l5HXbru797Kg":{"uri":"/melonJS/docs/melonjs/Color.html#toUint32"},"j02ueFyMpU3AH_BOoFZ9D":{"uri":"/melonJS/docs/melonjs/ColorLayer.html"},"gdf8CWT8BU6ge2mMUeBZS":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#alpha"},"6-4U81wAdrcvOHZTVxNvz":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#alwaysUpdate"},"nxHFP9QYXsTD7SiuN2joY":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#ancestor"},"Aiyz_GZJZ3BvSp2dhKrEW":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#anchorPoint"},"4aDmLP4_sH45mOvyyrm7l":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#autoTransform"},"DggfeeC1oLPlwxmlWF4ey":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#blendMode"},"dkh4OUKaNiukEozxz0IQb":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#body"},"UWuqO96ZasjMD2kuQeXLS":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#bottom"},"wFgvQBovXEBKdA3rBW1ll":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#centerX"},"kb3G5hXpkBzajqdbeGk0b":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#centerY"},"sW0iQSoVd3DxFkDd_WacQ":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#color"},"jVnMZ985_x4xwqH0jJYCg":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#currentTransform"},"LfQhWdvx9KUAmTcmOSirA":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#depth"},"zPx92OyuBxG8E6HhjDHI-":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#floating"},"6zCYm66ffMtS0qZBwrta-":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#GUID"},"s2RjqVzDI5E7maXrKzU5d":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#height"},"95HjUksjFyglRgdu-wtbj":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#inViewport"},"8XKapS0rBKTzZWo6IdhcK":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isDirty"},"xFpDYaZG8fdCal0V4JfEc":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isFlippedX"},"hfstSZ5dSq2XtjkwjPil0":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isFlippedY"},"jf06C0ZDJURX9olT1G-jT":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isFloating"},"GwkvSH6KKsoXZliYK8xft":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isKinematic"},"3LqrNBRZkuhGXmuqR577A":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isPersistent"},"BnEtI3uwXF_JgL0-dJ__P":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#left"},"5E1RRE4dT05PZL726EyCi":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#mask"},"fB9VJ1P5m7Ne3E2ow0BET":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#name"},"hSTdb4EiYhb_JZ70edZBv":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#onVisibilityChange"},"tMsbJ1LX68e9Rp4OwuKye":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#points"},"sUHxDXvAnWdQdki8Y488X":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#pos"},"GDRQuy7TDTK6FRxFNVBRj":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#right"},"2FNpToWN02CkleAKoZirQ":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#shader"},"8Qop59Mu1Phgf_pGmtAN3":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#tint"},"o7ryM59tPjPwfbKVoV-Ss":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#top"},"Q78Kfe77W2DVlff8TkPjK":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#type"},"a8MgLafKVlujNL282tdZd":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#updateWhenPaused"},"02f7eJHVUgTLHEvUuGf83":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#width"},"E4KDMrKFCTGgvWuIkMH9C":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#angleTo"},"QZ0KJcAreXOy_L1sIA-Cj":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#centerOn"},"tdAo3aw76OXsUcUhMme_p":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#clone"},"2HpxldfPgNe7cS8XQU3v2":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#constructor"},"HGAkIfJp0ckmcGcSH4egT":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#contains"},"YaZk619y0gDnk5fRfmAE8":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#copy"},"g8GbBM4UNHYy5PZINE2n-":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#distanceTo"},"-QYjc4SYndO-H7DqbBcER":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#equals"},"IDXVrHUtuzECpgOHUdXRT":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#flipX"},"U8ilKar7RoE9uUZ2y_KK1":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#flipY"},"YrqgZRS0c5gQVK4R_KKfL":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#getAbsolutePosition"},"5Bod6oB7LR2haUS_pfbpf":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#getBounds"},"VxreeRiczR9o-pIO5W88u":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#getIndices"},"UBKA45IIcdUg-_yvlzhpu":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#getOpacity"},"ChvE6ho2s5hOLH2N8ymRl":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isConvex"},"MxnF6c4_1SkGIJKjvIuYh":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isFinite"},"6iOjaUFwEuYgJD4KYhf4V":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#lookAt"},"qpjumy6VQRMOfIibnt661":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#onCollision"},"sJKkT9gbnJz546WhNMX2x":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#onDestroyEvent"},"PEkUTiOb0MHxis1xaNU4H":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#overlaps"},"L_D_Lxowzu9P0e5aL_aoP":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#postDraw"},"F-LqU5Pw-dUwA92SufHdn":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#preDraw"},"Bs2TTrvQs86lTG8iSKqHV":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#recalc"},"sF-UNvaH5ui4Ds35LNVZt":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#resize"},"8JfxqZig6LSA07DRreivj":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#rotate"},"kmucuhGFm415b-bWR0Yx_":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#scale"},"wkzKJ6rh0M0zTUlsM3Y14":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#scaleV"},"4TVhKQK_NaXhUnLJ9JXmj":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#setOpacity"},"-fBk9csjzi6np17ALenRC":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#setShape"},"rXF1-hDQ00lM-fWl7fTDI":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#setVertices"},"UVvS3gojkHZWaqQYpiosZ":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#shift"},"CfxyfbFa5yT55en398CIf":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#to2d"},"GsJvFs2n2dGJ6m0leLuW9":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#toIso"},"k8-gMHRdjjSbg2EAJdxmt":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#toPolygon"},"0xMPYqkyeNngKR82xObh3":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#transform"},"S7SWv6ARAYwUPyG272ztd":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#translate"},"Pl3JOY4XWz5EWtB9YNZG4":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#union"},"9aDiXNeoGpP7xzwfRVUvN":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#update"},"oOfYyQatj1agH6qVo9S6F":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#updateBounds"},"0pWayfsz3o45U2MW-RD2x":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#draw"},"EmulZEDHpbEOh3aaIIlMw":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#onAnchorUpdate"},"qLINZ7vLurrdj_DzzOC21":{"uri":"/melonJS/docs/melonjs/Compositor.html"},"OvvVGIUaAZnOYf90hpuud":{"uri":"/melonJS/docs/melonjs/Compositor.html#attributes"},"csDOqizr1kPGsORMuB-nP":{"uri":"/melonJS/docs/melonjs/Compositor.html#currentShader"},"WfrxvMyKTDg1fzy3d1oq8":{"uri":"/melonJS/docs/melonjs/Compositor.html#defaultShader"},"DIgcgun3dnjW6tFX7nIbA":{"uri":"/melonJS/docs/melonjs/Compositor.html#mode"},"eTLT2u5GHf28cSsplCrzP":{"uri":"/melonJS/docs/melonjs/Compositor.html#vertexByteSize"},"p9vyreumtLqN7TsDvAHtz":{"uri":"/melonJS/docs/melonjs/Compositor.html#vertexData"},"YzXzEQH8D20slGd5Sn9FE":{"uri":"/melonJS/docs/melonjs/Compositor.html#vertexSize"},"mVXL8eAWRs0c56fy2ZLM4":{"uri":"/melonJS/docs/melonjs/Compositor.html#addAttribute"},"Wkxt56u4KTw0r9I4mjZn_":{"uri":"/melonJS/docs/melonjs/Compositor.html#bind"},"4Fcx1KQyMark41UaEq8rW":{"uri":"/melonJS/docs/melonjs/Compositor.html#constructor"},"dYdZFv1dCKxea6DaXWrn2":{"uri":"/melonJS/docs/melonjs/Compositor.html#flush"},"scOrtsfSVABiy0QX8Aw1y":{"uri":"/melonJS/docs/melonjs/Compositor.html#setProjection"},"KB0TWHYYcUmTtsq_8flet":{"uri":"/melonJS/docs/melonjs/Compositor.html#useShader"},"GrBQ-UHfmBPd3-VhVCtI0":{"uri":"/melonJS/docs/melonjs/Container.html"},"iyoJFQ3xb3JZ4nRl1eCGi":{"uri":"/melonJS/docs/melonjs/Container.html#alpha"},"CoLoVrvAZhP_7gynzYzNl":{"uri":"/melonJS/docs/melonjs/Container.html#alwaysUpdate"},"CL7-I_UiQA9sWXh10RHpa":{"uri":"/melonJS/docs/melonjs/Container.html#ancestor"},"eSuAnbPf9Sc4964fHzD8C":{"uri":"/melonJS/docs/melonjs/Container.html#anchorPoint"},"MwTT850Ehwq8Cd4yhiVXe":{"uri":"/melonJS/docs/melonjs/Container.html#autoDepth"},"zL3EIM01L2ragvMn5Kk8n":{"uri":"/melonJS/docs/melonjs/Container.html#autoSort"},"2U5ngwbHXhajouq5ye5eg":{"uri":"/melonJS/docs/melonjs/Container.html#autoTransform"},"JdSsv7q8QKHzMk6Z27Bs8":{"uri":"/melonJS/docs/melonjs/Container.html#backgroundColor"},"56Fz84-ulLecEGwJpV9AJ":{"uri":"/melonJS/docs/melonjs/Container.html#blendMode"},"TyM4TXRRS3p_aKG5uQJn4":{"uri":"/melonJS/docs/melonjs/Container.html#body"},"DI4h2SSC4z6teRLWSAyNU":{"uri":"/melonJS/docs/melonjs/Container.html#bottom"},"gtwfFnp3gvaDUNgFoQ_rE":{"uri":"/melonJS/docs/melonjs/Container.html#centerX"},"b-r6x6KWiZtoRu5ag_mWw":{"uri":"/melonJS/docs/melonjs/Container.html#centerY"},"BYT7PfTIexFO10DZhHTmP":{"uri":"/melonJS/docs/melonjs/Container.html#clipping"},"muDjBlY_ogMetZIPFxvsH":{"uri":"/melonJS/docs/melonjs/Container.html#currentTransform"},"mjK7RBv2SjnknGLosAMJc":{"uri":"/melonJS/docs/melonjs/Container.html#depth"},"LPDyJk77gmEM8lLL-yGub":{"uri":"/melonJS/docs/melonjs/Container.html#enableChildBoundsUpdate"},"NHuid9ryRD4runhw97g8w":{"uri":"/melonJS/docs/melonjs/Container.html#floating"},"g-3hhHbsJmGjSSHwj07xM":{"uri":"/melonJS/docs/melonjs/Container.html#GUID"},"fpLea4r5oWp9dknuPAIoF":{"uri":"/melonJS/docs/melonjs/Container.html#height"},"r0cBVMvviGl-xCjtbFZaE":{"uri":"/melonJS/docs/melonjs/Container.html#inViewport"},"1VGgIA2pAQSxwriJs100q":{"uri":"/melonJS/docs/melonjs/Container.html#isDirty"},"ih1ZRWCDKvERpT2Jfg7ul":{"uri":"/melonJS/docs/melonjs/Container.html#isFlippedX"},"oFfe3BP9IHhFrJKhft_No":{"uri":"/melonJS/docs/melonjs/Container.html#isFlippedY"},"-pk9tjBmNM_J3TVjsCG1-":{"uri":"/melonJS/docs/melonjs/Container.html#isFloating"},"vwBoNIZMqsG02L12wuxn6":{"uri":"/melonJS/docs/melonjs/Container.html#isKinematic"},"cssaASy64iwAoANGXG7mL":{"uri":"/melonJS/docs/melonjs/Container.html#isPersistent"},"X_6ClqPr754-STyb6eENM":{"uri":"/melonJS/docs/melonjs/Container.html#left"},"9c4zKOh3bhbpjcdvWzzHb":{"uri":"/melonJS/docs/melonjs/Container.html#mask"},"E0jvMfm4QqI7g4FafCmyQ":{"uri":"/melonJS/docs/melonjs/Container.html#name"},"r_A6hAYYs_Icywd2gK-fM":{"uri":"/melonJS/docs/melonjs/Container.html#onVisibilityChange"},"IZopOOiLfJ7Vh-UMcQTe8":{"uri":"/melonJS/docs/melonjs/Container.html#points"},"_3eEsWu-QRwabr1CXDnz8":{"uri":"/melonJS/docs/melonjs/Container.html#pos"},"0LpRZXiKQoc7u4gIwzevc":{"uri":"/melonJS/docs/melonjs/Container.html#right"},"GH9pdFdYopd9nVGXw4cP4":{"uri":"/melonJS/docs/melonjs/Container.html#root"},"pG69vZLUoJnpTh2iwcDvq":{"uri":"/melonJS/docs/melonjs/Container.html#shader"},"n-oe057b5yCJUX33RcvFZ":{"uri":"/melonJS/docs/melonjs/Container.html#sortOn"},"I7yT5BXfvk4UAEU18Opg0":{"uri":"/melonJS/docs/melonjs/Container.html#tint"},"BPnJqJyUah-bBz32O1BaS":{"uri":"/melonJS/docs/melonjs/Container.html#top"},"EjS3oPacpGThPaBzhTIdW":{"uri":"/melonJS/docs/melonjs/Container.html#type"},"pRGj9xMRoGdSzpRaWUyT1":{"uri":"/melonJS/docs/melonjs/Container.html#updateWhenPaused"},"Xv-vNTSiUBeux3BmtZcjX":{"uri":"/melonJS/docs/melonjs/Container.html#width"},"21_bSbyAb0iKyzS7JZ544":{"uri":"/melonJS/docs/melonjs/Container.html#addChild"},"PvH4VfTy2-QSnkdOdT-7F":{"uri":"/melonJS/docs/melonjs/Container.html#addChildAt"},"kYCpoIsvOWvINAVFwfN9A":{"uri":"/melonJS/docs/melonjs/Container.html#angleTo"},"hLEPChDwTYjiovLCYDKto":{"uri":"/melonJS/docs/melonjs/Container.html#centerOn"},"Nqjf3QwN_AyWTSmlsOBP2":{"uri":"/melonJS/docs/melonjs/Container.html#clone"},"LzK9pZQ70KpYNeERNMJJA":{"uri":"/melonJS/docs/melonjs/Container.html#constructor"},"IBwqqsuaHsttAitCMw2WK":{"uri":"/melonJS/docs/melonjs/Container.html#contains"},"b0pgD6s6JaKnmxWqARaaT":{"uri":"/melonJS/docs/melonjs/Container.html#copy"},"5i2Dq3GBx5DvtC9hLzjYA":{"uri":"/melonJS/docs/melonjs/Container.html#distanceTo"},"2HtjhMQvyL1OKAUMwsQLh":{"uri":"/melonJS/docs/melonjs/Container.html#equals"},"P_hyisyWmAc-O_C6YhKH4":{"uri":"/melonJS/docs/melonjs/Container.html#flipX"},"EWnAnfWB3qVs_y_XuQnnA":{"uri":"/melonJS/docs/melonjs/Container.html#flipY"},"nQvrwAwn35Erht8PGpGo_":{"uri":"/melonJS/docs/melonjs/Container.html#forEach"},"zIr1lU7b_1XXcTaCyp-z_":{"uri":"/melonJS/docs/melonjs/Container.html#getAbsolutePosition"},"l19WMJ87XhBxDPbMac5jE":{"uri":"/melonJS/docs/melonjs/Container.html#getBounds"},"zQKNqXUlMQHgy_y9Yk_bh":{"uri":"/melonJS/docs/melonjs/Container.html#getChildAt"},"xTMCEefeIexR4VwAt2L2O":{"uri":"/melonJS/docs/melonjs/Container.html#getChildByGUID"},"myQ5qGvuXEauFN2AwMyA8":{"uri":"/melonJS/docs/melonjs/Container.html#getChildByName"},"YH2BCP9oydOMqx1AMkeUe":{"uri":"/melonJS/docs/melonjs/Container.html#getChildByProp"},"dWL5VnttwGErV1XmgEsDm":{"uri":"/melonJS/docs/melonjs/Container.html#getChildByType"},"tuVajtfORzAUCPBSGo8Ad":{"uri":"/melonJS/docs/melonjs/Container.html#getChildIndex"},"qryqGDyIH5zW1gmJTqhYb":{"uri":"/melonJS/docs/melonjs/Container.html#getChildren"},"aSaOa2ePogIALPjXcP9Kz":{"uri":"/melonJS/docs/melonjs/Container.html#getIndices"},"vx35pi0OSFDaTqP4rjrSd":{"uri":"/melonJS/docs/melonjs/Container.html#getNextChild"},"bUSZ4W02x15o8E8AZpL3R":{"uri":"/melonJS/docs/melonjs/Container.html#getOpacity"},"P-GcBYghSLtMGjC9ohRYt":{"uri":"/melonJS/docs/melonjs/Container.html#getRootAncestor"},"hznT9En7FiOeLU_QytnRo":{"uri":"/melonJS/docs/melonjs/Container.html#hasChild"},"WyOO7uE_i5NE-7WfrI3Ok":{"uri":"/melonJS/docs/melonjs/Container.html#isAttachedToRoot"},"JsWi8bWu1bGW6LiH4_dcJ":{"uri":"/melonJS/docs/melonjs/Container.html#isConvex"},"8tRauqMFdgc87zZAYCxT2":{"uri":"/melonJS/docs/melonjs/Container.html#isFinite"},"shtksiw-4kpCHGofJOpQa":{"uri":"/melonJS/docs/melonjs/Container.html#lookAt"},"jp67Y48aHNeSWcPJK7-_x":{"uri":"/melonJS/docs/melonjs/Container.html#moveDown"},"0isFCxi69Y6cYD9vDiZkK":{"uri":"/melonJS/docs/melonjs/Container.html#moveToBottom"},"TlktU7wXAKwe67j99ZVPv":{"uri":"/melonJS/docs/melonjs/Container.html#moveToTop"},"rmAsLKh3TDT_kypA3w3nm":{"uri":"/melonJS/docs/melonjs/Container.html#moveUp"},"5CjiLw5zcGb0GoH9HD22f":{"uri":"/melonJS/docs/melonjs/Container.html#onChildChange"},"dTBnA2LERjx3TXjUueJEw":{"uri":"/melonJS/docs/melonjs/Container.html#onCollision"},"eOTPukNYUNmzV-aRYt9Mp":{"uri":"/melonJS/docs/melonjs/Container.html#onDestroyEvent"},"jWkyNZ19sGOytU4Kxh25R":{"uri":"/melonJS/docs/melonjs/Container.html#overlaps"},"lLsPC5C9ZXopfg92j8x-b":{"uri":"/melonJS/docs/melonjs/Container.html#postDraw"},"5biroReaYUhLap9srdJRs":{"uri":"/melonJS/docs/melonjs/Container.html#preDraw"},"73vO5Wk4W5G9iXBp4KatL":{"uri":"/melonJS/docs/melonjs/Container.html#recalc"},"QOP-6iIDiNv9CN90dZZtB":{"uri":"/melonJS/docs/melonjs/Container.html#removeChild"},"NJZinJvUNmA2GnevkTEYd":{"uri":"/melonJS/docs/melonjs/Container.html#removeChildNow"},"ooy_ft89NrxprPWLyqDHJ":{"uri":"/melonJS/docs/melonjs/Container.html#reset"},"kd4ikCNoXQVLEikDzqJXu":{"uri":"/melonJS/docs/melonjs/Container.html#resize"},"TiApSIHNCRO1ZpU5KuS1F":{"uri":"/melonJS/docs/melonjs/Container.html#rotate"},"s0Fk4ZZW82pRCpj4iHoEA":{"uri":"/melonJS/docs/melonjs/Container.html#scale"},"YXc20NtjTLtZG7wOVADJ8":{"uri":"/melonJS/docs/melonjs/Container.html#scaleV"},"ZMRSVTio0y30fZuDUVsRU":{"uri":"/melonJS/docs/melonjs/Container.html#setChildsProperty"},"r6LPWTFB9LSm970vkTvbI":{"uri":"/melonJS/docs/melonjs/Container.html#setOpacity"},"Zl1ZNrmHPBrBtn804K_yR":{"uri":"/melonJS/docs/melonjs/Container.html#setShape"},"932ROOUVMaAmaD5lzrAEj":{"uri":"/melonJS/docs/melonjs/Container.html#setVertices"},"-QKefukZUhOR3vinVfuVL":{"uri":"/melonJS/docs/melonjs/Container.html#shift"},"bL7b9vGc3pzCQ0hUkbR5U":{"uri":"/melonJS/docs/melonjs/Container.html#sort"},"6PlYFwsPz---I4czPGooF":{"uri":"/melonJS/docs/melonjs/Container.html#swapChildren"},"NvPGHF9bfYfVu9DsWDtxz":{"uri":"/melonJS/docs/melonjs/Container.html#to2d"},"d_b9vTCi8L-7AOkG1kROw":{"uri":"/melonJS/docs/melonjs/Container.html#toIso"},"J3I3Y2Q2vaQknHYAsFDi5":{"uri":"/melonJS/docs/melonjs/Container.html#toPolygon"},"YhZE3H8a3jrVyyQKlKAS8":{"uri":"/melonJS/docs/melonjs/Container.html#transform"},"Z0ex9DQUHrPHA21nCZ4s6":{"uri":"/melonJS/docs/melonjs/Container.html#translate"},"mOzZsQdSPmQimxZBSs_tL":{"uri":"/melonJS/docs/melonjs/Container.html#union"},"N6v6HfjY1qUFQ4Sijk03_":{"uri":"/melonJS/docs/melonjs/Container.html#updateBounds"},"s5FI1RD4gjCCjAcYwGPFn":{"uri":"/melonJS/docs/melonjs/Container.html#draw"},"bDI_1K9PUN0nDahgyOQaY":{"uri":"/melonJS/docs/melonjs/Container.html#update"},"9OWQLYq3hG5DKwd8j_gUb":{"uri":"/melonJS/docs/melonjs/Container.html#onAnchorUpdate"},"Dlkt3ysC7zaWLf48bW-t6":{"uri":"/melonJS/docs/melonjs/Detector.html"},"zZQz2I98QX49ExQ9RSzTb":{"uri":"/melonJS/docs/melonjs/Detector.html#response"},"twgOFUJ6T3A7dwqH60NSt":{"uri":"/melonJS/docs/melonjs/Detector.html#collides"},"vyjzR7tfSu4ggFApnr_S6":{"uri":"/melonJS/docs/melonjs/Detector.html#constructor"},"CG-oF-PKKdhT4sT6Z9hRN":{"uri":"/melonJS/docs/melonjs/Detector.html#shouldCollide"},"JdXp_zjJ_W8JQT9PIvZn0":{"uri":"/melonJS/docs/melonjs/Draggable.html"},"72H24CMeOXiXe9dPqdMPY":{"uri":"/melonJS/docs/melonjs/Draggable.html#alpha"},"iD6MsliZVkCU-BWxwFq4F":{"uri":"/melonJS/docs/melonjs/Draggable.html#alwaysUpdate"},"IMnNDLh-HLhUcPhKbcOdu":{"uri":"/melonJS/docs/melonjs/Draggable.html#ancestor"},"ICV0LOiNXJfhmbegor69e":{"uri":"/melonJS/docs/melonjs/Draggable.html#anchorPoint"},"Q-QXofvRXk8CLxau4-G5r":{"uri":"/melonJS/docs/melonjs/Draggable.html#autoTransform"},"7ZXdnyTplJN-YpmG69Nne":{"uri":"/melonJS/docs/melonjs/Draggable.html#blendMode"},"ncUZfzslpQ8Ehrd3jj8Ul":{"uri":"/melonJS/docs/melonjs/Draggable.html#body"},"POWdx-2omxW29eFiv3Zt2":{"uri":"/melonJS/docs/melonjs/Draggable.html#bottom"},"ZBUVTFMwzAVQdLl9bFAV9":{"uri":"/melonJS/docs/melonjs/Draggable.html#centerX"},"FxuwmiGI4w3GRYlCHmsI9":{"uri":"/melonJS/docs/melonjs/Draggable.html#centerY"},"ao3_H6ptUdFaf3Juwzyyn":{"uri":"/melonJS/docs/melonjs/Draggable.html#currentTransform"},"UuFsj4iJZVGNXkf-v8wms":{"uri":"/melonJS/docs/melonjs/Draggable.html#depth"},"d-kAjD2pXqPvvIVAKTvWx":{"uri":"/melonJS/docs/melonjs/Draggable.html#floating"},"4Db7G4K6T1ytcjsGgU0RA":{"uri":"/melonJS/docs/melonjs/Draggable.html#GUID"},"DJWb1-gyatLBxC4fdV-7A":{"uri":"/melonJS/docs/melonjs/Draggable.html#height"},"M-MjLRoffH_5sthrpbLd5":{"uri":"/melonJS/docs/melonjs/Draggable.html#inViewport"},"uhoErGYD4zhRlt4REewOv":{"uri":"/melonJS/docs/melonjs/Draggable.html#isDirty"},"3ogaLK30f_MBWB1nzajJK":{"uri":"/melonJS/docs/melonjs/Draggable.html#isFlippedX"},"vZo9w9I3yKexVoH5_zENz":{"uri":"/melonJS/docs/melonjs/Draggable.html#isFlippedY"},"GryA228v1hhY7QXkVgxEC":{"uri":"/melonJS/docs/melonjs/Draggable.html#isFloating"},"EBttEjLYSU-AP9lTuCOTl":{"uri":"/melonJS/docs/melonjs/Draggable.html#isKinematic"},"VBRvugVjd0E2-knJVKa72":{"uri":"/melonJS/docs/melonjs/Draggable.html#isPersistent"},"dRUqnZuFDVj1KKgK-rYHL":{"uri":"/melonJS/docs/melonjs/Draggable.html#left"},"eUn7cErX4dUof4hXBgG1C":{"uri":"/melonJS/docs/melonjs/Draggable.html#mask"},"HnRLperDnjbVeG8eydCA4":{"uri":"/melonJS/docs/melonjs/Draggable.html#name"},"gScnMKAI7UJtmEit0fc2C":{"uri":"/melonJS/docs/melonjs/Draggable.html#onVisibilityChange"},"aPnYKVBjL-zcGymPnmnAE":{"uri":"/melonJS/docs/melonjs/Draggable.html#points"},"hF50vgWDpph-3kCECj8zw":{"uri":"/melonJS/docs/melonjs/Draggable.html#pos"},"NWv5B7yYAhufyRCuB0bMv":{"uri":"/melonJS/docs/melonjs/Draggable.html#right"},"GB6O-SZ_vnj7T5mDucn2Z":{"uri":"/melonJS/docs/melonjs/Draggable.html#shader"},"rn8NHaVEfw6FFbIuj-WOi":{"uri":"/melonJS/docs/melonjs/Draggable.html#tint"},"GP6zNdVZjOMRtMZ0UQ1ZO":{"uri":"/melonJS/docs/melonjs/Draggable.html#top"},"yMdYNxvozUsFfyf7PT19L":{"uri":"/melonJS/docs/melonjs/Draggable.html#type"},"oTNDd6J_pUZN_rzNRM5Jp":{"uri":"/melonJS/docs/melonjs/Draggable.html#updateWhenPaused"},"HTm3yyJGyIIpzcdVWTYZD":{"uri":"/melonJS/docs/melonjs/Draggable.html#width"},"puyVqtS60xegbFkwjr7Pk":{"uri":"/melonJS/docs/melonjs/Draggable.html#angleTo"},"pJaeVcVUPanfQAPTeQ2Ji":{"uri":"/melonJS/docs/melonjs/Draggable.html#centerOn"},"S6_b45aomAaVPH56DwsaQ":{"uri":"/melonJS/docs/melonjs/Draggable.html#clone"},"x85TiFPqkMMY11yfrZlxJ":{"uri":"/melonJS/docs/melonjs/Draggable.html#constructor"},"M2Qy1GYlqKrdWEIrVTyQ_":{"uri":"/melonJS/docs/melonjs/Draggable.html#contains"},"1BPSi5dKl-C6K6ze1KTzf":{"uri":"/melonJS/docs/melonjs/Draggable.html#copy"},"XX32vGKEy5288VoRTJBF2":{"uri":"/melonJS/docs/melonjs/Draggable.html#distanceTo"},"md4qbC6d1LCKpMHk9cPJk":{"uri":"/melonJS/docs/melonjs/Draggable.html#dragEnd"},"9TZUFFhp9lN-vUDz_BtFf":{"uri":"/melonJS/docs/melonjs/Draggable.html#dragMove"},"OQ0Ep94Lp244MYs7613P1":{"uri":"/melonJS/docs/melonjs/Draggable.html#dragStart"},"I-GEJpev2aFMUyt_d279h":{"uri":"/melonJS/docs/melonjs/Draggable.html#draw"},"KIyBxlo6pOLnIBzuJ3C8n":{"uri":"/melonJS/docs/melonjs/Draggable.html#equals"},"TqpT4sm_E4EvFz56ec9zB":{"uri":"/melonJS/docs/melonjs/Draggable.html#flipX"},"x2IxmTL9EBw0Uiq-Lgnqq":{"uri":"/melonJS/docs/melonjs/Draggable.html#flipY"},"cvF1Jx1OA0tvEmUpUbY2B":{"uri":"/melonJS/docs/melonjs/Draggable.html#getAbsolutePosition"},"lGBKgF4irNkmC2i-3NBFy":{"uri":"/melonJS/docs/melonjs/Draggable.html#getBounds"},"nTr6LN645JQGjYWapD1N7":{"uri":"/melonJS/docs/melonjs/Draggable.html#getIndices"},"V1Vuw_w1UoKBKZYSzbgf5":{"uri":"/melonJS/docs/melonjs/Draggable.html#getOpacity"},"_TOxJzJparF2t4YLEJkbe":{"uri":"/melonJS/docs/melonjs/Draggable.html#isConvex"},"Rg5bU3JPWrqOFnXckkDWW":{"uri":"/melonJS/docs/melonjs/Draggable.html#isFinite"},"uo2SwNWJ-3awe1Vj5041W":{"uri":"/melonJS/docs/melonjs/Draggable.html#lookAt"},"YogGtgcUmVM4wx4-CEKTn":{"uri":"/melonJS/docs/melonjs/Draggable.html#onCollision"},"32fn0694ynM0QMUU8QaNx":{"uri":"/melonJS/docs/melonjs/Draggable.html#onDestroyEvent"},"9Q2umfKfA5lJLv3bW3fpV":{"uri":"/melonJS/docs/melonjs/Draggable.html#overlaps"},"qswuiAMLke88sMu7gdiZ1":{"uri":"/melonJS/docs/melonjs/Draggable.html#postDraw"},"rVIxIIqlLB6L2dNgoAGnm":{"uri":"/melonJS/docs/melonjs/Draggable.html#preDraw"},"cfqDnd0JkM90hgSZWVUUI":{"uri":"/melonJS/docs/melonjs/Draggable.html#recalc"},"7UyoAVKS7vgfhaLq6uSWn":{"uri":"/melonJS/docs/melonjs/Draggable.html#resize"},"8koJI0b7Wz-FzaavCO8Ur":{"uri":"/melonJS/docs/melonjs/Draggable.html#rotate"},"8RMS314kth-k1CbQhi2vy":{"uri":"/melonJS/docs/melonjs/Draggable.html#scale"},"Y6wWvO4VDPMhG01oI2aJv":{"uri":"/melonJS/docs/melonjs/Draggable.html#scaleV"},"vJ9eFkNp7QsVYt_tK5JTh":{"uri":"/melonJS/docs/melonjs/Draggable.html#setOpacity"},"6iNNOCaWbmoqL-VmM3nGp":{"uri":"/melonJS/docs/melonjs/Draggable.html#setShape"},"tPtLaahMXLcbdc5FyTqOg":{"uri":"/melonJS/docs/melonjs/Draggable.html#setVertices"},"cFrArQ1cDWJS0JoqW3B3H":{"uri":"/melonJS/docs/melonjs/Draggable.html#shift"},"bSxK0KWebFRGY6RsD_f33":{"uri":"/melonJS/docs/melonjs/Draggable.html#to2d"},"NcBL5BWx0V_gpvdK0uz2d":{"uri":"/melonJS/docs/melonjs/Draggable.html#toIso"},"aKS2DtMS1A4gMrsEVgEFz":{"uri":"/melonJS/docs/melonjs/Draggable.html#toPolygon"},"Itb4VUDZrmxtWzyBju91K":{"uri":"/melonJS/docs/melonjs/Draggable.html#transform"},"sGucms8gV8PgMb0m9h9FB":{"uri":"/melonJS/docs/melonjs/Draggable.html#translate"},"5Gy9SVtqF8lv22M7wX-M2":{"uri":"/melonJS/docs/melonjs/Draggable.html#union"},"soYnmSWsQywUDA6F1fMRN":{"uri":"/melonJS/docs/melonjs/Draggable.html#update"},"_JYINLAWKF9PNag_1EK5P":{"uri":"/melonJS/docs/melonjs/Draggable.html#updateBounds"},"sAvgZdri_WOKtMoknFfjt":{"uri":"/melonJS/docs/melonjs/Draggable.html#initEvents"},"vcooUz5hu59CiJQmKzQEb":{"uri":"/melonJS/docs/melonjs/Draggable.html#onAnchorUpdate"},"A0Jtx3szYDgpwfl0p1CQ1":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html"},"Xj-VzalDvHCYpPNwPBLaG":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#alive"},"79dQe4NjGTzXDAmJIQ3SM":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#alpha"},"TPR7rS_8_JtU_NyeGHmXf":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#alwaysUpdate"},"yQWkyFne_EzmwK4shU4Ji":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#ancestor"},"W6K5irA6gaNIbcH1hRkge":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#anchorPoint"},"ZFM7vU8FTu1g8oDo8rrep":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#autoTransform"},"-vXz2BHq7y9w-zlLC1_7o":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#blendMode"},"rm1eD7o_CvyfK_3jKVmo_":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#body"},"2iOttb7R5-HAYq9EFQpMb":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#bottom"},"rmGGGvZsTROzZ6-AWqqmn":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#centerX"},"j7qBi652bUMDXRY7t_BA7":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#centerY"},"2HoVqvau3P8cSOfK0t2K7":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#currentTransform"},"jiK7ZJBAYnk_VvtK7jvIu":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#depth"},"Hi6dHBlvdiSOaltfgz5wm":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#floating"},"wbv29kIos72Dq5PeVQjf3":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#GUID"},"TYR1W5MhLzCXeGxVouPZ4":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#height"},"w6nX4LUtLgPij0Up6tFg6":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#id"},"x9y1CZUwI2QtT2S4dha9I":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#inViewport"},"Xaky6g-46Je3G9afGTXQa":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isDirty"},"0EaXfZst93GzXkvmAbwEG":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isFlippedX"},"JXc8ygKI3werPReUjBaRX":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isFlippedY"},"0nW3Ib91YfoaOAOHbxJbe":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isFloating"},"Icu4HLGvZqiZLRXSn5TMB":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isKinematic"},"n_dPtD8fLtXyiIt-OAoMb":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isPersistent"},"B_sFmAPzp-WnJpyBSqH6e":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#left"},"cV7_fYC-qlgD7nvynmtfp":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#mask"},"YI9bV01V-YDRwG3GgjBaq":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#name"},"u4lMA7pIn976UdLN54ODZ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onVisibilityChange"},"D4bOZKQlYUwcAwgKWPBkD":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#points"},"E_7qTIM4TSOru6YXmhAuH":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#pos"},"aVZnXvlkDk870BhHeZ8I3":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#renderable"},"ayGPOIE0eTs45_GDgNsAK":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#right"},"zfUxz-fg_EkgmJd7g5KUg":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#shader"},"rs7KriKidKCvspM2L11zM":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#tint"},"pP16u52hwMFTRMUe35dPT":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#top"},"B6Y2NzQPalXWSSlKudvUf":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#type"},"aixPU0B58ouNvGk2Qj4ix":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#updateWhenPaused"},"_1LHAtHAhJ2NYF4Z0rkoe":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#width"},"lgatx7nkCP4W-gvXqCFxH":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#angleTo"},"hClqL6HjdlVLZb-JiAHEf":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#centerOn"},"CYf1mZZjHugjuschSrK5A":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#clone"},"AXymMR2-q6Cdf5LVTVQim":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#constructor"},"GO11T7pQ4F-HcYBy-xbD-":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#contains"},"w6cSrD5jMHH2ixYo4m6I5":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#copy"},"VzVhKlow6HiwlgqBhubq8":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#distanceTo"},"BIz4nTpgiUQcsZuDsoLxk":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#equals"},"6gQThdMtIYHWv3ZWBOYBO":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#flipX"},"zdrZteHYDpI4nZ0pO4b-V":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#flipY"},"OusAkU1P1Db7j43piBoac":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#getAbsolutePosition"},"Ozcjfw5gaeJdlzYUoJaA-":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#getBounds"},"AjkoNtwlDqB5FZAGGXIfI":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#getIndices"},"znLvgzCNiOWhq6Uhi3H2a":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#getOpacity"},"_ug9lxR4eTNhohhzZ9RbF":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isConvex"},"9XLGsvNO_-hn8SrYHIDJW":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isFinite"},"fiUgHvl3fI6Q4MdJG_PsN":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#lookAt"},"HvwBWKfCCgUMWb7dn5Lsi":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onBodyUpdate"},"pccj-6LsKJAxjtLwzZ8ZV":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onCollision"},"XxkVYr_j2uW691ofKtuq2":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onDeactivateEvent"},"9AXrdV8UY3iOfXBXKtSfF":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onDestroyEvent"},"xKyk1uuRcA2t_Qep18XXl":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#overlaps"},"0kWQifxXbRfEq0FhaKgvy":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#postDraw"},"AhsfWlwx-zcN-9zdfgizd":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#preDraw"},"9Ey_PVRDZibAb8R9Qo3TA":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#recalc"},"29X5_V7FTnqkYXIpKC1up":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#resize"},"IusG-HLWHof6Hw0aCcfsX":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#rotate"},"nkC7q4VKvgtSLEzGXhl8c":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#scale"},"umyu61gR4jr7y_s19LhG4":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#scaleV"},"qIdTmf_LRGvMydSV7HblG":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#setOpacity"},"QGB1upPMm1TFaANMxVQWj":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#setShape"},"TC8j7Pb6gNpiX5wYq7QL-":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#setVertices"},"0COjZyMiRzWttt3m_2r9M":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#shift"},"Xhno5iJ9MSRhpbZ703_zT":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#to2d"},"OGJTG4oQXD2_ZwMf5rrCa":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#toIso"},"pjqjKywfS-sa6JsNQXWFZ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#toPolygon"},"JX5MHifZgGutCPyMDuLtp":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#transform"},"AZP_sqSFKXjvXvZ2QPtqn":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#translate"},"f2_DCMwiXuo4GvDBjzJ9c":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#union"},"ee4TFF0jQQvHZ4M_C6Vhx":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#update"},"96wIFHfIoo_wNqRh5afNZ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#updateBounds"},"w257c-gQnrXI0rEjFErRE":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#draw"},"XGWO7_wzRdK80V-R4ZhdJ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onAnchorUpdate"},"Zwhw0zb8ZUogcyvfPQN2D":{"uri":"/melonJS/docs/melonjs/DropTarget.html"},"TyrCtfcTeWD-aWTO2SHkv":{"uri":"/melonJS/docs/melonjs/DropTarget.html#alpha"},"2v4EYO0UR3Mgx1TIas7MF":{"uri":"/melonJS/docs/melonjs/DropTarget.html#alwaysUpdate"},"BWkF2Ap7mULWDiJZxxiR5":{"uri":"/melonJS/docs/melonjs/DropTarget.html#ancestor"},"ucirjqHGiWfDIic9faou2":{"uri":"/melonJS/docs/melonjs/DropTarget.html#anchorPoint"},"j0lZ-N5AR4a-zCt-yT9H7":{"uri":"/melonJS/docs/melonjs/DropTarget.html#autoTransform"},"a2nJH1kt-Z29z7NRtQbf_":{"uri":"/melonJS/docs/melonjs/DropTarget.html#blendMode"},"KWh8IVEBAtDO3qD7JvGMY":{"uri":"/melonJS/docs/melonjs/DropTarget.html#body"},"znjrSe7vLHyNDZMjrV_Rm":{"uri":"/melonJS/docs/melonjs/DropTarget.html#bottom"},"XucS1qwYDvDi2iMg_GbXx":{"uri":"/melonJS/docs/melonjs/DropTarget.html#centerX"},"vpuIEyjufpkn6IAX1myNh":{"uri":"/melonJS/docs/melonjs/DropTarget.html#centerY"},"t_BOg1NUVP4-U7Q55ZlYU":{"uri":"/melonJS/docs/melonjs/DropTarget.html#checkMethod"},"eC9BXZVHFsTajddVNUnZu":{"uri":"/melonJS/docs/melonjs/DropTarget.html#CHECKMETHOD_CONTAINS"},"5iDEl5JsEHhim85Kfodwf":{"uri":"/melonJS/docs/melonjs/DropTarget.html#CHECKMETHOD_OVERLAP"},"iShqeOhokMqk_Q0m1c92u":{"uri":"/melonJS/docs/melonjs/DropTarget.html#currentTransform"},"ZcCj9buJ3-UcyqOY2xFdD":{"uri":"/melonJS/docs/melonjs/DropTarget.html#depth"},"lRHuMhWFz8fZkE0sEvBUm":{"uri":"/melonJS/docs/melonjs/DropTarget.html#floating"},"aWfFHgYpgSvbhSYxmmSWj":{"uri":"/melonJS/docs/melonjs/DropTarget.html#GUID"},"-c57t_z_vUkeGxRkSQ9Vg":{"uri":"/melonJS/docs/melonjs/DropTarget.html#height"},"5-qI3Uxc55vN9slDpNSaC":{"uri":"/melonJS/docs/melonjs/DropTarget.html#inViewport"},"aZWSV0II9G2V6y1LNcLbe":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isDirty"},"rlIpR_Hqqii0giJEBu2t4":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isFlippedX"},"3SBRJl6NNlkBrBUzIRxdI":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isFlippedY"},"gdnT5M3hLsVHtl5DrriTp":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isFloating"},"YSZ5BustIf36f48adbD_P":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isKinematic"},"vDQzaHqLvJt8iiWlEY5Wc":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isPersistent"},"w96dbz7jSW6UaWuS84cKw":{"uri":"/melonJS/docs/melonjs/DropTarget.html#left"},"ERO9r9y_E8usAdnfsI95M":{"uri":"/melonJS/docs/melonjs/DropTarget.html#mask"},"717Nu_WXsm_wu4XDW_omw":{"uri":"/melonJS/docs/melonjs/DropTarget.html#name"},"v6-zlLeFeSj-KbzjxUGrz":{"uri":"/melonJS/docs/melonjs/DropTarget.html#onVisibilityChange"},"64izsh1EFDousY94AFVcA":{"uri":"/melonJS/docs/melonjs/DropTarget.html#points"},"arx1dn25bjo2VmHiTk3WZ":{"uri":"/melonJS/docs/melonjs/DropTarget.html#pos"},"_8WbYR7VUAlKYgZlhgfEy":{"uri":"/melonJS/docs/melonjs/DropTarget.html#right"},"lGhAOWunRYogWG-np7sEo":{"uri":"/melonJS/docs/melonjs/DropTarget.html#shader"},"wuQH4nqFQvsXFyLwKOaNh":{"uri":"/melonJS/docs/melonjs/DropTarget.html#tint"},"GK905oCGCAXQ6_Xt-7NsX":{"uri":"/melonJS/docs/melonjs/DropTarget.html#top"},"OikJI1CC5IbPiVxZ3SgvH":{"uri":"/melonJS/docs/melonjs/DropTarget.html#type"},"hGmL2ArWUuuCnM_1vF8--":{"uri":"/melonJS/docs/melonjs/DropTarget.html#updateWhenPaused"},"Su-ZA0h6XB9SBU4YUEWv_":{"uri":"/melonJS/docs/melonjs/DropTarget.html#width"},"wbzdF6CufqApKeWhumk5f":{"uri":"/melonJS/docs/melonjs/DropTarget.html#angleTo"},"uN5viYxYjzsk_HNz3b8kQ":{"uri":"/melonJS/docs/melonjs/DropTarget.html#centerOn"},"nDzRNpR1Cys2pPrh8Zxuh":{"uri":"/melonJS/docs/melonjs/DropTarget.html#checkOnMe"},"31nbQcZFb8ebNYri3RAod":{"uri":"/melonJS/docs/melonjs/DropTarget.html#clone"},"TFayno-mVOEaf_pchHx6S":{"uri":"/melonJS/docs/melonjs/DropTarget.html#constructor"},"EzuJn5XX-_9m_rY5GFEzi":{"uri":"/melonJS/docs/melonjs/DropTarget.html#contains"},"hAXjCxPuDY5Z7idNcEmHL":{"uri":"/melonJS/docs/melonjs/DropTarget.html#copy"},"pWdziQGVWyonSRtPA26EB":{"uri":"/melonJS/docs/melonjs/DropTarget.html#distanceTo"},"YbzRF-p-uuJJ2bSs8EZnC":{"uri":"/melonJS/docs/melonjs/DropTarget.html#draw"},"mN3MHF3y0KlN05W3t_li8":{"uri":"/melonJS/docs/melonjs/DropTarget.html#drop"},"LdVWIo574kHvDjl6IYI__":{"uri":"/melonJS/docs/melonjs/DropTarget.html#equals"},"oVpUaIViRLKpgY1ckj31q":{"uri":"/melonJS/docs/melonjs/DropTarget.html#flipX"},"jVQ-PHVQoQEcBqVmC_yav":{"uri":"/melonJS/docs/melonjs/DropTarget.html#flipY"},"mXBNShamRsirV-dzPo4gs":{"uri":"/melonJS/docs/melonjs/DropTarget.html#getAbsolutePosition"},"idOIWOe1wFg-h9OY6vs0G":{"uri":"/melonJS/docs/melonjs/DropTarget.html#getBounds"},"zrVNkVv4n__j0-sGyqzpe":{"uri":"/melonJS/docs/melonjs/DropTarget.html#getIndices"},"v0o_iSeKsT8P-85X0rMTA":{"uri":"/melonJS/docs/melonjs/DropTarget.html#getOpacity"},"1gxrf9wnyRYnvkY0aCI4f":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isConvex"},"x_SIINh-31qI7q8DeUcGk":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isFinite"},"WTDlsvc7lkSsWvLUQ1KT1":{"uri":"/melonJS/docs/melonjs/DropTarget.html#lookAt"},"wm-hO8SDbRWJuYQ-EXg09":{"uri":"/melonJS/docs/melonjs/DropTarget.html#onCollision"},"Mq_KjcPqeIr_xGWfwVgtb":{"uri":"/melonJS/docs/melonjs/DropTarget.html#onDestroyEvent"},"hB53bixj5-MMqHg_YNmHm":{"uri":"/melonJS/docs/melonjs/DropTarget.html#overlaps"},"JquDVeVTKQbykMR7HqK8B":{"uri":"/melonJS/docs/melonjs/DropTarget.html#postDraw"},"ng4dJs_Lmzvxe--9oMeqA":{"uri":"/melonJS/docs/melonjs/DropTarget.html#preDraw"},"t9XMEw2vXHvHHe5R1nthk":{"uri":"/melonJS/docs/melonjs/DropTarget.html#recalc"},"twXPchymaNBwSHGgFdLx0":{"uri":"/melonJS/docs/melonjs/DropTarget.html#resize"},"20CxunUthI4DazTD3F3xd":{"uri":"/melonJS/docs/melonjs/DropTarget.html#rotate"},"gkgLtuser4vaDcMMhWmiS":{"uri":"/melonJS/docs/melonjs/DropTarget.html#scale"},"DzvBrEwtl-Dd3mpZRgWnp":{"uri":"/melonJS/docs/melonjs/DropTarget.html#scaleV"},"jVtVR8LKl80qH_1fA2LCL":{"uri":"/melonJS/docs/melonjs/DropTarget.html#setCheckMethod"},"6vISI0upWiROxI9Hud5m5":{"uri":"/melonJS/docs/melonjs/DropTarget.html#setOpacity"},"ajdpWx3JIE5MpaR09RoMR":{"uri":"/melonJS/docs/melonjs/DropTarget.html#setShape"},"QP4chZQJl5OWkqOSmtfRd":{"uri":"/melonJS/docs/melonjs/DropTarget.html#setVertices"},"nQ0MYpFhbfKqBdHe6Nql2":{"uri":"/melonJS/docs/melonjs/DropTarget.html#shift"},"nOPbz2j6WAC6Hdp-ey58c":{"uri":"/melonJS/docs/melonjs/DropTarget.html#to2d"},"pIIPn3SKQTBTHlLiUqnqd":{"uri":"/melonJS/docs/melonjs/DropTarget.html#toIso"},"bcwQ_-2-bhNkBdiv-M7Cc":{"uri":"/melonJS/docs/melonjs/DropTarget.html#toPolygon"},"RG36ak3f5iNjlHcu--52t":{"uri":"/melonJS/docs/melonjs/DropTarget.html#transform"},"8n0zPVc4nYUM1cW723Vja":{"uri":"/melonJS/docs/melonjs/DropTarget.html#translate"},"8RMMhrfnghhbCkQDre6rF":{"uri":"/melonJS/docs/melonjs/DropTarget.html#union"},"EknHn4ODrhMgs5tLLzAuk":{"uri":"/melonJS/docs/melonjs/DropTarget.html#update"},"4Weyib6yhnAlpUKHi1O1J":{"uri":"/melonJS/docs/melonjs/DropTarget.html#updateBounds"},"Ppmxih5dbGEemxLuyUJYF":{"uri":"/melonJS/docs/melonjs/DropTarget.html#onAnchorUpdate"},"tDC_89KSbq3XQjGiz-0DE":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html"},"rTolNGZcdbl26FApnRg4i":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#alive"},"QZTGDdma6l6eiMxi7WQyj":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#alpha"},"hIZG3xIoAWXf1SX8i5v3_":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#alwaysUpdate"},"GfxRnvD9RyEh_RmcQYBLI":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#ancestor"},"NTIJNDPxGRGEXxPvmDdAx":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#anchorPoint"},"WfXOLqBuhoMe2-2nIqr1g":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#autoTransform"},"BYT1NYcTjTF6TB9m7Skhh":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#blendMode"},"kmKME2nJ8yr_u2pYp6eVB":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#body"},"y2_aH4bl4cK6H1eYhohOy":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#bottom"},"qirRlFvTlSZjQPwFryTv-":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#centerX"},"SORJuwSWdTAZ67eItAibA":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#centerY"},"rSoUTYhIBm_XGkdFbdLsZ":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#currentTransform"},"XJP1gM4i9dg7dHsc5FjFe":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#depth"},"wi9Q72ayFXhk3py6LL4Iy":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#floating"},"pW-RJwObx4baAJmrPQi93":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#GUID"},"KewrCr7KM2aBbQps7453H":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#height"},"yavlJtGpU-52z2Us46cjo":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#id"},"aJcdyF-KJs2kTzmm0beCD":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#inViewport"},"OHEWLgRK5SEmhJk77gAvD":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isDirty"},"vKBTwqZwy1UihgSqAyzs3":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isFlippedX"},"OEg8nUyLWX0aXUtUjOOd8":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isFlippedY"},"jLQmuWMj7eKT_2JK-KSqy":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isFloating"},"yUMze7rgzwWjkh1wRyusp":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isKinematic"},"GH_mzAnijsc40AawjZmzb":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isPersistent"},"GQRPr2GQr7V7i3puLdxrg":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#left"},"fSTiBWt3Zg6oFx69BlD1f":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#mask"},"iwgdDz073kApZHHQHPZz0":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#name"},"tp9ZuI9LNSsR19HX6Tx5k":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onVisibilityChange"},"XSfdWGp4pZVrbTCv48dSk":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#points"},"Oh2-AYjPvMICcrLJtKm4B":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#pos"},"-I7yy6kWEUNGqQWLH5BhG":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#renderable"},"mnwtS63KsHp95p9PbM591":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#right"},"pzk99AVoYSVdg1RNTOlmA":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#shader"},"H9oa4dWzw6ITN1MNEQmi1":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#tint"},"LXuLq_dFlBGzXabkvXSUj":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#top"},"fvs93yvwBCoR1ihmYv87X":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#type"},"AmW3eI7o7xOVk_3eMbrN4":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#updateWhenPaused"},"yI1BL9stDQuZkxudqRIem":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#width"},"7pjT-EvSfC8n8IWCMwfvr":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#angleTo"},"TTPr7Rif-00DBZsc_1roP":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#centerOn"},"6-oLUbvRPxhBKcRITEb9Y":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#clone"},"e4JfbRHr7oF6MhCnRi0pH":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#constructor"},"VCqMLvCaWyEqpVpkO0Tlq":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#contains"},"cCFD_r8Hm7oKBJdmkcHcA":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#copy"},"-HUuiwrzkBrBTLILx3hAu":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#distanceTo"},"nAqq7xukXNB70nD5_ojve":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#equals"},"FMI6fUjNIlsh6y5216rWD":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#flipX"},"2pz86LloXtmi5JgP-l37V":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#flipY"},"23qbeyKz1Fs9HuQ8aFfeU":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#getAbsolutePosition"},"AIZi5ySVvw7c4sqxl0EuK":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#getBounds"},"zggbQfeUVAWwk40BnOWOx":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#getIndices"},"OmnaBp2fasXIpa4gFA20-":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#getOpacity"},"xR-7F06B-wtkqTmL5KypQ":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isConvex"},"OeGt-mgnZ8buoZGHNLBPo":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isFinite"},"cLhPoNSpjG-rKqasFuWfR":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#lookAt"},"HpYhXUFjz9Be05GOATCcH":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onBodyUpdate"},"XrYYtYayXRVwVdRl_KUPn":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onCollision"},"wxkih-WffS2zFzAr6Cr4l":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onDeactivateEvent"},"cNdzUZ4Lckat-uRRG6Ar2":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onDestroyEvent"},"YiLDuuuadX9TK_AK_Jdxb":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#overlaps"},"Owsvbq4d5C8WWIhIp2-Hi":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#postDraw"},"uxDXpvnEFHI6Wb_rWdN1n":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#preDraw"},"nZ24qGFUsW8eHSxSpwW3g":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#recalc"},"JjN4oXrjcoV4HlZ2qzeNk":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#resize"},"R6slvpPKR73utDIcdgOlR":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#rotate"},"Xx9ANhKkNdRtotYZW5yfw":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#scale"},"bt2h11D-2U_QC-8y7mM0c":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#scaleV"},"h5_n8ZtSalg1ZE9ZpWayk":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#setOpacity"},"E6hOYf-LSWPL8-sJQs5QV":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#setShape"},"SOQliOfRDdBTBj9CgjP2R":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#setVertices"},"Q88S3J3eIFSavEDEXrV3a":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#shift"},"PCv2DVKpwztaWE74z63IC":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#to2d"},"xjdFNgatPuzJTExD3PStj":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#toIso"},"Dg4ou6JbKFh93hiqbjSq9":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#toPolygon"},"PsAEEsMKJz8SJkq3_WjVW":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#transform"},"VoWLQWXYIkU9unlHLvq5Q":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#translate"},"hOmEzOZH1UUcRkilUvhMg":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#union"},"jd3ef0TWap89c4IPT6KTi":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#update"},"32OmOErqaGdTb1blZ06jM":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#updateBounds"},"r0-AeRS_PsUod7i5NNEH3":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#draw"},"WsUGcBz7Vgdya8yMYzhxM":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onAnchorUpdate"},"hxr0QXR-LLoNdZfcn72r-":{"uri":"/melonJS/docs/melonjs/Ellipse.html"},"SC2yg_uQdXvfYV6GK3kDq":{"uri":"/melonJS/docs/melonjs/Ellipse.html#pos"},"91HPYw7wmgB3oWZ9Fc9wn":{"uri":"/melonJS/docs/melonjs/Ellipse.html#radius"},"EwKYFveVHBYNEjeWNfB7m":{"uri":"/melonJS/docs/melonjs/Ellipse.html#radiusSq"},"WHfcE8U3jyd2fkKktEaCK":{"uri":"/melonJS/docs/melonjs/Ellipse.html#radiusV"},"I46gSX4yDiTBY_0sWf5nN":{"uri":"/melonJS/docs/melonjs/Ellipse.html#ratio"},"F-bahH9R8QO2FhoeGAUiC":{"uri":"/melonJS/docs/melonjs/Ellipse.html#type"},"4Qpf0xgW3p8NUdlYIRq24":{"uri":"/melonJS/docs/melonjs/Ellipse.html#_bounds"},"Oy3q1vY3_LDFJvi9-DDI-":{"uri":"/melonJS/docs/melonjs/Ellipse.html#clone"},"oZgsXca6AOFiJTAG2DdpZ":{"uri":"/melonJS/docs/melonjs/Ellipse.html#constructor"},"RSqgbqV-EbRqt_ANp0Vtk":{"uri":"/melonJS/docs/melonjs/Ellipse.html#contains"},"tJNzKrvGZIupDGJ3dICP3":{"uri":"/melonJS/docs/melonjs/Ellipse.html#getBounds"},"BDuOVDarx7AdxSJPfNxK5":{"uri":"/melonJS/docs/melonjs/Ellipse.html#rotate"},"0dSaWmcEASr1MdgSVCLuR":{"uri":"/melonJS/docs/melonjs/Ellipse.html#scale"},"6d6JdVB_9m6oKsMV5GXWz":{"uri":"/melonJS/docs/melonjs/Ellipse.html#scaleV"},"EaM85T5-CXn1-3mbd4DAp":{"uri":"/melonJS/docs/melonjs/Ellipse.html#setShape"},"egZmPirvAaen88VWL47Cc":{"uri":"/melonJS/docs/melonjs/Ellipse.html#transform"},"K_ZReTrFAeWqHj8YAsSDh":{"uri":"/melonJS/docs/melonjs/Ellipse.html#translate"},"7DOtkjlCDzwg1cTQ1OL8p":{"uri":"/melonJS/docs/melonjs/Entity.html"},"HtcjhAJs-eCxVbAum0njF":{"uri":"/melonJS/docs/melonjs/Entity.html#alive"},"ly_nFqQGPpS1ZzMIHwQr7":{"uri":"/melonJS/docs/melonjs/Entity.html#alpha"},"GERszQw-4bkq3gua_6SJH":{"uri":"/melonJS/docs/melonjs/Entity.html#alwaysUpdate"},"C0qSrW3HMKTtLytB39S7c":{"uri":"/melonJS/docs/melonjs/Entity.html#ancestor"},"6Xdy3kFyodXweOEhu27Oz":{"uri":"/melonJS/docs/melonjs/Entity.html#anchorPoint"},"1pupFz9dY-BsAmQ5qccyv":{"uri":"/melonJS/docs/melonjs/Entity.html#autoTransform"},"XI1HtYTJiy42OfqAagtZZ":{"uri":"/melonJS/docs/melonjs/Entity.html#blendMode"},"zNmPV1tPmcLYcef4TCB5g":{"uri":"/melonJS/docs/melonjs/Entity.html#body"},"M01gMAcBwfJqrj_46E69n":{"uri":"/melonJS/docs/melonjs/Entity.html#bottom"},"EffMLu5FFe52TlCEBzg6e":{"uri":"/melonJS/docs/melonjs/Entity.html#centerX"},"l7LPMEzRpqQKWXD_s65ia":{"uri":"/melonJS/docs/melonjs/Entity.html#centerY"},"399Z5g1LQnRsU_PqVOU0h":{"uri":"/melonJS/docs/melonjs/Entity.html#currentTransform"},"fqCo2tlJmyVj79zQxLdnp":{"uri":"/melonJS/docs/melonjs/Entity.html#depth"},"IEGgc0Rm2Mro7rNEm2N0E":{"uri":"/melonJS/docs/melonjs/Entity.html#floating"},"CD2nxjVKMcbWgPzJjLyWe":{"uri":"/melonJS/docs/melonjs/Entity.html#GUID"},"cmGCcJpgRSjWxBXlkdI5j":{"uri":"/melonJS/docs/melonjs/Entity.html#height"},"czejLjxom86jdoVYFE5_e":{"uri":"/melonJS/docs/melonjs/Entity.html#id"},"fsmCSj7MZTvedQ0v0oXht":{"uri":"/melonJS/docs/melonjs/Entity.html#inViewport"},"0nwWrO-CAJOrIBvC39RxB":{"uri":"/melonJS/docs/melonjs/Entity.html#isDirty"},"epj2kFnBqZeUD8fb9LTlC":{"uri":"/melonJS/docs/melonjs/Entity.html#isFlippedX"},"yPE_hAfNJi6O2DhkkbdNd":{"uri":"/melonJS/docs/melonjs/Entity.html#isFlippedY"},"LBavgYzA86fT9NNsGQEyn":{"uri":"/melonJS/docs/melonjs/Entity.html#isFloating"},"nRTO8QV4n_6eaoiha66Ay":{"uri":"/melonJS/docs/melonjs/Entity.html#isKinematic"},"Fjsltt_pqqxxpzBfddjXV":{"uri":"/melonJS/docs/melonjs/Entity.html#isPersistent"},"LidZRzCZj1kHLL9rwzozZ":{"uri":"/melonJS/docs/melonjs/Entity.html#left"},"ilnsENd30nWKKMacge-sk":{"uri":"/melonJS/docs/melonjs/Entity.html#mask"},"lXhN7WHTwfdEny8lx6PKC":{"uri":"/melonJS/docs/melonjs/Entity.html#name"},"hETXnUsKRnS4BUCHP3BTu":{"uri":"/melonJS/docs/melonjs/Entity.html#onVisibilityChange"},"Pplj2a-WhKuJxB6mbtnBK":{"uri":"/melonJS/docs/melonjs/Entity.html#points"},"9d13Cl3s1ZY3MaADr9-4F":{"uri":"/melonJS/docs/melonjs/Entity.html#pos"},"Tct30Q2iRwlR6JUS2yGTM":{"uri":"/melonJS/docs/melonjs/Entity.html#renderable"},"moo3RmRE-0Ss8BTUohnyh":{"uri":"/melonJS/docs/melonjs/Entity.html#right"},"r7D_tKg7Ywa5D7H7f_5td":{"uri":"/melonJS/docs/melonjs/Entity.html#shader"},"jIankfsbDVWKN2RlJP-Kp":{"uri":"/melonJS/docs/melonjs/Entity.html#tint"},"JtGNhmt0PF6o_n7m3DBUO":{"uri":"/melonJS/docs/melonjs/Entity.html#top"},"AkoqgffXAZXEk6HZ0n-xM":{"uri":"/melonJS/docs/melonjs/Entity.html#type"},"7gxgLE1AAKGimQQqZCTD4":{"uri":"/melonJS/docs/melonjs/Entity.html#updateWhenPaused"},"JKkoDepbE_ezDQ70I-c1-":{"uri":"/melonJS/docs/melonjs/Entity.html#width"},"xOBFsaSaXMDazxpug582s":{"uri":"/melonJS/docs/melonjs/Entity.html#angleTo"},"vmde5CFwRH6IQ5NL3S77f":{"uri":"/melonJS/docs/melonjs/Entity.html#centerOn"},"waYeSnHQbEnGMMNe_IiQD":{"uri":"/melonJS/docs/melonjs/Entity.html#clone"},"1N2ple_0Hhit44O68dJUf":{"uri":"/melonJS/docs/melonjs/Entity.html#constructor"},"WI2RPW3PwAeQ5oEQXKClr":{"uri":"/melonJS/docs/melonjs/Entity.html#contains"},"SI45N4lCX-x0rMknrjCti":{"uri":"/melonJS/docs/melonjs/Entity.html#copy"},"uHkYK9gYE14W8KDEDsPyk":{"uri":"/melonJS/docs/melonjs/Entity.html#distanceTo"},"ORRfmEF71s6_Kd1kInJWC":{"uri":"/melonJS/docs/melonjs/Entity.html#equals"},"zPQrdMHvBSDimfMHCivVT":{"uri":"/melonJS/docs/melonjs/Entity.html#flipX"},"WP9U5Y6PNTjaB5bshONgZ":{"uri":"/melonJS/docs/melonjs/Entity.html#flipY"},"DtqIzFlKUvKSBbsd6WM2v":{"uri":"/melonJS/docs/melonjs/Entity.html#getAbsolutePosition"},"_xKKxUJPQyg81nyKwALCY":{"uri":"/melonJS/docs/melonjs/Entity.html#getBounds"},"VRhSnuAwzmt3TZTNnGJmc":{"uri":"/melonJS/docs/melonjs/Entity.html#getIndices"},"MU8MUHGiALte7u1ihQ3A3":{"uri":"/melonJS/docs/melonjs/Entity.html#getOpacity"},"duRWJX__6wv94EazLFF9Y":{"uri":"/melonJS/docs/melonjs/Entity.html#isConvex"},"oC4PRsPjW1q24Pk5M_2n8":{"uri":"/melonJS/docs/melonjs/Entity.html#isFinite"},"iikdBScwjGQJ_OHI2X2HI":{"uri":"/melonJS/docs/melonjs/Entity.html#lookAt"},"sLDA746q0Uc9_ziiOW0XF":{"uri":"/melonJS/docs/melonjs/Entity.html#onBodyUpdate"},"zCrQ5FdL917ohMNvzSy4y":{"uri":"/melonJS/docs/melonjs/Entity.html#onCollision"},"ymEeJbORRen6LtZFbwGfA":{"uri":"/melonJS/docs/melonjs/Entity.html#onDeactivateEvent"},"kk5DxOgZ7hTOXrSpM8QFZ":{"uri":"/melonJS/docs/melonjs/Entity.html#onDestroyEvent"},"M-CaRrOMoZrcEFOIxhHdb":{"uri":"/melonJS/docs/melonjs/Entity.html#overlaps"},"7ro4OijIer3rLwCECaoQW":{"uri":"/melonJS/docs/melonjs/Entity.html#postDraw"},"1f6xFef-W7nPe3AmFgdTE":{"uri":"/melonJS/docs/melonjs/Entity.html#preDraw"},"V7t37gCGjn97NxUg-wJ9P":{"uri":"/melonJS/docs/melonjs/Entity.html#recalc"},"PJF1FjTeHKNGe5btxgMbv":{"uri":"/melonJS/docs/melonjs/Entity.html#resize"},"p3oaHXjQRPSRAbC3I2oSd":{"uri":"/melonJS/docs/melonjs/Entity.html#rotate"},"K9MUg3xjtwQUPTKh9ZxOm":{"uri":"/melonJS/docs/melonjs/Entity.html#scale"},"J783G9Z1pzHgDJWaIPVZq":{"uri":"/melonJS/docs/melonjs/Entity.html#scaleV"},"7tfz9KSZ18ccJrlXw_5hR":{"uri":"/melonJS/docs/melonjs/Entity.html#setOpacity"},"DyhKOnB4s53heHqRfzjDF":{"uri":"/melonJS/docs/melonjs/Entity.html#setShape"},"MCv67mSj0IkItDEE9kZpY":{"uri":"/melonJS/docs/melonjs/Entity.html#setVertices"},"4Qgg7ch5_jAxb-0UYvzKM":{"uri":"/melonJS/docs/melonjs/Entity.html#shift"},"6J1kvapYjQqv9tHHvMYzP":{"uri":"/melonJS/docs/melonjs/Entity.html#to2d"},"Ump9ikxkCTfYJ8Mcv9KcN":{"uri":"/melonJS/docs/melonjs/Entity.html#toIso"},"gkd8T0MKQwGgENcK1ELYK":{"uri":"/melonJS/docs/melonjs/Entity.html#toPolygon"},"4ZAWiY81AsslroQdDbt2O":{"uri":"/melonJS/docs/melonjs/Entity.html#transform"},"Umg0kUJ_Uc3BeAYu_b3UB":{"uri":"/melonJS/docs/melonjs/Entity.html#translate"},"7TaZi_1h2ANOEe3_tPv-W":{"uri":"/melonJS/docs/melonjs/Entity.html#union"},"qp1FOSER7mxtKTs1CAL71":{"uri":"/melonJS/docs/melonjs/Entity.html#update"},"QhdW1xJJKBJ6Yub0_ik7i":{"uri":"/melonJS/docs/melonjs/Entity.html#updateBounds"},"28KmZhCl7u6pHix8A4vpI":{"uri":"/melonJS/docs/melonjs/Entity.html#draw"},"or0y_fa030xqB51F-YG4C":{"uri":"/melonJS/docs/melonjs/Entity.html#onAnchorUpdate"},"9e_y2F6prp4RZWObkYTK8":{"uri":"/melonJS/docs/melonjs/GLShader.html"},"afAw6KXuoa4qLwqyOn9gf":{"uri":"/melonJS/docs/melonjs/GLShader.html#attributes"},"KqxSvfj_RR0tjZC1nVYZb":{"uri":"/melonJS/docs/melonjs/GLShader.html#fragment"},"1PdWhls2Z5QppveUZBRCW":{"uri":"/melonJS/docs/melonjs/GLShader.html#gl"},"xxjZr6i-iTWUibImI2McZ":{"uri":"/melonJS/docs/melonjs/GLShader.html#program"},"rfjkDIQ575pSf2uv4oJln":{"uri":"/melonJS/docs/melonjs/GLShader.html#uniforms"},"wieHDHA2H8pzL494xhOkp":{"uri":"/melonJS/docs/melonjs/GLShader.html#vertex"},"mN2bn8sjOIN_dGCiJ7W8y":{"uri":"/melonJS/docs/melonjs/GLShader.html#bind"},"qIH6LLR7k6-yar_zC_5bK":{"uri":"/melonJS/docs/melonjs/GLShader.html#constructor"},"wkGxIKKSrX7hKDIQrRXx5":{"uri":"/melonJS/docs/melonjs/GLShader.html#destroy"},"RUyT7LlSDmXXA0QPZJGdB":{"uri":"/melonJS/docs/melonjs/GLShader.html#getAttribLocation"},"uv7N_waEYLVFVCEwjIH3w":{"uri":"/melonJS/docs/melonjs/GLShader.html#setUniform"},"90yg8gk_N5QpQ5f6UhsvE":{"uri":"/melonJS/docs/melonjs/GLShader.html#setVertexAttributes"},"IPxt6JhrXtUO3_Q73y1Ot":{"uri":"/melonJS/docs/melonjs/GUI_Object.html"},"58P8-RHrw9YWV5OCCauA7":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#alpha"},"S-F5bSNXnbGanz3d-D_Iy":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#alwaysUpdate"},"vqrIikJALJyKEtGY4hKdg":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#ancestor"},"nDcVfHLhUeR3GajRaSJrG":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#anchorPoint"},"NeP6dXOrL7-IzmJ4JM7JN":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#animationpause"},"cyQp7WcrRsmGyFTx04t24":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#animationspeed"},"w3L4oObpesSuuMzu5es2k":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#autoTransform"},"cjqLvCqpN1dmy4G9vmcJv":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#blendMode"},"_ruOHAac66BtVs4GXxgPJ":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#body"},"7sS3AsbAURTK1vFR8pSub":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#bottom"},"D_Qta-mywvnuUFZT56QxS":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#centerX"},"LkNidh3S00YWpfL3p05tq":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#centerY"},"bWSRmSD2cHUwpkgBeej6z":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#currentTransform"},"uQLHZVxSvkYb2a1_TR6d2":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#depth"},"G-VerojpPZcPsmpJ6S7iO":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#floating"},"2ANkAbnhbMDk07vav_XvY":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#GUID"},"Ozqew6ha89Ja_DQpc4DdJ":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#height"},"89a3NFO01x9JbiBPNxcRc":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#inViewport"},"Lg4Cve_WMmv_SVsHSZV2B":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isDirty"},"nHJRjQLUrPHKZS_qwsL9U":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFlippedX"},"bbqJq3qNYN87dcpFJ6yQZ":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFlippedY"},"VomkOaZUp_zVYliPhnnz8":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFloating"},"7XPNVNdGyiF8aaTGDo15q":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isKinematic"},"s54xj5E__bz_FxVbRj20J":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isPersistent"},"PQdc67vLulDQL7fjku7fM":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#left"},"xEn-0nmrINLnmjRzJb-kx":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#mask"},"4eKyC8YgL5noMOG1IjVNn":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#name"},"JalS_LuBrkELNmbQ-fhHk":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#offset"},"Xmm1g8OOFRLDuTjX-tAjq":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#onVisibilityChange"},"e1PyGSg3zcTXD0ecDTM66":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#points"},"S8R0m95wpFt_uOBLbpQPi":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#pos"},"P53qNkeImHNuIzprkIozA":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#right"},"thxRGlCUwghBTS44lh7Zy":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#shader"},"vchzjfekSXB6ChywJ-3MG":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#source"},"cjwm9iAxMoLw1_74PSu6k":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#tint"},"hL2524fUPqC0jrdtQgFHj":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#top"},"hfT2-I9HH9nonR1Zs8Dw1":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#type"},"Q0E6Wk-LruVPhAGveq2MJ":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#updateWhenPaused"},"KpWCp2SD5LYS8T-mj3ORO":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#width"},"twsfvaekuLVMwcArzQ2Rv":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#addAnimation"},"2kYkWGX9cKTKB48gvi1DS":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#angleTo"},"y5b95ObMlZ3c_ucf8fx5S":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#centerOn"},"VKX6sadbnChDKob9E4zoc":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#clone"},"H1J44_FhTrtkInbFVH1fH":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#constructor"},"YmjdMleAyO4QkfXJ9csNP":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#contains"},"_h409y0Rt8OwnS6m-mUfR":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#copy"},"j1BgUnLzLOIfuDEw9bpHc":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#distanceTo"},"B-iivwrZ14S0TWk9sAXCS":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#equals"},"Xv6e2PDIobShJX4fTJeWi":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#flicker"},"1eytU3g3gFEELLCTQNDUS":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#flipX"},"ZXoCYnPunJ42e3eAyEW48":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#flipY"},"kBv5E6c9Arc5em-hN0Azd":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getAbsolutePosition"},"PqfhOTOXZXC8sFejaoPC4":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getBounds"},"zbe_6fG_P9JDlGkP93jp7":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getCurrentAnimationFrame"},"MBXdIpu4ej08U-VTB6TJw":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getIndices"},"36KUzz8dzPw6P2HEM9HiD":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getOpacity"},"ks_DwNjNu6yBSUd_Y2XXO":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isConvex"},"LMehegUvtLB6mm10Vq8zN":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isCurrentAnimation"},"7OwL2NaDA6FbH69yEuS3W":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFinite"},"GA5Hv1IfTQtcfAH401Pml":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFlickering"},"jYOOQNUZKBRYPN2cG5MzC":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#lookAt"},"9A30EQei_SpZQcFQoKjM7":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#onCollision"},"ohVqe60LO1E9NLFJQaPkI":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#onDestroyEvent"},"wnNUpmZaMmXvEx7rdJnic":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#overlaps"},"ZOLbrmBkbORGRwH6Jxyjj":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#postDraw"},"9r3EnX3hKv8kjbmeLQIc-":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#preDraw"},"_Dmv0KmWOpVbLdgY5NscA":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#recalc"},"_M9_p4Nfk-hDskrcmp2EE":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#resize"},"Eb1LwI-1nXWzd_5CqyDeR":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#reverseAnimation"},"vD09g04TkYrG9pYzK3R2V":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#rotate"},"Itk3MEjXou_uxNW3DFGv_":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#scale"},"4tBJzH6IgYWQQmWFMpLm3":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#scaleV"},"Y7Akz2AkLraNiT1gMAJ2e":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setAnimationFrame"},"OiWWtXpfgNbYjRb3DWX5y":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setCurrentAnimation"},"H1ACv6SR_Ykz3keq1ll4l":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setOpacity"},"PPztH81zYZBYJtesXvTzk":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setRegion"},"V2WszqdffJSN0sdjNLble":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setShape"},"NJkL8SmlrUW6OIbPSOGCe":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setVertices"},"uHjZ9abgtROQI2bEHzqfP":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#shift"},"2KGZYHN_xXXB5DLxi2Aiq":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#to2d"},"e0tAl-KebmLnjIzBwymQO":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#toIso"},"cSHWexSLond2s-u06ZNAz":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#toPolygon"},"LCf1-8hbfj7qTTx8cAVRE":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#transform"},"0zjNUtKYhVop4sjQKEqC3":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#translate"},"wMZJm2CvI2nY_VLnnI1mE":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#union"},"CmBMFZqEx2sJa8lYJAs6k":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#updateBounds"},"9fyVz8x4IasCN3nCsGl-2":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#draw"},"1rudKZYp93HkqZ6rPw-7E":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#update"},"V02y67iiv3tXPXbuiIFSN":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#onAnchorUpdate"},"IUbwXZFwffloRsEJMTQIm":{"uri":"/melonJS/docs/melonjs/ImageLayer.html"},"r3-NZ6LhTFS4z-F9cTey_":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#alpha"},"5cQkNUL2RRN_upjsaEB9F":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#alwaysUpdate"},"E0324IOVaVT6V5Xg7AsoI":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#ancestor"},"-h8q24AKE80eQADUZI83w":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#anchorPoint"},"GjRRJZG884_33F3vWN7Ng":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#animationpause"},"dS_YNtU-Lbt5kWmwRb9-W":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#animationspeed"},"pmRe4hZN9ieAyAa-F6fGb":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#autoTransform"},"5Ld9qqtAouz5FzwNgidVx":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#blendMode"},"LJtvAKc3Jw444T9aW3onP":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#body"},"T-zuQkcufH9d1qp4drlJd":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#bottom"},"2xhOGpLq_PzsQmzvwxBZm":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#centerX"},"Iun0wzMrXGBHPrs_ZEDrL":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#centerY"},"L6jNTeCKCkjNUmuC6Wary":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#currentTransform"},"Ojyzpq3Ro334zqR3ja_OF":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#depth"},"QklbFs-tK6nAMT5I4Ud9Z":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#floating"},"H5278KNQZE3v_EuLhTYpz":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#GUID"},"QjGQFcbnGEAXSQ-0WrbmW":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#height"},"bRPQ7BqoBaWTmcNrhU9t6":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#inViewport"},"pnMtYgU_XlxEXV-G-IaDq":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isDirty"},"1Zbmll90wOwrIrEnDUBOX":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFlippedX"},"PXrac6bDbkL4Wby6fGTm4":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFlippedY"},"Js3ZEENeQnTAvulzt-Pak":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFloating"},"doVG4WNbGZgAN69oluhli":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isKinematic"},"6pGEeJdcOvccZlws1GgFU":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isPersistent"},"ulS2uDkBfYb44VG-1NOkt":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#left"},"AJpadC7hfgiYS92sdpDYJ":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#mask"},"b8pONIFXVJXU8y7CyZ_HV":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#name"},"Q4qab1dAlTkRfBw1Yi1Xo":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#offset"},"oQ4PqXM5Q0mWQoQOsdUC5":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#onVisibilityChange"},"Eu7GPHXiscPox3dk2F0Hn":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#points"},"gEdOnkXAaRjpFr-mAgye7":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#pos"},"nDWNJTv1Hb7TuyM9qWYRJ":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#ratio"},"GMRECjo0neg2-018ah3St":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#repeat"},"XEbl8-y5MarLFLXmVMmVt":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#right"},"qKPXCwf_XJOETj8aOgg9c":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#shader"},"e_OOVr87_DSb2m45orQY4":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#source"},"al4WnzT9BT3IADdUM9QY2":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#tint"},"SQrsN1aaHKqVZfP2AMx8q":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#top"},"PKicYsk8ackc7wS6XWnCo":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#type"},"oq8YtkUnzt-eit8zgsowt":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#updateWhenPaused"},"K-k9m6C195kqO2mzujhlG":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#width"},"WMCXmZS3ehvhJAOZAEz3s":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#addAnimation"},"Sy67C4RklcRURDtzS2V9g":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#angleTo"},"p24Z8rbCACPTKqetXSrBi":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#centerOn"},"mNAaUlmIrdVNmbIglcPv1":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#clone"},"JLxlBynCSPPDKeLX03e6M":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#constructor"},"ziA4y9CCvVIxSIPs9u6PP":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#contains"},"JNmVge86t1GDithm5-sB6":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#copy"},"cKL-3JBPulmLqy8np0Soa":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#distanceTo"},"PX214wlc28lC-hB3tMdRW":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#equals"},"sZnBG1jLiGiGeQSAY4nRF":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#flicker"},"r-y72CoTlzWjdFspZSWXQ":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#flipX"},"DS94VtHr9miN4LWHrQrUJ":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#flipY"},"Enr3yS25-3vxOyQ26fZxm":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getAbsolutePosition"},"2uemgSMqFRo1nKgojjMH0":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getBounds"},"mjCoZWZB4mh9HTjvRiL7o":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getCurrentAnimationFrame"},"2ifWsAKfH_mWaMEw6zyxl":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getIndices"},"cekuuRforB1FB3kUmr1eb":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getOpacity"},"FmFazD4CXl5cHSgz1cboC":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isConvex"},"gCC_bMBfsZeiQhcV1LBNl":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isCurrentAnimation"},"rfpc9G9Gyk2BA3qHAE14j":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFinite"},"BpjjmYpvqmhVI4zjRYheF":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFlickering"},"g96GQNq9aZT_cYDUl-U-p":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#lookAt"},"5ZwZWEEbum3GJtwidJFlN":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#onCollision"},"sZMwmXiLHeU9EoImK7xnc":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#onDestroyEvent"},"K9UBLCKH6ZfF4FZp024CD":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#overlaps"},"rYSNVwrWIuLivsR74X_DI":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#postDraw"},"K5niZ5wYpISHLeF0uHJgJ":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#preDraw"},"nRmGC1tog6Pnt37wXvunP":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#recalc"},"oU0xFiSr5jKJOGxQpyGGb":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#resize"},"Me2XPi6jKk65qxfF0ttUY":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#reverseAnimation"},"cRzZognaQkaxiOlfwKjU_":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#rotate"},"92VivIKUPpvMUIuDai7gl":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#scale"},"dw4tCCaHD1Ng0ZkOPXxrP":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#scaleV"},"bwc19ngRoxSxOLlwWBzva":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setAnimationFrame"},"U0nqxV5_30nCphAk4fIWJ":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setCurrentAnimation"},"kMaA4CCWPcv2PKBmhWkQR":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setOpacity"},"P7tOWEYqEofe5M0GsFD5g":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setRegion"},"TEpVAYovlIR-zg2y0Pw9f":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setShape"},"8XdsjPfWAZvGSjfZblcw8":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setVertices"},"Efckoq1d15i1Mkc2KsI2n":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#shift"},"t8s3UwvRBxrxUmax3saVH":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#to2d"},"VEq-EuD4PShZd5nhkQj8J":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#toIso"},"lmnjx_nam3hDFJMraEAjk":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#toPolygon"},"JVGzH6yIab0LTFqAv8ald":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#transform"},"C4sIGdDS8a2oF3XDFDjMp":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#translate"},"x5OIk5W3mJMlN--od0Kz7":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#union"},"ndskGAq603Eq2zAO43c9g":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#updateBounds"},"9aSI252VjJdOAHW74XduC":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#draw"},"gchCcrAmG3RtSdPJld20U":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#update"},"uRB8TcRaUSDSFzLBT86Iy":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#onAnchorUpdate"},"msGU6abW2UXwwGZEdRiar":{"uri":"/melonJS/docs/melonjs/Light2d.html"},"3fbpkfphQO2f-CVAmtjW7":{"uri":"/melonJS/docs/melonjs/Light2d.html#alpha"},"WTyjH679BKgSacbNAAmBD":{"uri":"/melonJS/docs/melonjs/Light2d.html#alwaysUpdate"},"adFvf0IkWbsc6662GcZQS":{"uri":"/melonJS/docs/melonjs/Light2d.html#ancestor"},"uhVMuj99ZC9TE_OPHEedq":{"uri":"/melonJS/docs/melonjs/Light2d.html#anchorPoint"},"4YtUAeWM2uUpIZNVUN_yA":{"uri":"/melonJS/docs/melonjs/Light2d.html#autoTransform"},"GHe1EI2UvERnQe1L0zPfS":{"uri":"/melonJS/docs/melonjs/Light2d.html#blendMode"},"MpFTxnBc6VM4UaBTQb0sL":{"uri":"/melonJS/docs/melonjs/Light2d.html#body"},"k3JrR657iGLZY-cU152su":{"uri":"/melonJS/docs/melonjs/Light2d.html#bottom"},"bxmBMVILNKT1ZzK8vbnV1":{"uri":"/melonJS/docs/melonjs/Light2d.html#centerX"},"mAkYP3qZpxd8-fu-mWt7F":{"uri":"/melonJS/docs/melonjs/Light2d.html#centerY"},"OQqQeh0ztyV6KFKqFxgi4":{"uri":"/melonJS/docs/melonjs/Light2d.html#color"},"B_BJBED0WzsBuUQCaRBWJ":{"uri":"/melonJS/docs/melonjs/Light2d.html#currentTransform"},"9FUQAZI5VoIX0qI4jkj64":{"uri":"/melonJS/docs/melonjs/Light2d.html#depth"},"h6aoGqmrUspzAVlqvLpAy":{"uri":"/melonJS/docs/melonjs/Light2d.html#floating"},"4VpDc55t_Czcv5IM5iZXN":{"uri":"/melonJS/docs/melonjs/Light2d.html#GUID"},"6LPNfNfLX27GlhdloDDxi":{"uri":"/melonJS/docs/melonjs/Light2d.html#height"},"VarndjT0wBQx6LAvjP55q":{"uri":"/melonJS/docs/melonjs/Light2d.html#intensity"},"jyTQueqMoU-Ss4F7FKcbv":{"uri":"/melonJS/docs/melonjs/Light2d.html#inViewport"},"3xsVJk-q1bSLN5oe3TO64":{"uri":"/melonJS/docs/melonjs/Light2d.html#isDirty"},"AvwRAYHE3XlI8FqG1163W":{"uri":"/melonJS/docs/melonjs/Light2d.html#isFlippedX"},"t8_cpmKEDh-yTIEkwme-_":{"uri":"/melonJS/docs/melonjs/Light2d.html#isFlippedY"},"S0RfRqv178LPoyx3YBy44":{"uri":"/melonJS/docs/melonjs/Light2d.html#isFloating"},"SzuJ_pXPVRcAeAW1ed9st":{"uri":"/melonJS/docs/melonjs/Light2d.html#isKinematic"},"lC45FhRaxvNusLgMUP6MW":{"uri":"/melonJS/docs/melonjs/Light2d.html#isPersistent"},"0bgMuKsYlUuGR33Dhh7w3":{"uri":"/melonJS/docs/melonjs/Light2d.html#left"},"IfNORSodAtBtvTH5kn9hb":{"uri":"/melonJS/docs/melonjs/Light2d.html#mask"},"w5-L4pTBGPLkVxY2G4AE_":{"uri":"/melonJS/docs/melonjs/Light2d.html#name"},"deSafxALKiQj2qiSSmkNE":{"uri":"/melonJS/docs/melonjs/Light2d.html#onVisibilityChange"},"3gG74dLm6lIHr4gxbMqqq":{"uri":"/melonJS/docs/melonjs/Light2d.html#points"},"T8SsZYlMi9WpG92B9PB1O":{"uri":"/melonJS/docs/melonjs/Light2d.html#pos"},"S2nYCsAeES8VQLkuMGwvo":{"uri":"/melonJS/docs/melonjs/Light2d.html#radiusX"},"bgbV0elUXki39-MxR9J1M":{"uri":"/melonJS/docs/melonjs/Light2d.html#radiusY"},"54vFdSeihqAlGprdFYJKy":{"uri":"/melonJS/docs/melonjs/Light2d.html#right"},"_UlDFHQBK8o2VQaPZJzVK":{"uri":"/melonJS/docs/melonjs/Light2d.html#shader"},"b6mD7u6a-ElcdSllNGa03":{"uri":"/melonJS/docs/melonjs/Light2d.html#tint"},"fgEuuk11ue08pjQ8JJKXu":{"uri":"/melonJS/docs/melonjs/Light2d.html#top"},"UP4cPmZW2qt8NNOHsUM_o":{"uri":"/melonJS/docs/melonjs/Light2d.html#type"},"QpdpzuUauJreniGq5Iy6x":{"uri":"/melonJS/docs/melonjs/Light2d.html#updateWhenPaused"},"r9YGZfrThijPAnmtBDy6h":{"uri":"/melonJS/docs/melonjs/Light2d.html#width"},"PrRc46i0CeTVhqOK-eJNQ":{"uri":"/melonJS/docs/melonjs/Light2d.html#angleTo"},"1T_a-ncZ3AKqAriGUvp0-":{"uri":"/melonJS/docs/melonjs/Light2d.html#centerOn"},"ECaEUKNi06GM_-tcnuAZh":{"uri":"/melonJS/docs/melonjs/Light2d.html#clone"},"UKt8W_n6F9qCHpJjANidU":{"uri":"/melonJS/docs/melonjs/Light2d.html#constructor"},"f1deX96eXp2QDssvYM-1-":{"uri":"/melonJS/docs/melonjs/Light2d.html#contains"},"v7kpbtzMzU0lPi_FVG5ub":{"uri":"/melonJS/docs/melonjs/Light2d.html#copy"},"4qafftiNkh742vq2cU_GM":{"uri":"/melonJS/docs/melonjs/Light2d.html#distanceTo"},"VWrcvuZxkN3iZ4rObMG3N":{"uri":"/melonJS/docs/melonjs/Light2d.html#equals"},"PaE-1x0F-J4z37jO4Ffpn":{"uri":"/melonJS/docs/melonjs/Light2d.html#flipX"},"K9pXUN62r8g4bT5eIOFlx":{"uri":"/melonJS/docs/melonjs/Light2d.html#flipY"},"7t_ZiJwBV5GQ6p6iIR8sZ":{"uri":"/melonJS/docs/melonjs/Light2d.html#getAbsolutePosition"},"tNNV1soh2QWJxXeKwdXRm":{"uri":"/melonJS/docs/melonjs/Light2d.html#getBounds"},"uTHNjoAnKLE5R-yfeIc2Z":{"uri":"/melonJS/docs/melonjs/Light2d.html#getIndices"},"utg2GHO2v4GC4gmJ6hanN":{"uri":"/melonJS/docs/melonjs/Light2d.html#getOpacity"},"0eAxrsGIEcIszDIOWKCgQ":{"uri":"/melonJS/docs/melonjs/Light2d.html#getVisibleArea"},"3Ar6uKImKL4oRSofhv9vj":{"uri":"/melonJS/docs/melonjs/Light2d.html#isConvex"},"fWoFF9xVaaiGcdiGNpJ_D":{"uri":"/melonJS/docs/melonjs/Light2d.html#isFinite"},"gUrP6SM9o1TbWUU7gGDSm":{"uri":"/melonJS/docs/melonjs/Light2d.html#lookAt"},"jUn1j782LKE9lz_UvS5gF":{"uri":"/melonJS/docs/melonjs/Light2d.html#onCollision"},"Zj4EhAKhXflGvY2wAQS9T":{"uri":"/melonJS/docs/melonjs/Light2d.html#onDestroyEvent"},"S0tmpDUtb5bPhc7eHIRsI":{"uri":"/melonJS/docs/melonjs/Light2d.html#overlaps"},"BAtnaUfgcx9ZE891s-4Ce":{"uri":"/melonJS/docs/melonjs/Light2d.html#postDraw"},"aitHMLr9kE6Fzqg6BBjJT":{"uri":"/melonJS/docs/melonjs/Light2d.html#preDraw"},"EAH9CH3VTOkJEzxU8i7rM":{"uri":"/melonJS/docs/melonjs/Light2d.html#recalc"},"E7MqBSmPY2muQCmff-3fF":{"uri":"/melonJS/docs/melonjs/Light2d.html#resize"},"XWwfVzE46ldAGvijcYqRd":{"uri":"/melonJS/docs/melonjs/Light2d.html#rotate"},"wKJnMgwxNK2ViGx7PT67W":{"uri":"/melonJS/docs/melonjs/Light2d.html#scale"},"I2SLKxvAyoE-xPa2WAB6W":{"uri":"/melonJS/docs/melonjs/Light2d.html#scaleV"},"hnjX7BodsnICLpi-mX2a6":{"uri":"/melonJS/docs/melonjs/Light2d.html#setOpacity"},"VGpWuQdlPFpipEjCrLydP":{"uri":"/melonJS/docs/melonjs/Light2d.html#setShape"},"LYme2cE2cbaObEfP-SgoF":{"uri":"/melonJS/docs/melonjs/Light2d.html#setVertices"},"wq5-01uWMGwAZ5O5HTF6k":{"uri":"/melonJS/docs/melonjs/Light2d.html#shift"},"b0x8vDR4wGhpCZmqHzdMO":{"uri":"/melonJS/docs/melonjs/Light2d.html#to2d"},"BT2jzHtYru_QmQj8uAMA9":{"uri":"/melonJS/docs/melonjs/Light2d.html#toIso"},"aqVXRMlv0jkufBOJbXd3j":{"uri":"/melonJS/docs/melonjs/Light2d.html#toPolygon"},"qHglBTP6dt2PfoEsbKrP4":{"uri":"/melonJS/docs/melonjs/Light2d.html#transform"},"4e5q3xza88Za9vIgLkJ6g":{"uri":"/melonJS/docs/melonjs/Light2d.html#translate"},"HQRDZosXuTkyZsCRLkfJV":{"uri":"/melonJS/docs/melonjs/Light2d.html#union"},"-XX6GSvIaBkks95WnhBog":{"uri":"/melonJS/docs/melonjs/Light2d.html#update"},"L_a6o7ZR4ArYTG-EPvKVG":{"uri":"/melonJS/docs/melonjs/Light2d.html#updateBounds"},"34dPalr8ldP14DR0KIyW2":{"uri":"/melonJS/docs/melonjs/Light2d.html#draw"},"tOEfN8z38hT5hx0dsFxF0":{"uri":"/melonJS/docs/melonjs/Light2d.html#onAnchorUpdate"},"lp9c-XCA7oaDejBlJJfDK":{"uri":"/melonJS/docs/melonjs/Line.html"},"hwYZYJFCAQyQ_U0A9lk2f":{"uri":"/melonJS/docs/melonjs/Line.html#points"},"6p6tH6_RuY3G0UNKMNPhm":{"uri":"/melonJS/docs/melonjs/Line.html#pos"},"C43bld92Hpj0tgFB6GKa9":{"uri":"/melonJS/docs/melonjs/Line.html#type"},"6BB2G9d-15aza5JJ3nV6s":{"uri":"/melonJS/docs/melonjs/Line.html#clone"},"dzxDuKPZuclsbMz2Cx45r":{"uri":"/melonJS/docs/melonjs/Line.html#constructor"},"KFwdKOc-WGwOYty_tBVgp":{"uri":"/melonJS/docs/melonjs/Line.html#contains"},"q94Nj_igONNZZDtRgT58K":{"uri":"/melonJS/docs/melonjs/Line.html#getBounds"},"MAvanoQj5zXY_4qXu3or2":{"uri":"/melonJS/docs/melonjs/Line.html#getIndices"},"3n7cJy2RavxAQmqlVgcwg":{"uri":"/melonJS/docs/melonjs/Line.html#isConvex"},"jVYSO5PpkDd88y1EzEfmx":{"uri":"/melonJS/docs/melonjs/Line.html#recalc"},"zStqO-55MlltYpF8TbHp5":{"uri":"/melonJS/docs/melonjs/Line.html#rotate"},"fxdPns9d-5ttLIaCrQOQs":{"uri":"/melonJS/docs/melonjs/Line.html#scale"},"M5qyG8XyF_zdbksybWRL8":{"uri":"/melonJS/docs/melonjs/Line.html#scaleV"},"91IxJd28JtN_3ct-2Omhp":{"uri":"/melonJS/docs/melonjs/Line.html#setShape"},"29omUHPPyEMHdUipBB1Cq":{"uri":"/melonJS/docs/melonjs/Line.html#setVertices"},"ck7dgdjF1kVObba-drTwd":{"uri":"/melonJS/docs/melonjs/Line.html#shift"},"16EDjdk7cB4Pmto5uwgVo":{"uri":"/melonJS/docs/melonjs/Line.html#to2d"},"BlpY-E4NMU5tdNMvp06jY":{"uri":"/melonJS/docs/melonjs/Line.html#toIso"},"AIO9q0xsCFKPCzWJs3VTr":{"uri":"/melonJS/docs/melonjs/Line.html#transform"},"gWCi5OtkzXSbI80aFMIm0":{"uri":"/melonJS/docs/melonjs/Line.html#translate"},"QuwNsFzybdM4bcGqq_Hkj":{"uri":"/melonJS/docs/melonjs/Line.html#updateBounds"},"MftK9YkI1KejDDoiYkH-1":{"uri":"/melonJS/docs/melonjs/Matrix2d.html"},"wW8tyj1dSu1WwDGthVbra":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#tx"},"xGVxEVnuHLtI9cffDtenA":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#ty"},"MZVTUyoyEG8lQQCM4chhn":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#apply"},"I6iNyo6wfUi1YCTTkzoQb":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#applyInverse"},"tN_nr1BGHrOCssD67iwwQ":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#clone"},"VrkwpHlnO0pJJPmWKCaRh":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#constructor"},"TF51ejnc7NqJc-d5zN7B7":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#copy"},"2vdVzXPMiCmdhTvQa4etL":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#equals"},"N1r56O1zXpLWvdmf-jx6d":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#fromMat3d"},"mhU7IIuQS8APxvOPF3FJk":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#identity"},"N3f5mPC_T6O_0eEx1zqu4":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#invert"},"DI9CLJAFewh-_xN8Kj_HV":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#isIdentity"},"TwASCb295a4TtfTAv33P4":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#multiply"},"inQ5Trf2aXp06KizAYR17":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#rotate"},"d4MONkTl2DTtmx2ANdqao":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#scale"},"pDJ993g1Nr5i_UGfaUdVy":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#scaleV"},"2S-45eSCtCuqz3PRclgGI":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#scaleX"},"Lt3hMv6sZV9vRUFgBv_c-":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#scaleY"},"x-juIlBlh0TSw996g9uUG":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#setTransform"},"aD8bTNk1dgGP0kk2GF6MQ":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#toArray"},"pu8ktAt5U1vI56Ii9Zt3Z":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#toString"},"yzhf9k4qJIDOk0RIw7RpC":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#transform"},"m-nhzVMDhgHx4og21CepE":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#translate"},"u97cPrB408GtDhhgkbBKP":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#transpose"},"KH2ZiA_71M0KrTP0nSap4":{"uri":"/melonJS/docs/melonjs/Matrix3d.html"},"JeExfDOR_48DR3F9kvnjP":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#tx"},"3HVRsqaasrvGr0dIGYXk_":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#ty"},"2yIcv4e5uM9yDVpbo2bG6":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#tz"},"5FTFrlxjZSYEVbvOsyiCl":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#apply"},"Pvf4ls2tu8e6xAoeVAKYw":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#applyInverse"},"b2S7nnm2niIAWyx2mEP5f":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#clone"},"2_aCD9hmMvyfrzAIs3hsw":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#constructor"},"Qws0ZTb-LxYJPB_N9izG1":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#copy"},"2f4Kn5X6NIjDu6YkFj_ds":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#equals"},"fJcYHsclihCUBJ-jFQip9":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#fromMat2d"},"pZR0I4yGtnyCUNZzhz3bN":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#identity"},"OoNcc8LoXOeJvp4cWDaRy":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#invert"},"-oz0zjK3C5_raPqx9myIG":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#isIdentity"},"E2UyW9ai2FZ4ViJ6f6vPk":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#multiply"},"CNLWJuu_LVtC2Z0DDSmhq":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#ortho"},"38RW2ElTGepezqODTtVRV":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#rotate"},"oD7uIrnYE00tcTcx2MYgX":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#scale"},"u3qzzLpR1YveyIKjssfFa":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#scaleV"},"K2Cm-LvBGFbLmOWZ3hR1I":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#scaleX"},"Cmaglp9HWrADwvqf3Sufh":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#scaleY"},"FwonBrVSkdYIEjlZ8A6uR":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#setTransform"},"t6uQhwsDHKc4rLr0lDFTK":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#toArray"},"KJ-kfzK_5ouizEaxOI2OW":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#toString"},"5joaPHO0DuDx_tU13ITFW":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#translate"},"cSza903D4uxUGGkWIuWTf":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#transpose"},"oxNM6HWU0IdFkUST5UbNY":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html"},"-wcuCk2rb8C3xVig8VILX":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#alpha"},"OEAPmSu5T9hoAxDaBrW80":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#alwaysUpdate"},"NhcWQHxJ4r5njvfE5xCzP":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#ancestor"},"82eMu_-u-eukoWzBKK1OJ":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#anchorPoint"},"ssFC5Lc2OMFF5fLECmvP_":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#animationpause"},"5H66BbUtiLNw1rA6NVct1":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#animationspeed"},"fVrzSP6hCMCdC4Y51xXb5":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#autoTransform"},"Gkidhv2UC7ifKhf0Y9w84":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#blendMode"},"_zyFks7hhqfOaakwLbFwp":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#body"},"gKfeghuPJBqGXU70t6uHH":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#bottom"},"rSUcHXYrPP6tPCnhBjZLt":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#centerX"},"sd8zVWRee5uw2K-o6v2FQ":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#centerY"},"7MG1bvFSxi-bapSWV_MCG":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#currentTransform"},"xPv6Z7g8OGWiRsf-b8CUk":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#depth"},"Dhzdu6LBncrPAlXjzqRdQ":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#floating"},"TpQqsH2Zhn9BtH_deL_kF":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#GUID"},"cacSo9x_DC4YmQWVlrLRQ":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#height"},"hxcvEsxGDqpIQ-bzEYks7":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#inViewport"},"BjaBg_niKuksbB7zfyitv":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isDirty"},"10lpTYeGnL1kOQ1zSSJz1":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFlippedX"},"wOAcLkMpRCiJxWgEWtjqi":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFlippedY"},"p_LGBxfsLgR7UPAWVKJjE":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFloating"},"gHq3oRkA9wVyp3vVXo77k":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isKinematic"},"PFha74po1K0HUwASs8_sa":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isPersistent"},"Vs3bs-kUsiVDg1SAFtQib":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#left"},"KojZSWwdrwlqKK2x4PIO3":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#mask"},"HJdXFInPNjpEAAgVKTlTf":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#name"},"yjfqkfnVjdX2aD2jWp_kT":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#offset"},"PRqpKgoPWcpOtU5Q3nDr6":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#onVisibilityChange"},"wlOc_90V1weOJbdgP2YNT":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#points"},"uiW1wbltpBCel-mZzkT6F":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#pos"},"xp3JIiPrOJqBkNTibN_7B":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#right"},"iNdx8PeBiM1eYoXWjPW5r":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#shader"},"kti_UFYiT6GWmPo0_Hxqh":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#source"},"8oegLZOzFohWXy_mx4j4f":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#tint"},"GvVWSZIfde-nBaElQkHbu":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#top"},"UnQJHIQDMVxB0Auoqmcot":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#type"},"I9TyOvk2sv3LqRZT2zXbm":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#updateWhenPaused"},"tqItvKmGASbwyIHa_Duvk":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#width"},"y_7-85iOVukUQHTT_uWvd":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#addAnimation"},"8fONV2ycbK0wRp5gX6VvO":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#angleTo"},"nuy5CpkmofMtTLvR9gUUh":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#centerOn"},"ti5CxxvUdixscfiXbFOii":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#clone"},"13IEDYU2zGqEikF3g_eNp":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#constructor"},"cDOocbvsh3EMNrehQbadN":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#contains"},"VoQqIQ_P85FTdBObCQbDZ":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#copy"},"kmuuitI4NApABu0s3vjuo":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#distanceTo"},"oxUb8E4UY3mne_BsHXF2A":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#equals"},"Dc4wQ4ywn2BeZuGUqDi8J":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#flicker"},"QtX5VBmQoDfXdsSNroUDO":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#flipX"},"NeIpkd_xDG51j3fecNWfW":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#flipY"},"EBIrhiuKZA4-WE3lxntPx":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getAbsolutePosition"},"AfviZxTJcph_GLw8CvbV1":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getBounds"},"WpoBpk0HRu2LJMKOgGQum":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getCurrentAnimationFrame"},"EO8F_WTbJ9FjVPUL12qHh":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getIndices"},"5mzRSeXRtw6sLzCOQi1Rg":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getOpacity"},"FCwq0n1Qjqr8jpdcYtaWG":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isConvex"},"gaYGaX1kaX--6UvYprC1z":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isCurrentAnimation"},"cl2-yD5GCZ02QFb8C0w2u":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFinite"},"3cNuXxKk-IkvA7Ru0QgTb":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFlickering"},"a6y0vcq_VSiX37ScpWq53":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#lookAt"},"s3Oja4hxn5O_eoqxNvbnA":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#onCollision"},"M0JBurTBxfLLIgtwBDnUO":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#onDestroyEvent"},"Ib-K9tTr3RHO16dZRgUBF":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#overlaps"},"c3O9dHYgjqkWCl6vkgZVD":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#postDraw"},"qwGV4iqae9rMn1zHDkYlq":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#preDraw"},"7O_BV-JSdzdkfkh-7GqoT":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#recalc"},"j7-wPMRfO1zgiyVHU2-Gl":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#resize"},"k9cglViIZ_2mKpHRzx0p_":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#reverseAnimation"},"2bfNSli-K-GGRRbOBsErE":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#rotate"},"bIaAoINnBxj9o6ziaC0OT":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#scale"},"EM9CBGlsza-ElVZ76vQQj":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#scaleV"},"W1iT4BzkE5WUfoI-PDWZh":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setAnimationFrame"},"lvTkdLqsG9rkzi-2NHsI8":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setCurrentAnimation"},"mfjkUD8AxTWcPW9wTUZBB":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setOpacity"},"By689kXvwmzAWiYuhiwU_":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setRegion"},"ty9kjcbz8jz7h4_9FRRkb":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setShape"},"1Z8WpL83QjNYf21kL6Thw":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setVertices"},"HI9zPLSdoC2FI-azc9gaW":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#shift"},"TqLQT5RsCf4q1BhfDMXVV":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#to2d"},"5Bgw2poibrekM7JMfGo3C":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#toIso"},"op-kMzkKD1WCYKWpp3N1B":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#toPolygon"},"S5G4UzwIkMGRrLl3i3hHO":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#transform"},"uirJX-5XqNVmBDi4pS0Ob":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#translate"},"EnUVmU0h3roC_UUZzRtAr":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#union"},"rZWlVQnuj-ZgqSr1xe3PL":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#updateBounds"},"e5W74LKC9vx3kOuIG5-LT":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#draw"},"ow3b4NsEeG9mts7Xvrusc":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#update"},"xkO5ydIdcFobqUyhARyWU":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#onAnchorUpdate"},"fnTUo2yhtiAFYd4Y1SmlW":{"uri":"/melonJS/docs/melonjs/ObjectPool.html"},"CkadwizwgXRHDIP8MsTRr":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#exists"},"b4msN-qPAAqZvkl3SEZs6":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#getInstanceCount"},"O2U122fySGJbXbm-xX6B1":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#poolable"},"0Qn8KCUwabpBkUBE4lkM0":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#pull"},"AJhubw-tzeLIu7IgGMSNW":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#purge"},"SFHXucvKTi1gCUUrXhbmd":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#push"},"iX5APpRR0oyRGPG2_re3j":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#register"},"Od_iXAEVF2Aple0iRVj8Q":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html"},"r37lPoUn7-xpoRNI6KYIj":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#x"},"jSD4wOTtGuLhL9cXZu6gA":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#y"},"WW4n2x9MyERjqy8D52qER":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#abs"},"wKPGOSAo--ANxcr4ltYld":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#add"},"KeZuu047_V93w5ea6JyOP":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#angle"},"l1tLtmOXAUQiSa9eSbvFd":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#ceil"},"8cmJyUBGHnfhR7dCrT7qa":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#ceilSelf"},"aTVhuQVT6SFXvdsuKweVQ":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#clamp"},"AKSjQp8mQCd0hRIjCi8fT":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#clampSelf"},"wXUjf8tjKe83eRvV6_e-W":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#clone"},"4xvv5wgftW1M8HxBOCBUm":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#constructor"},"WwCWCG8-ioR_tNmgIflZg":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#copy"},"yqGlWnrbzNjVVlBpQ9vlD":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#cross"},"7Wt1dw62ePjNqlwsczggo":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#distance"},"Yu4u_c5sQ_bw2BH4-77Hi":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#div"},"3vnOqB9QR1JEhBkQO088N":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#dot"},"irws6qmnLzG-Js17bWnYU":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#equals"},"sdjXRdste_1_o_kFCCT8d":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#floor"},"3hdq-zyWxh8MAaweM7XpF":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#floorSelf"},"sVLy1tf2rkiYMhHTX93gP":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#length"},"SMH6D9r14cbCA2JoIMm3f":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#length2"},"TAA4BdnQPzo2XTqvAmTLa":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#lerp"},"i1EeBQ4LmVmZbf8t_a3lm":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#maxV"},"OjKwMrHF5n-bwcNDnhhm5":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#minV"},"yrxEK9lji7fvuyRa3NmKO":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#moveTowards"},"wBrr_eHEdYvuAMsasTqAc":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#negate"},"gMhO8_f4GgwCSvljZ2OX9":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#negateSelf"},"cOsISPZQ6wTW1kfIzcmce":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#normalize"},"vrUZcUajofVZRRk_AwYlC":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#perp"},"heupeVlFWvgt5cRjUdQqJ":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#project"},"u21BWO9vVgL6VyErI1A2Y":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#projectN"},"1n6cc3TJ5qGBAtiTOCm1v":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#rotate"},"z9z2xpJkyWBzwzynyG6pv":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#scale"},"O-a7fWQJCrYLcWjqKiZDk":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#scaleV"},"-3UR7c2GNstk6f2ZU1bju":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#set"},"uJuMYZKZFkaqereWzkZ5e":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#setCallback"},"SnBBi1achEyHRwsiFZmYl":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#setMuted"},"mXsvNzYFwmZM55w3cozS0":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#setV"},"s5qnACCjaoijmTomcmG3E":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#setZero"},"z5AOYAfoblrUj1Lsb45Wk":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#sub"},"KmurDSNje8RCAc1oLwW2P":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#to2d"},"I-UUNy-CaGtJcsnf3c4h-":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#toIso"},"CwV30V0xvaM54kD5ywJZo":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#toString"},"OA5yuqQsyWKXR7wIF1jZx":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#toVector2d"},"6Egvhr4-rsyV5AfCqOs1Z":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html"},"fj0eW3Z3deNSK6LzznpoZ":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#x"},"yVwhF0GcpQvEFVD3angaw":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#y"},"V2iCVFW-AQAjTeD956FFd":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#z"},"IDdJKm3bi4YvSbmnqVZd4":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#abs"},"1VqAubfl8ImQw7yhp43ie":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#add"},"aAK1u5mcu2wmoZi9dI7Ed":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#angle"},"P08gIf62eTrW0-djzPYjr":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#ceil"},"LTXEHF7RIdxm5PZd-slzG":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#ceilSelf"},"0xWCtHwZBYC5EYyr8tYAk":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#clamp"},"nLvPC4aoNAiEInpjZ1upR":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#clampSelf"},"y_E5_yt2n-Rl-u9fqwsGx":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#clone"},"QL9IcEJ9k1D6DmGK96fse":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#constructor"},"wg2F01vwp3VrL6W1lLWj_":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#copy"},"bxYhZs8mutwNk2lg5QmwV":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#cross"},"5KsOiI5nkvvF9yar8BG01":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#distance"},"IZOP3mbOM-bcnrEwbvYrR":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#div"},"WShEwkDg5mEEz4KCiT1X3":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#dot"},"YAVBmsipa94bs4loRxbqT":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#equals"},"E60Jn2JwZa3ARrZ44JEpH":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#floor"},"aKf1sm7MqQKk9DZ4pCNWx":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#floorSelf"},"hzWnPW7ksA3I3FhysKtNI":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#length"},"DDNagL1GhX0CNhypmZcB3":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#length2"},"mhVH55jyqnlwPuYRoSm7k":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#lerp"},"GYhTKdV28D4SpXdLSTkCu":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#maxV"},"fQY3G-On2Rs_j0uOVa7eq":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#minV"},"2gIr9WgCBVJOdpEh5jWO0":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#moveTowards"},"gsOSrwZ5Oz37GW9wpaMqR":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#negate"},"n_Poas_xYcgS6nQofwvFJ":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#negateSelf"},"kERyQoUBdL1M2BFN7IaHj":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#normalize"},"YS7jc11-c1-AeQZThymwP":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#perp"},"qwAzXE6ON8DOpRuBctIJH":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#project"},"bHmANr1JrAuvQIQjlf_C2":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#projectN"},"ryXKGbE27k0fE-SlatRXX":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#rotate"},"Bi9B2kE20H-kARjyH9y9U":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#scale"},"a0uSQofj9cqh-Ka2GgXk4":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#scaleV"},"TRmDiTPKhRN2WFu2f_DV5":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#set"},"7UT896kcwVtHmIalppzn7":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#setCallback"},"tWqevn23CHZZ2oROO-MSN":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#setMuted"},"l_GgxkQh6oPnc1eEOJCXY":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#setV"},"mMY_z8Lva8awf3gpQthzE":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#setZero"},"pFBUCxusr0OGVK1PXH8S0":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#sub"},"SHyH48m5M7kSsYIPkFY1j":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#to2d"},"IiGQ-aF4zjk0TBoZfjdbI":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#toIso"},"WX5XiG2rIuK1z_yturyIl":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#toString"},"hvUF5UaU6p4nZOD4rAG74":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#toVector3d"},"abc-i8FARQ_Ff39MwRO-w":{"uri":"/melonJS/docs/melonjs/Particle.html"},"AnW1gqRLIwLZSBZCE_QdR":{"uri":"/melonJS/docs/melonjs/Particle.html#alpha"},"2w79z447_T8lrehfpMakV":{"uri":"/melonJS/docs/melonjs/Particle.html#alwaysUpdate"},"3f0Y0DtQI26lvBUY0AkmK":{"uri":"/melonJS/docs/melonjs/Particle.html#ancestor"},"zJj68iLxbkzjgbxejM8bq":{"uri":"/melonJS/docs/melonjs/Particle.html#anchorPoint"},"3UYT6mIvErvBA3F8J4BW4":{"uri":"/melonJS/docs/melonjs/Particle.html#autoTransform"},"zgiCb_DpM8PZke1kJAnHE":{"uri":"/melonJS/docs/melonjs/Particle.html#blendMode"},"MzFVhS9HBproflUVx48mi":{"uri":"/melonJS/docs/melonjs/Particle.html#body"},"Ej55RBTlh7i7-9pf4UjQz":{"uri":"/melonJS/docs/melonjs/Particle.html#bottom"},"3H0KgK7xvy4XOEvMZZwbR":{"uri":"/melonJS/docs/melonjs/Particle.html#centerX"},"uGW_AhqZ7AKpiBytj1_DZ":{"uri":"/melonJS/docs/melonjs/Particle.html#centerY"},"uXqbVDGoeSiKvvUq2TtWQ":{"uri":"/melonJS/docs/melonjs/Particle.html#currentTransform"},"_9DsUyw1zoEmRWcIJ_RPr":{"uri":"/melonJS/docs/melonjs/Particle.html#depth"},"Kj2O34_51xMnMI3cSArg2":{"uri":"/melonJS/docs/melonjs/Particle.html#floating"},"t2RmnrORI7oXUTNEgLUTe":{"uri":"/melonJS/docs/melonjs/Particle.html#GUID"},"SYk6DyxD4nXrTM3XpXpsx":{"uri":"/melonJS/docs/melonjs/Particle.html#height"},"YOCGj3R6zvmRH-TGl7sRa":{"uri":"/melonJS/docs/melonjs/Particle.html#inViewport"},"EkrfbZ-J0XCu5VvUxndjP":{"uri":"/melonJS/docs/melonjs/Particle.html#isDirty"},"2X_n2owzEK5ExzYkiXuP1":{"uri":"/melonJS/docs/melonjs/Particle.html#isFlippedX"},"mR--YdRmNDnBBf7v4CPqw":{"uri":"/melonJS/docs/melonjs/Particle.html#isFlippedY"},"75jB_eO5JRFIPUTPdol3e":{"uri":"/melonJS/docs/melonjs/Particle.html#isFloating"},"TmJafNB55afiqlYzAb2iX":{"uri":"/melonJS/docs/melonjs/Particle.html#isKinematic"},"AiMmmQI2ydeoTTn6hA682":{"uri":"/melonJS/docs/melonjs/Particle.html#isPersistent"},"THiDIQETTbEsOgT6nP99D":{"uri":"/melonJS/docs/melonjs/Particle.html#left"},"Sdgkz5OE5SOWoxPci1teo":{"uri":"/melonJS/docs/melonjs/Particle.html#mask"},"DqPhuFUWY3J3ngM1Su0rp":{"uri":"/melonJS/docs/melonjs/Particle.html#name"},"_T79o7oOlYeNzcmnFMbAA":{"uri":"/melonJS/docs/melonjs/Particle.html#onVisibilityChange"},"WkhbL83Wr6pizTrX_6DGB":{"uri":"/melonJS/docs/melonjs/Particle.html#points"},"5Xk0sOGugVhs0CVZufNZ5":{"uri":"/melonJS/docs/melonjs/Particle.html#pos"},"KNP76UK4o5eLo-hH6fdiz":{"uri":"/melonJS/docs/melonjs/Particle.html#right"},"npp2pUqDqYppVpZGA690k":{"uri":"/melonJS/docs/melonjs/Particle.html#shader"},"rZLGtyTh9-aY-LgzuUQEc":{"uri":"/melonJS/docs/melonjs/Particle.html#tint"},"0XkbuT03JftAiyUwfhdvg":{"uri":"/melonJS/docs/melonjs/Particle.html#top"},"ItRm6dJYE-GcDTxlz9P5G":{"uri":"/melonJS/docs/melonjs/Particle.html#type"},"e71tag5U1ha0tZXaIfhdo":{"uri":"/melonJS/docs/melonjs/Particle.html#updateWhenPaused"},"DKCxGAqXXVzjPNTcTubLN":{"uri":"/melonJS/docs/melonjs/Particle.html#width"},"qlq0dNG_ESv_8kAYYkbJj":{"uri":"/melonJS/docs/melonjs/Particle.html#angleTo"},"wrgcxdw_uD2LYSg9JkWX6":{"uri":"/melonJS/docs/melonjs/Particle.html#centerOn"},"DcgKSe5saoF787LMuJRIp":{"uri":"/melonJS/docs/melonjs/Particle.html#clone"},"x1JQWaVfFbFrzHc9MqPjS":{"uri":"/melonJS/docs/melonjs/Particle.html#constructor"},"OD8RCjWFZ4DLLjHAWH8he":{"uri":"/melonJS/docs/melonjs/Particle.html#contains"},"0vtptChQ_jfcdwwnwCPPW":{"uri":"/melonJS/docs/melonjs/Particle.html#copy"},"_iR5tb08GhHPY-XmwtpxJ":{"uri":"/melonJS/docs/melonjs/Particle.html#distanceTo"},"ABFzNK8MfvuObbc8C1Zaf":{"uri":"/melonJS/docs/melonjs/Particle.html#draw"},"Ib8-0nNc1YeCUCLeIlsBz":{"uri":"/melonJS/docs/melonjs/Particle.html#equals"},"PnM3MSV7E_thu0yeNjBXM":{"uri":"/melonJS/docs/melonjs/Particle.html#flipX"},"PAUL5I9c0LgiFVRFHFGli":{"uri":"/melonJS/docs/melonjs/Particle.html#flipY"},"KApfqr-pz1iSP7P9rOYXQ":{"uri":"/melonJS/docs/melonjs/Particle.html#getAbsolutePosition"},"X4nYzfsHvt92B_Acp6mdG":{"uri":"/melonJS/docs/melonjs/Particle.html#getBounds"},"I7C3V_7f2wILrAo52A7IE":{"uri":"/melonJS/docs/melonjs/Particle.html#getIndices"},"32dFleev_9fFXcReB4-pD":{"uri":"/melonJS/docs/melonjs/Particle.html#getOpacity"},"_qEzOE4bLJZMHArVAZKFB":{"uri":"/melonJS/docs/melonjs/Particle.html#isConvex"},"TUbcce-zo7kavNCIz8E2J":{"uri":"/melonJS/docs/melonjs/Particle.html#isFinite"},"V3LRLeoTtX22VneQBoBC1":{"uri":"/melonJS/docs/melonjs/Particle.html#lookAt"},"42Zp7dnFMDpZFtR1Qb_kx":{"uri":"/melonJS/docs/melonjs/Particle.html#onCollision"},"5pYVrPgYNVFdy4hmTAKlQ":{"uri":"/melonJS/docs/melonjs/Particle.html#onDestroyEvent"},"bDoJbkM2J8j0ooziNHDI-":{"uri":"/melonJS/docs/melonjs/Particle.html#overlaps"},"yieiZ25bDbVGEXEO-r88k":{"uri":"/melonJS/docs/melonjs/Particle.html#postDraw"},"1pbfEM5z46Bw_gbSdgdRP":{"uri":"/melonJS/docs/melonjs/Particle.html#preDraw"},"coJcQYXVwxLUWazJVriLX":{"uri":"/melonJS/docs/melonjs/Particle.html#recalc"},"2tfMTDsUtVLyzpu4_S_ef":{"uri":"/melonJS/docs/melonjs/Particle.html#resize"},"SEBMbA9HNExDDIRXue5vy":{"uri":"/melonJS/docs/melonjs/Particle.html#rotate"},"PKDEKUSe55IfVwLB7b0fs":{"uri":"/melonJS/docs/melonjs/Particle.html#scale"},"qHnvYq9_WznPPfN6JxcGP":{"uri":"/melonJS/docs/melonjs/Particle.html#scaleV"},"py0S_SeWM7XHA7gRrhEeg":{"uri":"/melonJS/docs/melonjs/Particle.html#setOpacity"},"l8Z59bRHqCf9sTvfcnyzZ":{"uri":"/melonJS/docs/melonjs/Particle.html#setShape"},"vKS_WcLEX8hL3GWXEFlwW":{"uri":"/melonJS/docs/melonjs/Particle.html#setVertices"},"q98rMJdrDp8tW4vSlq2eI":{"uri":"/melonJS/docs/melonjs/Particle.html#shift"},"D9SZKx3gst4Wu0Py7C_dh":{"uri":"/melonJS/docs/melonjs/Particle.html#to2d"},"PY5xPQf0mNs4nIdNTdhHY":{"uri":"/melonJS/docs/melonjs/Particle.html#toIso"},"Ny4u53bhh-dXbu1BiygpV":{"uri":"/melonJS/docs/melonjs/Particle.html#toPolygon"},"McNs6lUzXKxmzXa6LSOaW":{"uri":"/melonJS/docs/melonjs/Particle.html#transform"},"sdgTp0sAcaFrCVZ5MpXJE":{"uri":"/melonJS/docs/melonjs/Particle.html#translate"},"FlcD0mljtzLpnJC8c3Wud":{"uri":"/melonJS/docs/melonjs/Particle.html#union"},"1fVFZ23p99LvPu2mxYRDf":{"uri":"/melonJS/docs/melonjs/Particle.html#update"},"RJNN0uuzQlLlCRtaSTGTH":{"uri":"/melonJS/docs/melonjs/Particle.html#updateBounds"},"DEqgZhakGkuK9XG11EDsV":{"uri":"/melonJS/docs/melonjs/Particle.html#onAnchorUpdate"},"2_mxrzhW1-Kimmc7aSADC":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html"},"LrtRMvfzEYnBi2xiT4s-c":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#alpha"},"g_HGGNs1Pf2gwW9RbiU-H":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#alwaysUpdate"},"VilS4UpqIbMCl_SVyVTIc":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#ancestor"},"nTiZohLM8MH3s9ke9N3B_":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#anchorPoint"},"z13fy3R6h8S-k74vphkPq":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#autoDepth"},"nv4Vd1Dj3aZywrb_jom_m":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#autoSort"},"BVoY9Na8lh56MVBwvy25b":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#autoTransform"},"-TyqRy1s8Yxifmpqt4l-T":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#backgroundColor"},"v95Bk-f5i9iaW55uo0xj_":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#blendMode"},"gmEiZ8ncYV84IDrL2EwA3":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#body"},"8_FDkpI08-KgbBqUjKl8e":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#bottom"},"X_XK3hu-yU72pViDoTHVr":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#centerX"},"f0xAOIn-TYW-4_Z9e4K9M":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#centerY"},"uYk6nq23bq1lUhHaKdJdw":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#clipping"},"CRyXyllxfGT0pOKzLp6z0":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#currentTransform"},"oSTAa8YiJXVRylCuSfsAr":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#depth"},"jNbHdyOBnwUXj2mz9jh0L":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#enableChildBoundsUpdate"},"77Or4gWpsLtIaHMEdpwHe":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#floating"},"CIu4Yx-ND-xyrZV6fBcMk":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#GUID"},"fdEhLL4e7DvNghDj3Oqkq":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#height"},"cGTk2Kr0Q1AUL6zC6ZHaw":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#inViewport"},"JHj4iIUJHnMIxUTPC59bX":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isDirty"},"wMwEsmKMXOcVUS1lkd-PZ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isFlippedX"},"t0ZPGDa4Ny-ZcOxnJ_cIr":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isFlippedY"},"JAZq3SclbGKIMv1hhdjnp":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isFloating"},"TrhSdx4p8sRilskf4bIae":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isKinematic"},"YUhl6aY8uY_piBqDs8Kul":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isPersistent"},"rRiiIW4CHrBGy3NYEXH4X":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#left"},"qV7ifs5HdcYs2wQS0PmlP":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#mask"},"X8Q3vk2L8-5i3XK5fH2wA":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#name"},"oecOyiqnUUv_RNpkqxjwV":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onVisibilityChange"},"lVU4LzEKtPBG18IZWyjKO":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#points"},"o5hbs_WyYiaHqUQew4YNK":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#pos"},"HIx3d9EIQU1CvW0UEsaqQ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#right"},"WljYoExrgWkAbPUtP14xo":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#root"},"YJJIbRVgDx1djtDVckyL0":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#settings"},"dEN1ouD2YSKKlowlCsLdX":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#shader"},"9AmJV0FfmZGP5w7VhQpDu":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#sortOn"},"x_SUW-Mz966hDcXYWw8Fs":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#tint"},"p5ukZDyKzI2vPIKBqBTPs":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#top"},"m6i7aPTWnyg3fnNq5NsEt":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#type"},"AwBX9N3xMIjaBqjs7cRwM":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#updateWhenPaused"},"Qa15ESJBDM6VnXN91HezF":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#width"},"yq09hOaioMzecM2jDb4Fn":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#addChild"},"0sbOYih1uss1ziDmfwbqq":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#addChildAt"},"p0ae6RB4c8X9vgoSZcXeo":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#angleTo"},"bEe_r-SFfShj-2AX9O2ZB":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#burstParticles"},"qN5xOVmjjE_vOdRqX_bBU":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#centerOn"},"0fyu69EpeAofBjgvnEPIb":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#clone"},"YKnRWeQNEtu-4hmKG0d7a":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#constructor"},"zYYiKs3-C5WlrM1CGlS7v":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#contains"},"rzrgrmCYbyUoDi881IDeN":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#copy"},"7xua6GaYVmWPpKRyCMV6F":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#distanceTo"},"QHfpVvMjx0XF4T_xsprhJ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#equals"},"isDanLOZQsMZpiqqredSb":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#flipX"},"JEuUwP-qgea1dYlTmnc29":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#flipY"},"4w5Tdc3dla6qwaT5g92p-":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#forEach"},"13ZiwLSYJAvHkcjS7khD9":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getAbsolutePosition"},"C-2kTkvY8vvOVdomj58V-":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getBounds"},"evpAdXANzHWtkGj1R5F-r":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildAt"},"vg2go__MyoTcMqj6MvPO6":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildByGUID"},"lCgFltkt_2wJRKdW2ifAL":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildByName"},"x--AEWJcRYoQ57Fqm0o1U":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildByProp"},"tCKQHs4bvTOOrPcWQG_Fr":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildByType"},"TJmZ2mhLXVUKpd7LZLLa6":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildIndex"},"VS3pLt8CELZoPci5n5brC":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildren"},"0xxO71X7VUk6-kGQKa7sq":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getIndices"},"bibD4ieXoXstFGkBOKMr9":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getNextChild"},"qvLsjaakt7z7dGXec9YE3":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getOpacity"},"Oub_BMjNl781PyO_eiFPv":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getRandomPointX"},"YKIeMC4xC6PGF0tvLMZkL":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getRandomPointY"},"SuNpcmPDpO7vsGIa8geWr":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getRootAncestor"},"AHC9kBVaxSNZgtPWSrYPE":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#hasChild"},"spyqzhAJM2DwSzjE2JX__":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isAttachedToRoot"},"uMlaiK0aS9XvCubRiJLMU":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isConvex"},"VNwNwlWD4XStNtRPkCvoU":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isFinite"},"mYCFkME2qiQXkL9-T2t2E":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isRunning"},"ad3apQV_89qLvjlzhfTj8":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#lookAt"},"o61fh6bcOnMnE3eIDyLjJ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#moveDown"},"2LKP0SXN3l8-BQFLzJf1k":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#moveToBottom"},"0Cu-9JCV57UcEGmNQvrjX":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#moveToTop"},"ulZethBSQgzMaIiVXdJDo":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#moveUp"},"Opsj9jJmNHLwXdcnLOcVQ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onChildChange"},"dEhLH4DPfc4znHNU3w0LF":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onCollision"},"O0DROBgxvEejig1usgW4x":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onDestroyEvent"},"SFPCOIssLJsWhj_nd1olO":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#overlaps"},"2DCr5pN3Qm6AQVHjw57T4":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#postDraw"},"0bmuoRAAWsPlGwqifFfpE":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#preDraw"},"laH2bLYrVqm1zO0MFvdji":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#recalc"},"LsVel4dghsj9p2dpgx2bA":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#removeChild"},"mJGL3YqH__ucU97YQ3v1O":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#removeChildNow"},"QWvHvrqkfgwHdoaCzuY3T":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#reset"},"6ZZQeeSDLENqVjXWCumHR":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#resize"},"zCnAsoxTBWYpL1BlwfoSE":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#rotate"},"6HceqfjaCij1Fq-ZxmYKP":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#scale"},"_O2Vf6zJKoB6OSg0mEfiC":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#scaleV"},"vLIxL9WWY9ErqSFG-lhQM":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#setChildsProperty"},"WplKO4auLGrxXwlv3G1B0":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#setOpacity"},"H3K_9OpJtvOeBL3MX29Jz":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#setShape"},"1kvZeXwRLw8D3KalSTigY":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#setVertices"},"rnZzhsKXvPwTWX6UIS8AI":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#shift"},"Spr7Rjf247wscdW0W0eVV":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#sort"},"RSohQmK8Ohg-Ev_rCIW0-":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#stopStream"},"jWG8KRshK7Ywy4pygdzvj":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#streamParticles"},"oncRfMoqp3KlPvxHTnlWy":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#swapChildren"},"PhJYWrZLXHF-cH9jFSgWQ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#to2d"},"1UrNilpsn5Im9Xb55-oyd":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#toIso"},"PHMbGL-DoGy-FbbXBL3x7":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#toPolygon"},"a6rkyzpft_VY9W8hha5rY":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#transform"},"rzE1L5utBMc_Mv1GnoQpZ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#translate"},"jTRnaRmfdR40YZ5r19Ha0":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#union"},"NzQK5rUMuPv4sg6cNK7k7":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#updateBounds"},"ycDoM2_-WvuHECD67X-kL":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#draw"},"BqHuVLz9gPhc93HqPiuoz":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#update"},"aCEBec3pYVyAozc0iCWzt":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onAnchorUpdate"},"aAXdAvgBftUCz3gTevFGR":{"uri":"/melonJS/docs/melonjs/Path2D.html"},"VB5fGUyASMY1AW0Ps_bWS":{"uri":"/melonJS/docs/melonjs/Path2D.html#arcResolution"},"98ZUqX565aNgJ_7hYwNgs":{"uri":"/melonJS/docs/melonjs/Path2D.html#points"},"BLPH6aDIr47acUn4QnVeI":{"uri":"/melonJS/docs/melonjs/Path2D.html#arc"},"orIgT4qcrei372lE3yV4T":{"uri":"/melonJS/docs/melonjs/Path2D.html#arcTo"},"KlrTpmRBTY4uM3-h_ujnF":{"uri":"/melonJS/docs/melonjs/Path2D.html#beginPath"},"eaX8AfPJWIk8WunFaXEC2":{"uri":"/melonJS/docs/melonjs/Path2D.html#closePath"},"yEsHJmh2KdB6Om-oXDXUe":{"uri":"/melonJS/docs/melonjs/Path2D.html#ellipse"},"1e9dbdbDLLpYiQ4wjn3RX":{"uri":"/melonJS/docs/melonjs/Path2D.html#lineTo"},"n1eSy8T5Xxgbu3rdLyNtl":{"uri":"/melonJS/docs/melonjs/Path2D.html#moveTo"},"CbD4Me3-M03EjLMN4Zc8A":{"uri":"/melonJS/docs/melonjs/Path2D.html#rect"},"_7dgLD3syENjZchw2CNF-":{"uri":"/melonJS/docs/melonjs/Path2D.html#roundRect"},"I4NiHmfdbZ3LBkcCKrOvB":{"uri":"/melonJS/docs/melonjs/Path2D.html#triangulatePath"},"GK2hb3-2MEApHZkGVG1Y8":{"uri":"/melonJS/docs/melonjs/Point.html"},"Baj0Uj2DGZOP--khgNgTy":{"uri":"/melonJS/docs/melonjs/Point.html#type"},"mzK-KayzRqkf_fgA2b2A9":{"uri":"/melonJS/docs/melonjs/Point.html#x"},"BlVeu3vYfCx14MNlytbwo":{"uri":"/melonJS/docs/melonjs/Point.html#y"},"NvIj3QuD9sk7UV2eiW0Am":{"uri":"/melonJS/docs/melonjs/Point.html#clone"},"5uR8UartGZo3n-mmvmTKK":{"uri":"/melonJS/docs/melonjs/Point.html#equals"},"AcdatI1NFK6KeOYJUQgF_":{"uri":"/melonJS/docs/melonjs/Point.html#set"},"9a3zuv1OjseiJEdD9IKUY":{"uri":"/melonJS/docs/melonjs/Pointer.html"},"un7ZboB8lU6V4A979-RPL":{"uri":"/melonJS/docs/melonjs/Pointer.html#bottom"},"HDrRCNMnqKc5s86rspV2a":{"uri":"/melonJS/docs/melonjs/Pointer.html#button"},"DdRF6sEwNM5_ZWpNCI0RT":{"uri":"/melonJS/docs/melonjs/Pointer.html#center"},"EPZCKhAxJN3rXHpYIBa3C":{"uri":"/melonJS/docs/melonjs/Pointer.html#centerX"},"GaOQiAa7weLqwmT8DLmmW":{"uri":"/melonJS/docs/melonjs/Pointer.html#centerY"},"pkJQXmNEFY2ansez35RNw":{"uri":"/melonJS/docs/melonjs/Pointer.html#clientX"},"wsPU0ZVgBSoIWi86nZorW":{"uri":"/melonJS/docs/melonjs/Pointer.html#clientY"},"HXJ-fobXmB-lqNkJzn4RC":{"uri":"/melonJS/docs/melonjs/Pointer.html#deltaMode"},"975FREJokxCYL6HuXN0sl":{"uri":"/melonJS/docs/melonjs/Pointer.html#deltaX"},"ILIWbfjk4YuCgqDaYNu1c":{"uri":"/melonJS/docs/melonjs/Pointer.html#deltaY"},"rhStj-NbvE3GoAovkMCDq":{"uri":"/melonJS/docs/melonjs/Pointer.html#deltaZ"},"FNm-ackFyD1FAWYWAEy57":{"uri":"/melonJS/docs/melonjs/Pointer.html#event"},"B5Hpzfy_5FscN3Hou7sM6":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameLocalX"},"4AdMsjzZOaXNbtRIU6DGf":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameLocalY"},"Xn8ZW2hfJq_Q5HdiDtXBX":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameScreenX"},"E5OyVMFVIEe2i8X8uxj8a":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameScreenY"},"sxAfGPzLnakjuSbpoqPGA":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameWorldX"},"r6XfxeAARzJEkUEdrmctC":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameWorldY"},"eqy0FRaqJ4lg1A1n8E0t9":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameX"},"vKQ1ppKdf4FYRoqJtNP55":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameY"},"WRHbMA59b5t5SRm_zpnYU":{"uri":"/melonJS/docs/melonjs/Pointer.html#height"},"30e3QQRBM3V_9xfA3a-kE":{"uri":"/melonJS/docs/melonjs/Pointer.html#isNormalized"},"c9kvlNspSaSb_Uw2mH707":{"uri":"/melonJS/docs/melonjs/Pointer.html#isPrimary"},"Oxx-_9NTabBlY8A3XR6Rg":{"uri":"/melonJS/docs/melonjs/Pointer.html#left"},"YRUbpU1ML7NihdvyjxqAU":{"uri":"/melonJS/docs/melonjs/Pointer.html#LEFT_"},"p9WU0dwKqIoST_Heeli-l":{"uri":"/melonJS/docs/melonjs/Pointer.html#locked"},"TqzcwDh4JGPRJn2PxImV9":{"uri":"/melonJS/docs/melonjs/Pointer.html#MIDDLE"},"FYjQsKFE1E4cF-2moE-gs":{"uri":"/melonJS/docs/melonjs/Pointer.html#movementX"},"SC3vk_8PTNW46vFXRJT4-":{"uri":"/melonJS/docs/melonjs/Pointer.html#movementY"},"Bxv6CffAVQY1pAsvDM9l0":{"uri":"/melonJS/docs/melonjs/Pointer.html#pageX"},"5xlu2O6ODY-zHHkFiNRFM":{"uri":"/melonJS/docs/melonjs/Pointer.html#pageY"},"0OcsS9ofHjsSt0a3hSr44":{"uri":"/melonJS/docs/melonjs/Pointer.html#pointerId"},"9-7MfjE4HibK9MdahZN9q":{"uri":"/melonJS/docs/melonjs/Pointer.html#right"},"lAlrSy3m-9I9cd9Kj4cOL":{"uri":"/melonJS/docs/melonjs/Pointer.html#RIGHT_"},"6UykgfyVOux7LKxnO6df1":{"uri":"/melonJS/docs/melonjs/Pointer.html#top"},"Cz6B4DkIOWtzkC9-sHOee":{"uri":"/melonJS/docs/melonjs/Pointer.html#type"},"cnu3WlDnfKNRGjxxtMuyp":{"uri":"/melonJS/docs/melonjs/Pointer.html#width"},"mxjw18kZqcrtBsz70zQyh":{"uri":"/melonJS/docs/melonjs/Pointer.html#x"},"BMMB3XeEOSMXu_S1qdNUY":{"uri":"/melonJS/docs/melonjs/Pointer.html#y"},"ix6xHWfMLTyYvAPaPYeRO":{"uri":"/melonJS/docs/melonjs/Pointer.html#add"},"HVazIzaUGIThJ0oRXNzIy":{"uri":"/melonJS/docs/melonjs/Pointer.html#addBounds"},"AKlTtOzjvyfZvD4nT1j43":{"uri":"/melonJS/docs/melonjs/Pointer.html#addFrame"},"sBldLlnS0i1XgOQ_TuwLp":{"uri":"/melonJS/docs/melonjs/Pointer.html#addPoint"},"Pie1EXr4llMQQ0_5y9aHA":{"uri":"/melonJS/docs/melonjs/Pointer.html#centerOn"},"p3MDSoQZRqeprfi0yH9pk":{"uri":"/melonJS/docs/melonjs/Pointer.html#clear"},"DoLaeK06EveRN4loa7abo":{"uri":"/melonJS/docs/melonjs/Pointer.html#clone"},"oGT252n3iIMKll-qZ7ta9":{"uri":"/melonJS/docs/melonjs/Pointer.html#contains"},"woMhGLTr65xGRM5Lgp-Bo":{"uri":"/melonJS/docs/melonjs/Pointer.html#isFinite"},"32-jPGQdRU9UHMiVkzXbd":{"uri":"/melonJS/docs/melonjs/Pointer.html#overlaps"},"Du0-zT0t1kSzDayoaJlzT":{"uri":"/melonJS/docs/melonjs/Pointer.html#setMinMax"},"zR2DpI6HAa4imG4oxQ5r0":{"uri":"/melonJS/docs/melonjs/Pointer.html#shift"},"YV_brMQgOCdce8mHzRSwp":{"uri":"/melonJS/docs/melonjs/Pointer.html#toPolygon"},"AaVwQNwFb418uiGJbMEWB":{"uri":"/melonJS/docs/melonjs/Pointer.html#translate"},"OTL_UG-i6HpFXIGIhigM-":{"uri":"/melonJS/docs/melonjs/Pointer.html#update"},"06DpZ3BhpZW-S3BCD3RHQ":{"uri":"/melonJS/docs/melonjs/Pointer.html#set"},"fNS4WSMQ-4U5ORs5ezAKs":{"uri":"/melonJS/docs/melonjs/Polygon.html"},"Tm22qccK3_tEEqG8BhKiA":{"uri":"/melonJS/docs/melonjs/Polygon.html#points"},"T8X0nnh6RnidJ-EVuKy3T":{"uri":"/melonJS/docs/melonjs/Polygon.html#pos"},"umZx4HuCorpdngRMPW0KQ":{"uri":"/melonJS/docs/melonjs/Polygon.html#type"},"SzlH-Zm97uSFhRjfI2vaw":{"uri":"/melonJS/docs/melonjs/Polygon.html#clone"},"fyDVhnm_7C2eYi7cKn33K":{"uri":"/melonJS/docs/melonjs/Polygon.html#constructor"},"NaD7CptFruwD1vIzLTWUu":{"uri":"/melonJS/docs/melonjs/Polygon.html#contains"},"RoTo--uYX8-dhodGJYem0":{"uri":"/melonJS/docs/melonjs/Polygon.html#getBounds"},"l5dsQcyd95Rk4VE_7T_Vx":{"uri":"/melonJS/docs/melonjs/Polygon.html#getIndices"},"1Qy8Q2gwYjRpXBXIR15ag":{"uri":"/melonJS/docs/melonjs/Polygon.html#isConvex"},"XMruaOmdacBN3Tr84Qr-8":{"uri":"/melonJS/docs/melonjs/Polygon.html#recalc"},"Wz_YdmzeAXpP5DKvCBSFg":{"uri":"/melonJS/docs/melonjs/Polygon.html#rotate"},"ViOGFiXIniOX4qeqw7diT":{"uri":"/melonJS/docs/melonjs/Polygon.html#scale"},"Cdey0rKlWkEeW0KNCuNxu":{"uri":"/melonJS/docs/melonjs/Polygon.html#scaleV"},"-CxYTvlnGP576YxYZP64W":{"uri":"/melonJS/docs/melonjs/Polygon.html#setShape"},"jStUuPTEmPoMCx-uNJGIN":{"uri":"/melonJS/docs/melonjs/Polygon.html#setVertices"},"pTHRRLZBpa0JxAVkJr17b":{"uri":"/melonJS/docs/melonjs/Polygon.html#shift"},"0sjdNEE7-_e_N58OkaZ0m":{"uri":"/melonJS/docs/melonjs/Polygon.html#to2d"},"P7DMrEnFdaptrJuWG0N9Q":{"uri":"/melonJS/docs/melonjs/Polygon.html#toIso"},"0OnFVIqXKMJdk2aE7VrR1":{"uri":"/melonJS/docs/melonjs/Polygon.html#transform"},"xqM-F6YGAr4Wtseih7bkm":{"uri":"/melonJS/docs/melonjs/Polygon.html#translate"},"tYBgB7QwIoCn55E9MdKVX":{"uri":"/melonJS/docs/melonjs/Polygon.html#updateBounds"},"2GVbXtayIW7K9gR4S63EI":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html"},"tieSAchEW-sK7YQ6-gBsE":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#attributes"},"Vqc9E-DT6tNf43X8JerT4":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#currentShader"},"YGgWfy_FKTtec1Ca0U4_n":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#defaultShader"},"aIrg8x3QHTES9fM5VwaMJ":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#mode"},"AoQRfMQzFxyFnKV2S6RSP":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#vertexByteSize"},"T_WzYZ2KMUgcmVjCO285x":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#vertexData"},"XmNhIaAQCtuk4FyN5gXo7":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#vertexSize"},"I6lnRAIJPQle3_7RmM6FG":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#addAttribute"},"ZLDkGeDCbyLDwEe0VILpi":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#bind"},"RzmV_QsCW-PEcEIxS29RH":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#constructor"},"jKZIBNVQLvNxZWvlmN-JD":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#drawVertices"},"2O_bHur9eepkM4CVj54lV":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#flush"},"94u34sKc3pfeCFC-EI1Zz":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#setProjection"},"tTDHu3fQK7h0DFXx7hak4":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#useShader"},"vEgaKvsd5HrimZ3ZH36uc":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html"},"FhXawnkhIkL-vumdQetGf":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#attributes"},"Eyp40OhoJx41CSCiNnoSS":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#currentShader"},"RiX-SgL4CIdPvGuu84Fh7":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#defaultShader"},"tfFSqaSqT4BJ2J67GQHtd":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#mode"},"OXP4ivC6WnzD8KrQ0jhJI":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#vertexByteSize"},"qK0gpTGS00AdSCeqq8Lkv":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#vertexData"},"THjL1-BbmJ8xc7X116HlL":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#vertexSize"},"nNkLtX-FJuBroEwQy2Tjx":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#addAttribute"},"y1Cs8O6cav_TFxPzSiEaB":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#addQuad"},"W4QM0KlFRClCTzZpFhgJ2":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#bind"},"moOm7KVloCJfzf_hmGyaH":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#bindTexture2D"},"yBiZIkycyhW01SFd-4ge6":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#constructor"},"IiXVHvj_CYyq6y4XSmBea":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#createTexture2D"},"oYMHmrWn-nkeccvho4WSj":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#deleteTexture2D"},"qQQQLgxhqyfYooXU7PIbl":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#flush"},"-YJPv8cINuCKsMNENB46I":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#getTexture2D"},"ZE5JgUF9ADSEcPJDrGl38":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#setProjection"},"85sN56h0jFFrUQpiNBK2E":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#unbindTexture2D"},"IbWW7pTC9A6eMKZdsnc5p":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#useShader"},"cnoqXyj4JA8eq3EpsBiPd":{"uri":"/melonJS/docs/melonjs/QuadTree.html"},"KHJYNBIcHGyXMqB7dvUNR":{"uri":"/melonJS/docs/melonjs/QuadTree.html#clear"},"kH_M0LedBEzqUyEsN8BrV":{"uri":"/melonJS/docs/melonjs/QuadTree.html#constructor"},"6vbI6pxGYe-kmW_7HW1l2":{"uri":"/melonJS/docs/melonjs/QuadTree.html#hasChildren"},"KXkRdBQPkd-40HNwnxpHn":{"uri":"/melonJS/docs/melonjs/QuadTree.html#insert"},"KIgwCEWWzE0hpmrmWQHHz":{"uri":"/melonJS/docs/melonjs/QuadTree.html#insertContainer"},"OUg0-kiwy5mvxgBHurt8f":{"uri":"/melonJS/docs/melonjs/QuadTree.html#isPrunable"},"E-S15BFrascvFLDUlBNLM":{"uri":"/melonJS/docs/melonjs/QuadTree.html#remove"},"XnI9xsi_hGqQ8M7Ap8jvk":{"uri":"/melonJS/docs/melonjs/QuadTree.html#retrieve"},"VzN6F0Fs69EPxQc2_ulLr":{"uri":"/melonJS/docs/melonjs/Rect.html"},"wjXWEWmPRloWEjfLTp6G3":{"uri":"/melonJS/docs/melonjs/Rect.html#bottom"},"JFj7Oezuyn5dgR_Gfrlpf":{"uri":"/melonJS/docs/melonjs/Rect.html#centerX"},"N6COanJvbJDI-tl_kOZSZ":{"uri":"/melonJS/docs/melonjs/Rect.html#centerY"},"WbgJqfuffoHL3NhjixHjw":{"uri":"/melonJS/docs/melonjs/Rect.html#height"},"YJys2Viq70H9E8WQyhfkq":{"uri":"/melonJS/docs/melonjs/Rect.html#left"},"dkeEW1INQ5Xr6l_BXmgK9":{"uri":"/melonJS/docs/melonjs/Rect.html#points"},"9NuDHaSmHOJDVQwPgBtsM":{"uri":"/melonJS/docs/melonjs/Rect.html#pos"},"8fkzpPaK-NwYlbeGToYuq":{"uri":"/melonJS/docs/melonjs/Rect.html#right"},"OFaS1yTCO5sUVb31WwLsj":{"uri":"/melonJS/docs/melonjs/Rect.html#top"},"iFspJROQqct9AhZS5-Keb":{"uri":"/melonJS/docs/melonjs/Rect.html#type"},"uD_I-om7bWA_s8oIgnPng":{"uri":"/melonJS/docs/melonjs/Rect.html#width"},"vrxgadXR0fFPQHKZZ57-2":{"uri":"/melonJS/docs/melonjs/Rect.html#centerOn"},"Z1kbK3kwV04MHD2_mF7qa":{"uri":"/melonJS/docs/melonjs/Rect.html#clone"},"fKfqmEbPspv56qojm1j-a":{"uri":"/melonJS/docs/melonjs/Rect.html#constructor"},"gntZqagzZKoi2mZDsIFYp":{"uri":"/melonJS/docs/melonjs/Rect.html#contains"},"RUg36XaRqh-EgpfXFoqtt":{"uri":"/melonJS/docs/melonjs/Rect.html#copy"},"3qxZoJlnGmNf6Y5oUbq27":{"uri":"/melonJS/docs/melonjs/Rect.html#equals"},"6OW6DehlnBHYPh31b8mHQ":{"uri":"/melonJS/docs/melonjs/Rect.html#getBounds"},"ogB1Y4Dj4RN6cmGwcrWF0":{"uri":"/melonJS/docs/melonjs/Rect.html#getIndices"},"d3WnvytI1-AR69en02yX1":{"uri":"/melonJS/docs/melonjs/Rect.html#isConvex"},"ueR8_3W50cgMJjc56kF4h":{"uri":"/melonJS/docs/melonjs/Rect.html#isFinite"},"Jd4rXBeGaiaFZR2K5ytE4":{"uri":"/melonJS/docs/melonjs/Rect.html#overlaps"},"XecFSMKK53HhOPjGkOWlY":{"uri":"/melonJS/docs/melonjs/Rect.html#recalc"},"WIC0ajJvTu7Wn5xVkmXgm":{"uri":"/melonJS/docs/melonjs/Rect.html#resize"},"qxDxhtwZGxi2TAuxs0OKO":{"uri":"/melonJS/docs/melonjs/Rect.html#rotate"},"y6kFQQ2rzWotjgbXtsPzu":{"uri":"/melonJS/docs/melonjs/Rect.html#scale"},"SNGswgns8qY2oV04_mX3B":{"uri":"/melonJS/docs/melonjs/Rect.html#scaleV"},"TL_ilZ4QGMfM56J92X2aT":{"uri":"/melonJS/docs/melonjs/Rect.html#setShape"},"J65A4zdQTuP0kTk3UDVYS":{"uri":"/melonJS/docs/melonjs/Rect.html#setVertices"},"4RrI1Cwyyb4bNuE9L9cXn":{"uri":"/melonJS/docs/melonjs/Rect.html#shift"},"5lsY3eFyoKI-AWON2p2Qq":{"uri":"/melonJS/docs/melonjs/Rect.html#to2d"},"NX6W1sqtTsa5V4Lixaecy":{"uri":"/melonJS/docs/melonjs/Rect.html#toIso"},"9WMIDQAAmAct4ghOrq81u":{"uri":"/melonJS/docs/melonjs/Rect.html#toPolygon"},"r8aGowqbOlISBuwFFe2ZS":{"uri":"/melonJS/docs/melonjs/Rect.html#transform"},"_SkKOSfleWNkbT6at66bE":{"uri":"/melonJS/docs/melonjs/Rect.html#translate"},"OcovvLRlWD-FkXcqFXeAJ":{"uri":"/melonJS/docs/melonjs/Rect.html#union"},"kH-Fw_kkN18xjOg0A35JN":{"uri":"/melonJS/docs/melonjs/Rect.html#updateBounds"},"gpGEbBf4tNL9w3As0xItv":{"uri":"/melonJS/docs/melonjs/Renderable.html"},"WRBig614uGv6gG1a2VAbs":{"uri":"/melonJS/docs/melonjs/Renderable.html#alpha"},"tLB6svxddnDninWIHL63i":{"uri":"/melonJS/docs/melonjs/Renderable.html#alwaysUpdate"},"EOiMM_FCeFWeeGWgj1dZK":{"uri":"/melonJS/docs/melonjs/Renderable.html#ancestor"},"NKgCABSrbaGqcwqt_h4u2":{"uri":"/melonJS/docs/melonjs/Renderable.html#anchorPoint"},"z_Mb78d2hlXeeqp9gesqi":{"uri":"/melonJS/docs/melonjs/Renderable.html#autoTransform"},"Io_aiszSg6FlI_ykvX3FL":{"uri":"/melonJS/docs/melonjs/Renderable.html#blendMode"},"_TddBnKgVGxOSgzdfOEbH":{"uri":"/melonJS/docs/melonjs/Renderable.html#body"},"c0_SNLpLFdHe1Wy3m2epH":{"uri":"/melonJS/docs/melonjs/Renderable.html#bottom"},"-uOUHvlwOiRkPeJjXSDcG":{"uri":"/melonJS/docs/melonjs/Renderable.html#centerX"},"K-AvEOdiFQhvYcCc04ku7":{"uri":"/melonJS/docs/melonjs/Renderable.html#centerY"},"n0a7pNLaG3KdckNxssOSS":{"uri":"/melonJS/docs/melonjs/Renderable.html#currentTransform"},"oNJvUDS-shjEjgPDHFGhC":{"uri":"/melonJS/docs/melonjs/Renderable.html#depth"},"h4eOL7btXzQXnzsb7v7DN":{"uri":"/melonJS/docs/melonjs/Renderable.html#floating"},"Y3n9dCEIoAR-kIRhjqFo-":{"uri":"/melonJS/docs/melonjs/Renderable.html#GUID"},"ub_xGbdFz5iG0I6FzQwdu":{"uri":"/melonJS/docs/melonjs/Renderable.html#height"},"Fg-BciME-u6mlCyS5sSaZ":{"uri":"/melonJS/docs/melonjs/Renderable.html#inViewport"},"3PSyz9KhDkdfNjmu3J4GB":{"uri":"/melonJS/docs/melonjs/Renderable.html#isDirty"},"siXdODHAkzpHStDBQCsh8":{"uri":"/melonJS/docs/melonjs/Renderable.html#isFlippedX"},"2C0nbAq8qqTkugTU6iFPb":{"uri":"/melonJS/docs/melonjs/Renderable.html#isFlippedY"},"ms3l56jna01hnpelsZe5G":{"uri":"/melonJS/docs/melonjs/Renderable.html#isFloating"},"znoaDKjpKFh8RMeP2zp9h":{"uri":"/melonJS/docs/melonjs/Renderable.html#isKinematic"},"-iaBf6zLJfKN1mVjO-y5a":{"uri":"/melonJS/docs/melonjs/Renderable.html#isPersistent"},"UPPSrFMEFQz4UNSXoSgxU":{"uri":"/melonJS/docs/melonjs/Renderable.html#left"},"VckOaEhguy-QysVbqPYBB":{"uri":"/melonJS/docs/melonjs/Renderable.html#mask"},"3IgNI2OmUFUI7f45Yv2m8":{"uri":"/melonJS/docs/melonjs/Renderable.html#name"},"x_YioCZHe1cwEtj1MNdEP":{"uri":"/melonJS/docs/melonjs/Renderable.html#onVisibilityChange"},"G5yr0vuZ2ey5dWHmKZVRJ":{"uri":"/melonJS/docs/melonjs/Renderable.html#points"},"a88urAMYmB6HWAT55Mcd9":{"uri":"/melonJS/docs/melonjs/Renderable.html#pos"},"XX17_i2Q7kA-oLsnYsGlV":{"uri":"/melonJS/docs/melonjs/Renderable.html#right"},"6Z5cFs8K0Qbt1qsAPsrBH":{"uri":"/melonJS/docs/melonjs/Renderable.html#shader"},"JvpO3NNDqncyKdQn1HwdN":{"uri":"/melonJS/docs/melonjs/Renderable.html#tint"},"_sBeTcH1UYnL6puBYVvIb":{"uri":"/melonJS/docs/melonjs/Renderable.html#top"},"RfGaO6R5jfVzaNcgjGJIe":{"uri":"/melonJS/docs/melonjs/Renderable.html#type"},"s3Nq2e-hFLSWwzzyZIbZ9":{"uri":"/melonJS/docs/melonjs/Renderable.html#updateWhenPaused"},"-_nJD7_zHH5H-5MRuB0Gq":{"uri":"/melonJS/docs/melonjs/Renderable.html#width"},"RQsOZ3nwgYaoWGSuAcUFq":{"uri":"/melonJS/docs/melonjs/Renderable.html#angleTo"},"uJK-ZmKasF_bStHzH-BPk":{"uri":"/melonJS/docs/melonjs/Renderable.html#centerOn"},"xVu1Jgi9itNUNQcn8lRPV":{"uri":"/melonJS/docs/melonjs/Renderable.html#clone"},"LTm833-ACQPkSeuCnkyKI":{"uri":"/melonJS/docs/melonjs/Renderable.html#constructor"},"aFHPhyPicBvs9JSrhTDc4":{"uri":"/melonJS/docs/melonjs/Renderable.html#contains"},"Jxbi5Gs9jXyZ-sms6HZF9":{"uri":"/melonJS/docs/melonjs/Renderable.html#copy"},"Hu0wUkERxX-taQrX_IGJh":{"uri":"/melonJS/docs/melonjs/Renderable.html#distanceTo"},"utHjURAZnG9lWiRdI1GJ0":{"uri":"/melonJS/docs/melonjs/Renderable.html#draw"},"AfFLcqDO5Te5cWijF6G0x":{"uri":"/melonJS/docs/melonjs/Renderable.html#equals"},"7k1WnEd-ZSIejXLdtdOF7":{"uri":"/melonJS/docs/melonjs/Renderable.html#flipX"},"EvBjB9jKbk3QTyhpt1IWt":{"uri":"/melonJS/docs/melonjs/Renderable.html#flipY"},"F0C3dXg4gAx5p-T59ycOv":{"uri":"/melonJS/docs/melonjs/Renderable.html#getAbsolutePosition"},"QmSZ3WOv9P_CqmEIatTzl":{"uri":"/melonJS/docs/melonjs/Renderable.html#getBounds"},"rqQoHfOXo58QmPJt_QWtK":{"uri":"/melonJS/docs/melonjs/Renderable.html#getIndices"},"9wgqabFRIQbJtBvQOgci6":{"uri":"/melonJS/docs/melonjs/Renderable.html#getOpacity"},"AGSojwPkPqb5uBWBDu5UV":{"uri":"/melonJS/docs/melonjs/Renderable.html#isConvex"},"D89Jg3EJILRdqB6qSdwcG":{"uri":"/melonJS/docs/melonjs/Renderable.html#isFinite"},"m13RUzS2PXTY9NTryFaI0":{"uri":"/melonJS/docs/melonjs/Renderable.html#lookAt"},"rVjCxA64A0le2hF5Qp3lc":{"uri":"/melonJS/docs/melonjs/Renderable.html#onCollision"},"Xe0C0Qj4nE-PF5fgiRC6r":{"uri":"/melonJS/docs/melonjs/Renderable.html#onDestroyEvent"},"qHHsET-ElR_wWNI3cWg2X":{"uri":"/melonJS/docs/melonjs/Renderable.html#overlaps"},"ZLZ4zPpvlIJhSrrYY982n":{"uri":"/melonJS/docs/melonjs/Renderable.html#postDraw"},"nm5f18hSMqDKoK4tR9Py0":{"uri":"/melonJS/docs/melonjs/Renderable.html#preDraw"},"LbucbeKMoAmCUlS4zujVw":{"uri":"/melonJS/docs/melonjs/Renderable.html#recalc"},"i6Rh2iq0FxYyxolSBdOCP":{"uri":"/melonJS/docs/melonjs/Renderable.html#resize"},"iT7MWppiwxDIHhMK9Ceki":{"uri":"/melonJS/docs/melonjs/Renderable.html#rotate"},"-zR6WTQ7A3Dz1on0isV8h":{"uri":"/melonJS/docs/melonjs/Renderable.html#scale"},"YqmBGBpIu0LZXFLbRgTax":{"uri":"/melonJS/docs/melonjs/Renderable.html#scaleV"},"EtK28-2keKXgX4TOu6vc8":{"uri":"/melonJS/docs/melonjs/Renderable.html#setOpacity"},"_OnbzdWpHQAt0Sju4Gz9f":{"uri":"/melonJS/docs/melonjs/Renderable.html#setShape"},"TmVCRPst-zt2OkKcG9ihU":{"uri":"/melonJS/docs/melonjs/Renderable.html#setVertices"},"DCgPXvFUAT4MtrccKFa6Z":{"uri":"/melonJS/docs/melonjs/Renderable.html#shift"},"lzjNSilvwMDXew6WyNvht":{"uri":"/melonJS/docs/melonjs/Renderable.html#to2d"},"Ju6kqRACwDRaade04JWhF":{"uri":"/melonJS/docs/melonjs/Renderable.html#toIso"},"B-wgvjQYuK1VtM9G-GXJn":{"uri":"/melonJS/docs/melonjs/Renderable.html#toPolygon"},"MO2eJD8GSOvRS_msDkPOF":{"uri":"/melonJS/docs/melonjs/Renderable.html#transform"},"_M2zN9-WwEW0hAsWFYS1I":{"uri":"/melonJS/docs/melonjs/Renderable.html#translate"},"SytA-MAit55-tauWYwka9":{"uri":"/melonJS/docs/melonjs/Renderable.html#union"},"cHH5Q2Jn9qRXJIqiS0frD":{"uri":"/melonJS/docs/melonjs/Renderable.html#update"},"1LeiU6pIzB7zpSpLfZcsT":{"uri":"/melonJS/docs/melonjs/Renderable.html#updateBounds"},"PX76qOZrWweiQYv27oq3S":{"uri":"/melonJS/docs/melonjs/Renderable.html#onAnchorUpdate"},"oxCeIP6cpSPUWMGWKtRn9":{"uri":"/melonJS/docs/melonjs/Renderer.html"},"2Sm4RRHvR0J_mnZYtnDGn":{"uri":"/melonJS/docs/melonjs/Renderer/getHeight.html"},"Epg7Qee2JLx7xYfj7UtzN":{"uri":"/melonJS/docs/melonjs/Renderer/getHeight.html#constructor"},"LsinH9oFkR1Z4eYVEqAFo":{"uri":"/melonJS/docs/melonjs/Renderer/getWidth.html"},"P58njgCHho7ujmEDr_HmH":{"uri":"/melonJS/docs/melonjs/Renderer/getWidth.html#constructor"},"hmodZUw1-f_yukGs4Ue1E":{"uri":"/melonJS/docs/melonjs/Renderer/Texture.html"},"7N6t7DTJIM1u457mtC2HK":{"uri":"/melonJS/docs/melonjs/Renderer/Texture.html#constructor"},"uWVLd306VajRZeaSxwzK6":{"uri":"/melonJS/docs/melonjs/Renderer.html#depthTest"},"ikNHC7-sBVzZMsKrBb4Y8":{"uri":"/melonJS/docs/melonjs/Renderer.html#designRatio"},"R8uUOTh6MZHu6KVe2BEuk":{"uri":"/melonJS/docs/melonjs/Renderer.html#height"},"q-4AgZyEInGG1lv05ljzy":{"uri":"/melonJS/docs/melonjs/Renderer.html#isContextValid"},"VXj0Vj3hr30TmCejQheq7":{"uri":"/melonJS/docs/melonjs/Renderer.html#path2D"},"19abWx4tn5MxuEBsD9nwd":{"uri":"/melonJS/docs/melonjs/Renderer.html#scaleRatio"},"lWkdh5G7XrRAGG2KfvpSS":{"uri":"/melonJS/docs/melonjs/Renderer.html#settings"},"4CeVe-M7Wj3tP0SW6XPtJ":{"uri":"/melonJS/docs/melonjs/Renderer.html#type"},"zFNcmPMtOAKkpGYUJSVgg":{"uri":"/melonJS/docs/melonjs/Renderer.html#width"},"IfKIh9THvrnkuh4WKqUuR":{"uri":"/melonJS/docs/melonjs/Renderer.html#clear"},"152CsYxlRNtg0bRo0WRPc":{"uri":"/melonJS/docs/melonjs/Renderer.html#clearMask"},"zmnrpUqwHw0s2HPOUCIU0":{"uri":"/melonJS/docs/melonjs/Renderer.html#clearTint"},"55478QcKnaNrv9nNOLmQM":{"uri":"/melonJS/docs/melonjs/Renderer.html#constructor"},"raVeKhYivunY_lvYVDBiz":{"uri":"/melonJS/docs/melonjs/Renderer.html#fill"},"EMGkXF9OLjpnHSKLmcn-7":{"uri":"/melonJS/docs/melonjs/Renderer.html#flush"},"Q2IUAhoTqIk_I71hMe60E":{"uri":"/melonJS/docs/melonjs/Renderer.html#getBlendMode"},"Ks4i3YeDTlF68k3U-Zo_X":{"uri":"/melonJS/docs/melonjs/Renderer.html#getCanvas"},"9XnaDs_rIvSsbRVYj2TVm":{"uri":"/melonJS/docs/melonjs/Renderer.html#getColor"},"JxvyaawQ9t4z9vcNU7FTO":{"uri":"/melonJS/docs/melonjs/Renderer.html#getContext"},"yXmpREWd-mEQ6A802xB4l":{"uri":"/melonJS/docs/melonjs/Renderer.html#getContext2d"},"ICEIly8kxru05hvlCHF14":{"uri":"/melonJS/docs/melonjs/Renderer.html#getScreenCanvas"},"9hXyDzh6kimDKVBD8F4aW":{"uri":"/melonJS/docs/melonjs/Renderer.html#getScreenContext"},"kNQmujI0mvK44uNOFkpjy":{"uri":"/melonJS/docs/melonjs/Renderer.html#globalAlpha"},"mNr6yQy3_V3TUwYkWCiVR":{"uri":"/melonJS/docs/melonjs/Renderer.html#overlaps"},"aQoLwWXZIu6Fz_WNuotyx":{"uri":"/melonJS/docs/melonjs/Renderer.html#reset"},"xJP_IWb9NdxvizKB-fCuF":{"uri":"/melonJS/docs/melonjs/Renderer.html#resize"},"flD5B7ra5fuvpfZHv2GdN":{"uri":"/melonJS/docs/melonjs/Renderer.html#setAntiAlias"},"l_P06A1WZ8F7SoGL6d1Hs":{"uri":"/melonJS/docs/melonjs/Renderer.html#setMask"},"YHvht1q98jcBVHfTxAHVn":{"uri":"/melonJS/docs/melonjs/Renderer.html#setProjection"},"xawNqQuRoF8ZTbusfgRwV":{"uri":"/melonJS/docs/melonjs/Renderer.html#setTint"},"UgWvt9amaeCxumLUNKbkH":{"uri":"/melonJS/docs/melonjs/Renderer.html#stroke"},"0p5qiUfADZBY_5uOcN1Nx":{"uri":"/melonJS/docs/melonjs/Renderer.html#tint"},"APpmNyV2wYMkYWdPaZTVq":{"uri":"/melonJS/docs/melonjs/Renderer.html#toBlob"},"KfkbNxNY51lk-ixvJWUlA":{"uri":"/melonJS/docs/melonjs/Renderer.html#toDataURL"},"AO9g9EevFdYPGxQmevKPW":{"uri":"/melonJS/docs/melonjs/Renderer.html#toImageBitmap"},"3s5TLB5vdLKI9PpDRX2oR":{"uri":"/melonJS/docs/melonjs/ResponseObject.html"},"enyvUfiG3HrxXo_0mxjf2":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#a"},"-WIhbLZfmi0emP9czI0Lg":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#aInB"},"wDYJs3p3nRAdq-XD51NNF":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#b"},"6Alka7nz6utk42WErjMOJ":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#bInA"},"rj4f2ffWBc7ipRD9FgadK":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#indexShapeA"},"ldj7bbHTEziyKz8ukCS0f":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#indexShapeB"},"yF9iK6f5Y5ty7S4TfjtRt":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#overlap"},"2ELi9wJtssap7L7sqf-WJ":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#overlapN"},"1TiLoDf028HTtXw3MdMo9":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#overlapV"},"ydQSpsORFfpOukFupWdJe":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#clear"},"LUg26RX616FSf0WTfctb1":{"uri":"/melonJS/docs/melonjs/RoundRect.html"},"luauQVNTYvEvV5gJ8_qhu":{"uri":"/melonJS/docs/melonjs/RoundRect.html#bottom"},"9W3t84Ua0lSewy7ZDBQCy":{"uri":"/melonJS/docs/melonjs/RoundRect.html#centerX"},"ZlUjVbv-9N4nFV6ROXHK7":{"uri":"/melonJS/docs/melonjs/RoundRect.html#centerY"},"FHEeE4b2REN9a3IKpE1mC":{"uri":"/melonJS/docs/melonjs/RoundRect.html#height"},"23UVmI8ZAADm2dRe13tQg":{"uri":"/melonJS/docs/melonjs/RoundRect.html#left"},"0IAiXRYvy6QNSb4qmVzAp":{"uri":"/melonJS/docs/melonjs/RoundRect.html#points"},"mzdqf5NvoW3aEQ-IHFMjz":{"uri":"/melonJS/docs/melonjs/RoundRect.html#pos"},"rS0Pm2a29jacgE9jhwq0b":{"uri":"/melonJS/docs/melonjs/RoundRect.html#radius"},"wz90xI12Bcd1iJ3cxC3og":{"uri":"/melonJS/docs/melonjs/RoundRect.html#right"},"nY49cscYeLCAZ2gdKLy4W":{"uri":"/melonJS/docs/melonjs/RoundRect.html#top"},"nEvxzbuRfm9tyE2dzS9Y0":{"uri":"/melonJS/docs/melonjs/RoundRect.html#type"},"gXXD7RGb0Ciijab_NEg5i":{"uri":"/melonJS/docs/melonjs/RoundRect.html#width"},"wsNURVySwAqOxQ7J26LPZ":{"uri":"/melonJS/docs/melonjs/RoundRect.html#centerOn"},"96EY7Oq60gdCmrfpKO0Zo":{"uri":"/melonJS/docs/melonjs/RoundRect.html#clone"},"Bu801V4vdRp4DXS1XBJUx":{"uri":"/melonJS/docs/melonjs/RoundRect.html#constructor"},"EF3aro-CGaEVMUYoFeYjO":{"uri":"/melonJS/docs/melonjs/RoundRect.html#contains"},"Ehr1yKkhlvLQ2PP-0iJCj":{"uri":"/melonJS/docs/melonjs/RoundRect.html#copy"},"6tuGsTW3A1eOEyT91aJKv":{"uri":"/melonJS/docs/melonjs/RoundRect.html#equals"},"F8MBtbfLZjTicrnrd-1_f":{"uri":"/melonJS/docs/melonjs/RoundRect.html#getBounds"},"nU7Urjd5ge3aDmB52hLU_":{"uri":"/melonJS/docs/melonjs/RoundRect.html#getIndices"},"eAFowyz9lTW9jhgPmtuCL":{"uri":"/melonJS/docs/melonjs/RoundRect.html#isConvex"},"q88esf3uoQTjrC3DGe3sY":{"uri":"/melonJS/docs/melonjs/RoundRect.html#isFinite"},"IW--XtbsYvmy3UwLgwm8E":{"uri":"/melonJS/docs/melonjs/RoundRect.html#overlaps"},"lXTKBwTSmkftn-j4-CEzN":{"uri":"/melonJS/docs/melonjs/RoundRect.html#recalc"},"i4hypZLVEGgeGY1l4b_G5":{"uri":"/melonJS/docs/melonjs/RoundRect.html#resize"},"Ec6zd7S6PYpGQAkzX4-2V":{"uri":"/melonJS/docs/melonjs/RoundRect.html#rotate"},"fdWlWXWRFvhqicbPUqvyV":{"uri":"/melonJS/docs/melonjs/RoundRect.html#scale"},"6Er6Q93Czt9ex1oehuf21":{"uri":"/melonJS/docs/melonjs/RoundRect.html#scaleV"},"ehkRrMI6w4_MC9UWYiaqc":{"uri":"/melonJS/docs/melonjs/RoundRect.html#setShape"},"Kqv-OppyPO5RE1uT9grB1":{"uri":"/melonJS/docs/melonjs/RoundRect.html#setVertices"},"4asptnTRIq16e0cwBjt6h":{"uri":"/melonJS/docs/melonjs/RoundRect.html#shift"},"5mflrygOrEKNDvCUySI0m":{"uri":"/melonJS/docs/melonjs/RoundRect.html#to2d"},"xg6Fahd3_4gYGHZjp1ovk":{"uri":"/melonJS/docs/melonjs/RoundRect.html#toIso"},"g4kcsSG8UmhhDa_749NEX":{"uri":"/melonJS/docs/melonjs/RoundRect.html#toPolygon"},"Kf2lyoBz4RH-QJozAv2kT":{"uri":"/melonJS/docs/melonjs/RoundRect.html#transform"},"UtMTHE4qPuAN2pLoFgDAc":{"uri":"/melonJS/docs/melonjs/RoundRect.html#translate"},"wajtiUvKZuZLiEbxOTUGl":{"uri":"/melonJS/docs/melonjs/RoundRect.html#union"},"vmoXDnLFrTKlJoVBA8fJj":{"uri":"/melonJS/docs/melonjs/RoundRect.html#updateBounds"},"a0FnoRUtTmUfXKe4wRIsG":{"uri":"/melonJS/docs/melonjs/Sprite.html"},"Dia6ponQNRD54hcdR8BVo":{"uri":"/melonJS/docs/melonjs/Sprite.html#alpha"},"yBS7WJwWtzX50Z4fdDCrx":{"uri":"/melonJS/docs/melonjs/Sprite.html#alwaysUpdate"},"DbPQRLqdpQp-8ab9avKza":{"uri":"/melonJS/docs/melonjs/Sprite.html#ancestor"},"hvKqW1TSaIJpaHRIYmwpS":{"uri":"/melonJS/docs/melonjs/Sprite.html#anchorPoint"},"b_5Fbcg3gMw-qm8MGbBhW":{"uri":"/melonJS/docs/melonjs/Sprite.html#animationpause"},"00cidAbuYuyPwXVTQadWG":{"uri":"/melonJS/docs/melonjs/Sprite.html#animationspeed"},"fHXGo6ftCZIZw0biAiqvD":{"uri":"/melonJS/docs/melonjs/Sprite.html#autoTransform"},"jg5Bw_xi6xbXhlRC0w6IO":{"uri":"/melonJS/docs/melonjs/Sprite.html#blendMode"},"x7DWDB0K1AkGDzxIPlKRO":{"uri":"/melonJS/docs/melonjs/Sprite.html#body"},"n7ZbZd1QE_2U4isw5G0-w":{"uri":"/melonJS/docs/melonjs/Sprite.html#bottom"},"-DM_H-NK7kzFAYWyr1-lE":{"uri":"/melonJS/docs/melonjs/Sprite.html#centerX"},"WdvbYpn8PpbsU_39sbjCz":{"uri":"/melonJS/docs/melonjs/Sprite.html#centerY"},"ywndBCpNksSAr4D3DkbJ4":{"uri":"/melonJS/docs/melonjs/Sprite.html#currentTransform"},"t7HEssU7XnLZUqunF-MTH":{"uri":"/melonJS/docs/melonjs/Sprite.html#depth"},"ChfmdkRg7yECO9ktlyMml":{"uri":"/melonJS/docs/melonjs/Sprite.html#floating"},"WxerGCBouscqkwozLXaBB":{"uri":"/melonJS/docs/melonjs/Sprite.html#GUID"},"3kswPtqUlbFb85PJ0DtSO":{"uri":"/melonJS/docs/melonjs/Sprite.html#height"},"CH5jDPMEYDzzQ8QAEECQn":{"uri":"/melonJS/docs/melonjs/Sprite.html#inViewport"},"iI_1vKd-riiXqtkbuKfEC":{"uri":"/melonJS/docs/melonjs/Sprite.html#isDirty"},"Rf7PPW-uCkBN_c0zCxUeE":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFlippedX"},"4WRvht10qjAeLcdvH1r_K":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFlippedY"},"bXWJumCMgRXhR0KsxMoY-":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFloating"},"hrMDlh87QuXHs2tL1OwRZ":{"uri":"/melonJS/docs/melonjs/Sprite.html#isKinematic"},"P1imjVU9ffWK_SgsO-Bp1":{"uri":"/melonJS/docs/melonjs/Sprite.html#isPersistent"},"1kOaKTrZpufZLrF2tO8BU":{"uri":"/melonJS/docs/melonjs/Sprite.html#left"},"sgpqThuV8wpMRp2V8kJC_":{"uri":"/melonJS/docs/melonjs/Sprite.html#mask"},"KxvTwHnFV3H6fH6eWghVI":{"uri":"/melonJS/docs/melonjs/Sprite.html#name"},"S3vtTSZNblQqcK_g0XqmS":{"uri":"/melonJS/docs/melonjs/Sprite.html#offset"},"-dMe6T-OB9_CZmNrUECs1":{"uri":"/melonJS/docs/melonjs/Sprite.html#onVisibilityChange"},"5c-Q9D_XjJ_E5hwL0EKIK":{"uri":"/melonJS/docs/melonjs/Sprite.html#points"},"NUrT5BVjFxOs9k1ZTyVva":{"uri":"/melonJS/docs/melonjs/Sprite.html#pos"},"_j3dZfOidvTDUHwtkw9XV":{"uri":"/melonJS/docs/melonjs/Sprite.html#right"},"G1xJ2AcgxeYiqXtKEbGd1":{"uri":"/melonJS/docs/melonjs/Sprite.html#shader"},"Uy6Xkp4-T2DeJT9S8ocNH":{"uri":"/melonJS/docs/melonjs/Sprite.html#source"},"NsJrc_-OVPfpCvnsri8km":{"uri":"/melonJS/docs/melonjs/Sprite.html#tint"},"qcc_MwGOKsBHX04okRbbq":{"uri":"/melonJS/docs/melonjs/Sprite.html#top"},"8HVqkkF-xUdz0AMLg29Ig":{"uri":"/melonJS/docs/melonjs/Sprite.html#type"},"NKM8pkqFpOEE7sq-cwJ4G":{"uri":"/melonJS/docs/melonjs/Sprite.html#updateWhenPaused"},"vC7mT4BvQIcOtErV5hhbB":{"uri":"/melonJS/docs/melonjs/Sprite.html#width"},"8Vq7-_Ey9nUh55tctCAOj":{"uri":"/melonJS/docs/melonjs/Sprite.html#addAnimation"},"llcAoXgHER15bqhASQme6":{"uri":"/melonJS/docs/melonjs/Sprite.html#angleTo"},"TtZ6i7QbSrIB1xozUgBhB":{"uri":"/melonJS/docs/melonjs/Sprite.html#centerOn"},"8pOakhiEP7i8Mo65I-E1j":{"uri":"/melonJS/docs/melonjs/Sprite.html#clone"},"Mf4LA2Yr5we-B-SSMqKOp":{"uri":"/melonJS/docs/melonjs/Sprite.html#constructor"},"YLo5lZCGxbP-BIdQfrJqd":{"uri":"/melonJS/docs/melonjs/Sprite.html#contains"},"dV5ilWB0xudS2qD_0YgP4":{"uri":"/melonJS/docs/melonjs/Sprite.html#copy"},"wtDsx_F6IuC0n940XNUUt":{"uri":"/melonJS/docs/melonjs/Sprite.html#distanceTo"},"dZDeQMbmm-9hCTvxIZuQ-":{"uri":"/melonJS/docs/melonjs/Sprite.html#equals"},"k3PNC9XoahSYkOt67sddY":{"uri":"/melonJS/docs/melonjs/Sprite.html#flicker"},"iStegz_ykzFG6eRtb7-K2":{"uri":"/melonJS/docs/melonjs/Sprite.html#flipX"},"3OXMAdX9ZKunXUZ3QalEp":{"uri":"/melonJS/docs/melonjs/Sprite.html#flipY"},"JNyrnie3sVx7xS7GWBT7N":{"uri":"/melonJS/docs/melonjs/Sprite.html#getAbsolutePosition"},"nh6ast6G1K_pw2-8csYG9":{"uri":"/melonJS/docs/melonjs/Sprite.html#getBounds"},"Wc3WK9c0z-kIfUWfCLeI_":{"uri":"/melonJS/docs/melonjs/Sprite.html#getCurrentAnimationFrame"},"nJ4FBBvuYxKtJVJNenyz4":{"uri":"/melonJS/docs/melonjs/Sprite.html#getIndices"},"27f1tsi52eOuLo5Qhd7_L":{"uri":"/melonJS/docs/melonjs/Sprite.html#getOpacity"},"lnQbHHOJcmbeFKquI1XKj":{"uri":"/melonJS/docs/melonjs/Sprite.html#isConvex"},"joRYlgejiQxJ3ed-DFtca":{"uri":"/melonJS/docs/melonjs/Sprite.html#isCurrentAnimation"},"x3B0-aGlls37rj1U_b-jQ":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFinite"},"IvNL3S7Q412QAx51JRcSf":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFlickering"},"RFVVnio_OMGKS3ZFsSjYr":{"uri":"/melonJS/docs/melonjs/Sprite.html#lookAt"},"21NOxF77_gNyo7twv46gL":{"uri":"/melonJS/docs/melonjs/Sprite.html#onCollision"},"62RGyGYA3YfG51cnsJe4I":{"uri":"/melonJS/docs/melonjs/Sprite.html#onDestroyEvent"},"aqDoIq0AB0Ud8IYv0zpFI":{"uri":"/melonJS/docs/melonjs/Sprite.html#overlaps"},"rLfylHrA81IH8KeZebZHB":{"uri":"/melonJS/docs/melonjs/Sprite.html#postDraw"},"Rb6a0X_NSUzvJ9vEWBUjS":{"uri":"/melonJS/docs/melonjs/Sprite.html#preDraw"},"hVllZy0tEHa3hXJ2o979f":{"uri":"/melonJS/docs/melonjs/Sprite.html#recalc"},"E4DrEXuvbZ3SCslJ7ATQ3":{"uri":"/melonJS/docs/melonjs/Sprite.html#resize"},"ADJ5mHa1vtHodx517t43S":{"uri":"/melonJS/docs/melonjs/Sprite.html#reverseAnimation"},"aeroffnokJfjiopXK-2dy":{"uri":"/melonJS/docs/melonjs/Sprite.html#rotate"},"hJ9BNTJXSgGRmjX0gzGdC":{"uri":"/melonJS/docs/melonjs/Sprite.html#scale"},"vgeYoqvaOV10nusqiZtk2":{"uri":"/melonJS/docs/melonjs/Sprite.html#scaleV"},"-W7yKwluwfM3_Mp3xRsKZ":{"uri":"/melonJS/docs/melonjs/Sprite.html#setAnimationFrame"},"ZWQB-pgpUCfjP0FjqPv7F":{"uri":"/melonJS/docs/melonjs/Sprite.html#setCurrentAnimation"},"gUPV6lLwNGYbqdvI7EBpm":{"uri":"/melonJS/docs/melonjs/Sprite.html#setOpacity"},"Z6zTokLHICfFHJeQdhDso":{"uri":"/melonJS/docs/melonjs/Sprite.html#setRegion"},"_BysXqw9kATD2ih49uqwj":{"uri":"/melonJS/docs/melonjs/Sprite.html#setShape"},"vyvQlB7PKW-IYDspFF6b4":{"uri":"/melonJS/docs/melonjs/Sprite.html#setVertices"},"6wA-eEfielD76zF6X1fuP":{"uri":"/melonJS/docs/melonjs/Sprite.html#shift"},"Ad7S3EHsH0KfjpoO2-0YO":{"uri":"/melonJS/docs/melonjs/Sprite.html#to2d"},"ISIdyhGir6060tn1L-u9i":{"uri":"/melonJS/docs/melonjs/Sprite.html#toIso"},"UroE6fTofG98k4BDGxqG5":{"uri":"/melonJS/docs/melonjs/Sprite.html#toPolygon"},"xp5Qee7WUr_xvEj9fM1b1":{"uri":"/melonJS/docs/melonjs/Sprite.html#transform"},"A9aXnWLO1BlrLrNp1h-5z":{"uri":"/melonJS/docs/melonjs/Sprite.html#translate"},"ZC8skmt8UYZz3cypzd1YH":{"uri":"/melonJS/docs/melonjs/Sprite.html#union"},"DMmXm0zOZPLMe1U9atiqM":{"uri":"/melonJS/docs/melonjs/Sprite.html#updateBounds"},"tTpA28yHiORMoQ0cnCJaC":{"uri":"/melonJS/docs/melonjs/Sprite.html#draw"},"5pG80itSKG_jIEzlF8hHp":{"uri":"/melonJS/docs/melonjs/Sprite.html#update"},"ZAE5owQspewdC2SQrBmTQ":{"uri":"/melonJS/docs/melonjs/Sprite.html#onAnchorUpdate"},"O81Gukpaqq8ublcxGFEPJ":{"uri":"/melonJS/docs/melonjs/Stage.html"},"6yDR4vt8-0BzYqfN19BX5":{"uri":"/melonJS/docs/melonjs/Stage.html#ambientLight"},"0vNTPjcnuiE10lZkZThvc":{"uri":"/melonJS/docs/melonjs/Stage.html#cameras"},"E9kOWOUxzTwBOwnNgeYwR":{"uri":"/melonJS/docs/melonjs/Stage.html#lights"},"Tyk5BKhY4iCz7pGB9vrbW":{"uri":"/melonJS/docs/melonjs/Stage.html#settings"},"U8CcleFP3564mVCaXEukC":{"uri":"/melonJS/docs/melonjs/Stage.html#constructor"},"FQz9dnshA_TTT1Xr1omD0":{"uri":"/melonJS/docs/melonjs/Stage.html#onDestroyEvent"},"uhnN0rP9BvKkG5x8QBkxh":{"uri":"/melonJS/docs/melonjs/Stage.html#onResetEvent"},"HjWlTbnzZoc7-agS8Fj-c":{"uri":"/melonJS/docs/melonjs/Text.html"},"3NhiflI0VnKiPyk-0RaPX":{"uri":"/melonJS/docs/melonjs/Text.html#alpha"},"FIbG1EW8s6umKbRVxJFJh":{"uri":"/melonJS/docs/melonjs/Text.html#alwaysUpdate"},"1HyIJuzo09hnhzH1s80K5":{"uri":"/melonJS/docs/melonjs/Text.html#ancestor"},"EUZDrLShcvdNI47ZQtvzz":{"uri":"/melonJS/docs/melonjs/Text.html#anchorPoint"},"rLGfAAq7GG-696FnynCss":{"uri":"/melonJS/docs/melonjs/Text.html#autoTransform"},"Tm8ULWNCFhE8nNXrfHH1Y":{"uri":"/melonJS/docs/melonjs/Text.html#blendMode"},"8sE83Gh5jcx541k1n13qB":{"uri":"/melonJS/docs/melonjs/Text.html#body"},"NgVPx4UDW08Qcfd16NwpU":{"uri":"/melonJS/docs/melonjs/Text.html#bottom"},"Mgt-oLQ4Ls2fZuV9TE1P6":{"uri":"/melonJS/docs/melonjs/Text.html#centerX"},"8T8vDXse3q1rvYYGS4SDA":{"uri":"/melonJS/docs/melonjs/Text.html#centerY"},"p4eQqvz-Sb9DovnbwcHES":{"uri":"/melonJS/docs/melonjs/Text.html#currentTransform"},"uPDhu2HHwbg60ceg9PnZt":{"uri":"/melonJS/docs/melonjs/Text.html#depth"},"2X5LKsj_MAzvRHaahTS6h":{"uri":"/melonJS/docs/melonjs/Text.html#fillStyle"},"MHwiK7Y4rKZaFQQ5mcfZN":{"uri":"/melonJS/docs/melonjs/Text.html#floating"},"iFHPXNMq1nKwG0t0BiUqX":{"uri":"/melonJS/docs/melonjs/Text.html#fontSize"},"VVmVNkwuklgC0BmHmVVPq":{"uri":"/melonJS/docs/melonjs/Text.html#GUID"},"9h_mMp8TGfAYOlX9Q1kzv":{"uri":"/melonJS/docs/melonjs/Text.html#height"},"zNO559XW78506MV471EUq":{"uri":"/melonJS/docs/melonjs/Text.html#inViewport"},"SoRDJ6qaGUDuAsWv-XXwx":{"uri":"/melonJS/docs/melonjs/Text.html#isDirty"},"ALn3BHeII0TEWCPBd9Cai":{"uri":"/melonJS/docs/melonjs/Text.html#isFlippedX"},"KotEYt0_q7YhyjScL7Zta":{"uri":"/melonJS/docs/melonjs/Text.html#isFlippedY"},"N8EjJd_HwH9ypf1-HjWkq":{"uri":"/melonJS/docs/melonjs/Text.html#isFloating"},"WqIUiJfa5fvM6rceMqZ16":{"uri":"/melonJS/docs/melonjs/Text.html#isKinematic"},"iokm1I8i_VDrOprlklDHb":{"uri":"/melonJS/docs/melonjs/Text.html#isPersistent"},"36nbnff4LwEuGCu_86bTI":{"uri":"/melonJS/docs/melonjs/Text.html#left"},"Fe8VZb34cT7a6-_t2rcNV":{"uri":"/melonJS/docs/melonjs/Text.html#lineHeight"},"kTsvRpEiJgsn07gmMteWR":{"uri":"/melonJS/docs/melonjs/Text.html#lineWidth"},"5eYsDg8LgjyMnH-lu12lj":{"uri":"/melonJS/docs/melonjs/Text.html#mask"},"nVlPp5tZww7cQNtrbULk-":{"uri":"/melonJS/docs/melonjs/Text.html#name"},"r08mU3UIbvoOLXUo2wUJ9":{"uri":"/melonJS/docs/melonjs/Text.html#onVisibilityChange"},"IzG1nHSlSi4u6s4Bx2xL_":{"uri":"/melonJS/docs/melonjs/Text.html#points"},"6TRzkDbJOFXls2T6RaSYD":{"uri":"/melonJS/docs/melonjs/Text.html#pos"},"6UCIZSotRO4K9F8L96Qsz":{"uri":"/melonJS/docs/melonjs/Text.html#right"},"WtaVplP6X6xdcFoAtDN1_":{"uri":"/melonJS/docs/melonjs/Text.html#shader"},"QyuVmYZdYFJBsWv0xFzAa":{"uri":"/melonJS/docs/melonjs/Text.html#strokeStyle"},"JzpVRLqZ0GKMwWxsPU6ys":{"uri":"/melonJS/docs/melonjs/Text.html#textAlign"},"-he16sIbnKJXdlysx1pkt":{"uri":"/melonJS/docs/melonjs/Text.html#textBaseline"},"RHNU_6LCViyY6yfwvcnwC":{"uri":"/melonJS/docs/melonjs/Text.html#tint"},"PX6SylpRXL2MO-B2EUCET":{"uri":"/melonJS/docs/melonjs/Text.html#top"},"VkFSmGzhyHeJcxLwUhLm5":{"uri":"/melonJS/docs/melonjs/Text.html#type"},"Z0vkTJE07cXT9GYFu7JnS":{"uri":"/melonJS/docs/melonjs/Text.html#updateWhenPaused"},"7T4nSWOMtea74sush60MF":{"uri":"/melonJS/docs/melonjs/Text.html#width"},"rin6_tN4y4OWcXKIaJtgr":{"uri":"/melonJS/docs/melonjs/Text.html#wordWrapWidth"},"aYSooxQYeoLO2_HyXPYIh":{"uri":"/melonJS/docs/melonjs/Text.html#_text"},"kVUZAm-VHoVBfi8v55Pzr":{"uri":"/melonJS/docs/melonjs/Text.html#angleTo"},"E-3jaZm7nvPXVBTlHO8cl":{"uri":"/melonJS/docs/melonjs/Text.html#bold"},"R4ytiNr7PTArSJfYzJ2gI":{"uri":"/melonJS/docs/melonjs/Text.html#centerOn"},"xlcL7TnfC9knnt1da5zfZ":{"uri":"/melonJS/docs/melonjs/Text.html#clone"},"Z9aIowBZv7UbNhDKQyu3q":{"uri":"/melonJS/docs/melonjs/Text.html#constructor"},"iXiss0JNPYrK_VNaHCQRD":{"uri":"/melonJS/docs/melonjs/Text.html#contains"},"9m7dqts3xb6zN-63uK95P":{"uri":"/melonJS/docs/melonjs/Text.html#copy"},"udNw79HpVx7o4mzDO7jhD":{"uri":"/melonJS/docs/melonjs/Text.html#distanceTo"},"-W5fgQRG3__GKg2rPPsfs":{"uri":"/melonJS/docs/melonjs/Text.html#draw"},"cm8Ob9XOJWV1K5h0XMmb5":{"uri":"/melonJS/docs/melonjs/Text.html#drawStroke"},"4jbjyRKBARfOwpU3ckLOL":{"uri":"/melonJS/docs/melonjs/Text.html#equals"},"fEIdpO7lQjbq16V-ecuq0":{"uri":"/melonJS/docs/melonjs/Text.html#flipX"},"sgg6yM-ejv-Ndltr8OL7G":{"uri":"/melonJS/docs/melonjs/Text.html#flipY"},"kPREe8Gl3Xc2QP6j-Pb58":{"uri":"/melonJS/docs/melonjs/Text.html#getAbsolutePosition"},"j4KBe6GkCKRmxW-qwSzog":{"uri":"/melonJS/docs/melonjs/Text.html#getBounds"},"O4rkycbNV530vf-ztmsP7":{"uri":"/melonJS/docs/melonjs/Text.html#getIndices"},"PGiQQrEy7cqTsU0NLs8Pn":{"uri":"/melonJS/docs/melonjs/Text.html#getOpacity"},"TGcZ6uQhxcLLBr3xYNfpj":{"uri":"/melonJS/docs/melonjs/Text.html#isConvex"},"p59Wf1NR_M991lY2K9ofk":{"uri":"/melonJS/docs/melonjs/Text.html#isFinite"},"nEbstBXia79PaNFMtwMVB":{"uri":"/melonJS/docs/melonjs/Text.html#italic"},"jtzTzuNmk8uXSDgrugY8C":{"uri":"/melonJS/docs/melonjs/Text.html#lookAt"},"eZ7Aoo5fDxCx_RXmlNjoh":{"uri":"/melonJS/docs/melonjs/Text.html#measureText"},"1Ipf7SJvyvSVEr3no2rhZ":{"uri":"/melonJS/docs/melonjs/Text.html#onCollision"},"90nv7WieuCOiV7M9l3Svt":{"uri":"/melonJS/docs/melonjs/Text.html#onDestroyEvent"},"DvqvjQW1BEUbZsmIVFPfR":{"uri":"/melonJS/docs/melonjs/Text.html#overlaps"},"pMDQnwtIYDt_zXVrVNQGS":{"uri":"/melonJS/docs/melonjs/Text.html#postDraw"},"nqKKuOvyKPSZsSIc_re0A":{"uri":"/melonJS/docs/melonjs/Text.html#preDraw"},"s7STSIjVjR5B0plQ7ELJQ":{"uri":"/melonJS/docs/melonjs/Text.html#recalc"},"Xs1sd7Z_BkYsV1YDutfMr":{"uri":"/melonJS/docs/melonjs/Text.html#resize"},"vtiFB8e6CAWhYvESOuY4J":{"uri":"/melonJS/docs/melonjs/Text.html#rotate"},"vfAOZysOGs3iLap18h3bM":{"uri":"/melonJS/docs/melonjs/Text.html#scale"},"d9q3m0Xm4Ot50s9bJAhy3":{"uri":"/melonJS/docs/melonjs/Text.html#scaleV"},"O2019RXFhFQeiHb4BRXfU":{"uri":"/melonJS/docs/melonjs/Text.html#setFont"},"QjS7V8-sx5LMD7qG2hivr":{"uri":"/melonJS/docs/melonjs/Text.html#setOpacity"},"_Z7vF3WVvqIutlxl_l52Q":{"uri":"/melonJS/docs/melonjs/Text.html#setShape"},"gXfQhTAZW46XbQEcP--dq":{"uri":"/melonJS/docs/melonjs/Text.html#setText"},"-7enlTMKbxIjGoC3fAilo":{"uri":"/melonJS/docs/melonjs/Text.html#setVertices"},"dwXJLiPQ5sFjnK072LMc8":{"uri":"/melonJS/docs/melonjs/Text.html#shift"},"chVstZsj0eP2A95Lm8k1h":{"uri":"/melonJS/docs/melonjs/Text.html#to2d"},"8hmsjGQtgndLic3qJhH8F":{"uri":"/melonJS/docs/melonjs/Text.html#toIso"},"PsjrdpiP4U9-rP6u4f8DZ":{"uri":"/melonJS/docs/melonjs/Text.html#toPolygon"},"4v58RTH9Z3gUVfCjYdJcO":{"uri":"/melonJS/docs/melonjs/Text.html#transform"},"VpvnHB6rdsljyH0oHAsjW":{"uri":"/melonJS/docs/melonjs/Text.html#translate"},"Ty0hyKx6qirOtCx-DRcb2":{"uri":"/melonJS/docs/melonjs/Text.html#union"},"tblygpS8QN5S49IMWayi9":{"uri":"/melonJS/docs/melonjs/Text.html#update"},"2nYDI4vrMg6HvPi4nWkQE":{"uri":"/melonJS/docs/melonjs/Text.html#updateBounds"},"zDDV2chZ4msQduu1VpT6P":{"uri":"/melonJS/docs/melonjs/Text.html#onAnchorUpdate"},"iIWe_kGkApoHu7ogNE5oi":{"uri":"/melonJS/docs/melonjs/TextMetrics.html"},"qlHuOuW2uoLFGldaOFfIp":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#ancestor"},"sCDQNU7Z8_Xi2OgwGS5BE":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#bottom"},"MK5G8G0b5LDcNlBT2m1LQ":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#center"},"XQe3oo_aajNw8vlXnDiUh":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#centerX"},"3nH6gc35BF_tJQ2DuUFnX":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#centerY"},"gpi-W1e8BzY3FT5Ks-etb":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#height"},"5tBOvuyIJHkEirAH-DTnB":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#left"},"xWG6V9SUrQxsUVrzGRpN2":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#right"},"BYz3izve4S0MnssmU-MRS":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#top"},"TpeWr5Osp3tV5HsDYfq5A":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#type"},"cwXAnw1jtsLv05N06xa9q":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#width"},"MCtJ0S1ON3nuJUytDL8ju":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#x"},"X7w6o-ygYGeDfmuVWrNrZ":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#y"},"uFgmIqMi613AAY3m80UCz":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#add"},"u6vRwYPi9CU8OK1NfSJLq":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#addBounds"},"dK7X8-_o25LeZGVXCz7gl":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#addFrame"},"By979uXYpwqDi_udRNOxw":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#addPoint"},"EI23XkXUpqeA4Iqeb4H-3":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#centerOn"},"nCkIxTGpBhfN8he9UHKU0":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#clear"},"OYzfLkzusbHr4KQC27PsG":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#clone"},"O8Hz-5_ASUp5M-awWiv3_":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#constructor"},"DedvBgF7q2fRCF5ktmZt6":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#contains"},"Ogo2XleFWHteioUUFscEh":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#isFinite"},"RTYKpnuXH-PmtuC_QpXYr":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#lineHeight"},"CaW_YQaSFt2Lu9bbK6rAK":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#lineWidth"},"36-5nJ215r8zH3mJ-mt9g":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#measureText"},"KfGuqjdhN37u1y1vzDjmk":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#overlaps"},"cbuIKvziXdTRRlvPTZVNf":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#setMinMax"},"_m_2xPSG-cJfEdVe15goC":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#shift"},"ZUiOPbfezjYuQMN4zvrFw":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#toPolygon"},"7vgK3BWYioOeDuHK4oY6z":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#translate"},"FaGpuy3ew4VoPttnMAGet":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#update"},"Sr40cN8FQ6GM8nsvuNvJe":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#wordWrap"},"vtdl3e9oOyLq6PCQas8pA":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html"},"ciHrTcM6FlkS9ATTgICPc":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#addRegion"},"6Zb-gtOEA99mGpOPmPbaL":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#addUVs"},"0B_SzVj-f0HFUpIh20JD9":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#constructor"},"sIt6nAKV441OZGKfHyim4":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#createAnimationFromName"},"QiYOO2fZIFIoMqG4XAHv_":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#createSpriteFromName"},"cgH9aG9Baij016nCVeZC5":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getAtlas"},"Z6_Bf60fSSvLegCbeD28b":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getFormat"},"FMKfKKuLPZkfnMTIJlnJZ":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getRegion"},"Ydj-bWiGr3FKmpJ_2SjKT":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getTexture"},"eihzW9qzkLtnQ0uMgl_A7":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getUVs"},"s9NzPBsOSpZMmxjv0n8Vj":{"uri":"/melonJS/docs/melonjs/Tile.html"},"qOqFBn1RzV2NnU3QwmYxT":{"uri":"/melonJS/docs/melonjs/Tile.html#bottom"},"Smq6wfJ-80Ys2D6APt8sE":{"uri":"/melonJS/docs/melonjs/Tile.html#center"},"DNJlnAd6u4Z5s-ZbTEPce":{"uri":"/melonJS/docs/melonjs/Tile.html#centerX"},"S1egeTtJgJ_Xcy8OndJED":{"uri":"/melonJS/docs/melonjs/Tile.html#centerY"},"c5L5s3eCWzyIR-8iWdCdp":{"uri":"/melonJS/docs/melonjs/Tile.html#flipped"},"z4KlTHJH7EF-0-NNkCgnW":{"uri":"/melonJS/docs/melonjs/Tile.html#flippedAD"},"MRPbWZFyXrx8LesKEqohk":{"uri":"/melonJS/docs/melonjs/Tile.html#flippedX"},"rpO1Wi54bKRiU9FmoHhMd":{"uri":"/melonJS/docs/melonjs/Tile.html#flippedY"},"hAubOqCBGLTGdmxsvg_fq":{"uri":"/melonJS/docs/melonjs/Tile.html#height"},"FXY3WH-KlEY-tlzsdEtqH":{"uri":"/melonJS/docs/melonjs/Tile.html#left"},"QnwVTpy6G0l2vrIOQ0D1e":{"uri":"/melonJS/docs/melonjs/Tile.html#right"},"V6dzmZBu1ZvHNudZcGJER":{"uri":"/melonJS/docs/melonjs/Tile.html#tileId"},"h3D7MNqyGsBWp7Ambz7is":{"uri":"/melonJS/docs/melonjs/Tile.html#tileset"},"NanhyurhnwDu5HfuM9ZKp":{"uri":"/melonJS/docs/melonjs/Tile.html#top"},"0uU-hW8wuUJDxiPaRzkQn":{"uri":"/melonJS/docs/melonjs/Tile.html#type"},"hxJSfXera9XwIkog1yICL":{"uri":"/melonJS/docs/melonjs/Tile.html#width"},"dv_3fnfS1tURBgTLpGV2V":{"uri":"/melonJS/docs/melonjs/Tile.html#x"},"-9oz1bp4BOndTr-x0bWTh":{"uri":"/melonJS/docs/melonjs/Tile.html#y"},"cisFZaCl4xdI4-zBzA5Wm":{"uri":"/melonJS/docs/melonjs/Tile.html#add"},"3VwZTMSdlS0KZWRLyUH3l":{"uri":"/melonJS/docs/melonjs/Tile.html#addBounds"},"y6MMkG69fxdgDpt2sDD5A":{"uri":"/melonJS/docs/melonjs/Tile.html#addFrame"},"2Ga9MTvCmon_Z1anSFtw6":{"uri":"/melonJS/docs/melonjs/Tile.html#addPoint"},"W5YFzjhAOhSsnKFwgnXQH":{"uri":"/melonJS/docs/melonjs/Tile.html#centerOn"},"bUQLBMrZZki-mr9HwgykQ":{"uri":"/melonJS/docs/melonjs/Tile.html#clear"},"h5xdHq7f49BNvDbcued62":{"uri":"/melonJS/docs/melonjs/Tile.html#clone"},"-6DIszmrLflXo5rqgcxJs":{"uri":"/melonJS/docs/melonjs/Tile.html#constructor"},"hQhFCzp50TUcqXJCS1Xx2":{"uri":"/melonJS/docs/melonjs/Tile.html#contains"},"NBjxrr8-4Okd-pHZHqIsF":{"uri":"/melonJS/docs/melonjs/Tile.html#getRenderable"},"s_YBZQ1l9oUYxEjW7jjyz":{"uri":"/melonJS/docs/melonjs/Tile.html#isFinite"},"nFN_xiGWh9r77X8bSheyR":{"uri":"/melonJS/docs/melonjs/Tile.html#overlaps"},"Ux8CBA0W7KN2ABJ7I6ZFZ":{"uri":"/melonJS/docs/melonjs/Tile.html#setMinMax"},"USZ79ICCIn0OS1cvf8DQg":{"uri":"/melonJS/docs/melonjs/Tile.html#shift"},"LcScobFGJoBK6jiNoYgU8":{"uri":"/melonJS/docs/melonjs/Tile.html#toPolygon"},"QlhSvvKvsHx2dRcrmT870":{"uri":"/melonJS/docs/melonjs/Tile.html#translate"},"vjLjMAdIPHDn8dfe32KYl":{"uri":"/melonJS/docs/melonjs/Tile.html#update"},"anKyXWK4v7fwG6eVPO6IT":{"uri":"/melonJS/docs/melonjs/Timer_.html"},"G26WdPp4aey0lRasNPOA1":{"uri":"/melonJS/docs/melonjs/Timer_.html#fps"},"hQ-uB0P3a6aPAX2uCCPY4":{"uri":"/melonJS/docs/melonjs/Timer_.html#interpolation"},"uYxJl8G1r_wF7hFUgMasI":{"uri":"/melonJS/docs/melonjs/Timer_.html#maxfps"},"n5IZlRE4VzGede9sSDzG5":{"uri":"/melonJS/docs/melonjs/Timer_.html#tick"},"2lcOP1TwNEuyDNqjOVC3h":{"uri":"/melonJS/docs/melonjs/Timer_.html#clearInterval"},"8kbCm4qkrVYwBQaRdK6om":{"uri":"/melonJS/docs/melonjs/Timer_.html#clearTimeout"},"ut0KZ3ahT6XVdcIQCM-tI":{"uri":"/melonJS/docs/melonjs/Timer_.html#getDelta"},"gZDVw2QCXLcov7TtJ8e_l":{"uri":"/melonJS/docs/melonjs/Timer_.html#getTime"},"3xSRtJyy0GWOPyHneBTCS":{"uri":"/melonJS/docs/melonjs/Timer_.html#setInterval"},"Wm-fUSr1SBspYE97k2qA8":{"uri":"/melonJS/docs/melonjs/Timer_.html#setTimeout"},"URz71hb07gjMCebBr_2zM":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html"},"8ZcI2ZsLvCTFPuVIWf6CP":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#canRender"},"TBHNwG8BM1SRsVo3gkGKC":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#constructor"},"HeXa5EstmgFhgmkxJZhOd":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#drawTile"},"8Gxq8WtZ1cBepJeA0jzGM":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#drawTileLayer"},"NYxaOhe8YEmtZV-p_o0Pu":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#getBounds"},"YQuUdtjZmNUfcQCju_dmy":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#pixelToTileCoords"},"Eth9bSjhDbQobiIEsFz7m":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#tileToPixelCoords"},"du8pgZSnwGhECRu0OGawr":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html"},"FXlnQZNhQe02mMM1iGJtL":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#canRender"},"5kaXSwtCg-4LRZCF6MHyE":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#constructor"},"DAud5KcpCVZdp0r5X9LJh":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#drawTile"},"9V1jI7yzcw0ybryyYvriQ":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#drawTileLayer"},"v0pXFbcf_cUZdbBb5sAB0":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#getBounds"},"LBJhSNRaT36-_6INiAJIE":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#pixelToTileCoords"},"oT-fclStvbx1O0OFPviAo":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#tileToPixelCoords"},"V4iOxMdSvPYjWYsKHlh1x":{"uri":"/melonJS/docs/melonjs/TMXLayer.html"},"1aKnwGiDP7vXq8mg8mrfP":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#alpha"},"MGujPe2ddhR2SclHqZKmU":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#alwaysUpdate"},"UBP4JYNfTdS9_io2wzWD5":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#ancestor"},"cvD2LVr6yAzsl_5WJZPs2":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#anchorPoint"},"moMA2tBEoFEOIP3Wpv5qt":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#animatedTilesets"},"_F9kf-BKrYlLl-rxvltAC":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#autoTransform"},"rVG9P2gfpWwevHUQ6elWY":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#blendMode"},"k0Vd4QqKvpbZyoxY0orXo":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#body"},"h_lbUY1-VtSm3kQRe_HFM":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#bottom"},"kSZoJBQgZZXKE97nMUfhA":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#centerX"},"Nss7OOlOZHf39dfCSVHM3":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#centerY"},"6WFneftFb86DGx86G2-xZ":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#class"},"a3eaB-0alZyzRu-3rmmam":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#currentTransform"},"S-lK5u7YFgKS8sluALfVo":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#depth"},"b0JbkCEMczMIwCwKBYKet":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#floating"},"e9ho0f7yU5YnwZlaTYWvi":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#GUID"},"WdJP7voykuQKOepUnD5cB":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#height"},"3yp1AEBMhrdMnjQo8FyZt":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#inViewport"},"TeTXhiz61NKahZcsawyJ8":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isAnimated"},"IUqVSopJrhTVL5uH2x25S":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isDirty"},"LNZIIPO7yPWmIg2I-uLdC":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isFlippedX"},"CVy1XhZ0CayfJN2HoECyJ":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isFlippedY"},"SGDdtFuEizZHsWlOQFGpW":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isFloating"},"YqwZJ-JLZykhI7siL2cBo":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isKinematic"},"quQbSXudFvyqmu_zegri6":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isPersistent"},"XQC0JtrIwZebkdhw_iYmE":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#left"},"-WsJW4LXnf1AA3j0XBnbh":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#mask"},"isuu-55RDztiBi5Wf1WHF":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#name"},"unGImjExazBa0Ow_dF0TQ":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#onVisibilityChange"},"JDi75W6LGPiR2aKrXL8GB":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#points"},"E7w0iFV_iFJ4RgTndI4z2":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#pos"},"3Uy-ABqC_sti25vPHgiFo":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#renderorder"},"KdP6CSkWhl2EflLTSbFT5":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#right"},"mtNVKUZCdD0Y4q2x45mKP":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#shader"},"qpRBOscjCjgM0pcEs92_p":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#tilesets"},"s6XF4T2QrgtZdHFXII9AR":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#tint"},"PwQOmoibbHL0iHeQy7B3l":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#top"},"mbFfsVfbGBFbk0GgMPHZI":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#type"},"mFGRmnO4qMBlNOsFmxsgd":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#updateWhenPaused"},"EMpznrieh7avkmTRuS1J8":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#width"},"WbzGu9DpsMp-W5d61rP0H":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#x"},"XLHxg3VZoQTmqN9TaCRzU":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#y"},"pv3Cu8EYMEdgVi2l5RD26":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#angleTo"},"_3-u7Qr1dTtmsaB4JBXey":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#cellAt"},"W83_wcbGRxZT4AazDJ3j7":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#centerOn"},"FUzA9Bp6IYeHaHS12Quq2":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#clearTile"},"FzhJwJBusRaNHyp22xUFz":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#clone"},"_1dfaslHdpmbp2SaYntKe":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#constructor"},"RrwrOSzSKfiWW7wEnRYpi":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#contains"},"dcjfaWEyySeBLPwVaaA0O":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#copy"},"Ej4H4BQaly8ZvnTRM0ux_":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#distanceTo"},"vEIqEP6wVk5K4E6_cSSYu":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#draw"},"4sMDFO1775TD_70R3kx5R":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#equals"},"naiQeuCkU5Uh6GCS6KG1G":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#flipX"},"Cvpmg21WecREhFRDEKI8p":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#flipY"},"Jjzfw8YusTWwJXipa8p15":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getAbsolutePosition"},"UAPzur3fDzFb8mJ2oys5t":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getBounds"},"z6PREP-Wk3zmF3WIMWc33":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getIndices"},"64tCt0sAAYMyxn7W4ED71":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getOpacity"},"VYf-saLDWOWxjNgzSvtzT":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getRenderer"},"8HKzKEOqliMtAixYmPBP1":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getTile"},"YfcZaOv2UWaZ9IKh1OOOx":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getTileById"},"DF6-uMK0lPZEwhU5mB6fz":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getTileId"},"-xAOlBR_aTg8iP6PZipc6":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isConvex"},"JU2nSDB0yPyMGp4Uk6AeR":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isFinite"},"gbTsnw3epXx_bYBIY9yGB":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#lookAt"},"Qi-HANfvSl1hLNlpJgfpM":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#onCollision"},"lILkDAnbtKgedNEDH59AB":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#onDestroyEvent"},"wahOD2hxDOlTc_gQYBf06":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#overlaps"},"QAiuiW1IFYwpeKWgKwisv":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#postDraw"},"2I9tCNRh1Si5_GJWii30h":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#preDraw"},"9-QreaE-nIavQ1T3VY1bm":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#recalc"},"-giNvH-ikDhnbVL5WZG3g":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#resize"},"B40hqE7W_DKeAOkNny_w1":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#rotate"},"qsUlriYTDBpz298eCwX4F":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#scale"},"8_1jeoyNPCp8DLnRDNfFM":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#scaleV"},"LJKwFExrTBXYeogAfsrXN":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setOpacity"},"GXh6MF2n5HxEx18fzqb6L":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setRenderer"},"eiHNuan3IckP-orGqafRV":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setShape"},"ZH8MqltASZ4Y6o7qP3v4f":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setTile"},"x0D4B8HJrvyG6zvTmqdcf":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setVertices"},"BVyPQIM_ym-o89KUu_Uq4":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#shift"},"pNU4ByMCHelcm2Mx1cmQL":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#to2d"},"QuhlizYbyEOrvJEkWsGWg":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#toIso"},"L8x--xy7bv6sBZFUSTnHS":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#toPolygon"},"1jA8AQmHlDV-kKJ20MNB7":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#transform"},"A4SVn4Py3Ym35DqfgCgW9":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#translate"},"ayOFIFVH_4t-fTpmHdEaO":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#union"},"LIsoI1Bx0rlRKhrRzIRqK":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#update"},"R5JjrMD-EUAmdn8ePsqZj":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#updateBounds"},"AyYCOWEZPuPGKCbf4X0M-":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#onAnchorUpdate"},"8oo6QnBvE0ykA4m-zpqRA":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html"},"ZPO370tKKox-wZlO7lZFP":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#canRender"},"K5xvqgWpC90bYnNblSskT":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#constructor"},"QTZTmGySHFQBOeQgwvuxu":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#drawTile"},"QYGUa2GTyZ1x6wXa-Dqge":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#drawTileLayer"},"tLUunpkRY7c4cxwrnz1pG":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#getBounds"},"Q_S0E2LqUV2anRvcvWfVo":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#pixelToTileCoords"},"tv9vJ8N1l1MLNaiWc8zyo":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#tileToPixelCoords"},"khWQ8XLEC6yGiMBY2NVO3":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html"},"-KoZl_Ke6iCcTQqs-BTfj":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#canRender"},"ClrngLyBGxEzd7M005Cbb":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#constructor"},"B4e4KTTrC3FxM5yWgrjMG":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#drawTile"},"6nPfYlo5rTyuVArlQP-_t":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#drawTileLayer"},"Wx4KuY29UN1SlfvsKDgDb":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#getBounds"},"9VeXG4rxSihzzcxH9T_5L":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#pixelToTileCoords"},"AGu49cRCyWzx2uTst_jXJ":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#tileToPixelCoords"},"9lcK3qGkG82CnplS6Nowm":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html"},"ROU2h7mJ80sBez5jUzOfh":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#canRender"},"JrUG7e50Arv7s9MI8mBO8":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#constructor"},"TH73jFZVUXqzRr1TiGc5u":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#drawTile"},"bLZuOIwxz9vLlfLM_ChVD":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#drawTileLayer"},"A_fjD6yPlpR1a2Pyze1QS":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#getBounds"},"nMRShBrFXZGayL_a3r6IX":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#pixelToTileCoords"},"GSHxTQ1hf1zaVunNmI91L":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#tileToPixelCoords"},"PEVWZHgjn9yuapR7EzaFa":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html"},"AGbV2cTn4qXIw6eIH5ceu":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#class"},"NZkhQriFjxehVCwrMcy7K":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#cols"},"Luy7f6gDCPJopl913T7RD":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#infinite"},"zvk3Fhv748Gpn-hPRP7j9":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#name"},"vXwhLq1aCE_H6dReJqdyg":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#orientation"},"XsKsYjmGxQ-lEXLC7KfAN":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#renderorder"},"9bI1SdS1Bk30pDBSMfIKE":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#rows"},"U5FbipwWRm21qbnTMKvpA":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#tiledversion"},"KCneUjtjjhqo2Bkf2-gUf":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#tileheight"},"-EiSDsI4gttTJWiwNo0bC":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#tilewidth"},"ylmprKjeg-uvB16YWYSMU":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#version"},"174DQEv02eXu-heR7hrWS":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#addTo"},"p12DUambSIO2dVHPDOKzN":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#constructor"},"GoxUIANOG8SsPRfAU8XB0":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#destroy"},"99Jpbsw-kz1_IBkloHvnf":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#getBounds"},"dtxAudlt7AkjpE77P8fGy":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#getLayers"},"9naC-p7oq_D4YYN4CWQKh":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#getObjects"},"yaCyXOw-X0rJT8_hP3J45":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#getRenderer"},"KYXYx6Z1iBwERnjjxyDOp":{"uri":"/melonJS/docs/melonjs/TMXTileset.html"},"ih77_IuF8QH-PAwCZ-6rs":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#class"},"NpYm5Z8zymok9t05063WS":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#isAnimated"},"I2IwklLcnBDp2K3okLBo7":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#isCollection"},"U6CnpQx3nDMcnohkYOiX7":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#_lastUpdate"},"Rm4oCwZTu5Crsi1fvRX5Q":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#animations"},"i1Ine35xRDglFgDwB8148":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#constructor"},"2iak2lgKkiHid1wkDzQtf":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#contains"},"2S_2muKb3g5K0r-Oqdyjm":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#getTileImage"},"lJfMFrBxWQK2Tr_A8dZ1I":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#getTileProperties"},"vCYvtTiHZcnZdDLjlE3TZ":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#getViewTileId"},"mF6X_X3NJTBFPcg1cR3gz":{"uri":"/melonJS/docs/melonjs/TMXTilesetGroup.html"},"RIAGb4kfsPWaENOfuKsdL":{"uri":"/melonJS/docs/melonjs/TMXTilesetGroup.html#add"},"v1X7I22WnSzm0Pn0ewKsP":{"uri":"/melonJS/docs/melonjs/TMXTilesetGroup.html#getTilesetByGid"},"_8SVrXiElaz0asU4g80gJ":{"uri":"/melonJS/docs/melonjs/TMXTilesetGroup.html#getTilesetByIndex"},"kLHwY-BbSOoXuoOmRHvO-":{"uri":"/melonJS/docs/melonjs/Trigger.html"},"qqBZJxVd3RNrCsrGeAHC4":{"uri":"/melonJS/docs/melonjs/Trigger.html#alpha"},"ae3SFWrBjpeVMNrmWGb9w":{"uri":"/melonJS/docs/melonjs/Trigger.html#alwaysUpdate"},"Qrsts5IpGtNWiLS7HJd4c":{"uri":"/melonJS/docs/melonjs/Trigger.html#ancestor"},"TO1LDvKdSUb7T3u2OXGEU":{"uri":"/melonJS/docs/melonjs/Trigger.html#anchorPoint"},"OVPMC58cXmL0l8VpuSgEW":{"uri":"/melonJS/docs/melonjs/Trigger.html#autoTransform"},"gVmtETeKSMxpbhL0EFHpN":{"uri":"/melonJS/docs/melonjs/Trigger.html#blendMode"},"PgLqxWPC_jbN9v6KG8ED5":{"uri":"/melonJS/docs/melonjs/Trigger.html#body"},"fLM5kv5VG1haKDKb6B-rt":{"uri":"/melonJS/docs/melonjs/Trigger.html#bottom"},"sJ8SfsWRRamp4l66VVCEy":{"uri":"/melonJS/docs/melonjs/Trigger.html#centerX"},"HhVhiEoSdzeX_kIh07Ly-":{"uri":"/melonJS/docs/melonjs/Trigger.html#centerY"},"e0y3c2dymBu5QoIr8O_q9":{"uri":"/melonJS/docs/melonjs/Trigger.html#currentTransform"},"Ny-xuCGM978ZTfV5wVvoy":{"uri":"/melonJS/docs/melonjs/Trigger.html#depth"},"xSHx7Fj1NJTaJRJp_5QRo":{"uri":"/melonJS/docs/melonjs/Trigger.html#floating"},"To1kk-Vl0bg0Z8vtuaafW":{"uri":"/melonJS/docs/melonjs/Trigger.html#GUID"},"PHRCaL9-yabqm-zACfMOH":{"uri":"/melonJS/docs/melonjs/Trigger.html#height"},"Z20yz36XYFeO0xdyGw03m":{"uri":"/melonJS/docs/melonjs/Trigger.html#inViewport"},"TuVgBEZewdwKsj9ca-mTV":{"uri":"/melonJS/docs/melonjs/Trigger.html#isDirty"},"Suo6QgXVrZkVIBB5C5I5b":{"uri":"/melonJS/docs/melonjs/Trigger.html#isFlippedX"},"f_0_YfDNtTpsJQuVQkTwB":{"uri":"/melonJS/docs/melonjs/Trigger.html#isFlippedY"},"o5OZeVkFP--WoxhLnxg_W":{"uri":"/melonJS/docs/melonjs/Trigger.html#isFloating"},"LL88Vf136rGeESVHksHhA":{"uri":"/melonJS/docs/melonjs/Trigger.html#isKinematic"},"8UZZaSMM8tyTKX0gw-eXU":{"uri":"/melonJS/docs/melonjs/Trigger.html#isPersistent"},"jNHTQxBD2ntOIGEvJanws":{"uri":"/melonJS/docs/melonjs/Trigger.html#left"},"vzK-KHJZrArHN1H5I3Uyw":{"uri":"/melonJS/docs/melonjs/Trigger.html#mask"},"uJ8KMCudUWJibDWXPXccC":{"uri":"/melonJS/docs/melonjs/Trigger.html#name"},"9YNxLpMBB7qw04mdW1BXw":{"uri":"/melonJS/docs/melonjs/Trigger.html#onVisibilityChange"},"sRWBEK8Wr9HLgBLKLcvkz":{"uri":"/melonJS/docs/melonjs/Trigger.html#points"},"TwFWc9pPOTi0Btl38gD-T":{"uri":"/melonJS/docs/melonjs/Trigger.html#pos"},"N446xTRcDmEPAZ93xHkKA":{"uri":"/melonJS/docs/melonjs/Trigger.html#right"},"LGqWt0fLtNBGRdY98vfKm":{"uri":"/melonJS/docs/melonjs/Trigger.html#shader"},"fHkppFBc3K4kqENks8R0r":{"uri":"/melonJS/docs/melonjs/Trigger.html#tint"},"Tl1gLSs_5dsJapBk2t-I5":{"uri":"/melonJS/docs/melonjs/Trigger.html#top"},"WjIClzErqkmCwjgTbWGnO":{"uri":"/melonJS/docs/melonjs/Trigger.html#type"},"Gn0gNPO1v5J4Dll1RjARs":{"uri":"/melonJS/docs/melonjs/Trigger.html#updateWhenPaused"},"7sbU-AjkCUmcTrz-9Wx72":{"uri":"/melonJS/docs/melonjs/Trigger.html#width"},"-XDoZDI1_fJuk_ppdYY46":{"uri":"/melonJS/docs/melonjs/Trigger.html#angleTo"},"ora8f39Swyo737ix0RWC_":{"uri":"/melonJS/docs/melonjs/Trigger.html#centerOn"},"R_ZFfZy-4yHw_ZqQf5l0s":{"uri":"/melonJS/docs/melonjs/Trigger.html#clone"},"xb8pG-N7P9AdHTIlsy-ZQ":{"uri":"/melonJS/docs/melonjs/Trigger.html#constructor"},"Nuh54wku1OqsLvYrMHdhd":{"uri":"/melonJS/docs/melonjs/Trigger.html#contains"},"vF0X4_O4MFeurzyrWw0qF":{"uri":"/melonJS/docs/melonjs/Trigger.html#copy"},"JD9bslE8TcNZ7ivJ_03L6":{"uri":"/melonJS/docs/melonjs/Trigger.html#distanceTo"},"eaa89neCbBdom2uDuvPun":{"uri":"/melonJS/docs/melonjs/Trigger.html#draw"},"V5E56TF_3sNwLl0ueMLqA":{"uri":"/melonJS/docs/melonjs/Trigger.html#equals"},"6NM_a-ZqVD-erxc5eCuFd":{"uri":"/melonJS/docs/melonjs/Trigger.html#flipX"},"DCB2KDvNSoTXJoYTtY_wY":{"uri":"/melonJS/docs/melonjs/Trigger.html#flipY"},"_4w8Ee4uGpiKDsepKmNkP":{"uri":"/melonJS/docs/melonjs/Trigger.html#getAbsolutePosition"},"4NMiEhHAA_KkxdGAW9wCk":{"uri":"/melonJS/docs/melonjs/Trigger.html#getBounds"},"K4aRpA_penrF3y9-ThQsJ":{"uri":"/melonJS/docs/melonjs/Trigger.html#getIndices"},"l9iMs_DkC5gAbzBITzk3B":{"uri":"/melonJS/docs/melonjs/Trigger.html#getOpacity"},"HTFqpxXuBXwL78Z3keckv":{"uri":"/melonJS/docs/melonjs/Trigger.html#isConvex"},"Kc-gwWpPPxLDu9azC3vSc":{"uri":"/melonJS/docs/melonjs/Trigger.html#isFinite"},"GHfiTcZj1VuJx5hgSlA-M":{"uri":"/melonJS/docs/melonjs/Trigger.html#lookAt"},"Jgiv16hs84fIt3gv0ARic":{"uri":"/melonJS/docs/melonjs/Trigger.html#onCollision"},"N2EPvrb-mi2HrfvE7alfA":{"uri":"/melonJS/docs/melonjs/Trigger.html#onDestroyEvent"},"oV6hvOAbKHLUYJ27uSF4a":{"uri":"/melonJS/docs/melonjs/Trigger.html#overlaps"},"toqtEMn8P6Xf92nrK7-aE":{"uri":"/melonJS/docs/melonjs/Trigger.html#postDraw"},"toOR9xizFJbO6sK-Qhmvy":{"uri":"/melonJS/docs/melonjs/Trigger.html#preDraw"},"IHVY4e9Zjt_a6EP2iJgxP":{"uri":"/melonJS/docs/melonjs/Trigger.html#recalc"},"TAv6xImtb70Ss5IztY7Hr":{"uri":"/melonJS/docs/melonjs/Trigger.html#resize"},"olQD-VmMKcoDAJY4HSVF1":{"uri":"/melonJS/docs/melonjs/Trigger.html#rotate"},"GdIPPlgEBEXYJyim23t0Y":{"uri":"/melonJS/docs/melonjs/Trigger.html#scale"},"_FLR_qiAAj7ZisxuzUz-v":{"uri":"/melonJS/docs/melonjs/Trigger.html#scaleV"},"1Tv4sls12C4kCnjFsqe9u":{"uri":"/melonJS/docs/melonjs/Trigger.html#setOpacity"},"D9HcvrLJjxoX9kKUPXmiv":{"uri":"/melonJS/docs/melonjs/Trigger.html#setShape"},"_uljBf0NQNBGfqvPhzZib":{"uri":"/melonJS/docs/melonjs/Trigger.html#setVertices"},"f-a3pVVezE03NkfaARyl2":{"uri":"/melonJS/docs/melonjs/Trigger.html#shift"},"D5LvgqJ6D0EbEWwsLzeiU":{"uri":"/melonJS/docs/melonjs/Trigger.html#to2d"},"3sDiKHN-2mT5Rzh56NRQp":{"uri":"/melonJS/docs/melonjs/Trigger.html#toIso"},"-YM-oY4t93cM9bbbKHjSq":{"uri":"/melonJS/docs/melonjs/Trigger.html#toPolygon"},"eOmynhaGbWwaxnG7mFXl7":{"uri":"/melonJS/docs/melonjs/Trigger.html#transform"},"tWC69NTN0k43ByLXWEhtP":{"uri":"/melonJS/docs/melonjs/Trigger.html#translate"},"jJaNp07nvvzTIhs3b-PvP":{"uri":"/melonJS/docs/melonjs/Trigger.html#union"},"-bt17KCuZIRM_-Z96vlIK":{"uri":"/melonJS/docs/melonjs/Trigger.html#update"},"Biurav5Dqrt4gcVTZwKOy":{"uri":"/melonJS/docs/melonjs/Trigger.html#updateBounds"},"SUnXbXz6-RDHIo_s_ILt8":{"uri":"/melonJS/docs/melonjs/Trigger.html#triggerEvent"},"hIZN6nF_3Af1eNncfuQni":{"uri":"/melonJS/docs/melonjs/Trigger.html#onAnchorUpdate"},"-fd-y9TzxA4Wz_S-QOXAO":{"uri":"/melonJS/docs/melonjs/Tween.html"},"g6zxlpap5rH6DZg4HIfjg":{"uri":"/melonJS/docs/melonjs/Tween/Easing.html"},"rSO5cpNAvQOA_XvGQWJqR":{"uri":"/melonJS/docs/melonjs/Tween/Interpolation.html"},"Jj2wnL00HmPt7s0m58mK_":{"uri":"/melonJS/docs/melonjs/Tween.html#chain"},"LzY-fkbzMFO-BmmzSVf0-":{"uri":"/melonJS/docs/melonjs/Tween.html#constructor"},"NXgwDn-zsqu2MtqTJOrzH":{"uri":"/melonJS/docs/melonjs/Tween.html#delay"},"Qz5Fape9wmLa2loa-R2al":{"uri":"/melonJS/docs/melonjs/Tween.html#easing"},"ro3KNRAEU6JStYYvh9UEv":{"uri":"/melonJS/docs/melonjs/Tween.html#interpolation"},"bI8UcXxfPrfVsHjM5h6fR":{"uri":"/melonJS/docs/melonjs/Tween.html#onComplete"},"FnBj6gJ4i9Ouf9PWw_--n":{"uri":"/melonJS/docs/melonjs/Tween.html#onStart"},"JJVvunRND1sj5P9IXOuwg":{"uri":"/melonJS/docs/melonjs/Tween.html#onUpdate"},"htSiBojM8q0_fAL_FUcBW":{"uri":"/melonJS/docs/melonjs/Tween.html#repeat"},"ZPsYqYQnKsCyQCIbUHJx1":{"uri":"/melonJS/docs/melonjs/Tween.html#start"},"Q93Yn4bb4SO-r4fKD6kPh":{"uri":"/melonJS/docs/melonjs/Tween.html#stop"},"Pmk972xAxiRrxjZuTz8be":{"uri":"/melonJS/docs/melonjs/Tween.html#to"},"psWYzSkrZHwkTHZmvJcxE":{"uri":"/melonJS/docs/melonjs/Tween.html#yoyo"},"4EaOAWieiEczLxUgJ3c6F":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html"},"mdwTMCcYypgUdCQUrb55_":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#alpha"},"Zca58TdmXQ7zmj2jVkcKJ":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#alwaysUpdate"},"9S-mLK-KcF_J60hUPLtip":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#ancestor"},"O3q_70UzXelH9avjJoVEq":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#anchorPoint"},"ljBiW7YpyxDwRZHWMFIW3":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#autoDepth"},"kJ8FefMctBUybWrqlCZTX":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#autoSort"},"7VaYdJ1znD7zZJxHSj0OM":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#autoTransform"},"aczQbbfAbeMvXCIAhqU_T":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#backgroundColor"},"o3LzF6qXzTVU87mzu2swF":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#blendMode"},"SGa2JOEx-E21droIbi1RT":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#body"},"hLv5bLTzyIO_n9VXiGqIy":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#bottom"},"AQ0oMR6fRassjqZN58927":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#centerX"},"6QUSOD0fJbv234w8mTYqM":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#centerY"},"ZsVcBAlOkTrVEDAFLfAFz":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#clipping"},"6DpDhbM3_RheZu7b5dA2M":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#currentTransform"},"gzMQ9Men8OEP3WFrYFUcY":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#depth"},"0EBk4mvcVxFJP-jdJOPjf":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#enableChildBoundsUpdate"},"uLLkmHlHJyWGICcVsuYFR":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#floating"},"g1UUvE-hOqEpUGKglAnnu":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#GUID"},"7SiNR_XqinuDoMhjDfR2_":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#height"},"3F8ECuicke-qcR5nQw5rk":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#holdThreshold"},"mUkZ7ZS2sgo9GglkGESCX":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#hover"},"4_wOf8NH7owm9ZouN1rPq":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#inViewport"},"PHdr9Q9p3X-Bp4jrdAniA":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isClickable"},"qMlQhhXSJSKOSb8Sa1Izp":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isDirty"},"TT7jwSVRSqkbg9s4hhoRX":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isDraggable"},"klfww2oOwNwvY-32srFK6":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isFlippedX"},"LDn06nNANMj__D6btAd33":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isFlippedY"},"fupU9n6Jnek_evLCN7Udd":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isFloating"},"8mDFfxvuRY3WF2cLxHXbH":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isHoldable"},"1NyNcSGdqWSISxBnSBTBN":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isKinematic"},"B_dG0IvO_5QxzoXJCd6ao":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isPersistent"},"bkA340P99wbu2ZszhO9kp":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#left"},"zUDrENVVUXxOYhykr37XS":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#mask"},"kkfV4H98HIBoQ58Nc7xW7":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#name"},"lotXzUwqRqm6s1Av5Doc4":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onVisibilityChange"},"5OLibfMR2l-ofOEYQ4KnI":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#points"},"M7y3dXpTr_ymiacmx8MW8":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#pos"},"FXSpbDOGVi9Gh4o8olF-v":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#released"},"ZPshUxAEDreynZaGG5INl":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#right"},"A6x9dOSO4LzdVUEDcn_Jr":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#root"},"6gGr8JKxTv7gwQo0cRJJo":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#shader"},"Jf7qx8okFC9iSfP1cSDst":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#sortOn"},"BZq7ESrGNGQ-mOTH6LRQr":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#tint"},"IUyYiv7-Pa-za57eIgOOi":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#top"},"fV66AYVgJbwJWb4A6A6jM":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#type"},"U49vnKTEXHIfJQfVaccEA":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#updateWhenPaused"},"jfHQvW3kNS04idwTLCccV":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#width"},"jfwCMVSvMIpjQqX8xmaQw":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#addChild"},"lJuLWmnfl1-Gh2Rq4JjWf":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#addChildAt"},"GfNH6yFrCJPxqd10lblcY":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#angleTo"},"0khRC-dAzq5H__du-gs50":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#centerOn"},"pmjLKdMfZecQ7x1CrkYtd":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#clone"},"WT8O2TjBLsd51KsKBhFNN":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#constructor"},"66fbYNYfK7i-mHVwIf9HF":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#contains"},"IHAY7z6iHG1eoBnzJ51wj":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#copy"},"o0vnfYjWHjiLFG8M13pZF":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#distanceTo"},"wlvQ_mjonL45WzjpXV7lE":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#equals"},"q3q_xzALQtcO4UhOHDXv7":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#flipX"},"pwVPNLUcrqwRgW6BPSKau":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#flipY"},"suLfGFLPpTXo1LpYeSwws":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#forEach"},"yKCTztFwMYpw2Mt6ybGot":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getAbsolutePosition"},"ftFjHGs37vLNc90nlmF8C":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getBounds"},"hgfaQpP0lTFitIKvHySCT":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildAt"},"OHvM8x4d5nBrkWQudlklj":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildByGUID"},"I2-Dj2OvFqYI6v9x7jgUU":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildByName"},"HDfAOja4RoiGD31SdEPeq":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildByProp"},"0v-XPBdzOdfvzNGcna7Pp":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildByType"},"BSXBz6YfvLFc9K-kUQze5":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildIndex"},"s11Bn301b5XClQTHoSWYS":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildren"},"gKyjFLrhEb-69meMaGvb2":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getIndices"},"AwReNwnTY-LuUwC4pEMk0":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getNextChild"},"61rlsn8LiCnp49Ji2QPz9":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getOpacity"},"iFbzpKJGqDzVIXxCUbjgi":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getRootAncestor"},"7URFDhA0jLY0rEV5k3ZIv":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#hasChild"},"TZU0ESoYut8KRCGlPp6Y6":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isAttachedToRoot"},"xNNr51Sg_CD9V-_nW6ezk":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isConvex"},"TLg5yjJoHVPDQDgNhi93X":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isFinite"},"_V_F-rreO8OFZVCU-GfNa":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#lookAt"},"X32MmIYfH5S0X4gyGYHic":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#moveDown"},"b8bmsVMyC4rXpXkztTJST":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#moveToBottom"},"_i2jhZbqhpK1Bk8FaLsLa":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#moveToTop"},"JLH-rigtJY7OV_1V6zIZ_":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#moveUp"},"jxE5RgnBxnCzPvvdFv1C6":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onChildChange"},"8SV6CVTKVe92HlTuUUAso":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onClick"},"1I2FKIeeUkqOzz8Zs5TYF":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onCollision"},"9RsnvNrtorEdmnl8DPqCL":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onDestroyEvent"},"mXkGnU2o15jTI-4R-kuh1":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onHold"},"VerLd4AxuCZIHH0lmUyJX":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onMove"},"jFZSVfcAfnKDTHEW6abMM":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onOut"},"6Azudjqd9bynw6u3lc6OK":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onOver"},"UtshCvXzfmnxv__xw_jEC":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onRelease"},"vlQZNlj4hvaJLF8GVxvIX":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#overlaps"},"xF-yzcX18yphnYamhNs_q":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#postDraw"},"Nwmb7YFMcqLV-f71JWVnD":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#preDraw"},"0ME0f-z1kLDyF9XazIqe_":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#recalc"},"C6AFF0Wrm1prW-eNv8i-I":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#removeChild"},"anMSO-4C0nfVxaGgVSTJH":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#removeChildNow"},"sVGDOshAejKcNHdncuZ8r":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#reset"},"pLdRAHOYteUTZy_9wQrDU":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#resize"},"aPAozDzX8E9S0AURUUc1v":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#rotate"},"UMCr7Y0wM5bKB6jqYZRbW":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#scale"},"kj6qNa3o7uwulREonASpa":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#scaleV"},"MZVy7nvR9e2EbRICBfbHu":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#setChildsProperty"},"6rF_E2gL2T5KIw39XsjIA":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#setOpacity"},"E7UAfYn_IW8z1iEUGwyB8":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#setShape"},"RJY84Qyb4mNtm3acMQuu-":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#setVertices"},"SU1RTihntE-Uka8GB9NN5":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#shift"},"5qbeV51-O9exDSgaIMrTS":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#sort"},"ffAvmD0iWpq8-4SstKEMf":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#swapChildren"},"rqa1n48G6Bmf7kgwhhHvx":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#to2d"},"imUhFCLTIAgllBICKy8QG":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#toIso"},"u1mH5aDQRzl3_YxGUWafP":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#toPolygon"},"tQh1y9qzgtidF-kmfKKbv":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#transform"},"Linn6-8mjdJXzbP9-4I-u":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#translate"},"agfEo5YSQ5ddUYmU9I6Dx":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#union"},"Jn6YlLzLh4mTNRw4JGsgp":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#updateBounds"},"jfzxV_2E73wnONF_AWEXw":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#draw"},"-00wOSpYoNxTLhBNZeQi3":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#update"},"LYnGlZOGPYGomel3oebHj":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onAnchorUpdate"},"8Ym3wU2cUogEGbwW-k-NL":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html"},"6v53Gj2YUUUS16gISJ5_6":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#alpha"},"UD-Ch6zwu7OE8HzN-lZcu":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#alwaysUpdate"},"ZV9YvWTi2M6uuS9QxxGfe":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#ancestor"},"7JFNuqPAZOZjuBzsZ2jOd":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#anchorPoint"},"khbipaUPbh_V9gzrMdlNF":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#animationpause"},"63r9RnJ6QcYcy5IwGiC30":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#animationspeed"},"FIrpkKdli2OxiCX9nADHe":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#autoTransform"},"ngshgmGdGWvPXZiA8amFt":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#blendMode"},"ztX77ar13Fi2Ghtt9d7wq":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#body"},"tx4hrjOgiNEWskNyH29MQ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#bottom"},"9Q1jE_lVGhf86JW6VRccl":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#centerX"},"pqkY9ON2dAPdB80Le2ere":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#centerY"},"a7HhNtF029HZLIyBTdbKw":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#currentTransform"},"mQpIv7sfcLqI54VmnyP6n":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#depth"},"2IVZk5uP2S1-0yjkUknrO":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#floating"},"4nY7Yf4SQw-x7F2SWvHVC":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#GUID"},"9AIH0MtsLRxRRsIZrbYyd":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#height"},"gmag-S1hbspxTOup2Xtg5":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#holdThreshold"},"EcnExtaHR4_e8Zwbs-IDo":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#hover"},"EccLpjG9vTWwuB6YIvsDC":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#inViewport"},"mjj0gDP2klIfrsCqH4jDr":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isClickable"},"9Q8cKWU1UINB-J0ZwQswq":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isDirty"},"aS8WGebTta1nvlb6QMRBO":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFlippedX"},"wuDa-sG5-lbtDrkteu_am":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFlippedY"},"rF6_cQOd1e1HOArDlFrYH":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFloating"},"rhYHvpK0xZxdPv42j3uBI":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isHoldable"},"qOB6C3_kVcmrsbAfvnocF":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isKinematic"},"v7SSzHeeqT-L4gIFQ5NiN":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isPersistent"},"Ruh5x_rxBFjoAJw-cmrTB":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#left"},"mrRu3LmMhZlo_kHlnkdXS":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#mask"},"x0YfROUTBtEv6_GU7y7oj":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#name"},"U0ldfFiE9gWbx6jdEC5XO":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#offset"},"V29Xe2KoU206lMYv7AQgf":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onVisibilityChange"},"O8OTfA3PyNlJ3D6HDg_Xw":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#points"},"S_K2uw6cqPfx-ii-pTiXU":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#pos"},"MHICbVmlzB2hRFmEoYF47":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#right"},"v28kLu_H9snLDk-lOR6OU":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#shader"},"5bHJXHga6OnzXRvtBbeJM":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#source"},"tg0QMfZp4kfuV387fPNoe":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#tint"},"klOkMhQ4TqmoG6208Kbvf":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#top"},"qQzJErsyBM7aiU8PfTBl-":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#type"},"VlyoK11rngbwIBH9Wk2B2":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#updateWhenPaused"},"pK1cSSgdead0QhsA88bxR":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#width"},"xaw-qTAqhRogeY9ID0S8o":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#addAnimation"},"tNTxFCgNZxH7X3cVOFQ-b":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#angleTo"},"o0AhIJwcVRVx9iFyixVmH":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#centerOn"},"Wbht5wfMjSKUn5SytPeKe":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#clone"},"NVWqnQ8LgRkWAKUeUA375":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#constructor"},"Zl-LGz-DqrmbkIt7dUYOJ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#contains"},"1YpD8m-BZQ1JV_erRCtR0":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#copy"},"T2jrHwZ8ebFwR-bPH9HMy":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#distanceTo"},"QAmn1PeOEYa6H0zl0rAnH":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#equals"},"60YXdt2O8WjQgEmViG0rj":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#flicker"},"gfxR-Ard2RSSo9AoNrzNi":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#flipX"},"QhLduvw8LPamzu21hpbZ-":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#flipY"},"GyhRt-qWSFaL0yRBPf1um":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getAbsolutePosition"},"8P7MeKxC8iszgfH7MKwcY":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getBounds"},"D8WC9dk3rzwVUpaNf-3A_":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getCurrentAnimationFrame"},"_Q6YUlRF-2LLAcyydsnNh":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getIndices"},"gJ0FNGMKc4A4OMmjOVSb6":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getOpacity"},"RP6mtzm5xfx67AnwRa0a-":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isConvex"},"B9ZN87Kv9fWPLNe6vJg_B":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isCurrentAnimation"},"5Q2hCBSzEPTZsW3-UpYfu":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFinite"},"y1fA_fpgjbW59md9dG3Co":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFlickering"},"BkX3WCccBpmGuPOxMdijZ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#lookAt"},"XO9-0EvXgD9tv3-zzo9u9":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onClick"},"8JfKODBqaY5Er1rk1b3g6":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onCollision"},"n6ni-_S9O6bpXCBwc_yrx":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onDestroyEvent"},"-ZfpeoSnGPjPscacKIQpU":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onHold"},"2EvosU1QT5XCyPtFB1mLZ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onOut"},"yY9df91pfn-KzY11e7zlu":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onOver"},"C0le_CvAF-X-knMHKp_te":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onRelease"},"wPV_7Sh2zsUY_MgXQjOXn":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#overlaps"},"RlLyazR4uKIXkbvbHJzYJ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#postDraw"},"r2a8uKj4WyLAril9AwTp3":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#preDraw"},"PwdCuJwcgMVViVPbYZVEs":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#recalc"},"vA8PQHG7EieksL5mUj5u7":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#resize"},"s-rg6AsAOivZ-BoSQwxJj":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#reverseAnimation"},"vGtp4r_0Uk1svdl0JBmVO":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#rotate"},"q_NCiNfV0-fbNjIwU2nwn":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#scale"},"kbWip4bj30WtVyxtVAdqo":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#scaleV"},"7P1x0Oa5KPFuQS2kFFdiI":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setAnimationFrame"},"86zQvnoZ-8wRmZHQYus7L":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setCurrentAnimation"},"05MZm8nG-nd1XuMEbyLXe":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setOpacity"},"SbxHEYWF9hi7DarPfhrWb":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setRegion"},"zTRpoQcWYXzqGFRPpPEFE":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setShape"},"pYVlaOVK06-6sj12ouxNz":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setVertices"},"bPKyp3EkYlTywl_foTdRr":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#shift"},"5yK5jv7IBmTARzvBx-Haj":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#to2d"},"rfNYqZ2Cv6-03LwrrQfJl":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#toIso"},"XmScT9IzkVhv9mItvVkFT":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#toPolygon"},"_0o14xseUwTiHQsMqg9-H":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#transform"},"Ca9VPjFDS5xeVMbI96rJU":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#translate"},"PTFLrofe2Ok3WHd-XI1F6":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#union"},"3LHxiJC1_Dwxioa_4EA_l":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#updateBounds"},"BfwUhtQsBvWu4YE6LfwLZ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#draw"},"Apf2eKORAF0gI3FmJ6GO3":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#update"},"szox1DLqtBajSxjUTYAT_":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onAnchorUpdate"},"Yxp3M1D7dtcy-v6ccS9sL":{"uri":"/melonJS/docs/melonjs/UITextButton.html"},"hC-dJZ9gAaV77JY9b0b6x":{"uri":"/melonJS/docs/melonjs/UITextButton.html#alpha"},"Lw3B48yjuumHEhHX5H1pj":{"uri":"/melonJS/docs/melonjs/UITextButton.html#alwaysUpdate"},"FepdFz5oGNJC0--ryZXFr":{"uri":"/melonJS/docs/melonjs/UITextButton.html#ancestor"},"OmJ7-aNfuJXYC6XDJmmBY":{"uri":"/melonJS/docs/melonjs/UITextButton.html#anchorPoint"},"DIqd8SoDbGYjB8cyoWk93":{"uri":"/melonJS/docs/melonjs/UITextButton.html#autoDepth"},"WjUL91vTWlm3lDCvRDR1r":{"uri":"/melonJS/docs/melonjs/UITextButton.html#autoSort"},"6UtrpBy5LKHVhrVOECoBA":{"uri":"/melonJS/docs/melonjs/UITextButton.html#autoTransform"},"DRGhrifGzVpuSfcdM9-l-":{"uri":"/melonJS/docs/melonjs/UITextButton.html#backgroundColor"},"u6Dkfsd2q3yc1B7JZPWIK":{"uri":"/melonJS/docs/melonjs/UITextButton.html#bindKey"},"zo9zuVg-f-gJxH0JUfzuw":{"uri":"/melonJS/docs/melonjs/UITextButton.html#bitmapText"},"cmft6PI45FpVw4N8P31NA":{"uri":"/melonJS/docs/melonjs/UITextButton.html#blendMode"},"Eshfb0VzvzhGJEREwTZm6":{"uri":"/melonJS/docs/melonjs/UITextButton.html#body"},"0vblkLlZxl6dhyXEFU4bm":{"uri":"/melonJS/docs/melonjs/UITextButton.html#borderStrokeColor"},"bS7C6vpQhiKVLb1LwRZDL":{"uri":"/melonJS/docs/melonjs/UITextButton.html#bottom"},"yMPQZkZjmWYL7YhNeDpQ2":{"uri":"/melonJS/docs/melonjs/UITextButton.html#centerX"},"3GwQZVlFUnCmH4bSAYZvO":{"uri":"/melonJS/docs/melonjs/UITextButton.html#centerY"},"f_gePj0FZ22vhAXxK1h3R":{"uri":"/melonJS/docs/melonjs/UITextButton.html#clipping"},"FbXXC4poUfU4vPCSE4HYl":{"uri":"/melonJS/docs/melonjs/UITextButton.html#currentTransform"},"wWPRb2kP-2W-CCwJqX98W":{"uri":"/melonJS/docs/melonjs/UITextButton.html#depth"},"thPSpdXpaOQk3m0qCscty":{"uri":"/melonJS/docs/melonjs/UITextButton.html#enableChildBoundsUpdate"},"I3mO76ShYv34UFJnK2FxZ":{"uri":"/melonJS/docs/melonjs/UITextButton.html#floating"},"Y6dGEdts2d8tYKofeQn4q":{"uri":"/melonJS/docs/melonjs/UITextButton.html#GUID"},"DvzEK_Qg4SDpI8_uq7qDI":{"uri":"/melonJS/docs/melonjs/UITextButton.html#height"},"xdiXbVqswA_aayTL20uT-":{"uri":"/melonJS/docs/melonjs/UITextButton.html#holdThreshold"},"Yu68qTxvacHWINRcxdLTY":{"uri":"/melonJS/docs/melonjs/UITextButton.html#hover"},"qUMhSi338IGM-luQHAWdW":{"uri":"/melonJS/docs/melonjs/UITextButton.html#hoverOffColor"},"do_bkJ8NoUTdqz_bg0Bz2":{"uri":"/melonJS/docs/melonjs/UITextButton.html#hoverOnColor"},"lYTHzXDBTnjxz0nURl8-s":{"uri":"/melonJS/docs/melonjs/UITextButton.html#inViewport"},"ECLM0RhEbfqKpk9hBn4Vy":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isClickable"},"CeGQ7QpylaOx2PYfPir_K":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isDirty"},"Cxv7NSeAN7WabB3gjvU_m":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isDraggable"},"-Mfh-V8XWKW1B291VzIVd":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isFlippedX"},"GYXe9fJr2C278g0m5LrIf":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isFlippedY"},"M_19Gj8jwUrjHUjYVbylG":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isFloating"},"kaYkdgFu37x4lhJfQ4YNp":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isHoldable"},"90YCZlXdUalxD1CGejNea":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isKinematic"},"z6UXl9eqaj8m8V3TlqqMD":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isPersistent"},"t8YHo7XlXZR6Ux24hWDpw":{"uri":"/melonJS/docs/melonjs/UITextButton.html#left"},"qw6yoiRHUJQNQ8oHD1K4T":{"uri":"/melonJS/docs/melonjs/UITextButton.html#mask"},"Xqf0DuLKOXFR4maEi8nSI":{"uri":"/melonJS/docs/melonjs/UITextButton.html#name"},"l7BjPuT_LDibToPAHbQ9a":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onVisibilityChange"},"QQE-TxcCkKTYDAlEdVODD":{"uri":"/melonJS/docs/melonjs/UITextButton.html#points"},"-OscWFm2TA1tUANuvaerv":{"uri":"/melonJS/docs/melonjs/UITextButton.html#pos"},"XWjXGqWlKY5IrPZqXbG-9":{"uri":"/melonJS/docs/melonjs/UITextButton.html#released"},"SQ8BQI6bNLSPCfHn_LiEq":{"uri":"/melonJS/docs/melonjs/UITextButton.html#right"},"x42uKbkUmTz-SOYdjQWBA":{"uri":"/melonJS/docs/melonjs/UITextButton.html#root"},"-K7tUi_-IgOGhafvC5oKV":{"uri":"/melonJS/docs/melonjs/UITextButton.html#shader"},"dS0QX4MPP6xN8k5wTwnEY":{"uri":"/melonJS/docs/melonjs/UITextButton.html#sortOn"},"M7EbuGZz8raWHROqm2tfi":{"uri":"/melonJS/docs/melonjs/UITextButton.html#textAlign"},"zW7ukuq0LVJkMrPagMCxX":{"uri":"/melonJS/docs/melonjs/UITextButton.html#textBaseline"},"OJ0UE17sYt5sNJetWtJ02":{"uri":"/melonJS/docs/melonjs/UITextButton.html#tint"},"5a3t58ZolEF4Na9R39noZ":{"uri":"/melonJS/docs/melonjs/UITextButton.html#top"},"qwlZdRKo5rPKuMfTvvakA":{"uri":"/melonJS/docs/melonjs/UITextButton.html#type"},"kJP5mJkBG5AGz2gViU65l":{"uri":"/melonJS/docs/melonjs/UITextButton.html#updateWhenPaused"},"tEQmGpqXNINe6afJeDJ7e":{"uri":"/melonJS/docs/melonjs/UITextButton.html#width"},"GjViD6YgkBCQVIOHK4C0m":{"uri":"/melonJS/docs/melonjs/UITextButton.html#addChild"},"qJitvNK16acgMpEKHFqZm":{"uri":"/melonJS/docs/melonjs/UITextButton.html#addChildAt"},"g79DY9Pq6q-1mULWtNpLY":{"uri":"/melonJS/docs/melonjs/UITextButton.html#angleTo"},"jzZsg9nn8aEyNoldjdYsO":{"uri":"/melonJS/docs/melonjs/UITextButton.html#centerOn"},"Kqf0Ax4PA0Ff0FFr7VI7i":{"uri":"/melonJS/docs/melonjs/UITextButton.html#clone"},"Bbahzley7_z1UYoXHFGMs":{"uri":"/melonJS/docs/melonjs/UITextButton.html#constructor"},"fOR_jRR4W3-VKKn9Sw1Sz":{"uri":"/melonJS/docs/melonjs/UITextButton.html#contains"},"sdUe13extELYPyccM_eLN":{"uri":"/melonJS/docs/melonjs/UITextButton.html#copy"},"L7rNpfqyey9PCMQewWssX":{"uri":"/melonJS/docs/melonjs/UITextButton.html#distanceTo"},"HnmBWQ1yiJvkKFF_-jAo3":{"uri":"/melonJS/docs/melonjs/UITextButton.html#equals"},"7044tMOQdskmtwgyEVLOR":{"uri":"/melonJS/docs/melonjs/UITextButton.html#flipX"},"jy-46qT7iRKNpBC9EJwNr":{"uri":"/melonJS/docs/melonjs/UITextButton.html#flipY"},"KNmgz6pwqrLnbjnY7Nc7Y":{"uri":"/melonJS/docs/melonjs/UITextButton.html#forEach"},"V91QiTdTFiXkYHoKuE63F":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getAbsolutePosition"},"1oWHHjIyORIgFoTMPzOOz":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getBounds"},"AuN8TMgo8TsH5YRi0Khoe":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildAt"},"rnOdLnJqQDLu7wW2s_v6G":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildByGUID"},"J87xD_viansyUkG6QP9IE":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildByName"},"gjunrea0cAtRhncbsrW3l":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildByProp"},"omCHW61zSxcq6458RotEz":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildByType"},"P8FcWlE8DvWo6j0vaBawR":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildIndex"},"F5-tQr_U1J0VO5iq4sHpZ":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildren"},"FIUoZqBdTpQVcI74DKSNs":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getIndices"},"PAMiJs6QL5JkuuWS2k5gY":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getNextChild"},"5cJRPYbsU8gdJNESwBiHT":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getOpacity"},"VOuA39d5lbzPSPkTRcmTt":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getRootAncestor"},"vFZbzJMsn-pcZm7aVLh8X":{"uri":"/melonJS/docs/melonjs/UITextButton.html#hasChild"},"D2KU0iWqt_X9ZSklNrML6":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isAttachedToRoot"},"DKwHV6MOxHRXUTeSs38n6":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isConvex"},"w9U9wEahfLdz0VCXCZgZq":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isFinite"},"bHsMeA_Dd0u0JBzUjbDmf":{"uri":"/melonJS/docs/melonjs/UITextButton.html#lookAt"},"n5ja-MS2iaYYBFy564F4G":{"uri":"/melonJS/docs/melonjs/UITextButton.html#moveDown"},"EpzX3eYdPok32Fhr54DAT":{"uri":"/melonJS/docs/melonjs/UITextButton.html#moveToBottom"},"bMp4QCArqK5fiI8SiK7X-":{"uri":"/melonJS/docs/melonjs/UITextButton.html#moveToTop"},"_3qMUZ_qLaCB_-VZY7-yf":{"uri":"/melonJS/docs/melonjs/UITextButton.html#moveUp"},"gDI3ubRxDCb3CA1slOA-o":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onChildChange"},"3FvcCpDUI_0QZ3HT3Mozg":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onClick"},"EXieZ_aF7bw918DT1_fD_":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onCollision"},"2l45rBXM8_ftcqKIBntl1":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onDestroyEvent"},"S-AP0-rLs3KQhHTchYCZM":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onHold"},"_wgqgOSMxPQzvyB4AHvVl":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onMove"},"OjioGeik4ABq6-UJodY6L":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onOut"},"zvTH7dZKcT3WJXjvKduJa":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onOver"},"HWMiWafXV14gchV5EwjLr":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onRelease"},"w5Qk288ycZRPSbV0JF_4h":{"uri":"/melonJS/docs/melonjs/UITextButton.html#overlaps"},"YyCg92AbR122hGS2tqvVa":{"uri":"/melonJS/docs/melonjs/UITextButton.html#postDraw"},"FSHKg4ITstCf2hiTEEMKN":{"uri":"/melonJS/docs/melonjs/UITextButton.html#preDraw"},"LK3ATKhIWRNDwFh9UCrle":{"uri":"/melonJS/docs/melonjs/UITextButton.html#recalc"},"RFmZPRyB6Rp4EefCl07xR":{"uri":"/melonJS/docs/melonjs/UITextButton.html#removeChild"},"5X9bxS_Xrtr_xO1YkzFf2":{"uri":"/melonJS/docs/melonjs/UITextButton.html#removeChildNow"},"XbpBame2cOEXNHPv6iC7l":{"uri":"/melonJS/docs/melonjs/UITextButton.html#reset"},"SrFPX4miQ6y1AkWhHyFhd":{"uri":"/melonJS/docs/melonjs/UITextButton.html#resize"},"FmzQqvFwOcgHf_j3rlgmT":{"uri":"/melonJS/docs/melonjs/UITextButton.html#rotate"},"CQKa8P3536tnHExTTmNUn":{"uri":"/melonJS/docs/melonjs/UITextButton.html#scale"},"doAQ4dO3x4LXc6ehz87ZP":{"uri":"/melonJS/docs/melonjs/UITextButton.html#scaleV"},"N4qmw5Ft22meuVEv9T2Co":{"uri":"/melonJS/docs/melonjs/UITextButton.html#setChildsProperty"},"wFqfp5ocit-dIoen8fADz":{"uri":"/melonJS/docs/melonjs/UITextButton.html#setOpacity"},"c5cX6r8GEO6WnC8KOt3bb":{"uri":"/melonJS/docs/melonjs/UITextButton.html#setShape"},"SeKpVl9rdrPmf7qz1cYo-":{"uri":"/melonJS/docs/melonjs/UITextButton.html#setVertices"},"ExfjyaYv18pB_dKPdcOnP":{"uri":"/melonJS/docs/melonjs/UITextButton.html#shift"},"QxTnjhgNMIBtluqe3Kxy5":{"uri":"/melonJS/docs/melonjs/UITextButton.html#sort"},"HrC_MdKE3v5xmYdzeIvWl":{"uri":"/melonJS/docs/melonjs/UITextButton.html#swapChildren"},"Om6Zk2WyFZNZl1AAn5VH3":{"uri":"/melonJS/docs/melonjs/UITextButton.html#to2d"},"iY_cVUNMLVr2PSPqPN5hS":{"uri":"/melonJS/docs/melonjs/UITextButton.html#toIso"},"8RQnaOf-Zc8vtSdN_0R0o":{"uri":"/melonJS/docs/melonjs/UITextButton.html#toPolygon"},"D_XwuRy8i0WFuNgL3AoQK":{"uri":"/melonJS/docs/melonjs/UITextButton.html#transform"},"S1oqpISotOpcBLwfnsCbT":{"uri":"/melonJS/docs/melonjs/UITextButton.html#translate"},"nggR-F7RZuKnndxgTao7m":{"uri":"/melonJS/docs/melonjs/UITextButton.html#union"},"SP3n7tJRp3IM888MLLwRV":{"uri":"/melonJS/docs/melonjs/UITextButton.html#updateBounds"},"y_YAzwh831dOwBtfVJ8WC":{"uri":"/melonJS/docs/melonjs/UITextButton.html#draw"},"hilCYBfyfWtXhKMLU5CbZ":{"uri":"/melonJS/docs/melonjs/UITextButton.html#update"},"TVyxsgsQYLZiRRN9ND5bG":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onAnchorUpdate"},"RVhqqt1yqdYQVR7lrXPgh":{"uri":"/melonJS/docs/melonjs/Vector2d.html"},"PkD8bY0gZeH4uWGJEsxK4":{"uri":"/melonJS/docs/melonjs/Vector2d.html#x"},"6U4aqueX1zuLH-Er5ZoPT":{"uri":"/melonJS/docs/melonjs/Vector2d.html#y"},"Iz1oaeSz2nDWH0t5SPRGd":{"uri":"/melonJS/docs/melonjs/Vector2d.html#abs"},"DDRQMFYEWtp3U_AWU2X-R":{"uri":"/melonJS/docs/melonjs/Vector2d.html#add"},"-Lky01_S1jXlFuu74cgQC":{"uri":"/melonJS/docs/melonjs/Vector2d.html#angle"},"zbKA3wCI71-CluN5bvIuE":{"uri":"/melonJS/docs/melonjs/Vector2d.html#ceil"},"Uw_-v7hulNuPWLDZ3wjCJ":{"uri":"/melonJS/docs/melonjs/Vector2d.html#ceilSelf"},"eLWisUUhL3X8aeEq2Papn":{"uri":"/melonJS/docs/melonjs/Vector2d.html#clamp"},"IP80oZCCUOHc6cDzShoI8":{"uri":"/melonJS/docs/melonjs/Vector2d.html#clampSelf"},"bEwHDH7CyarMwNwDEWoEx":{"uri":"/melonJS/docs/melonjs/Vector2d.html#clone"},"0ofwq3sRCJ70t2gUXGRxZ":{"uri":"/melonJS/docs/melonjs/Vector2d.html#constructor"},"S5NLqFDwd7SKSHemRLYJd":{"uri":"/melonJS/docs/melonjs/Vector2d.html#copy"},"dPlYePltSzGeu0Mle2Qwn":{"uri":"/melonJS/docs/melonjs/Vector2d.html#cross"},"rwnli9QTnx0tWA0GXv-co":{"uri":"/melonJS/docs/melonjs/Vector2d.html#distance"},"L9aFddpi9cHYcQNH_lz_7":{"uri":"/melonJS/docs/melonjs/Vector2d.html#div"},"Aqj-tcMDHcuU8CdJXvQlx":{"uri":"/melonJS/docs/melonjs/Vector2d.html#dot"},"WX-CY83oA8wbFbZ7FLGjB":{"uri":"/melonJS/docs/melonjs/Vector2d.html#equals"},"O7ke3qurvkSZ26cV7D4pS":{"uri":"/melonJS/docs/melonjs/Vector2d.html#floor"},"Arp9foI5D7a18S353yR1B":{"uri":"/melonJS/docs/melonjs/Vector2d.html#floorSelf"},"4USPL9Kol9iYXtsq2HrvB":{"uri":"/melonJS/docs/melonjs/Vector2d.html#length"},"eGm3qaN8HbBCtpfX3xC7l":{"uri":"/melonJS/docs/melonjs/Vector2d.html#length2"},"00vV7JcMy5CzISsvWmuAY":{"uri":"/melonJS/docs/melonjs/Vector2d.html#lerp"},"5UGEIw0hnsKosv9vsI73E":{"uri":"/melonJS/docs/melonjs/Vector2d.html#maxV"},"Sdd-dpL3jx8UaxnlcX5HH":{"uri":"/melonJS/docs/melonjs/Vector2d.html#minV"},"hT8y0jWq1S2RZIFtqmZTe":{"uri":"/melonJS/docs/melonjs/Vector2d.html#moveTowards"},"MHFRsCZ2TIdWd1SbKUE3Q":{"uri":"/melonJS/docs/melonjs/Vector2d.html#negate"},"EgbnaN3tZTnJpQPPEqaiN":{"uri":"/melonJS/docs/melonjs/Vector2d.html#negateSelf"},"ys19Nvkkb19AESsW_aX7u":{"uri":"/melonJS/docs/melonjs/Vector2d.html#normalize"},"40yf8q22wWLuyvwW6fEKJ":{"uri":"/melonJS/docs/melonjs/Vector2d.html#perp"},"NHV_FeOs67YOqTVsreb70":{"uri":"/melonJS/docs/melonjs/Vector2d.html#project"},"o2cNXHW6xjyOv3-1b09Qe":{"uri":"/melonJS/docs/melonjs/Vector2d.html#projectN"},"sQ4DWejilPeiupThl2LhZ":{"uri":"/melonJS/docs/melonjs/Vector2d.html#rotate"},"LORc0SIPu87z2VPdhHWht":{"uri":"/melonJS/docs/melonjs/Vector2d.html#scale"},"r8PMTYX_OIPjayH1IlsgU":{"uri":"/melonJS/docs/melonjs/Vector2d.html#scaleV"},"DOXMfsgZRiQ-cdX1tKpf1":{"uri":"/melonJS/docs/melonjs/Vector2d.html#set"},"nlMMW7YoKl-WOq_L6OQZd":{"uri":"/melonJS/docs/melonjs/Vector2d.html#setV"},"AfNWjArHr6s8N8C07m44i":{"uri":"/melonJS/docs/melonjs/Vector2d.html#setZero"},"S0gsaqzZxwsZ1tAYTWyv1":{"uri":"/melonJS/docs/melonjs/Vector2d.html#sub"},"AFPGm8oaTIApGWbQm592e":{"uri":"/melonJS/docs/melonjs/Vector2d.html#to2d"},"Qi9G5qJmnRjf-rA_coCLp":{"uri":"/melonJS/docs/melonjs/Vector2d.html#toIso"},"VNx9ztHNWJZahsNBw1GV4":{"uri":"/melonJS/docs/melonjs/Vector2d.html#toString"},"CU6oh7Xip9VB80MR9GJF4":{"uri":"/melonJS/docs/melonjs/Vector3d.html"},"kVZp0r2g8wjLY7tutOor8":{"uri":"/melonJS/docs/melonjs/Vector3d.html#x"},"7oZrV2bzKr1d3lRILhq40":{"uri":"/melonJS/docs/melonjs/Vector3d.html#y"},"6ZJcw545mdxf7D66ddHpq":{"uri":"/melonJS/docs/melonjs/Vector3d.html#z"},"Dql-FaBQyASavG8-5sjv4":{"uri":"/melonJS/docs/melonjs/Vector3d.html#abs"},"l0I8Twi9uK3Cq3NIPPkpM":{"uri":"/melonJS/docs/melonjs/Vector3d.html#add"},"ZsMzvaWRnwqVRKeINMSOQ":{"uri":"/melonJS/docs/melonjs/Vector3d.html#angle"},"tqxgBcQCScYGfu_D9mHp1":{"uri":"/melonJS/docs/melonjs/Vector3d.html#ceil"},"y7v90HVS7a2MFZnvdxffu":{"uri":"/melonJS/docs/melonjs/Vector3d.html#ceilSelf"},"5eZzaQS99CfX5wmdTg6Wy":{"uri":"/melonJS/docs/melonjs/Vector3d.html#clamp"},"BC1I1iq2ubBxhWf6__-tR":{"uri":"/melonJS/docs/melonjs/Vector3d.html#clampSelf"},"s-yjVnf7cCnz5Sxl6WCMM":{"uri":"/melonJS/docs/melonjs/Vector3d.html#clone"},"XcmOj-NOm954Q15XY7DIH":{"uri":"/melonJS/docs/melonjs/Vector3d.html#constructor"},"wGHBFYi04ZCWSfOSFDjN3":{"uri":"/melonJS/docs/melonjs/Vector3d.html#copy"},"jXqbeH4W93Ww07SJ7OIKx":{"uri":"/melonJS/docs/melonjs/Vector3d.html#cross"},"wNUaPoCkk69WNxP4nLUS6":{"uri":"/melonJS/docs/melonjs/Vector3d.html#distance"},"9ZcYSPiVXp8QbXJdPcT0L":{"uri":"/melonJS/docs/melonjs/Vector3d.html#div"},"78xJTeOSVheJeblYB-j3o":{"uri":"/melonJS/docs/melonjs/Vector3d.html#dot"},"GNCdz3kTX9ylRcb2eBjg3":{"uri":"/melonJS/docs/melonjs/Vector3d.html#equals"},"uL0sy2lVsAayRnoMnQjp-":{"uri":"/melonJS/docs/melonjs/Vector3d.html#floor"},"u5IN_YvYu_MZMCnvlJCKb":{"uri":"/melonJS/docs/melonjs/Vector3d.html#floorSelf"},"meKsAuPjj7EL7alMjeUe8":{"uri":"/melonJS/docs/melonjs/Vector3d.html#length"},"CS9ciIt_5ib6nC-ig7Wu5":{"uri":"/melonJS/docs/melonjs/Vector3d.html#length2"},"UrP5PO0UEnt8eS--GoB88":{"uri":"/melonJS/docs/melonjs/Vector3d.html#lerp"},"jJzJWOWMKLxgUL1oc5fq3":{"uri":"/melonJS/docs/melonjs/Vector3d.html#maxV"},"AGqV8OSPV-PaTFNN0pVDI":{"uri":"/melonJS/docs/melonjs/Vector3d.html#minV"},"rY1dJ5-wJNsgb1lkGBrmd":{"uri":"/melonJS/docs/melonjs/Vector3d.html#moveTowards"},"zUtjJTDTDooUS46ovRQbE":{"uri":"/melonJS/docs/melonjs/Vector3d.html#negate"},"x6uCBQS0dTzgU6S3ZakjW":{"uri":"/melonJS/docs/melonjs/Vector3d.html#negateSelf"},"xvHchOpnvnEHo4rQM55NE":{"uri":"/melonJS/docs/melonjs/Vector3d.html#normalize"},"6Dwk1QBJ21ivGoI3c-oj4":{"uri":"/melonJS/docs/melonjs/Vector3d.html#perp"},"CVIUvXFolcX5rgRtzhBhY":{"uri":"/melonJS/docs/melonjs/Vector3d.html#project"},"S55-pDiftXmZ1xV2hh9i6":{"uri":"/melonJS/docs/melonjs/Vector3d.html#projectN"},"IZ-7hOt6GEixKOr5pdZyl":{"uri":"/melonJS/docs/melonjs/Vector3d.html#rotate"},"yo3Xsqiq_mhBoFA-eZEsL":{"uri":"/melonJS/docs/melonjs/Vector3d.html#scale"},"LoLkzmogC2tCJJ_89uLPy":{"uri":"/melonJS/docs/melonjs/Vector3d.html#scaleV"},"fLWZYdGWk3G4Pt1OPeMrW":{"uri":"/melonJS/docs/melonjs/Vector3d.html#set"},"urJxWLjQiSNxEEAhMlEal":{"uri":"/melonJS/docs/melonjs/Vector3d.html#setV"},"OmmTUgYYOBLjHlZZWYqny":{"uri":"/melonJS/docs/melonjs/Vector3d.html#setZero"},"cJrt1FZ4JGFsxDzdizppP":{"uri":"/melonJS/docs/melonjs/Vector3d.html#sub"},"yMrBY5ilf6Fq-Z6KFze2s":{"uri":"/melonJS/docs/melonjs/Vector3d.html#to2d"},"pHPyejdFkgIqKfXacP0IG":{"uri":"/melonJS/docs/melonjs/Vector3d.html#toIso"},"BY81ZxZx8TN5v4ceBZuW8":{"uri":"/melonJS/docs/melonjs/Vector3d.html#toString"},"8NJ5THBz6CuCFk2h2Bzo9":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html"},"Oq4rqiepRww89UE053Q5E":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#compositors"},"qneqF3lctrp9uIiWeaEdU":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#currentCompositor"},"npEMDJXeEySlZPwGNnzZy":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#currentProgram"},"Lkj890w0jbwYJuuc26BnQ":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#currentTransform"},"IzZn-YKctHxXDf-Gy9FXu":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#depthTest"},"FlCdx5cen1UDLjPDRpNDb":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#designRatio"},"renAq0nCB30vN8cnAalNw":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#gl"},"MgND4V3Itz6pcXYdzRazL":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#GPURenderer"},"IpgntK3EbElMAX6LxZe5l":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#GPUVendor"},"jyCQUANbqkoHyx2F4LFbB":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#height"},"iHtrlmgjq0l2SfKML5COE":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#isContextValid"},"2z2GLI4gG0tV8uweIZGgv":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#maxTextures"},"-HkXH5WuA3kiGqPB7lN8Y":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#path2D"},"BPaZ8za9vzRHbf53rn9fR":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#scaleRatio"},"Y7zHlK112xXM8q9aitjO3":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#settings"},"KS_znDRNcypZo_dV98r4F":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#type"},"2aXOk4dUtEpJBAuT_mxU9":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#vertexBuffer"},"SYrjV3notFIxXM45JxzE8":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#WebGLVersion"},"MoMNC9FNqOm7mtYTiyp0d":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#width"},"qSFV_clbfLptPyJNsTXAV":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#addCompositor"},"nPRr8UXG0Pe5GfdUlZ0j8":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#beginPath"},"0k1oZq83QKyiiVpIcq3Cq":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clear"},"fBDaQf_Yatnr4QVThE3lu":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clearColor"},"9Fk_BAfT4RCpB78twTenJ":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clearMask"},"nw3qRPfkNzQolh_KLh79Y":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clearRect"},"6Uml8Qzyi3QCS8xTzgC0i":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clearTint"},"vvdSbu_Io4ZQQF8xxyBej":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clipRect"},"zALt6DHpCEAPV5ThnoSGA":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#closePath"},"fYnNhYMjMKNAah5G1B_Hy":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#constructor"},"caXCBge21ah8YmsSv-tBD":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#createPattern"},"8c-t8Z6NdtTjoZPVS1bG2":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#drawImage"},"L31ZL7TJQzG6SR4uma3wl":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#drawPattern"},"UdF-XGYgFwf-Ye10QjchB":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fill"},"fSDnm40IcVSRbc0DEQeAH":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillArc"},"jrTuxb47Py2GM7lTcYRfu":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillEllipse"},"nkl8frvCgY0VDVuwaDxHW":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillLine"},"G0Il6qKAi7_fkrkvlgVe5":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillPoint"},"9tIhq0gt4exhj0LShxxL6":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillPolygon"},"YIBckaH1fjDELMXaj1nqY":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillRect"},"HIUH_SuarHmmp_1o9pJid":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillRoundRect"},"lyDzNKQtBHedITgm1XURB":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#flush"},"SjFRF0ss_gOTCv3p81VcF":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getBlendMode"},"zi2EbnClsgi37_DlKskm-":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getCanvas"},"wWRlAF7RUylQuE8OcnciD":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getColor"},"alx4v1vijYvzSdQcmuK36":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getContext"},"8rnPNUj90t13aRltELqVU":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getContext2d"},"glgkCr4ZRQfEp29M-Juen":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getContextGL"},"ueUHKDVSb8gZBwQ8VmPwt":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getGlobalAlpha"},"ZFE71QbSazFnqQG7V_Ow1":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getScreenCanvas"},"Ul5qvgG4HPFlH8EEKPU-V":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getScreenContext"},"xyb7GYftLyF00drxMeGOz":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#globalAlpha"},"qWtqbtzqTxR2f-DNbps7Z":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#lineTo"},"oAbOhWLhM5ed-NBrfAr9U":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#moveTo"},"spxwsLzZmPvwG6G_F76Jb":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#overlaps"},"awGYQHMfi0PzHlvRfSAQy":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#rect"},"xY5-51PSBS9X-R0i4WpAI":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#reset"},"MuzUIz8b2s9FSiwMQDRLe":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#resetTransform"},"SFlKJSTfykZp2XCJ9P1jv":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#resize"},"41O9S0GBsqRUQsoK4YNWP":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#restore"},"3-ci8d8ruvUDc_GZtOktM":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#rotate"},"NdMACYJubh_OLycFa9m4l":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#roundRect"},"NKLE5GfLBVC5lCQcFAcxw":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#save"},"8-7H8Jaoex_X2PQFCI7sL":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#scale"},"AnXBpuHE5eiAsx_vdg0GG":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setAntiAlias"},"UKlpxNvXoLBDWMrrBBOlP":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setBlendMode"},"mg8I7Zyf0VR07HPoCNUe4":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setColor"},"y0hlnttlPTUZG7tVUs9Jv":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setCompositor"},"sd1T5yK5p9gwbWrguMHZC":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setGlobalAlpha"},"CJLCcbqBBFqXEdG0UucIS":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setLineWidth"},"4CcRTcA1aMWU9wnPh7KJX":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setMask"},"OCbStU4MmGOpMDfyW45l7":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setProjection"},"nH_fgWLpFuUuRsjVejsLj":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setTint"},"Fmq0vaw6DXe22b9T5fa6c":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setTransform"},"cMFrRWqivYdGav_XZ3qd0":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setViewport"},"bexAvjzTddDhdyeDpY9Vo":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#stroke"},"BoyYyIHvMwbyAvc4lh1rX":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeArc"},"PPpSTUpLeQ85fDsPuzc5H":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeEllipse"},"GgNuNolqv-jFKacwsMP9E":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeLine"},"nB7cP_fFl4XBOs5FuaUsj":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokePoint"},"VdaNKnSYrPJ5RoVUwsHsg":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokePolygon"},"WZ--yhkL4WVRQYmeDjJto":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeRect"},"YstwUa8rIUuPICiBggwdA":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeRoundRect"},"okFIz4UxkXvvga2WlAcL9":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#tint"},"lZCWYeCOgppv6x7XxjZN-":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#toBlob"},"OR7Y3ym7IWGLxQS8pZAXt":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#toDataURL"},"SEwJTF-2n0-OM0gP6W96J":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#toImageBitmap"},"vwzHEeNjJMmISvZ2BYPOe":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#transform"},"Za4APBgrP99e_t7JVFlOE":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#translate"},"vyIfK7W7_2P97ldY_Sisk":{"uri":"/melonJS/docs/melonjs/World.html"},"WYQWR-NRPp279skdo_ZM_":{"uri":"/melonJS/docs/melonjs/World.html#alpha"},"ct8RQV5gevnhmEvwaMnEy":{"uri":"/melonJS/docs/melonjs/World.html#alwaysUpdate"},"y9EdUUoFiDqtdHdgKG-Tk":{"uri":"/melonJS/docs/melonjs/World.html#ancestor"},"TvxHxfU3bXe1PYsY-sfB3":{"uri":"/melonJS/docs/melonjs/World.html#anchorPoint"},"G0QueWPcVFVxFP7tdmnqX":{"uri":"/melonJS/docs/melonjs/World.html#app"},"agHiwPAsR6arK7RwXesvc":{"uri":"/melonJS/docs/melonjs/World.html#autoDepth"},"OMB_1GTwdT4mSs4wO7QVe":{"uri":"/melonJS/docs/melonjs/World.html#autoSort"},"zcK3sI6A1UGjlz5dMqIqn":{"uri":"/melonJS/docs/melonjs/World.html#autoTransform"},"gWeHaJtT3Tm4uXQwewOSJ":{"uri":"/melonJS/docs/melonjs/World.html#backgroundColor"},"1sFPp6-yEeNmDDuAAETcy":{"uri":"/melonJS/docs/melonjs/World.html#blendMode"},"X_REvcB0PlBMuDoQrSr4R":{"uri":"/melonJS/docs/melonjs/World.html#bodies"},"cMH3Csl-0J1hDXNMptAgG":{"uri":"/melonJS/docs/melonjs/World.html#body"},"JbpVTeuDlPXCIdr07QTYI":{"uri":"/melonJS/docs/melonjs/World.html#bottom"},"lZ-lLG4Tn5-PCmbLoIHUt":{"uri":"/melonJS/docs/melonjs/World.html#broadphase"},"Wnh2rBhu4-QDuBdcnHaHu":{"uri":"/melonJS/docs/melonjs/World.html#centerX"},"PseCxPMVKf7SuWxSY9fY-":{"uri":"/melonJS/docs/melonjs/World.html#centerY"},"9Wdr0v05dK1Y-VXlPYtGa":{"uri":"/melonJS/docs/melonjs/World.html#clipping"},"KagKO-ob-Dvl2YlcCLtxh":{"uri":"/melonJS/docs/melonjs/World.html#currentTransform"},"zKgdyqVNLIoN8557ATYiz":{"uri":"/melonJS/docs/melonjs/World.html#depth"},"zxdDHwZimnItCTv1tRfww":{"uri":"/melonJS/docs/melonjs/World.html#detector"},"upQ8-8qEyxxz_g5XKgKw_":{"uri":"/melonJS/docs/melonjs/World.html#enableChildBoundsUpdate"},"i9PVHytAticyPW_-oOubq":{"uri":"/melonJS/docs/melonjs/World.html#floating"},"koikyGYUeuEiHPy3kqFc-":{"uri":"/melonJS/docs/melonjs/World.html#fps"},"vhKT3uDHWE9PfGFCdkiF2":{"uri":"/melonJS/docs/melonjs/World.html#gravity"},"HXbMBUsNnJFC3Qv5dcxiN":{"uri":"/melonJS/docs/melonjs/World.html#GUID"},"NaJMZNDrCTzBIsdR18zQu":{"uri":"/melonJS/docs/melonjs/World.html#height"},"DoyFbnUSAGfvtJ8SxGHgA":{"uri":"/melonJS/docs/melonjs/World.html#inViewport"},"k_P1FyUYcYR59kwRn44B8":{"uri":"/melonJS/docs/melonjs/World.html#isDirty"},"QXa5s--xLMCEDm_H0LJph":{"uri":"/melonJS/docs/melonjs/World.html#isFlippedX"},"-IYEtl93TOeKIWg1wx4WN":{"uri":"/melonJS/docs/melonjs/World.html#isFlippedY"},"MWfkaMquOeNF6lp5OM5B7":{"uri":"/melonJS/docs/melonjs/World.html#isFloating"},"dy93jA49H0dAvHG3lj3-2":{"uri":"/melonJS/docs/melonjs/World.html#isKinematic"},"BNsGQQiL0no5ze-C33Oz2":{"uri":"/melonJS/docs/melonjs/World.html#isPersistent"},"jelIkBDkWxLdVnUteXtwb":{"uri":"/melonJS/docs/melonjs/World.html#left"},"3u3jPi3XUytnWN3Q1K31S":{"uri":"/melonJS/docs/melonjs/World.html#mask"},"FyZqyFkiDvuSjTn_dKbnN":{"uri":"/melonJS/docs/melonjs/World.html#name"},"fxp1CUbaKlN_V8tjpEdDj":{"uri":"/melonJS/docs/melonjs/World.html#onVisibilityChange"},"48cn8i7ScEEirO2f4MW4Y":{"uri":"/melonJS/docs/melonjs/World.html#physic"},"TC1L3wG3bkXKhbd982i8l":{"uri":"/melonJS/docs/melonjs/World.html#points"},"3-fbP2PJFUu0jYaKJ9Hwn":{"uri":"/melonJS/docs/melonjs/World.html#pos"},"5Lj0K9b7TPLUTGjRhG82s":{"uri":"/melonJS/docs/melonjs/World.html#preRender"},"Wu2kixBbHzmrUcxCxb0pq":{"uri":"/melonJS/docs/melonjs/World.html#right"},"8-MTtIV83mNcqdxO1Z2tK":{"uri":"/melonJS/docs/melonjs/World.html#root"},"4CbIfdTarnFWtAA9Gk83d":{"uri":"/melonJS/docs/melonjs/World.html#shader"},"vIoCn86AGxu6CAQ1X61kI":{"uri":"/melonJS/docs/melonjs/World.html#sortOn"},"Iain8IHYVrGTUM9pYN04R":{"uri":"/melonJS/docs/melonjs/World.html#tint"},"31zm3ovBo2L-BeXK-moWW":{"uri":"/melonJS/docs/melonjs/World.html#top"},"RLJO0bjH7jGwzcew-j1LQ":{"uri":"/melonJS/docs/melonjs/World.html#type"},"hWoqo-fvAn44_4b6MSbBp":{"uri":"/melonJS/docs/melonjs/World.html#updateWhenPaused"},"B5Y14pBmZ-o2smqUD6a5v":{"uri":"/melonJS/docs/melonjs/World.html#width"},"Qgq7yvYl8-Tyf9nUNJ1M_":{"uri":"/melonJS/docs/melonjs/World.html#addBody"},"vlReeI0sfj4nHdGjPatvp":{"uri":"/melonJS/docs/melonjs/World.html#addChild"},"XaJ9gSbUN9gINfKfYiydR":{"uri":"/melonJS/docs/melonjs/World.html#addChildAt"},"dAbjy3Fml_D_5KiGtO5ga":{"uri":"/melonJS/docs/melonjs/World.html#angleTo"},"0OoTIfPytsj-OFJTv-Hau":{"uri":"/melonJS/docs/melonjs/World.html#centerOn"},"eXMkvVav-YytPyJ-vsFmi":{"uri":"/melonJS/docs/melonjs/World.html#clone"},"SVig-3WuA7JtLPCgxkjSs":{"uri":"/melonJS/docs/melonjs/World.html#constructor"},"ViFABpEVGqczIEgQx0rBt":{"uri":"/melonJS/docs/melonjs/World.html#contains"},"a1TKzJD1x0Qna1NTLQS8I":{"uri":"/melonJS/docs/melonjs/World.html#copy"},"Xzpje6uzpF3fhhf6XZzjW":{"uri":"/melonJS/docs/melonjs/World.html#distanceTo"},"SuleONsGxXHOCqs89C3ci":{"uri":"/melonJS/docs/melonjs/World.html#equals"},"0rt40yJNp2fKWsjrlU8_3":{"uri":"/melonJS/docs/melonjs/World.html#flipX"},"xzp--FNX62q3wI0YQkT0v":{"uri":"/melonJS/docs/melonjs/World.html#flipY"},"08KrmxspySb94DW9XAnP_":{"uri":"/melonJS/docs/melonjs/World.html#forEach"},"_7nmR2o-9MkyIqqih-ppy":{"uri":"/melonJS/docs/melonjs/World.html#getAbsolutePosition"},"5rlE9SNmyKRPhj-R9ncfn":{"uri":"/melonJS/docs/melonjs/World.html#getBounds"},"Y_IUV5NmS1eetOZDyLb9C":{"uri":"/melonJS/docs/melonjs/World.html#getChildAt"},"-LM4FFahXIfxWOCMTnv8h":{"uri":"/melonJS/docs/melonjs/World.html#getChildByGUID"},"xQgr6kBSJC4bOtPlWmvqU":{"uri":"/melonJS/docs/melonjs/World.html#getChildByName"},"oJaNxV8XDOKiWyWlqMmnR":{"uri":"/melonJS/docs/melonjs/World.html#getChildByProp"},"2mxkZhlM1FGNjxX06vcj5":{"uri":"/melonJS/docs/melonjs/World.html#getChildByType"},"RAPkxj261jisjoZGE_dfr":{"uri":"/melonJS/docs/melonjs/World.html#getChildIndex"},"EuFiJibhWFUWHjmlX2vjg":{"uri":"/melonJS/docs/melonjs/World.html#getChildren"},"51LsMQLLG5HwuE41b0JTb":{"uri":"/melonJS/docs/melonjs/World.html#getIndices"},"vvTy4PabH-UbhHaWyxS6x":{"uri":"/melonJS/docs/melonjs/World.html#getNextChild"},"h71bljp9gNrpX8-7fa7os":{"uri":"/melonJS/docs/melonjs/World.html#getOpacity"},"v3_vAd_hs__zrR-x7LR0n":{"uri":"/melonJS/docs/melonjs/World.html#getRootAncestor"},"o9yER6s92L0Aq8wb4qYD_":{"uri":"/melonJS/docs/melonjs/World.html#hasChild"},"YUTImem-xf49j_URarhgI":{"uri":"/melonJS/docs/melonjs/World.html#isAttachedToRoot"},"AL-knfziR-8K4LOj9vsoW":{"uri":"/melonJS/docs/melonjs/World.html#isConvex"},"7-wS5YqJf4IEIS0UFmMtm":{"uri":"/melonJS/docs/melonjs/World.html#isFinite"},"duKrhzr4U2A_nN647eICt":{"uri":"/melonJS/docs/melonjs/World.html#lookAt"},"JWTlqDTYQxL4hKEQ6Lv53":{"uri":"/melonJS/docs/melonjs/World.html#moveDown"},"kG_Z7Vz9r0okV9Nu8b48Y":{"uri":"/melonJS/docs/melonjs/World.html#moveToBottom"},"SgypP0Rw647pMwilvTOUF":{"uri":"/melonJS/docs/melonjs/World.html#moveToTop"},"fuAtymDQl-oFBfukhI06h":{"uri":"/melonJS/docs/melonjs/World.html#moveUp"},"v4_9RkSMhYf8vY6MndYFc":{"uri":"/melonJS/docs/melonjs/World.html#onChildChange"},"pxGVOgXGww8w0eVeLCkdZ":{"uri":"/melonJS/docs/melonjs/World.html#onCollision"},"TfQb1iOXsUgv-ceR4pGdE":{"uri":"/melonJS/docs/melonjs/World.html#onDestroyEvent"},"T6afNqpw2p8K5DFcVyBcZ":{"uri":"/melonJS/docs/melonjs/World.html#overlaps"},"LkfpwItpWrrLfKDea0lVh":{"uri":"/melonJS/docs/melonjs/World.html#postDraw"},"tFjFzpKFmlpD6keGPV_cL":{"uri":"/melonJS/docs/melonjs/World.html#preDraw"},"a-Ke55TVPMpFsjEJLEm42":{"uri":"/melonJS/docs/melonjs/World.html#recalc"},"fEQG666KhSDCE0mxq41xZ":{"uri":"/melonJS/docs/melonjs/World.html#removeBody"},"MIeqm9UljYVwgiUP8qwA0":{"uri":"/melonJS/docs/melonjs/World.html#removeChild"},"Mb5QPZZxmcPBVYgL7fdFZ":{"uri":"/melonJS/docs/melonjs/World.html#removeChildNow"},"RWfSs416O1MfyOzcN1sGz":{"uri":"/melonJS/docs/melonjs/World.html#reset"},"8cWLkDhsBw-OYWpkFe0QD":{"uri":"/melonJS/docs/melonjs/World.html#resize"},"q6w-Xqt_S7KHsnQ8AHY12":{"uri":"/melonJS/docs/melonjs/World.html#rotate"},"_hOsyq9yoJv6IPJICMCIL":{"uri":"/melonJS/docs/melonjs/World.html#scale"},"3UVmqc63r28wODJfKxvGx":{"uri":"/melonJS/docs/melonjs/World.html#scaleV"},"r0co7t5nEr8r0DT8lJ0n1":{"uri":"/melonJS/docs/melonjs/World.html#setChildsProperty"},"oZeUxE4b1YRSaR-VsGLAo":{"uri":"/melonJS/docs/melonjs/World.html#setOpacity"},"040opQyytUMVJ0wf13Tkx":{"uri":"/melonJS/docs/melonjs/World.html#setShape"},"Ent--Um6_0FYEpT9wUu0K":{"uri":"/melonJS/docs/melonjs/World.html#setVertices"},"Xe-86qqLG_VvJ0Wwak5vL":{"uri":"/melonJS/docs/melonjs/World.html#shift"},"Y1kuPFfb7d5whqQQfCfXz":{"uri":"/melonJS/docs/melonjs/World.html#sort"},"T8p0AqQ-nZdNDTWVrHvPa":{"uri":"/melonJS/docs/melonjs/World.html#step"},"KwQ4uZZ8T0aZFZDQPvYg-":{"uri":"/melonJS/docs/melonjs/World.html#swapChildren"},"niyWteF-DRnf6Jd_9MVlN":{"uri":"/melonJS/docs/melonjs/World.html#to2d"},"SmjxkF_1Lv_NHAM6jF_Bk":{"uri":"/melonJS/docs/melonjs/World.html#toIso"},"CR_ourTS9oGxj1a26UBkC":{"uri":"/melonJS/docs/melonjs/World.html#toPolygon"},"ir43KvWa2yeAMOnWwMHZL":{"uri":"/melonJS/docs/melonjs/World.html#transform"},"cHY_wPm0u6u20o_cF-4as":{"uri":"/melonJS/docs/melonjs/World.html#translate"},"7FLfkt78ZXdC-1EYkJxBE":{"uri":"/melonJS/docs/melonjs/World.html#union"},"-sf7RSp7BW_m1Cx_aQ9OG":{"uri":"/melonJS/docs/melonjs/World.html#update"},"OH0b90MhVWUQosdPAyC35":{"uri":"/melonJS/docs/melonjs/World.html#updateBounds"},"SLhro3RtZ1kMO0WJyGb3y":{"uri":"/melonJS/docs/melonjs/World.html#draw"},"FL_V4-Qh2a_8u4kjwlG-f":{"uri":"/melonJS/docs/melonjs/World.html#bodyApplyGravity"},"huas9bva4eqJzc7i2aiI_":{"uri":"/melonJS/docs/melonjs/World.html#onAnchorUpdate"},"tz7GboYYDNTVLh2WuDbn2":{"uri":"global.html#AUTO"},"IZvBoSDGPrD8-f-fkd_e7":{"uri":"global.html#CANVAS"},"viD3geuqexuQ7IN8Hu5uu":{"uri":"global.html#version"},"aQoGr7xirdJ9Iq4-fCA-f":{"uri":"global.html#WEBGL"},"ZY7lBmkpuRKeULiQjke2w":{"uri":"global.html#failureLoadedAssets"},"Xtg5WNITc0fkt3MEWfUde":{"uri":"global.html#imgList"},"gV0o4H6VOT-DCIoY7AYvP":{"uri":"global.html#initialized"},"TlsMwqps9HQ6T8p5_ieUG":{"uri":"global.html#parserInitialized"},"T4hvIOst2fNWGOhQX90Ho":{"uri":"global.html#parsers"},"WbckzIcqRK7xzrPxHknLK":{"uri":"global.html#skipAutoInit"},"swtk01_StiFvvwnBW_iUG":{"uri":"/melonJS/docs/melonjs/boot.html"},"cmk0sx-WYijDGJFju047O":{"uri":"/melonJS/docs/melonjs/consoleHeader.html"},"qsLzOyo1cZP8S9uxCfNJt":{"uri":"/melonJS/docs/melonjs/warning.html"},"huiYgg4PoWFFeg4e3eX0P":{"uri":"/melonJS/docs/melonjs/onresize.html"},"i04lAYIraLbxGW_FXgoFX":{"uri":"/melonJS/docs/melonjs/scale.html"}}} \ No newline at end of file +{"version":"1.0.0","metadata":{"linker":"(unsigned)","siteRoot":"melonJS/docs"},"root":{"id":"root-n4VIqLmE5ul611lxNFvjQ","name":"","type":"RootDoc","members":[{"id":"AIj5m7dCi4kTZD4uy3Cmw","name":"audio","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"DF_Z6Pr6CcdagSor1RO68","name":"stopOnAudioError","brief":"","defaultValue":"true","type":"PropertyDoc","description":"

                Specify either to stop on audio loading error or not
                \nif true, melonJS will throw an exception and stop loading
                \nif ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QrBJm7dzcTH3SVZP7g3q5","name":"disable","brief":"","scope":"static","type":"FunctionDoc","description":"

                disable audio output

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QQeDn-2eKgUDZJNU2MI2M","name":"enable","brief":"","scope":"static","see":["audio.disable"],"type":"FunctionDoc","description":"

                enable audio output
                \nonly useful if audio supported and previously disabled through

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1gIov4DPTeI-ZBlvTHHDo","name":"fade","brief":"","scope":"static","type":"FunctionDoc","description":"

                Fade a currently playing sound between two volumee.

                ","params":[{"identifier":"sound_name","optional":false,"description":"

                audio clip name - case sensitive

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"from","optional":false,"description":"

                Volume to fade from (0.0 to 1.0).

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"to","optional":false,"description":"

                Volume to fade to (0.0 to 1.0).

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"duration","optional":false,"description":"

                Time in milliseconds to fade.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"id","optional":true,"description":"

                the sound instance ID. If none is passed, all sounds in group will fade.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"sjijEeMpNhLe9be2MhH9Q","name":"getCurrentTrack","brief":"","scope":"static","type":"FunctionDoc","description":"

                returns the current track Id

                ","params":[],"returns":[{"description":"

                audio track name

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"7h-Z4Xg246ycw33sZnqj_","name":"getVolume","brief":"","scope":"static","type":"FunctionDoc","description":"

                get the default global volume

                ","params":[],"returns":[{"description":"

                current volume value in Float [0.0 - 1.0] .

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3H0JeAydUJfxMoDdS5hs8","name":"hasAudio","brief":"","scope":"static","type":"FunctionDoc","description":"

                check if audio (HTML5 or WebAudio) is supported

                ","params":[],"returns":[{"description":"

                return true if audio (HTML5 or WebAudio) is supported

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"BENni6E_JJ1YMiDWa2xot","name":"hasFormat","brief":"","scope":"static","type":"FunctionDoc","description":"

                check if the given audio format is supported

                ","params":[{"identifier":"codec","optional":false,"description":"

                the audio format to check for support

                ","dataType":{"tokens":[{"value":"\"mp3\" | \"mpeg\" | \"opus\" | \"ogg\" | \"oga\" | \"wav\" | \"aac\" | \"caf\" | \"m4a\" | \"m4b\" | \"mp4\" | \"weba\" | \"webm\" | \"dolby\" | \"flac\"","kind":"canonical"},{"value":"\"mp3\"","kind":"canonical"},{"value":"\"mpeg\"","kind":"canonical"},{"value":"\"opus\"","kind":"canonical"},{"value":"\"ogg\"","kind":"canonical"},{"value":"\"oga\"","kind":"canonical"},{"value":"\"wav\"","kind":"canonical"},{"value":"\"aac\"","kind":"canonical"},{"value":"\"caf\"","kind":"canonical"},{"value":"\"m4a\"","kind":"canonical"},{"value":"\"m4b\"","kind":"canonical"},{"value":"\"mp4\"","kind":"canonical"},{"value":"\"weba\"","kind":"canonical"},{"value":"\"webm\"","kind":"canonical"},{"value":"\"dolby\"","kind":"canonical"},{"value":"\"flac\"","kind":"canonical"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15"}}],"returns":[{"description":"

                return true if the given audio format is supported

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"Ik0E9PutiWpj9CLck4Ha-","name":"init","brief":"","examples":[{"caption":"","code":"// initialize the \"sound engine\", giving \"webm\" as default desired audio format, and \"mp3\" as a fallback\nif (!me.audio.init(\"webm,mp3\")) {\n alert(\"Sorry but your browser does not support html 5 audio !\");\n return;\n}"}],"scope":"static","type":"FunctionDoc","description":"

                Initialize and configure the audio support.
                \nFor a maximum browser coverage the recommendation is to use at least two o...","params":[{"identifier":"format","optional":true,"default":"\"mp3\"","description":"

                audio format to prioritize ("mp3"|"mpeg"|"opus"|"ogg"|"oga"|"wav&qu...","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                Indicates whether audio initialization was successful

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"n5LT68iRcfp4_J81ubm8b","name":"load","brief":"","scope":"static","type":"FunctionDoc","description":"

                Load an audio file

                ","params":[{"identifier":"sound","optional":false,"dataType":{"tokens":[{"value":"loader.Asset","kind":"canonical"},{"value":"loader.Asset","kind":"link"}],"template":"%1"}},{"identifier":"onloadcb","optional":true,"description":"

                function to be called when the resource is loaded

                ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"onerrorcb","optional":true,"description":"

                function to be called in case of error

                ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

                the amount of asset loaded (always 1 if successfull)

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"S1_Hyp07p-SOCEovystA4","name":"mute","brief":"","examples":[{"caption":"","code":"// mute the background music\nme.audio.mute(\"awesome_music\");"}],"scope":"static","type":"FunctionDoc","description":"

                mute or unmute the specified sound, but does not pause the playback.

                ","params":[{"identifier":"sound_name","optional":false,"description":"

                audio clip name - case sensitive

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

                the sound instance ID. If none is passed, all sounds in group will mute.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"mute","optional":true,"default":"true","description":"

                True to mute and false to unmute

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"-SM_Pu1JeJexJ_f5VMoL5","name":"muteAll","brief":"","scope":"static","type":"FunctionDoc","description":"

                mute all audio

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PpHUShk2ad0Msq-1UNX1J","name":"muted","brief":"","scope":"static","type":"FunctionDoc","description":"

                Returns true if audio is muted globally.

                ","params":[],"returns":[{"description":"

                true if audio is muted globally

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"eKW9bGkCg2BeOlkGo9LAr","name":"pause","brief":"","examples":[{"caption":"","code":"me.audio.pause(\"cling\");"}],"scope":"static","type":"FunctionDoc","description":"

                pause the specified sound on all channels
                \nthis function does not reset the currentTime property

                ","params":[{"identifier":"sound_name","optional":false,"description":"

                audio clip name - case sensitive

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

                the sound instance ID. If none is passed, all sounds in group will pause.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"nUkxEAfKCth4GQZyhafdc","name":"pauseTrack","brief":"","examples":[{"caption":"","code":"me.audio.pauseTrack();"}],"scope":"static","type":"FunctionDoc","description":"

                pause the current audio track

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LeFWzPmX1RdzMHLSVhHxE","name":"play","brief":"","examples":[{"caption":"","code":"// play the \"cling\" audio clip\nme.audio.play(\"cling\");\n// play & repeat the \"engine\" audio clip\nme.audio.play(\"engine\", true);\n// play the \"gameover_sfx\" audio clip and call myFunc when finished\nme.audio.play(\"gameover_sfx\", false, myFunc);\n// play the \"gameover_sfx\" audio clip with a lower volume level\nme.audio.play(\"gameover_sfx\", false, null, 0.5);"}],"scope":"static","type":"FunctionDoc","description":"

                play the specified sound

                ","params":[{"identifier":"sound_name","optional":false,"description":"

                audio clip name - case sensitive

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"loop","optional":true,"default":"false","description":"

                loop audio

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"onend","optional":true,"description":"

                Function to call when sound instance ends playing.

                ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"volume","optional":true,"default":"default","description":"

                Float specifying volume (0.0 - 1.0 values accepted).

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                the sound instance ID.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ViTk2mUT9zuhmjLtaudzA","name":"playTrack","brief":"","examples":[{"caption":"","code":"me.audio.playTrack(\"awesome_music\");"}],"scope":"static","type":"FunctionDoc","description":"

                play the specified audio track
                \nthis function automatically set the loop property to true
                \nand keep track of the cur...","params":[{"identifier":"sound_name","optional":false,"description":"

                audio track name - case sensitive

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"volume","optional":true,"default":"default","description":"

                Float specifying volume (0.0 - 1.0 values accepted).

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                the sound instance ID.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xh5NKYVhKYJdBpBC5uriN","name":"rate","brief":"","examples":[{"caption":"","code":"// get the playback rate of the background music\nlet rate = me.audio.rate(\"dst-gameforest\");\n// speed up the playback of the background music\nme.audio.rate(\"dst-gameforest\", 2.0);"}],"scope":"static","type":"FunctionDoc","description":"

                get or set the rate of playback for a sound.

                ","params":[{"identifier":"sound_name","optional":false,"description":"

                audio clip name - case sensitive

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"rate","optional":true,"variadic":true,"description":"

                playback rate : 0.5 to 4.0, with 1.0 being normal speed.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"id","optional":true,"description":"

                the sound instance ID. If none is passed, all sounds in group will be changed.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                return the current playback rate (if no extra parameters were given)

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nx2Vza4hzzQesGgmFOLrA","name":"resume","brief":"","examples":[{"caption":"","code":"// play a audio clip\nlet id = me.audio.play(\"myClip\");\n...\n// pause it\nme.audio.pause(\"myClip\", id);\n...\n// resume\nme.audio.resume(\"myClip\", id);"}],"scope":"static","type":"FunctionDoc","description":"

                resume the specified sound on all channels

                ","params":[{"identifier":"sound_name","optional":false,"description":"

                audio clip name - case sensitive

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

                the sound instance ID. If none is passed, all sounds in group will resume.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"lS3-WLR9tcPI8cheKnK3y","name":"resumeTrack","brief":"","examples":[{"caption":"","code":"// play an awesome music\nme.audio.playTrack(\"awesome_music\");\n// pause the audio track\nme.audio.pauseTrack();\n// resume the music\nme.audio.resumeTrack();"}],"scope":"static","type":"FunctionDoc","description":"

                resume the previously paused audio track

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7FXhHfF825d7IJLFl7FmJ","name":"seek","brief":"","examples":[{"caption":"","code":"// return the current position of the background music\nlet current_pos = me.audio.seek(\"dst-gameforest\");\n// set back the position of the background music to the beginning\nme.audio.seek(\"dst-gameforest\", 0);"}],"scope":"static","type":"FunctionDoc","description":"

                get/set the position of playback for a sound.

                ","params":[{"identifier":"sound_name","optional":false,"description":"

                audio clip name - case sensitive

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"seek","optional":true,"variadic":true,"description":"

                the position to move current playback to (in seconds).

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"id","optional":true,"description":"

                the sound instance ID. If none is passed, all sounds in group will changed.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                return the current seek position (if no extra parameters were given)

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"4jzyUAcjVEZ-n0bXnRJz8","name":"setVolume","brief":"","scope":"static","type":"FunctionDoc","description":"

                set the default global volume

                ","params":[{"identifier":"volume","optional":false,"description":"

                Float specifying volume (0.0 - 1.0 values accepted).

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"PiQ7KGwU-h3u66dhcqpA9","name":"stop","brief":"","examples":[{"caption":"","code":"me.audio.stop(\"cling\");"}],"scope":"static","type":"FunctionDoc","description":"

                stop the specified sound on all channels

                ","params":[{"identifier":"sound_name","optional":true,"description":"

                audio clip name (case sensitive). If none is passed, all sounds are stopped.

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

                the sound instance ID. If none is passed, all sounds in group will stop.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"TRbfrtcCQe1IKQIGBgDvz","name":"stopTrack","brief":"","examples":[{"caption":"","code":"// play a awesome music\nme.audio.playTrack(\"awesome_music\");\n// stop the current music\nme.audio.stopTrack();"}],"scope":"static","see":["audio.playTrack"],"type":"FunctionDoc","description":"

                stop the current audio track

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VqqtB5cdQfPBviENOuUau","name":"unload","brief":"","examples":[{"caption":"","code":"me.audio.unload(\"awesome_music\");"}],"scope":"static","type":"FunctionDoc","description":"

                unload specified audio track to free memory

                ","params":[{"identifier":"sound_name","optional":false,"description":"

                audio track name - case sensitive

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                true if unloaded

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"urUA6pHk1mqu9nEtM_kgS","name":"unloadAll","brief":"","examples":[{"caption":"","code":"me.audio.unloadAll();"}],"scope":"static","type":"FunctionDoc","description":"

                unload all audio to free memory

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tHGi-mp4EGKqqLCsC4H1Z","name":"unmute","brief":"","scope":"static","type":"FunctionDoc","description":"

                unmute the specified sound

                ","params":[{"identifier":"sound_name","optional":false,"description":"

                audio clip name

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"id","optional":true,"description":"

                the sound instance ID. If none is passed, all sounds in group will unmute.

                ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"VfC3rrmIm4KxZ_bNbqH_z","name":"unmuteAll","brief":"","scope":"static","type":"FunctionDoc","description":"

                unmute all audio

                ","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"d63FQAfNVK7P8v_gSMFjA","name":"collision","brief":"","type":"NSDoc","description":"

                Collision detection (and projection-based collision response) of 2D shapes.
                \nBased on the Separating Axis Theorem and s...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"kFWlyNwFK1JzQYlkBTUc3","name":"types","brief":"","examples":[{"caption":"","code":" // set the body collision type\n myEntity.body.collisionType = me.collision.types.PLAYER_OBJECT;\n\n // filter collision detection with collision shapes, enemies and collectables\n myEntity.body.setCollisionMask(\n me.collision.types.WORLD_SHAPE |\n me.collision.types.ENEMY_OBJECT |\n me.collision.types.COLLECTABLE_OBJECT\n );\n\n // User-defined collision types are defined using BITWISE LEFT-SHIFT:\n game.collisionTypes = {\n LOCKED_DOOR : me.collision.types.USER << 0,\n OPEN_DOOR : me.collision.types.USER << 1,\n LOOT : me.collision.types.USER << 2,\n };\n\n // Set collision type for a door entity\n myDoorEntity.body.collisionType = game.collisionTypes.LOCKED_DOOR;\n\n // Set collision mask for the player entity, so it collides with locked doors and loot\n myPlayerEntity.body.setCollisionMask(\n me.collision.types.ENEMY_OBJECT |\n me.collision.types.WORLD_SHAPE |\n game.collisionTypes.LOCKED_DOOR |\n game.collisionTypes.LOOT\n );"}],"readonly":true,"scope":"static","see":["Body.setCollisionMask","Body.collisionType"],"type":"EnumDoc","description":"

                Enum for collision type values.

                ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"_1w-XkTzIVNz0HNhdpcL8","name":"ACTION_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                e.g. doors

                "},{"id":"exqqTrzo4d4sFHUYOI1oL","name":"ALL_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                all of the above (including user-defined types)

                "},{"id":"dd42pAs1_UZfFr9OeFjK3","name":"COLLECTABLE_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                collectable objects

                "},{"id":"am48diLTicMZSMHg_cpjF","name":"ENEMY_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                enemies objects

                "},{"id":"HfLnHsuqq5Cg1BPeASY53","name":"NO_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                to disable collision check

                "},{"id":"_MNePunWIogIqpCe2G3yJ","name":"NO_OBJECT","brief":"

                to disable collision check

                ","defaultValue":"0","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"f1IcBoJajNkhb1BIbUJpd","name":"NPC_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                non playable characters

                "},{"id":"7L8hgg-tkmWya5_0szdbC","name":"PLAYER_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                playbable characters

                "},{"id":"TXGd8uGRAHTTQTOSnlxHc","name":"PROJECTILE_OBJECT","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                e.g. missiles

                "},{"id":"5pllY4j_0920zQrRVCSyl","name":"USER","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                user-defined collision types (see example)

                "},{"id":"hL_l1S9KAv-Wjh-x1Hl9L","name":"WORLD_SHAPE","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                e.g. walls; for map collision shapes

                "}]},{"id":"VS2Gh_p0L2BrX0oqXMcNF","name":"maxChildren","brief":"","access":"public","defaultValue":"8","scope":"static","see":["game.world.broadphase"],"type":"PropertyDoc","description":"

                The maximum number of children that a quadtree node can contain before it is split into sub-nodes.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mO7Y8f6ToAeyKtvbFMBMZ","name":"maxDepth","brief":"","access":"public","defaultValue":"4","scope":"static","see":["game.world.broadphase"],"type":"PropertyDoc","description":"

                The maximum number of levels that the quadtree will create.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HRXLmhxaDR8siKpGkwKRk","name":"rayCast","brief":"","access":"public","examples":[{"caption":"","code":" // define a line accross the viewport\n let ray = new me.Line(\n // absolute position of the line\n 0, 0, [\n // starting point relative to the initial position\n new me.Vector2d(0, 0),\n // ending point\n new me.Vector2d(me.game.viewport.width, me.game.viewport.height)\n ]);\n\n // check for collition\n result = me.collision.rayCast(ray);\n\n if (result.length > 0) {\n // ...\n }"}],"scope":"instance","type":"MethodDoc","description":"

                Checks for object colliding with the given line

                ","params":[{"identifier":"line","optional":false,"description":"

                line to be tested for collision

                ","dataType":{"tokens":[{"value":"Line","kind":"canonical"},{"value":"Line","kind":"link"}],"template":"%1"}},{"identifier":"result","optional":true,"description":"

                a user defined array that will be populated with intersecting physic objects.

                ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"returns":[{"description":"

                an array of intersecting physic objects

                ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"Renderable","kind":"link"}],"template":"%1<%2>"}}],"extends":[],"implements":[]}]},{"id":"60CjiKGpC9vH0wAFGjBDA","name":"device","brief":"","defaultValue":"false","type":"NSDoc","description":"

                device type and capabilities

                ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"rLzVZQmX6rI8LQJULYR-1","name":"platform","brief":"","readonly":true,"type":"NSDoc","description":"

                The device platform type

                ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"RUMxvNN7a9Roo9qxAxb5A","name":"android","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if the device is an Android platform

                "},{"id":"YCY3NywrEPBFLm6iuAdWx","name":"android2","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if the device is an Android 2.x platform

                "},{"id":"Q7evuKDnvmeZK2b_s6gA-","name":"BlackBerry","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if the device is a BlackBerry platform

                "},{"id":"DznEoXCPyM0pbPRbclD6g","name":"chromeOS","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if the device is running on ChromeOS.

                "},{"id":"0Z6ZJTp4JgA10dz8WoOm_","name":"ejecta","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if running under Ejecta

                "},{"id":"KJYsgxXqfuP1G10sOFZy5","name":"iOS","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if the device is an iOS platform

                "},{"id":"uB0C6CwCnWSIdUTngtIlD","name":"isMobile","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if a mobile device

                "},{"id":"2RKW_mdjRqevtqu1EmzT1","name":"isWeixin","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if running under Wechat

                "},{"id":"o7eZfXUjhEeG3gErLGUEL","name":"Kindle","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if the device is a Kindle platform

                "},{"id":"COP7SbNI1PREUvmq1Gpl4","name":"linux","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if the device is a Linux platform

                "},{"id":"KwHRYBPvBf_QVuhyICA3l","name":"nodeJS","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if running under node.js

                "},{"id":"wEhgGKsEKD03ILJJ9-TXi","name":"ua","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                the user agent string for the current device

                "},{"id":"GASknrQ5Ax2b2xQAAwARq","name":"wp","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                true if the device is a Windows Phone platform

                "}]},{"id":"TnkBUM3OFx5t35x-gjSMc","name":"accelerationX","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchAccelerometer"],"type":"PropertyDoc","description":"

                contains the g-force acceleration along the x-axis.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SsohbpaA2kLyy3JESCrAk","name":"accelerationY","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchAccelerometer"],"type":"PropertyDoc","description":"

                contains the g-force acceleration along the y-axis.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DUNLNqtJqHf1VXj7j4R7s","name":"accelerationZ","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchAccelerometer"],"type":"PropertyDoc","description":"

                contains the g-force acceleration along the z-axis.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s5qjxJhOWDt8vbbDNBHu1","name":"alpha","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchDeviceOrientation"],"type":"PropertyDoc","description":"

                Device orientation Alpha property. Gives angle based on the rotation of the phone around its z axis.\nThe z-axis is perpend...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"39ruehanRMV1gelklhMHv","name":"autoFocus","brief":"","access":"public","defaultValue":"true","type":"PropertyDoc","description":"

                Specify whether to automatically bring the window to the front

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3V3WvBf1pa7m6PM878vQQ","name":"beta","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchDeviceOrientation"],"type":"PropertyDoc","description":"

                Device orientation Beta property. Gives angle on tilting a portrait held phone forward or backward

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3fIsGu6hD63fK2im76rrx","name":"devicePixelRatio","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                Ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9dL8Wa07_s5_3EfvlHD5U","name":"gamma","brief":"","access":"public","defaultValue":"0","readonly":true,"see":["device.watchDeviceOrientation"],"type":"PropertyDoc","description":"

                Device orientation Gamma property. Gives angle on tilting a portrait held phone left or right

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tVVg_R82Z7-fpnanPxdPN","name":"hasAccelerometer","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

                Browser accelerometer capabilities

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hi-hfXUKqhcJ1EOibRf28","name":"hasDeviceOrientation","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

                Browser device orientation

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TH4z-23QCuhZEOhspEGsz","name":"hasFullscreenSupport","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                Browser full screen support

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8WJfJkOrHTcbhb-ZTv-ry","name":"hasHTML5Audio","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                Device HTML5Audio Support

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OLUeHJks1eeJz4spI275e","name":"hasPointerLockSupport","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                Browser pointerlock api support

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"09JU14rwJ-fEFZUNnPucJ","name":"hasWebAudio","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

                Device WebAudio Support

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HcnNRDlEo5BsUgkjwNlcj","name":"isMobile","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                equals to true if a mobile device.\n(Android | iPhone | iPad | iPod | BlackBerry | Windows Phone | Kindle)

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L3daV_POMErY0hr95Y18u","name":"language","brief":"","access":"public","readonly":true,"see":["http://www.w3schools.com/tags/ref_language_codes.asp"],"type":"PropertyDoc","description":"

                a string representing the preferred language of the user, usually the language of the browser UI.\n(will default to "e...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"08xxE6bjWyXrIVj8Uphj8","name":"localStorage","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                Browser Local Storage capabilities
                \n(this flag will be set to false if cookies are blocked)

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TAtqplk7qQMuBGJT1d2Lr","name":"maxTouchPoints","brief":"","access":"public","examples":[{"caption":"","code":"if (me.device.maxTouchPoints > 1) {\n // device supports multi-touch\n}"}],"readonly":true,"type":"PropertyDoc","description":"

                the maximum number of simultaneous touch contact points are supported by the current device.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"asgZJ7UklukyPJ2HQJBZt","name":"nativeBase64","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                Browser Base64 decoding capability

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pTEeWw_4QWyvrJXy418kN","name":"offscreenCanvas","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                equals to true if the device browser supports OffScreenCanvas.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mnrHLrPG37wOZJWZXJqrD","name":"pauseOnBlur","brief":"","access":"public","defaultValue":"true","deprecated":"since 15.4.0","see":["Application.pauseOnBlur"],"type":"PropertyDoc","description":"

                Specify whether to pause the game when losing focus

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MCXo22_aobFfr9vHP2b1-","name":"platform","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                the device platform type

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6yfx3IyWvLF331QWWSrjr","name":"pointerEvent","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

                True if the browser supports Pointer Events

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VSSax4vJ1BPc0tuOtyUcF","name":"resumeOnFocus","brief":"","access":"public","defaultValue":"true","deprecated":"since 15.4.0","see":["Application.resumeOnFocus"],"type":"PropertyDoc","description":"

                Specify whether to unpause the game when gaining focus

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"waDWZ_QGyuGC7L5P7MuJA","name":"screenOrientation","brief":"","access":"public","readonly":true,"see":["https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/onchange"],"type":"PropertyDoc","description":"

                Supports the ScreenOrientation API

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DQj3ZEeuHpxnX6XuqlLmP","name":"sound","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                Returns true if the browser/device has audio capabilities.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e1qHPu5xTCj2D25arMmMK","name":"stopOnBlur","brief":"","access":"public","defaultValue":"false","deprecated":"since 15.4.0","see":["Application.stopOnBlur"],"type":"PropertyDoc","description":"

                Specify whether to stop the game when losing focus or not.\nThe engine restarts on focus if this is enabled.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P1YCjrBr7AbsIMtXepOwI","name":"touch","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                Touch capabilities (support either Touch or Pointer events)

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4WeWZ2OKBRc_0Djg3A-cF","name":"touchEvent","brief":"","access":"public","defaultValue":"--","readonly":true,"type":"PropertyDoc","description":"

                True if the browser supports Touch Events

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s5s6TG7BsIlJHKKSxrB_t","name":"wheel","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                W3C standard wheel events

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ccqGb1W4uyl9DjFPg8jrN","name":"enableSwipe","brief":"","access":"public","type":"FunctionDoc","description":"

                enable/disable swipe on WebView.

                ","params":[{"identifier":"enable","optional":true,"default":"true","description":"

                enable or disable swipe.

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"tScNmXP23Q7v3cABkjjne","name":"exitFullscreen","brief":"","access":"public","type":"FunctionDoc","description":"

                Exit fullscreen mode. Requires fullscreen support from the browser/device.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tzhnNLXMBzh94H_uOhJyu","name":"focus","brief":"","access":"public","examples":[{"caption":"","code":"if (clicked) {\n me.device.focus();\n}"}],"type":"FunctionDoc","description":"

                Makes a request to bring this device window to the front.

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hWDHzaKQeBO2oCdj-xA-f","name":"getElement","brief":"","access":"public","type":"FunctionDoc","description":"

                return the DOM element for the given element name or HTMLElement object

                ","params":[{"identifier":"element","optional":false,"description":"

                the parent element name or a HTMLElement object

                ","dataType":{"tokens":[{"value":"string | HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

                the corresponding DOM Element or null if not existing

                ","dataType":{"tokens":[{"value":"HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"RpI_D1VNNu5MLfVJwDAvl","name":"getElementBounds","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/DOMRect"],"type":"FunctionDoc","description":"

                returns the size of the given HTMLElement and its position relative to the viewport\n
                an HTMLElement object

                ","dataType":{"tokens":[{"value":"string | HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

                the size and position of the element relatively to the viewport

                ","dataType":{"tokens":[{"value":"DOMRect","kind":"canonical"},{"value":"DOMRect","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZBOnCCi3j3MrkR9WZxd4g","name":"getParentBounds","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/DOMRect"],"type":"FunctionDoc","description":"

                returns the size of the given HTMLElement Parent and its position relative to the viewport\n
                an HTMLElement object

                ","dataType":{"tokens":[{"value":"string | HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

                the size and position of the given element parent relative to the viewport

                ","dataType":{"tokens":[{"value":"DOMRect","kind":"canonical"},{"value":"DOMRect","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"7iLvOhSgO6p5fesaCUIAH","name":"getParentElement","brief":"","access":"public","type":"FunctionDoc","description":"

                return the parent DOM element for the given parent name or HTMLElement object

                ","params":[{"identifier":"element","optional":false,"description":"

                the parent element name or a HTMLElement object

                ","dataType":{"tokens":[{"value":"string | HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

                the parent Element

                ","dataType":{"tokens":[{"value":"HTMLElement","kind":"canonical"},{"value":"HTMLElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"AAcE3BoUhrqKCjFKVDVyr","name":"getScreenOrientation","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation"],"type":"FunctionDoc","description":"

                Return a string representing the orientation of the device screen.\nIt can be "any", "natural", "l...","params":[],"returns":[{"description":"

                the screen orientation

                ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"qGaNHzaxMivTkpKf6Atdp","name":"getStorage","brief":"","access":"public","see":["save"],"type":"FunctionDoc","description":"

                return the device storage

                ","params":[{"identifier":"type","optional":true,"default":"\"local\"","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                a reference to the device storage

                ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"bja42krJk1VRWyZT3WED-","name":"isFullscreen","brief":"","access":"public","type":"FunctionDoc","description":"

                Returns true if the browser/device is in full screen mode.

                ","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"FllCW045bIIUmY48Iabwk","name":"isLandscape","brief":"","access":"public","type":"FunctionDoc","description":"

                return true if the device screen orientation is in Portrait mode

                ","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"vnV2Qu9zK-RcXu_p8vza3","name":"isPortrait","brief":"","access":"public","type":"FunctionDoc","description":"

                return true if the device screen orientation is in Portrait mode

                ","params":[],"returns":[{"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"fY6CBGi38PEjvxY2lByk1","name":"isWebGLSupported","brief":"","access":"public","type":"FunctionDoc","description":"

                returns true if the device supports WebGL

                ","params":[{"identifier":"options","optional":true,"description":"

                context creation options

                ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.failIfMajorPerformanceCaveat","optional":true,"default":"true","description":"

                If true, the renderer will switch to CANVAS mode if the performances of a WebGL context would be dramatically lower than t...","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

                true if WebGL is supported

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"JzEHWPb6SvAjJvfsNK8w_","name":"lockOrientation","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation"],"type":"FunctionDoc","description":"

                locks the device screen into the specified orientation.
                \nThis method only works for installed Web apps or for Web pages...","params":[{"identifier":"orientation","optional":false,"description":"

                The orientation into which to lock the screen.

                ","dataType":{"tokens":[{"value":"string | Array","kind":"canonical"},{"value":"Array","kind":"canonical"}],"template":"string | %1"}}],"returns":[{"description":"

                true if the orientation was unsuccessfully locked

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"I5Io7kV1KPDiVB98lwPgC","name":"onReady","brief":"","access":"public","examples":[{"caption":"","code":" // small game skeleton\n let game = {\n // called by the me.device.onReady function\n onload = function () {\n // init video\n if (!me.video.init('screen', 640, 480, true)) {\n alert(\"Sorry but your browser does not support html 5 canvas.\");\n return;\n }\n\n // initialize the \"audio\"\n me.audio.init(\"mp3,ogg\");\n\n // set callback for ressources loaded event\n me.loader.onload = this.loaded.bind(this);\n\n // set all ressources to be loaded\n me.loader.preload(game.assets);\n\n // load everything & display a loading screen\n me.state.change(me.state.LOADING);\n };\n\n // callback when everything is loaded\n loaded = function () {\n // define stuff\n // ....\n\n // change to the menu screen\n me.state.change(me.state.PLAY);\n }\n }; // game\n\n // \"bootstrap\"\n me.device.onReady(function () {\n game.onload();\n });"}],"type":"FunctionDoc","description":"

                specify a function to execute when the Device is fully loaded and ready

                ","params":[{"identifier":"fn","optional":false,"description":"

                the function to be executed

                ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"G97WetpOTcRfqfEq0iQnn","name":"requestFullscreen","brief":"","access":"public","examples":[{"caption":"","code":"// add a keyboard shortcut to toggle Fullscreen mode on/off\nme.input.bindKey(me.input.KEY.F, \"toggleFullscreen\");\nme.event.on(me.event.KEYDOWN, function (action, keyCode, edge) {\n // toggle fullscreen on/off\n if (action === \"toggleFullscreen\") {\n me.device.requestFullscreen();\n } else {\n me.device.exitFullscreen();\n }\n});"}],"type":"FunctionDoc","description":"

                Triggers a fullscreen request. Requires fullscreen support from the browser/device.

                ","params":[{"identifier":"element","optional":true,"description":"

                the element to be set in full-screen mode.

                ","dataType":{"tokens":[{"value":"Element","kind":"canonical"},{"value":"Element","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"7sYgWvk9HT95IHNI-9IJm","name":"unlockOrientation","brief":"","access":"public","see":["https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation"],"type":"FunctionDoc","description":"

                unlocks the device screen into the specified orientation.
                \nThis method only works for installed Web apps or for Web pag...","params":[],"returns":[{"description":"

                true if the orientation was unsuccessfully unlocked

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"EDXMglsyYd3tIz_KZtvOA","name":"unwatchAccelerometer","brief":"","access":"public","type":"FunctionDoc","description":"

                unwatch Accelerometor event

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zUrmSuhjw_20t5HuYNu1h","name":"unwatchDeviceOrientation","brief":"","access":"public","type":"FunctionDoc","description":"

                unwatch Device orientation event

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hNtt68Fw2mRl2EncZYI3_","name":"vibrate","brief":"","access":"public","examples":[{"caption":"","code":"// vibrate for 1000 ms\nme.device.vibrate(1000);\n// or alternatively\nme.device.vibrate([1000]);\n// vibrate for 50 ms, be still for 100 ms, and then vibrate for 150 ms:\nme.device.vibrate([50, 100, 150]);\n// cancel any existing vibrations\nme.device.vibrate(0);"}],"type":"FunctionDoc","description":"

                the vibrate method pulses the vibration hardware on the device,
                \nIf the device doesn't support vibration, this method ...","params":[{"identifier":"pattern","optional":false,"description":"

                pattern of vibration and pause intervals

                ","dataType":{"tokens":[{"value":"number | Array","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1 | %3<%2>"}}],"returns":[],"extends":[],"implements":[]},{"id":"nF_RPHqMFNFYPQwpdAAgv","name":"watchAccelerometer","brief":"","access":"public","examples":[{"caption":"","code":"// try to enable device accelerometer event on user gesture\nme.input.registerPointerEvent(\"pointerleave\", me.game.viewport, function() {\n if (me.device.watchAccelerometer() === true) {\n // Success\n me.input.releasePointerEvent(\"pointerleave\", me.game.viewport);\n } else {\n // ... fail at enabling the device accelerometer event\n }\n});"}],"see":["device.accelerationX","device.accelerationY","device.accelerationZ"],"type":"FunctionDoc","description":"

                Enable monitor of the device accelerator to detect the amount of physical force of acceleration the device is receiving.\n(...","params":[],"returns":[{"description":"

                false if not supported or permission not granted by the user

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"h4i1Lpl5bJd44Ewhjgxhd","name":"watchDeviceOrientation","brief":"","access":"public","examples":[{"caption":"","code":"// try to enable device orientation event on user gesture\nme.input.registerPointerEvent(\"pointerleave\", me.game.viewport, function() {\n if (me.device.watchDeviceOrientation() === true) {\n // Success\n me.input.releasePointerEvent(\"pointerleave\", me.game.viewport);\n } else {\n // ... fail at enabling the device orientation event\n }\n});"}],"see":["device.alpha","device.beta","device.gamma"],"type":"FunctionDoc","description":"

                Enable monitor of the device orientation to detect the current orientation of the device as compared to the Earth coordina...","params":[],"returns":[{"description":"

                false if not supported or permission not granted by the user

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]}]},{"id":"sKs251q7BAxOzhurzq_1e","name":"event","brief":"","type":"NSDoc","description":"

                an event system based on nodeJS EventEmitter interface

                ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"LKSeC0yBRlnnJO3xTd3Ec","name":"BLUR","brief":"","access":"public","defaultValue":"\"me.blur\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event generated when the main browser or window is losing focus

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UF7ykEnAr3zh4snekeNb_","name":"BOOT","brief":"","access":"public","defaultValue":"\"me.boot\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event when the system is booting

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Lzb47lKeiH3uIIfQ9lxnY","name":"CANVAS_ONRESIZE","brief":"","access":"public","defaultValue":"\"canvas.onresize\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when the canvas is resized
                \n(this usually follows a WINDOW_ONRESIZE event).
                \nData passed : {number} canva...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LmvSbbaubIjZbMlnvgbkl","name":"DOM_READY","brief":"","access":"public","defaultValue":"\"dom_ready\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event when the DOM is Ready is booting

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n69HqN4Jud-SD1gvWIIei","name":"DRAGEND","brief":"","access":"public","defaultValue":"\"me.game.dragend\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for dragend events on a Draggable entity
                \nData passed:\n{object} the drag event
                \n{object} the Draggable entit...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Edj1TlorIBDa0LQVaXzdr","name":"DRAGSTART","brief":"","access":"public","defaultValue":"\"me.game.dragstart\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for dragstart events on a Draggable entity
                \nData passed:\n{object} the drag event
                \n{object} the Draggable ent...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HUGtEWYZmG2rqXu5_GImM","name":"FOCUS","brief":"","access":"public","defaultValue":"\"me.focus\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event generated when the main browser or window is gaining back focus

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-rson2hy9VuYFDG35cOzm","name":"GAME_AFTER_DRAW","brief":"","access":"public","defaultValue":"\"me.game.afterDraw\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for the start of the draw loop\nData passed : {number} time the current time stamp

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IdslF8RyHcSkc4bXXt7zj","name":"GAME_AFTER_UPDATE","brief":"","access":"public","defaultValue":"\"me.game.afterUpdate\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event for the end of the update loop\nData passed : {number} time the current time stamp

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZTkcnTVSh-9Nng4TH2nzu","name":"GAME_BEFORE_DRAW","brief":"","access":"public","defaultValue":"\"me.game.beforeDraw\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for the end of the draw loop\nData passed : {number} time the current time stamp

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rcPAhK7FzHRJUfeT_6_2r","name":"GAME_BEFORE_UPDATE","brief":"","access":"public","defaultValue":"\"me.game.beforeUpdate\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event for when the engine is about to start a new game loop\nData passed : {number} time the current time stamp

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kNmuvgkzSm6QZDBECIoTT","name":"GAME_INIT","brief":"","access":"public","defaultValue":"\"me.game.onInit\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event for when the game manager is initialized
                \nData passed : none

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v5KGuTGuVxY9DEIN7y142","name":"GAME_RESET","brief":"","access":"public","defaultValue":"\"me.game.onReset\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event for when the game manager is resetted
                \nData passed : none

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tD0XCEFoNw0aYpFpL_qc7","name":"GAME_UPDATE","brief":"","access":"public","defaultValue":"\"me.game.onUpdate\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when the game is updated (will be impacted by frame skip, frame interpolation and pause/resume state)
                \nData ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Qmo8U6hufv_CMjGssu53s","name":"GAMEPAD_CONNECTED","brief":"","access":"public","defaultValue":"\"gamepad.connected\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when a gamepad is connected
                \nData passed : {object} gamepad object

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6T3wi_-ua-upi5Vp3e47a","name":"GAMEPAD_DISCONNECTED","brief":"","access":"public","defaultValue":"\"gamepad.disconnected\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when a gamepad is disconnected
                \nData passed : {object} gamepad object

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u8w5t_9aKARBIY8z7XPSo","name":"GAMEPAD_UPDATE","brief":"","access":"public","defaultValue":"\"gamepad.update\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when gamepad button/axis state is updated
                \nData passed : {number} index
                \nData passed : {string} type : &...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yjLRhS3uU-mc7USBUCiNO","name":"KEYDOWN","brief":"","access":"public","defaultValue":"\"me.input.keydown\"","examples":[{"caption":"","code":" me.input.bindKey(me.input.KEY.X, \"jump\", true); // Edge-triggered\n me.input.bindKey(me.input.KEY.Z, \"shoot\"); // Level-triggered\n me.event.on(me.event.KEYDOWN, (action, keyCode, edge) => {\n // Checking bound keys\n if (action === \"jump\") {\n if (edge) {\n this.doJump();\n }\n\n // Make character fall slower when holding the jump key\n this.vel.y = this.body.gravity;\n }\n });"}],"readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for pressing a binded key
                \nData passed : {string} user-defined action, {number} keyCode,\n{boolean} edge state {\n // Checking unbound keys\n if (keyCode == me.input.KEY.ESC) {\n if (me.state.isPaused()) {\n me.state.resume();\n }\n else {\n me.state.pause();\n }\n }\n});"}],"readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for releasing a binded key
                \nData passed : {string} user-defined action, {number} keyCode

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KfiPURAurwopzYNYeMDDm","name":"LEVEL_LOADED","brief":"","access":"public","defaultValue":"\"me.game.onLevelLoaded\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when a level is loaded
                \nData passed : {string} Level Name

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5n7kZ_to2HnPiUuvyUEXs","name":"LOADER_COMPLETE","brief":"","access":"public","defaultValue":"\"me.loader.onload\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when everything has loaded
                \nData passed : none

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zlrDZhH3YnqAIyVMlHp5o","name":"LOADER_ERROR","brief":"","access":"public","defaultValue":"\"me.loader.onError\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when an error occur during preloading
                \nData passed : {Resource} resource object

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i_VoRm3gwLkyKPjxDqFl8","name":"LOADER_PROGRESS","brief":"","access":"public","defaultValue":"\"me.loader.onProgress\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for displaying a load progress indicator
                \nData passed : {number} [0 .. 1], {Resource} resource object

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7_gWN4q-j06yAdz1yknJZ","name":"ONCONTEXT_RESTORED","brief":"","access":"public","defaultValue":"\"renderer.contextrestored\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when the current context is restored
                \nData passed : {me.Renderer} the current renderer instance`

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WDw6wNJXru-VLx15bjIBH","name":"POINTERLOCKCHANGE","brief":"","access":"public","defaultValue":"\"me.event.pointerlockChange\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for onPointerLockChange event
                \nData passed : {boolean} pointer lock status (true/false)

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DUwFsbpdkBKkx2UI4-lJ7","name":"POINTERMOVE","brief":"","access":"public","defaultValue":"\"me.event.pointermove\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for pointermove events on the screen area
                \nData passed : {me.Pointer} a Pointer object

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"61h5LQsnbDG3B9stycdwe","name":"STAGE_RESET","brief":"","access":"public","defaultValue":"\"me.stage.onReset\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event for when a stage is resetted

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pf37kiSPImM5HRu0oHG5P","name":"STATE_CHANGE","brief":"","access":"public","defaultValue":"\"me.state.onChange\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event for when the changing to a different stage

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PqkXed9NFCsQZX175C0eo","name":"STATE_PAUSE","brief":"","access":"public","defaultValue":"\"me.state.onPause\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event when the game is paused
                \nData passed : none

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nn7ad1vEZljza-ajcophq","name":"STATE_RESTART","brief":"","access":"public","defaultValue":"\"me.state.onRestart\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event for when the game is restarted
                \nData passed : {number} time in ms the game was stopped

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QsOOpu0YtworQ5vWjOA20","name":"STATE_RESUME","brief":"","access":"public","defaultValue":"\"me.state.onResume\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event for when the game is resumed
                \nData passed : {number} time in ms the game was paused

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b_DcI8WZL0WVsRbzlrhAY","name":"STATE_STOP","brief":"","access":"public","defaultValue":"\"me.state.onStop\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event when the game is stopped
                \nData passed : none

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BlkItN-OAbPc37fZ7JuWD","name":"TICK","brief":"","access":"public","defaultValue":"\"me.tick\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                event generated when the system update the engine and the renderer by one step

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pJV5GTq_FJkfrr_YH4-rq","name":"VIDEO_INIT","brief":"","access":"public","defaultValue":"\"me.video.onInit\"","readonly":true,"see":["video.init","event.on"],"type":"PropertyDoc","description":"

                event for when the video is initialized
                \nData passed : {Renderer} the renderer instance created

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Nh4cqHZIZDXgOlZ9q1Ooj","name":"VIEWPORT_ONCHANGE","brief":"","access":"public","defaultValue":"\"viewport.onchange\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when the viewport position is updated
                \nData passed : {me.Vector2d} viewport position vector

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b8Kpyy601WTt60kuHmf-I","name":"VIEWPORT_ONRESIZE","brief":"","access":"public","defaultValue":"\"viewport.onresize\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when the viewport is resized
                \n(this usually follows a WINDOW_ONRESIZE event, when using the flexEvent for when the current context is lost
                \nData passed : {me.Renderer} the current renderer instance

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pQFr1gukVGR14H5E4CXfn","name":"WINDOW_ONORIENTATION_CHANGE","brief":"","access":"public","defaultValue":"\"globalThis.orientationchange\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when the device is rotated
                \nData passed : {Event} Event object

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"alWvCotzKUuRUrrh3qF5-","name":"WINDOW_ONRESIZE","brief":"","access":"public","defaultValue":"\"globalThis.onresize\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when the (browser) window is resized
                \nData passed : {Event} Event object

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WKhZStSkOGxMSY2_yIE6Y","name":"WINDOW_ONSCROLL","brief":"","access":"public","defaultValue":"\"globalThis.onscroll\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when the (browser) window is scrolled
                \nData passed : {Event} Event object

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DZ5sqvshUzzaw1FdlQ9WQ","name":"WORLD_STEP","brief":"","access":"public","defaultValue":"\"me.world.step\"","readonly":true,"see":["event.on"],"type":"PropertyDoc","description":"

                Event for when the physic world is updated\nData passed : {number} time the current time stamp

                ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ykuXX9vCQO2chU2yUu-8W","name":"emit","brief":"","examples":[{"caption":"","code":"me.event.emit(\"event-name\", a, b, c);"}],"scope":"static","type":"FunctionDoc","description":"

                calls each of the listeners registered for a given event.

                ","params":[{"identifier":"eventName","optional":false,"description":"

                The event name.

                ","dataType":{"tokens":[{"value":"string | symbol","kind":"canonical"},{"value":"symbol","kind":"canonical"}],"template":"string | %1"}},{"identifier":"...arguments","optional":true,"variadic":true,"description":"

                arguments to be passed to all listeners

                ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"

                true if the event had listeners, false otherwise.

                ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"C_ztYYLOITjIIs_ldeFii","name":"off","brief":"","access":"public","examples":[{"caption":"","code":"me.event.off(\"event-name\", myFunction);"}],"scope":"static","type":"FunctionDoc","description":"

                remove the given listener for a given event.

                ","params":[{"identifier":"eventName","optional":false,"description":"

                The event name.

                ","dataType":{"tokens":[{"value":"string | symbol","kind":"canonical"},{"value":"symbol","kind":"canonical"}],"template":"string | %1"}},{"identifier":"listener","optional":false,"description":"

                The listener function.

                ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

                this.

                ","dataType":{"tokens":[{"value":"EventEmitter","kind":"canonical"},{"value":"EventEmitter","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FSAcyvtPKYgK4C-_ZEqXY","name":"on","brief":"","access":"public","examples":[{"caption":"","code":"me.event.on(\"event-name\", myFunction, this);"}],"scope":"static","type":"FunctionDoc","description":"

                Add a listener for a given event.

                ","params":[{"identifier":"eventName","optional":false,"description":"

                The event name.

                ","dataType":{"tokens":[{"value":"string | symbol","kind":"canonical"},{"value":"symbol","kind":"canonical"}],"template":"string | %1"}},{"identifier":"listener","optional":false,"description":"

                The listener function.

                ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"context","optional":true,"default":"this","description":"

                The context to invoke the listener with.

                ","dataType":{"tokens":[{"value":"unknown","kind":"canonical"}],"template":"unknown"}}],"returns":[{"description":"

                this.

                ","dataType":{"tokens":[{"value":"EventEmitter","kind":"canonical"},{"value":"EventEmitter","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"q8SrUE9Jp2oAOikaW4tRC","name":"once","brief":"","access":"public","examples":[{"caption":"","code":"me.event.once(\"event-name\", myFunction, this);"}],"scope":"static","type":"FunctionDoc","description":"

                Add a one-time listener for a given event.

                ","params":[{"identifier":"eventName","optional":false,"description":"

                The event name.

                ","dataType":{"tokens":[{"value":"string | symbol","kind":"canonical"},{"value":"symbol","kind":"canonical"}],"template":"string | %1"}},{"identifier":"listener","optional":false,"description":"

                The listener function.

                ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"context","optional":true,"default":"this","description":"

                The context to invoke the listener with.

                ","dataType":{"tokens":[{"value":"unknown","kind":"canonical"}],"template":"unknown"}}],"returns":[{"description":"

                this.

                ","dataType":{"tokens":[{"value":"EventEmitter","kind":"canonical"},{"value":"EventEmitter","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"Y6wdPun1AT7dPC66FlT_N","name":"game","brief":"","readonly":true,"see":["Application"],"type":"NSDoc","description":"

                game is a default instance of a melonJS Application and represents your current game,\nit contains all the objects, tilemap...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cj9ia8-2fLtsummAZOmVP","name":"input","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"GwHKi0fyzEx9SmCqpBLho","name":"GAMEPAD","brief":"","access":"public","type":"NSDoc","description":"

                Namespace for standard gamepad mapping constants

                ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"25qN2xSvu5CkRRNQyKk0x","name":"AXES","brief":"","access":"public","scope":"static","see":["https://w3c.github.io/gamepad/#remapping"],"type":"EnumDoc","description":"

                Standard gamepad mapping information for axes

                \n
                  \n
                • Left control stick: LX (horizontal), Standard gamepad mapping information for buttons

                  \n
                    \n
                  • Face buttons: FACE_1, FACE_2standard keyboard constants

                    ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"ojo0C1yRwTY2A0laLfgBQ","name":"A","brief":"","defaultValue":"65","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d2_iTl0XaXEwPqIle77wb","name":"ADD","brief":"","defaultValue":"107","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zWVWMRAaJ7q9omPL3cwLW","name":"ALT","brief":"","defaultValue":"18","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Mm6O8OftPqq9lcKGJyCCw","name":"B","brief":"","defaultValue":"66","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_jXtmvMYmXZhtF9PzYrof","name":"BACK_SLASH","brief":"","defaultValue":"220","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JqqlwqRELqtYQfUE7g5v8","name":"C","brief":"","defaultValue":"67","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S0DOkJam4vjhFOX7Ei5V3","name":"CAPS_LOCK","brief":"","defaultValue":"20","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q6szdrDFFctjwujPzddtO","name":"CLOSE_BRACKET","brief":"","defaultValue":"221","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UAbav0f3gvUDfRAP0KgHJ","name":"COMMA","brief":"","defaultValue":"188","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b4uWqKWk42klmmdQS0X79","name":"CTRL","brief":"","defaultValue":"17","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EF4jVpsqr3Ca-1YKlLAi6","name":"D","brief":"","defaultValue":"68","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0uWc6EqsYFOae58oadvch","name":"DECIMAL","brief":"","defaultValue":"110","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HyCpLrtAuHRL-FNUKepVV","name":"DELETE","brief":"","defaultValue":"46","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LVL6PKeYyZwZxglsh9Gkp","name":"DIVIDE","brief":"","defaultValue":"111","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CDJ08iVDyUyhnY74UVF8l","name":"DOWN","brief":"","defaultValue":"40","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6y8p_3c3q982xrpp-J6yV","name":"E","brief":"","defaultValue":"69","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ayX4LyxXhTNt5t-7XHO8l","name":"END","brief":"","defaultValue":"35","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZvfZDxga3RNwRE3DihXUr","name":"ENTER","brief":"","defaultValue":"13","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"poBaUwdH2M8aVcbYVXgQ1","name":"ESC","brief":"","defaultValue":"27","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YiRMW_Q3rsyqcrRWpYWBO","name":"F","brief":"","defaultValue":"70","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ceapFI3JE0vw0mqiuZ5RU","name":"F1","brief":"","defaultValue":"112","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"INPm6JeQwpIUFP6GlwiYa","name":"F10","brief":"","defaultValue":"121","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ceyo1JLz5cL2506lJDG52","name":"F11","brief":"","defaultValue":"122","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"z_VyP8M5dqC9GWVJwqtIM","name":"F12","brief":"","defaultValue":"123","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AdHqcKYNuVLFiqTaakK1w","name":"F2","brief":"","defaultValue":"113","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0lmT2kW1RVJxTkPoe0R8e","name":"F3","brief":"","defaultValue":"114","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PEfQ683ED0kaFSEtQfOGc","name":"F4","brief":"","defaultValue":"115","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"95ZinHKXG-xFxPlzEMXca","name":"F5","brief":"","defaultValue":"116","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wnicB65a6Kyw0ROuuUgXq","name":"F6","brief":"","defaultValue":"117","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IJJzZTZeT71VAGDudmw95","name":"F7","brief":"","defaultValue":"118","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yezuM17bF0hFlFKr1S8gz","name":"F8","brief":"","defaultValue":"119","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UsnH4Vi5qFrWzObL496_M","name":"F9","brief":"","defaultValue":"120","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vSmRio__121pWpVcrNTav","name":"FORWAND_SLASH","brief":"","defaultValue":"191","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oDLEMH4a8eQ8_EsQdOeL3","name":"G","brief":"","defaultValue":"71","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cOWe1VHWd9nz6dclGbcbm","name":"GRAVE_ACCENT","brief":"","defaultValue":"192","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qqWbpJcc8Mo5SOV1wzmCH","name":"H","brief":"","defaultValue":"72","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9zIdyglCXj3MUL8SuH4ae","name":"HOME","brief":"","defaultValue":"36","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g2jbfpLezzVq2ydRESAvY","name":"I","brief":"","defaultValue":"73","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7pA9_hWyt9aevYeNDo5LL","name":"INSERT","brief":"","defaultValue":"45","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BKEf0GyzoDL4Zf1k0oMo5","name":"J","brief":"","defaultValue":"74","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F0vkoyhX3zVObP7A1rrA3","name":"K","brief":"","defaultValue":"75","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mIgV2bOl2q170flAXoSYb","name":"L","brief":"","defaultValue":"76","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kqwGRFFD4h0GCGsqm-sYk","name":"LEFT","brief":"","defaultValue":"37","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Hcpxd3JpGOOc2-Y0FeeeQ","name":"M","brief":"","defaultValue":"77","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Het1VVC_822c29rrrm2ij","name":"MINUS","brief":"","defaultValue":"189","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BH_khUO-lwfk4sJiYAQsD","name":"MULTIPLY","brief":"","defaultValue":"106","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6injZoPP6pivnHpyH6jOZ","name":"N","brief":"","defaultValue":"78","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pvSOy5Tq85Hh6rCGzeK4l","name":"NUM_LOCK","brief":"","defaultValue":"144","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CT0dE7tS4JBdz3r_u1rEa","name":"NUM0","brief":"","defaultValue":"48","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8awajR_Bd3sRYBPv-j1AY","name":"NUM1","brief":"","defaultValue":"49","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F2TJc2M_3EnrUn41t5yVJ","name":"NUM2","brief":"","defaultValue":"50","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GXcZFr1FWZEshgrlpYRlS","name":"NUM3","brief":"","defaultValue":"51","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_ayNyPA1Vi1Zq5CBLiBe4","name":"NUM4","brief":"","defaultValue":"52","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"quLO9cft5wwAUn-Fglg8Q","name":"NUM5","brief":"","defaultValue":"53","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xBQ9-_ADnHYwk_2vjeCio","name":"NUM6","brief":"","defaultValue":"54","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gXBvj8SykmMmH5LIvkxMt","name":"NUM7","brief":"","defaultValue":"55","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i62054jUZGOen2JA9nWyo","name":"NUM8","brief":"","defaultValue":"56","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yj1V6wGGtJoDetQ2NOOKq","name":"NUM9","brief":"","defaultValue":"57","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ohVLARaWwwP7iwI-oX2xS","name":"NUMPAD0","brief":"","defaultValue":"96","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vsqcjmY7SewxDV4reYrar","name":"NUMPAD1","brief":"","defaultValue":"97","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KC3DJk3Qfz8qndoMK2928","name":"NUMPAD2","brief":"","defaultValue":"98","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PjQ-sBJ_x978OcoEszAcY","name":"NUMPAD3","brief":"","defaultValue":"99","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZpjkTSETaBQej1l6tpPoL","name":"NUMPAD4","brief":"","defaultValue":"100","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8db2dUd0NzInqfIw0k1--","name":"NUMPAD5","brief":"","defaultValue":"101","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jQusCtHS3r07B3a1QBgXA","name":"NUMPAD6","brief":"","defaultValue":"102","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H60OomHyNwQD5mdsQX7eE","name":"NUMPAD7","brief":"","defaultValue":"103","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZWftSNIGBV7tdT1vStD6t","name":"NUMPAD8","brief":"","defaultValue":"104","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T9-uWYOEnROctPK8bQABy","name":"NUMPAD9","brief":"","defaultValue":"105","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F1aIJjTm9YAz0rN3yt5oo","name":"O","brief":"","defaultValue":"79","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HYsu1pk4tG32DRTJ9bOIU","name":"OPEN_BRACKET","brief":"","defaultValue":"219","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3P5qfSAQuLZWM7AggHT0d","name":"P","brief":"","defaultValue":"80","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cpCn6_c1ANHuOr_7zJO1l","name":"PAGE_DOWN","brief":"","defaultValue":"34","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nrVleGvc7W8aa9DTAjidT","name":"PAGE_UP","brief":"","defaultValue":"33","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kbHEWV8LXbJmsNz-Nfxl9","name":"PAUSE","brief":"","defaultValue":"19","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L-OBaPZtvzk-8fFhxqmlC","name":"PERIOD","brief":"","defaultValue":"190","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RIuKNdXQluu07w0DYsW3z","name":"PLUS","brief":"","defaultValue":"187","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tGdjFeK-1X2-EqFjQ1aIK","name":"PRINT_SCREEN","brief":"","defaultValue":"42","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6LDqdklqP70wd45KXrXvI","name":"Q","brief":"","defaultValue":"81","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qlPlfzqhryr4PKk9aHD_u","name":"R","brief":"","defaultValue":"82","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EWA-yvS9RpBXZv5A1cJ6Z","name":"RIGHT","brief":"","defaultValue":"39","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6xHPdL8J4E_qcqs1iyMBW","name":"S","brief":"","defaultValue":"83","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jU8LV4dUhw1e2_mHLkILV","name":"SCROLL_LOCK","brief":"","defaultValue":"145","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Rk9WBf90LnXZTr7Fb9fnu","name":"SEMICOLON","brief":"","defaultValue":"186","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"t_Wah4yzMMud4GJKKEMrO","name":"SHIFT","brief":"","defaultValue":"16","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LLN_DEjZF89ucZ4ZI9YPn","name":"SINGLE_QUOTE","brief":"","defaultValue":"222","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JVHofBgnvnsqqSmE45Ojj","name":"SPACE","brief":"","defaultValue":"32","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_7iD7KI_LglDCPp9fqX52","name":"SUBSTRACT","brief":"","defaultValue":"109","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PUweKB3BBowKEOr15-V-V","name":"T","brief":"","defaultValue":"84","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-JUoWv_gHs7pMDJcZPDHg","name":"TAB","brief":"","defaultValue":"9","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gPOYYgA-xbDIEMDGpJwJ8","name":"TILDE","brief":"","defaultValue":"126","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DaoERQl3f0yndj6wl8R_l","name":"U","brief":"","defaultValue":"85","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wv6BrL9aOd-zOjGWKusrB","name":"UP","brief":"","defaultValue":"38","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yKhV1XgrpvJiFEeNM9ldE","name":"V","brief":"","defaultValue":"86","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IKTcF_iBq7fo_mTiUwKic","name":"W","brief":"","defaultValue":"87","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"E5ZjSJEhFeoOS7ZsUvRtW","name":"WINDOW_KEY","brief":"","defaultValue":"91","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9k8puqVfM7C8GUX9eGVU4","name":"X","brief":"","defaultValue":"88","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DjGinpH4VgXgsCg3uXbdL","name":"Y","brief":"","defaultValue":"89","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LO9VbpqXkKe4dofAUWy4j","name":"Z","brief":"","defaultValue":"90","scope":"static","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"9lgWZL271A1l2qZ76FmS9","name":"keyBoardEventTarget","brief":"","access":"public","defaultValue":"undefined","type":"PropertyDoc","description":"

                    the default target element for keyboard events (usually the window element in which the game is running)

                    ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D_WnnV3tTQ9JOnf_awPr6","name":"locked","brief":"","access":"public","defaultValue":"false","type":"PropertyDoc","description":"

                    indicates if the pointer is currently locked

                    ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w6kjjeS0rG_DIImLsw2IH","name":"pointer","brief":"","access":"public","type":"PropertyDoc","description":"

                    Pointer information (current position and size)

                    ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Du9v-gdcmZm2hu04SIf5c","name":"pointerEventTarget","brief":"","access":"public","defaultValue":"undefined","type":"PropertyDoc","description":"

                    the default target element for pointer events (usually the canvas element in which the game is rendered)

                    ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F_72zjU9_hid1TNjR0Z1j","name":"preventDefault","brief":"","access":"public","defaultValue":"true","type":"PropertyDoc","description":"

                    specify if melonJS should prevent all default browser action on registered events.

                    ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7mAsRPmDkaotOJy6ABiZI","name":"setGamepadMapping","brief":"","access":"public","examples":[{"caption":"","code":" // A weird controller that has its axis mappings reversed\n me.input.setGamepadMapping(\"Generic USB Controller\", {\n \"axes\" : [ 3, 2, 1, 0 ],\n \"buttons\" : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]\n });\n\n // Mapping extra axes to analog buttons\n me.input.setGamepadMapping(\"Generic Analog Controller\", {\n \"axes\" : [ 0, 1, 2, 3 ],\n \"buttons\" : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ],\n\n // Raw axis 4 is mapped to GAMEPAD.BUTTONS.FACE_1\n // Raw axis 5 is mapped to GAMEPAD.BUTTONS.FACE_2\n // etc...\n // Also maps left and right triggers\n \"analog\" : [ 4, 5, 6, 7, -1, -1, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1 ],\n\n // Normalize the value of button L2: [-1.0..1.0] => [0.0..1.0]\n \"normalize_fn\" : function (value, axis, button) {\n return ((button === me.input.GAMEPAD.BUTTONS.L2) ? ((value + 1) / 2) : value) || 0;\n }\n });"}],"type":"PropertyDoc","description":"

                    specify a custom mapping for a specific gamepad id
                    \nsee below for the default mapping :

                    \n
                    Gamepad id string

                    ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"mapping","description":"

                    A hash table

                    ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"mapping.axes","description":"

                    Standard analog control stick axis locations

                    ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}},{"identifier":"mapping.buttons","description":"

                    Standard digital button locations

                    ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}},{"identifier":"mapping.analog","optional":true,"description":"

                    Analog axis locations for buttons

                    ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}},{"identifier":"mapping.normalize_fn","optional":true,"description":"

                    a function that returns a normalized value in range [-1.0..1.0] for the given value, axis and button

                    ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"aqbJRr8ttfHpOpfPAVfWh","name":"throttlingInterval","brief":"","access":"public","type":"PropertyDoc","description":"

                    time interval for event throttling in milliseconds
                    \ndefault value : "1000/me.timer.maxfps" ms
                    \nset to 0 ms...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9wV2ZoppFWUXxtydiwqrn","name":"bindGamepad","brief":"","access":"public","examples":[{"caption":"","code":"// enable the keyboard\nme.input.bindKey(me.input.KEY.X, \"shoot\");\n...\n// map the lower face button on the first gamepad to the X key\nme.input.bindGamepad(0, {type:\"buttons\", code: me.input.GAMEPAD.BUTTONS.FACE_1}, me.input.KEY.X);\n// map the left axis value on the first gamepad to the LEFT key\nme.input.bindGamepad(0, {type:\"axes\", code: me.input.GAMEPAD.AXES.LX, threshold: -0.5}, me.input.KEY.LEFT);"}],"type":"FunctionDoc","description":"

                    Associate a gamepad event to a keycode

                    ","params":[{"identifier":"index","optional":false,"description":"

                    Gamepad index

                    ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"button","optional":false,"description":"

                    Button/Axis definition

                    ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"button.type","description":"

                    "buttons" or "axes"

                    ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"button.code","description":"

                    button or axis code id (See {@link input.GAMEPAD.BUTTONS}, {@link input.GAMEPAD.AXES})

                    ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"button.threshold","optional":true,"default":"1","description":"

                    value indicating when the axis should trigger the keycode (e.g. -0.5 or 0.5)

                    ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"keyCode","optional":false,"description":"

                    (See {@link input.KEY})

                    ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"RdQPALmifBUabucUQOwq9","name":"bindKey","brief":"","access":"public","examples":[{"caption":"","code":"// enable the keyboard\nme.input.bindKey(me.input.KEY.LEFT, \"left\");\nme.input.bindKey(me.input.KEY.RIGHT, \"right\");\nme.input.bindKey(me.input.KEY.X, \"jump\", true);\nme.input.bindKey(me.input.KEY.F1, \"options\", true, true);"}],"type":"FunctionDoc","description":"

                    associate a user defined action to a keycode

                    ","params":[{"identifier":"keycode","optional":false,"description":"

                    (See {@link input.KEY})

                    ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"action","optional":false,"description":"

                    user defined corresponding action

                    ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"lock","optional":true,"default":"false","description":"

                    cancel the keypress event once read

                    ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"preventDefault","optional":true,"default":"input.preventDefault","description":"

                    prevent default browser action

                    ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"0lTli-9MMjwfbpzQ3W-Rm","name":"bindPointer","brief":"","examples":[{"caption":"","code":"// enable the keyboard\nme.input.bindKey(me.input.KEY.X, \"shoot\");\n// map the left button click on the X key (default if the button is not specified)\nme.input.bindPointer(me.input.KEY.X);\n// map the right button click on the X key\nme.input.bindPointer(me.input.pointer.RIGHT, me.input.KEY.X);"}],"type":"FunctionDoc","description":"

                    Associate a pointer event to a keycode
                    \nLeft button – 0\nMiddle button – 1\nRight button – 2

                    ","params":[{"identifier":"button","optional":true,"default":"input.pointer.LEFT","description":"

                    (accordingly to W3C values : 0,1,2 for left, middle and right buttons)

                    ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"keyCode","dataType":{"tokens":[{"value":"input.KEY","kind":"canonical"},{"value":"input.KEY","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"piPfGmlUw0V-3bQxVNh-A","name":"exitPointerLock","brief":"","type":"FunctionDoc","description":"

                    Initiates an exit from pointer lock state

                    ","params":[],"returns":[{"description":"

                    return true if the request was successfully submitted

                    ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"pM_HDmwUDYsKHQf_iRuTk","name":"getBindingKey","brief":"","access":"public","type":"FunctionDoc","description":"

                    return the action associated with the given keycode

                    ","params":[{"identifier":"keycode","optional":false,"description":"

                    (See {@link input.KEY})

                    ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                    user defined associated action

                    ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"ftZ2-aUwXhNGibEX72cF4","name":"globalToLocal","brief":"","examples":[{"caption":"","code":"onMouseEvent : function (pointer) {\n // convert the given into local (viewport) relative coordinates\n let pos = me.input.globalToLocal(pointer.clientX, pointer.clientY);\n // do something with pos !\n};"}],"type":"FunctionDoc","description":"

                    Translate the specified x and y values from the global (absolute)\ncoordinate to local (viewport) relative coordinate.

                    ","params":[{"identifier":"x","optional":false,"description":"

                    the global x coordinate to be translated.

                    ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

                    the global y coordinate to be translated.

                    ","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 translated coordinates

                    ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                    A vector object with the corresponding translated coordinates

                    ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PndVJvCePlodnBY8ArGbM","name":"hasActiveEvents","brief":"","type":"FunctionDoc","description":"

                    return true if there are pending pointer events in the queue

                    ","params":[],"returns":[{"description":"

                    true if there are pending events

                    "}],"extends":[],"implements":[]},{"id":"OYHQYTAciA8hLmiGTj27Z","name":"hasRegisteredEvents","brief":"","see":["registerPointerEvent"],"type":"FunctionDoc","description":"

                    return true if there are register pointer events

                    ","params":[],"returns":[{"description":"

                    true if there are pending events

                    "}],"extends":[],"implements":[]},{"id":"8eIHFIoBbcF6E8_MBYPP3","name":"isKeyPressed","brief":"","access":"public","examples":[{"caption":"","code":"if (me.input.isKeyPressed('left')) {\n //do something\n}\nelse if (me.input.isKeyPressed('right')) {\n //do something else...\n}"}],"type":"FunctionDoc","description":"

                    return the key press status of the specified action

                    ","params":[{"identifier":"action","optional":false,"description":"

                    user defined corresponding action

                    ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                    true if pressed

                    ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"a6hHDYwE9AVEofqUVobXr","name":"keyStatus","brief":"","access":"public","type":"FunctionDoc","description":"

                    return the key status of the specified action

                    ","params":[{"identifier":"action","optional":false,"description":"

                    user defined corresponding action

                    ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                    down (true) or up(false)

                    ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"wb6hNPVb7JEkPkwOiq7OW","name":"registerPointerEvent","brief":"","examples":[{"caption":"","code":" // onActivate function\n onActivateEvent: function () {\n // register on the 'pointerdown' event\n me.input.registerPointerEvent('pointerdown', this, (e) => this.pointerDown(e));\n },\n\n // pointerDown event callback\n pointerDown: function (pointer) {\n // do something\n ....\n // don\"t propagate the event to other objects\n return false;\n },"}],"see":["Pointer","{@link http://www.w3.org/TR/pointerevents/#list-of-pointer-events|W3C Pointer Event list}"],"type":"FunctionDoc","description":"

                    allows registration of event listeners on the object target.
                    \nmelonJS will pass a me.Pointer object to the defined cal...","params":[{"identifier":"eventType","optional":false,"description":"

                    The event type for which the object is registering
                    \nmelonJS currently supports:

                    \n
                      \n
                    • \"pointermo...","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"region","optional":false,"description":"

                      a shape representing the region to register on

                      ","dataType":{"tokens":[{"value":"Rect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4"}},{"identifier":"callback","optional":false,"description":"

                      methods to be called when the event occurs.\nReturning false from the defined callback will prevent the event ...","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"BEAnJn2Hq2novt64SsNbn","name":"releaseAllPointerEvents","brief":"","examples":[{"caption":"","code":"// release all registered event on the\nme.input.releaseAllPointerEvents(this);"}],"type":"FunctionDoc","description":"

                      allows the removal of all registered event listeners from the object target.

                      ","params":[{"identifier":"region","optional":false,"description":"

                      the registered region to release event from

                      ","dataType":{"tokens":[{"value":"Rect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4"}}],"returns":[],"extends":[],"implements":[]},{"id":"gcFasH2zEi8V9E6sAtOY2","name":"releasePointerEvent","brief":"","examples":[{"caption":"","code":"// release the registered region on the 'pointerdown' event\nme.input.releasePointerEvent('pointerdown', this);"}],"see":["{@link http://www.w3.org/TR/pointerevents/#list-of-pointer-events|W3C Pointer Event list}"],"type":"FunctionDoc","description":"

                      allows the removal of event listeners from the object target.

                      ","params":[{"identifier":"eventType","optional":false,"description":"

                      The event type for which the object was registered. See {@link input.registerPointerEvent}

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"region","optional":false,"description":"

                      the registered region to release for this event

                      ","dataType":{"tokens":[{"value":"Rect | Polygon | Line | Ellipse","kind":"canonical"},{"value":"Rect","kind":"link"},{"value":"Polygon","kind":"link"},{"value":"Line","kind":"link"},{"value":"Ellipse","kind":"link"}],"template":"%1 | %2 | %3 | %4"}},{"identifier":"callback","optional":true,"default":"\"all\"","description":"

                      if specified unregister the event only for the specific callback

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"p6qvU1v5r6mpnRrlvETm1","name":"requestPointerLock","brief":"","examples":[{"caption":"","code":"// register on the pointer lock change event\nevent.on(event.POINTERLOCKCHANGE, (locked)=> {\n console.log(\"pointer lock: \" + locked);\n});\n// request for pointer lock\nme.input.requestPointerLock();"}],"type":"FunctionDoc","description":"

                      request for the pointer to be locked on the parent DOM element.\n(Must be called in a click event or an event that requires...","params":[],"returns":[{"description":"

                      return true if the request was successfully submitted

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"KsZJatMOWFyVq1Zxya5aL","name":"setGamepadDeadzone","brief":"","access":"public","type":"FunctionDoc","description":"

                      Set deadzone for analog gamepad inputs
                      \nThe default deadzone is 0.1 (10%) Analog values less than this will be ignored

                      ","params":[{"identifier":"value","optional":false,"description":"

                      Deadzone value

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"L_wcfqWZMbCHjSqxs_0uw","name":"setTouchAction","brief":"","see":["https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action"],"type":"FunctionDoc","description":"

                      enable/disable all gestures on the given element.
                      \nby default melonJS will disable browser handling of all panning and ...","params":[{"identifier":"element","optional":false,"dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}},{"identifier":"value","optional":true,"default":"\"none\"","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"rjFhWuYv5f_B5qwPJ7nmR","name":"triggerKeyEvent","brief":"","access":"public","examples":[{"caption":"","code":"// trigger a key press\nme.input.triggerKeyEvent(me.input.KEY.LEFT, true);"}],"type":"FunctionDoc","description":"

                      trigger the specified key (simulated) event

                      ","params":[{"identifier":"keycode","optional":false,"description":"

                      (See {@link input.KEY})

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"status","optional":true,"default":"false","description":"

                      true to trigger a key down event, or false for key up event

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"mouseButton","optional":true,"description":"

                      the mouse button to trigger

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"2WwClRJTOnnvzI84I4vrV","name":"unbindGamepad","brief":"","access":"public","examples":[{"caption":"","code":"me.input.unbindGamepad(0, me.input.GAMEPAD.BUTTONS.FACE_1);"}],"type":"FunctionDoc","description":"

                      unbind the defined keycode

                      ","params":[{"identifier":"index","optional":false,"description":"

                      Gamepad index

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"button","optional":false,"description":"

                      (See {@link input.GAMEPAD.BUTTONS})

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"LsbCuFAf3HWwDsaBPWcd7","name":"unbindKey","brief":"","access":"public","examples":[{"caption":"","code":"me.input.unbindKey(me.input.KEY.LEFT);"}],"type":"FunctionDoc","description":"

                      unbind the defined keycode

                      ","params":[{"identifier":"keycode","optional":false,"description":"

                      (See {@link input.KEY})

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"tqHeg77FFgCqwpHPGxB4m","name":"unbindPointer","brief":"","examples":[{"caption":"","code":"me.input.unbindPointer(me.input.pointer.LEFT);"}],"type":"FunctionDoc","description":"

                      unbind the defined keycode

                      ","params":[{"identifier":"button","optional":true,"default":"input.pointer.LEFT","description":"

                      (accordingly to W3C values : 0,1,2 for left, middle and right buttons)

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"oHAhpj4b1Wy3Nlp9y72o0","name":"unlockKey","brief":"","access":"public","examples":[{"caption":"","code":"// Unlock jump when touching the ground\nif (!this.falling && !this.jumping) {\n me.input.unlockKey(\"jump\");\n}"}],"type":"FunctionDoc","description":"

                      unlock a key manually

                      ","params":[{"identifier":"action","optional":false,"description":"

                      user defined corresponding action

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"CSf_l3mpYBmiPNnDHV6aJ","name":"level","brief":"","type":"NSDoc","description":"

                      a level manager. once ressources loaded, the level manager contains all references of defined levels.

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"sfZ7D6phTmU-Xs08dc3cF","name":"add","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      add a level into the game manager (usually called by the preloader)

                      ","params":[{"identifier":"format","optional":false,"description":"

                      level format (only "tmx" supported)

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"levelId","optional":false,"description":"

                      the level id (or name)

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"callback","optional":true,"description":"

                      a function to be called once the level is loaded

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

                      true if the level was loaded

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"bJJ0sQa3Dh2jLOYP-GGxr","name":"getCurrentLevel","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      return the current level definition.\nfor a reference to the live instantiated level,\nrather use the container in which it ...","params":[],"returns":[{"dataType":{"tokens":[{"value":"TMXTileMap","kind":"canonical"},{"value":"TMXTileMap","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"m3XF3Of4d1V_GZNnauG59","name":"getCurrentLevelId","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      return the current level id

                      ","params":[],"returns":[{"dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"pw2ag6VD6lc5BiTxFURjQ","name":"levelCount","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      return the amount of level preloaded

                      ","params":[],"returns":[{"description":"

                      the amount of level preloaded

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"OYUmN6TS9rpYbvZPKiHl8","name":"load","brief":"","access":"public","examples":[{"caption":"","code":" // the game assets to be be preloaded\n // TMX maps\n let resources = [\n {name: \"a4_level1\", type: \"tmx\", src: \"data/level/a4_level1.tmx\"},\n {name: \"a4_level2\", type: \"tmx\", src: \"data/level/a4_level2.tmx\"},\n {name: \"a4_level3\", type: \"tmx\", src: \"data/level/a4_level3.tmx\"},\n // ...\n ];\n\n // ...\n\n // load a level into the game world\n me.level.load(\"a4_level1\");\n ...\n ...\n // load a level into a specific container\n let levelContainer = new me.Container();\n me.level.load(\"a4_level2\", {container:levelContainer});\n // add a simple transformation\n levelContainer.currentTransform.translate(levelContainer.width / 2, levelContainer.height / 2 );\n levelContainer.currentTransform.rotate(0.05);\n levelContainer.currentTransform.translate(-levelContainer.width / 2, -levelContainer.height / 2 );\n // add it to the game world\n me.game.world.addChild(levelContainer);"}],"scope":"instance","type":"MethodDoc","description":"

                      load a level into the game manager
                      \n(will also create all level defined entities, etc..)

                      ","params":[{"identifier":"levelId","optional":false,"description":"

                      level id

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"options","optional":true,"description":"

                      additional optional parameters

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.container","optional":true,"default":"game.world","description":"

                      container in which to load the specified level

                      ","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}},{"identifier":"options.onLoaded","optional":true,"default":"game.onLevelLoaded","description":"

                      callback for when the level is fully loaded

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"options.flatten","optional":true,"default":"game.mergeGroup","description":"

                      if true, flatten all objects into the given container

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"options.setViewportBounds","optional":true,"default":"true","description":"

                      if true, set the viewport bounds to the map size

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

                      true if the level was successfully loaded

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"tPM_p-lQJzgoX2rqHD9nM","name":"next","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      load the next level

                      ","params":[{"identifier":"options","optional":true,"description":"

                      additional optional parameters

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.container","optional":true,"default":"game.world","description":"

                      container in which to load the specified level

                      ","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}},{"identifier":"options.onLoaded","optional":true,"default":"game.onLevelLoaded","description":"

                      callback for when the level is fully loaded

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"options.flatten","optional":true,"default":"game.mergeGroup","description":"

                      if true, flatten all objects into the given container

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

                      true if the next level was successfully loaded

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ifrEPgcMGyI1aErkD3teq","name":"previous","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      load the previous level

                      ","params":[{"identifier":"options","optional":true,"description":"

                      additional optional parameters

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.container","optional":true,"default":"game.world","description":"

                      container in which to load the specified level

                      ","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}},{"identifier":"options.onLoaded","optional":true,"default":"game.onLevelLoaded","description":"

                      callback for when the level is fully loaded

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"options.flatten","optional":true,"default":"game.mergeGroup","description":"

                      if true, flatten all objects into the given container

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

                      true if the previous level was successfully loaded

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"71UHr5urTfu9ug5pUT8oL","name":"reload","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      reload the current level

                      ","params":[{"identifier":"options","optional":true,"description":"

                      additional optional parameters

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options.container","optional":true,"default":"game.world","description":"

                      container in which to load the specified level

                      ","dataType":{"tokens":[{"value":"Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"%1"}},{"identifier":"options.onLoaded","optional":true,"default":"game.onLevelLoaded","description":"

                      callback for when the level is fully loaded

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"options.flatten","optional":true,"default":"game.mergeGroup","description":"

                      if true, flatten all objects into the given container

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

                      the current level

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]}]},{"id":"KcAnEH24vA_5_qazA1XlC","name":"loader","brief":"","type":"NSDoc","description":"

                      a small class to manage loading of stuff and manage resources

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"OEF5DjYzfOOcJxzyKHre0","name":"Asset","brief":"","examples":[{"caption":"","code":"// PNG tileset\n{name: \"tileset-platformer\", type: \"image\", src: \"data/map/tileset.png\"}\n// PNG packed texture\n{name: \"texture\", type:\"image\", src: \"data/gfx/texture.png\"}\n// PNG base64 encoded image\n{name: \"texture\", type:\"image\", src: \"data:image/png;base64,iVBORw0KAAAQAAAAEACA...\"}\n// TSX file\n{name: \"meta_tiles\", type: \"tsx\", src: \"data/map/meta_tiles.tsx\"}\n// TMX level (XML & JSON)\n{name: \"map1\", type: \"tmx\", src: \"data/map/map1.json\"}\n{name: \"map2\", type: \"tmx\", src: \"data/map/map2.tmx\"}\n{name: \"map3\", type: \"tmx\", format: \"json\", data: {\"height\":15,\"layers\":[...],\"tilewidth\":32,\"version\":1,\"width\":20}}\n{name: \"map4\", type: \"tmx\", format: \"xml\", data: {xml representation of tmx}}\n// audio resources\n{name: \"bgmusic\", type: \"audio\", src: \"data/audio/\"}\n{name: \"cling\", type: \"audio\", src: \"data/audio/\"}\n// base64 encoded audio resources\n{name: \"band\", type: \"audio\", src: \"data:audio/wav;base64,...\"}\n// binary file\n{name: \"ymTrack\", type: \"binary\", src: \"data/audio/main.ym\"}\n// JSON file (used for texturePacker)\n{name: \"texture\", type: \"json\", src: \"data/gfx/texture.json\"}\n// JavaScript file\n{name: \"plugin\", type: \"js\", src: \"data/js/plugin.js\"}\n// Font Face\n{ name: \"'kenpixel'\", type: \"fontface\", src: \"url('data/font/kenvector_future.woff2')\" }"}],"scope":"static","see":["loader.preload","loader.load"],"type":"TypedefDoc","description":"

                      an asset definition to be used with the loader

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Sgnxmi_ekvRxwYsbSus0K","name":"data","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                      TMX data if not provided through a src url

                      "},{"id":"BC4vA7Q6olaaeygQ-E67x","name":"name","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                      name of the asset

                      "},{"id":"Vt8dQP2k6JIKfv9KtkfcQ","name":"src","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                      path and/or file name of the resource (for audio assets only the path is required)

                      "},{"id":"oGflV-vc2jGuKtIUsIVAp","name":"stream","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      Set to true to force HTML5 Audio, which allows not to wait for large file to be downloaded before playing.

                      "},{"id":"tMoD1yC1VBok2V8bu8tpn","name":"type","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                      the type of the asset ("audio"|"binary"|"image"|"json"|"js"|"tmx&qu..."}]},{"id":"cmn_KkmbyI8Qfc6Fb2Xun","name":"crossOrigin","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":" // allow for cross-origin texture loading in WebGL\n me.loader.crossOrigin = \"anonymous\";\n\n // set all ressources to be loaded\n me.loader.preload(game.resources, () => this.loaded());"}],"see":["https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes"],"type":"PropertyDoc","description":"

                      crossOrigin attribute to configure the CORS requests for Image data element.\nBy default (that is, when the attribute is no...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HxZBC8DWpPUh1wTk66pL9","name":"onError","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// set a callback for error notification\nme.loader.onError = this.loaderError.bind(this);"}],"type":"PropertyDoc","description":"

                      onError callback
                      \neach time a resource loading is failed, the loader will fire the specified function giving the actual...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cKGey5oKMDJPH_bTJwPBN","name":"onload","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// set a callback when everything is loaded\nme.loader.onload = this.loaded.bind(this);"}],"type":"PropertyDoc","description":"

                      onload callback

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0GDRCLM-rQL_NmPBWbv_g","name":"onProgress","brief":"","defaultValue":"undefined","examples":[{"caption":"","code":"// set a callback for progress notification\nme.loader.onProgress = this.updateProgress.bind(this);"}],"type":"PropertyDoc","description":"

                      onProgress callback
                      \neach time a resource is loaded, the loader will fire the specified function,\ngiving the actual pro...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8LICi_yU6TQR8ymjjPbUh","name":"withCredentials","brief":"","access":"public","defaultValue":"false","examples":[{"caption":"","code":" // enable withCredentials\n me.loader.withCredentials = true;\n\n // set all ressources to be loaded\n me.loader.preload(game.resources, () => this.loaded());"}],"see":["https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials"],"type":"PropertyDoc","description":"

                      indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies,\nauthorizatio...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OZmbUnleXKhXTlCb8QnIH","name":"getBinary","brief":"","type":"FunctionDoc","description":"

                      return the specified Binary object

                      ","params":[{"identifier":"elt","optional":false,"description":"

                      name of the binary object ("ymTrack");

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                      requested element or null if not found

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"fR7IQC0NP8Xb62VIgvlkq","name":"getImage","brief":"","type":"FunctionDoc","description":"

                      return the specified Image Object

                      ","params":[{"identifier":"image","optional":false,"description":"

                      name of the Image element ("tileset-platformer");

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                      requested element or null if not found

                      ","dataType":{"tokens":[{"value":"HTMLImageElement","kind":"canonical"},{"value":"HTMLImageElement","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2mRtI9loOrUcaDd6-GLnu","name":"getJSON","brief":"","type":"FunctionDoc","description":"

                      return the specified JSON Object

                      ","params":[{"identifier":"elt","optional":false,"description":"

                      name of the json file to load

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"AsQqsk4mDV1Hya-8xRTxz","name":"getTMX","brief":"","type":"FunctionDoc","description":"

                      return the specified TMX/TSX object

                      ","params":[{"identifier":"elt","optional":false,"description":"

                      name of the tmx/tsx element ("map1");

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                      requested element or null if not found

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"2JvOZOGWt4ZwKz_dXOBDk","name":"load","brief":"","examples":[{"caption":"","code":"// load an image asset\nme.loader.load({name: \"avatar\", type:\"image\", src: \"data/avatar.png\"}, () => this.onload(), () => this.onerror());\n// load a base64 image asset\n me.loader.load({name: \"avatar\", type:\"image\", src: \"data:image/png;base64,iVBORw0KAAAQAAAAEACA...\"};\n// start loading music\nme.loader.load({\n name : \"bgmusic\",\n type : \"audio\",\n src : \"data/audio/\"\n}, function () {\n me.audio.play(\"bgmusic\");\n});"}],"type":"FunctionDoc","description":"

                      Load a single asset (to be used if you need to load additional asset(s) during the game)

                      ","params":[{"identifier":"asset","optional":false,"dataType":{"tokens":[{"value":"loader.Asset","kind":"canonical"},{"value":"loader.Asset","kind":"link"}],"template":"%1"}},{"identifier":"onload","optional":true,"description":"

                      function to be called when the asset is loaded

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"onerror","optional":true,"description":"

                      function to be called in case of error

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

                      the amount of corresponding resource to be preloaded

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"K22P6ZRXZ7hegCcvGl9Hb","name":"preload","brief":"","examples":[{"caption":"","code":"game.assets = [\n // PNG tileset\n {name: \"tileset-platformer\", type: \"image\", src: \"data/map/tileset.png\"},\n // PNG packed texture\n {name: \"texture\", type:\"image\", src: \"data/gfx/texture.png\"}\n // PNG base64 encoded image\n {name: \"texture\", type:\"image\", src: \"data:image/png;base64,iVBORw0KAAAQAAAAEACA...\"}\n // TSX file\n {name: \"meta_tiles\", type: \"tsx\", src: \"data/map/meta_tiles.tsx\"},\n // TMX level (XML & JSON)\n {name: \"map1\", type: \"tmx\", src: \"data/map/map1.json\"},\n {name: \"map2\", type: \"tmx\", src: \"data/map/map2.tmx\"},\n {name: \"map3\", type: \"tmx\", format: \"json\", data: {\"height\":15,\"layers\":[...],\"tilewidth\":32,\"version\":1,\"width\":20}},\n {name: \"map4\", type: \"tmx\", format: \"xml\", data: {xml representation of tmx}},\n // audio resources\n {name: \"bgmusic\", type: \"audio\", src: \"data/audio/\"},\n {name: \"cling\", type: \"audio\", src: \"data/audio/\"},\n // base64 encoded audio resources\n {name: \"band\", type: \"audio\", src: \"data:audio/wav;base64,...\"},\n // binary file\n {name: \"ymTrack\", type: \"binary\", src: \"data/audio/main.ym\"},\n // JSON file (used for texturePacker)\n {name: \"texture\", type: \"json\", src: \"data/gfx/texture.json\"},\n // JavaScript file\n {name: \"plugin\", type: \"js\", src: \"data/js/plugin.js\"},\n // Font Face\n { name: \"'kenpixel'\", type: \"fontface\", src: \"url('data/font/kenvector_future.woff2')\" }\n];\n...\n// set all resources to be loaded\nme.loader.preload(game.assets, () => this.loaded());"}],"type":"FunctionDoc","description":"

                      set all the specified game assets to be preloaded.

                      ","params":[{"identifier":"assets","optional":false,"description":"

                      list of assets to load

                      ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"loader.Asset","kind":"link"}],"template":"%1<%2>"}},{"identifier":"onloadcb","optional":true,"default":"loader.onload","description":"

                      function to be called when all resources are loaded

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"switchToLoadState","optional":true,"default":"true","description":"

                      automatically switch to the loading screen

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"kSR9veE1C3FB3b1gG5Gz5","name":"reload","brief":"","examples":[{"caption":"","code":"event.on(\n event.LOADER_ERROR,\n (res) => {\n // custom function\n showErrorNotification({\n text: `Error during loading content: ${res.name}`,\n done: loader.reload(res.src);\n })\n }\n);"}],"type":"FunctionDoc","description":"

                      retry loading assets after a loading failure

                      ","params":[{"identifier":"src","optional":false,"description":"

                      src of asset to reload

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"JQTzIk-gL0PjOqkCkQolW","name":"setBaseURL","brief":"","access":"public","examples":[{"caption":"","code":"// change the base URL relative address for audio assets\nme.loader.setBaseURL(\"audio\", \"data/audio/\");\n// change the base URL absolute address for all object types\nme.loader.setBaseURL(\"*\", \"http://myurl.com/\")"}],"type":"FunctionDoc","description":"

                      change the default baseURL for the given asset type.
                      \n(this will prepend the asset URL and must finish with a '/')

                      ","params":[{"identifier":"type","optional":false,"description":"

                      "*", "audio", binary", "image", "json", "js", "tmx", &quo...","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"url","optional":true,"default":"\"./\"","description":"

                      default base URL

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"ozLM5HUiEy1ehq2Y0kFjz","name":"setParser","brief":"","examples":[{"caption":"","code":"// specify a custom function for \"abc\" format\nfunction customAbcParser(data, onload, onerror) {\n // preload and do something with the data\n let parsedData = doSomething(data);\n // when done, call the onload callback with the parsed data\n onload(parsedData);\n // in case of error, call the onerror callback\n onerror();\n // return the amount of asset parsed\n return 1\n}\n// set the parser for the custom format\nloader.setParser(\"abc\", customAbcParser);"}],"see":["loader.Asset.type"],"type":"FunctionDoc","description":"

                      specify a parser/preload function for the given asset type

                      ","params":[{"identifier":"type","optional":false,"description":"

                      asset type

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"parserFn","optional":false,"description":"

                      parser function

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"nekx2m5qOkxfpZ7cHBEWn","name":"unload","brief":"","examples":[{"caption":"","code":"me.loader.unload({name: \"avatar\", type:\"image\"});"}],"type":"FunctionDoc","description":"

                      unload the specified asset to free memory

                      ","params":[{"identifier":"asset","optional":false,"dataType":{"tokens":[{"value":"loader.Asset","kind":"canonical"},{"value":"loader.Asset","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                      true if unloaded

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"enTq_URrH-Gycr0lzMTPT","name":"unloadAll","brief":"","examples":[{"caption":"","code":"me.loader.unloadAll();"}],"type":"FunctionDoc","description":"

                      unload all resources to free memory

                      ","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"kh3BgQ_YqaKaoPE2jPz9n","name":"Math","brief":"","type":"NSDoc","description":"

                      a collection of math utility functions

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"2_c8WOW88zFszZQFFjWPa","name":"DEG_TO_RAD","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                      constant to convert from degrees to radians

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hZ-W828jdeGPz2c0i6YFU","name":"EPSILON","brief":"","access":"public","defaultValue":"0.000001","readonly":true,"type":"PropertyDoc","description":"

                      the difference between 1 and the smallest floating point number greater than 1

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9lCcExEaW-tsxNR3wXlkE","name":"ETA","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                      constant equals to half pi

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zRfJGfrNVdKCidiJJbQhq","name":"RAD_TO_DEG","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                      constant to convert from radians to degrees

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"18lVueCxzJUn1uuiCdPhN","name":"TAU","brief":"","access":"public","readonly":true,"type":"PropertyDoc","description":"

                      constant equals to 2 times pi

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PemZIBM5pRFCv95Gn9Txz","name":"clamp","brief":"","access":"public","type":"FunctionDoc","description":"

                      clamp the given value

                      ","params":[{"identifier":"val","optional":false,"description":"

                      the value to clamp

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"low","optional":false,"description":"

                      lower limit

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"high","optional":false,"description":"

                      higher limit

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      clamped value

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"xdRlfKoV9PNobi-Yy3PLG","name":"degToRad","brief":"","access":"public","examples":[{"caption":"","code":"// convert a specific angle\nme.Math.degToRad(60); // return 1.0471..."}],"type":"FunctionDoc","description":"

                      Converts an angle in degrees to an angle in radians

                      ","params":[{"identifier":"angle","optional":false,"description":"

                      angle in degrees

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      corresponding angle in radians

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"lxCfxvDJSCiAdOWX2iyIf","name":"isPowerOfTwo","brief":"","access":"public","type":"FunctionDoc","description":"

                      returns true if the given value is a power of two

                      ","params":[{"identifier":"val","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":"usJiLemTZVGIJ9rOL-Pyy","name":"nextPowerOfTwo","brief":"","access":"public","type":"FunctionDoc","description":"

                      returns the next power of two for the given value

                      ","params":[{"identifier":"val","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":"s8Hxaw-cpznrlfzK4A-M6","name":"radToDeg","brief":"","access":"public","examples":[{"caption":"","code":"// convert a specific angle\nme.Math.radToDeg(1.0471975511965976); // return 60"}],"type":"FunctionDoc","description":"

                      Converts an angle in radians to an angle in degrees.

                      ","params":[{"identifier":"radians","optional":false,"description":"

                      angle in radians

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      corresponding angle in degrees

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"fmaJLFSJYF3fiCfDXr5dr","name":"random","brief":"","access":"public","examples":[{"caption":"","code":"// Print a random number; one of 5, 6, 7, 8, 9\nconsole.log(me.Math.random(5, 10) );"}],"type":"FunctionDoc","description":"

                      return a random integer between min (included) and max (excluded)

                      ","params":[{"identifier":"min","optional":false,"description":"

                      minimum value.

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"max","optional":false,"description":"

                      maximum value.

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      random value

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"d4dfUPTgEp4dBH27yI-5i","name":"randomFloat","brief":"","access":"public","examples":[{"caption":"","code":"// Print a random number; one of 5, 6, 7, 8, 9\nconsole.log(me.Math.randomFloat(5, 10) );"}],"type":"FunctionDoc","description":"

                      return a random float between min, max (exclusive)

                      ","params":[{"identifier":"min","optional":false,"description":"

                      minimum value.

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"max","optional":false,"description":"

                      maximum value.

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      random value

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"7-g2GByo2opr4HYrjpudC","name":"round","brief":"","access":"public","examples":[{"caption":"","code":"// round a specific value to 2 digits\nme.Math.round(10.33333, 2); // return 10.33"}],"type":"FunctionDoc","description":"

                      round a value to the specified number of digit

                      ","params":[{"identifier":"num","optional":false,"description":"

                      value to be rounded.

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"dec","optional":true,"default":"0","description":"

                      number of decimal digit to be rounded to.

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      rounded value

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"WHgkgxg71viBQBw0j7XRd","name":"toBeCloseTo","brief":"","access":"public","examples":[{"caption":"","code":"// test if the given value is close to 10\nif (me.Math.toBeCloseTo(10, value)) {\n // do something\n}"}],"type":"FunctionDoc","description":"

                      check if the given value is close to the expected one

                      ","params":[{"identifier":"expected","optional":false,"description":"

                      value to be compared with.

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"actual","optional":false,"description":"

                      actual value to compare

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"precision","optional":true,"default":"2","description":"

                      float precision for the comparison

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      if close to

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ZaRhIFCXT_IVEq2zJ-d8P","name":"weightedRandom","brief":"","access":"public","examples":[{"caption":"","code":"// Print a random number; one of 5, 6, 7, 8, 9\nconsole.log(me.Math.weightedRandom(5, 10) );"}],"type":"FunctionDoc","description":"

                      return a weighted random between min, max (exclusive)

                      ","params":[{"identifier":"min","optional":false,"description":"

                      minimum value.

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"max","optional":false,"description":"

                      maximum value.

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      random value

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"DX0HEXNW1uHFl0JX2NxQ2","name":"ParticleEmitterSettings","brief":"","readonly":true,"see":["ParticleEmitter"],"type":"NSDoc","description":"

                      ParticleEmitterSettings contains the default settings for ParticleEmitter

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"dWDD5EfsT--rKBWtJAuAn","name":"angle","brief":"","access":"public","defaultValue":"Math.PI / 2","scope":"static","type":"PropertyDoc","description":"

                      Start angle for particle launch in Radians

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qx0vu0FsRjoCSi5gs5uoj","name":"angleVariation","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

                      letiation in the start angle for particle launch in Radians.

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NMzSjEz1ea7Zkpm4h4GdK","name":"blendMode","brief":"","access":"public","defaultValue":"normal","scope":"static","see":["CanvasRenderer#setBlendMode","WebGLRenderer#setBlendMode"],"type":"PropertyDoc","description":"

                      the blend mode to be applied when rendering particles.\n(note: this will superseed the textureAdditive setting...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tx6dEJPWjd1P1QsCMalDP","name":"duration","brief":"","access":"public","defaultValue":"Infinity","scope":"static","type":"PropertyDoc","description":"

                      Duration that the emitter releases particles in ms (used only if emitter is Stream).\nAfter this period, the emitter stop t...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S5O4tvxkVXZlVRUdxOWXP","name":"floating","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      Render particles in screen space.

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"n6lFCXz9GZ7p0KORXM6cG","name":"followTrajectory","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      Update the rotation of particle in accordance the particle trajectory.
                      \nThe particle sprite should aim at zero angle (d...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HWWJ_yYRgntdx683XpDqJ","name":"framesToSkip","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

                      Skip n frames after updating the particle system once.\nThis can be used to reduce the performance impact of emitters with ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lTgWJsk-Hcb_o15_AjwYr","name":"frequency","brief":"","access":"public","defaultValue":"100","scope":"static","type":"PropertyDoc","description":"

                      How often a particle is emitted in ms (used only if emitter is a Stream).

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AmjGqZXp3tyT5un49c6I8","name":"gravity","brief":"","access":"public","defaultValue":"0","scope":"static","see":["game.world.gravity"],"type":"PropertyDoc","description":"

                      Vertical force (Gravity) for each particle

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LJlmVbH-GFTmz9E8vcub3","name":"height","brief":"","access":"public","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

                      Height of the particle spawn area

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0_jiC5aV8qXJwgmaa6oaL","name":"image","brief":"","access":"public","defaultValue":"undefined","scope":"static","see":["ParticleEmitterSettings.textureSize"],"type":"PropertyDoc","description":"

                      image used for particles texture\n(by default melonJS will create an white 8x8 texture image)

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q7XL0CHgh4E84RwQZyfqQ","name":"maxEndScale","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

                      Maximum end scale ratio for particles

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qjJI7BxYt93mCcZxKtJ9x","name":"maxLife","brief":"","access":"public","defaultValue":"3000","scope":"static","type":"PropertyDoc","description":"

                      Maximum time each particle lives once it is emitted in ms.

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1911wiUXoCey9TnT2q0gI","name":"maxParticles","brief":"","access":"public","defaultValue":"10","scope":"static","type":"PropertyDoc","description":"

                      Maximum number of particles launched each time in this emitter (used only if emitter is Stream).

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5x0Iu4XJ3HiNeU7zVFQc0","name":"maxRotation","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

                      Maximum start rotation for particles sprites in Radians

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gMA7EEio5io7jwfvkpkkb","name":"maxStartScale","brief":"","access":"public","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

                      Maximum start scale ratio for particles (1 = no scaling)

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FK0GBOvcmnwJTEQkiCo81","name":"minEndScale","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

                      Minimum end scale ratio for particles

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yIf894Z_TZLrzsafUpMtj","name":"minLife","brief":"","access":"public","defaultValue":"1000","scope":"static","type":"PropertyDoc","description":"

                      Minimum time each particle lives once it is emitted in ms.

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MR5CZcjVM1QD_n71b2OtT","name":"minRotation","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

                      Minimum start rotation for particles sprites in Radians

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v_IM5wt3xSzzxkc0d3xI9","name":"minStartScale","brief":"","access":"public","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

                      Minimum start scale ratio for particles (1 = no scaling)

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p6duHicBM7XeFReke6itP","name":"onlyInViewport","brief":"","access":"public","defaultValue":"true","scope":"static","type":"PropertyDoc","description":"

                      Update particles only in the viewport, remove it when out of viewport.

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U4mEATiK7r_mUgWjbevHd","name":"speed","brief":"","access":"public","defaultValue":"2","scope":"static","type":"PropertyDoc","description":"

                      Start speed of particles.

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eFSipLoM8w-vnHODyOyrt","name":"speedVariation","brief":"","access":"public","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

                      letiation in the start speed of particles

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yUH7G0VGSMU8pwgaV6NAf","name":"textureAdditive","brief":"","access":"public","defaultValue":"false","scope":"static","see":["ParticleEmitterSettings.blendMode"],"type":"PropertyDoc","description":"

                      Enable the Texture Additive by composite operation ("additive" blendMode)

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GSvzz0NfX6MiwmG6xFUNT","name":"textureSize","brief":"","access":"public","defaultValue":"8","scope":"static","see":["ParticleEmitterSettings.image"],"type":"PropertyDoc","description":"

                      default texture size used for particles if no image is specified\n(by default melonJS will create an white 8x8 texture imag...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g5g1_onRvUZt8pfgTNuE5","name":"tint","brief":"","access":"public","defaultValue":"\"#fff\"","scope":"static","type":"PropertyDoc","description":"

                      tint to be applied to particles

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9RFNeBNktlqgH_Ck_l93A","name":"totalParticles","brief":"","access":"public","defaultValue":"50","scope":"static","type":"PropertyDoc","description":"

                      Total number of particles in the emitter

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0uv4XrzbippqQ5DHELxEM","name":"width","brief":"","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

                      Width of the particle spawn area.

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hndhKReXFNJLHa6jCqelt","name":"wind","brief":"","access":"public","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

                      Horizontal force (like a Wind) for each particle

                      ","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"x9Fwx64EAsa5i6DboRP9P","name":"plugin","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"XI6UP8hbm8aJHgKrY63G5","name":"Base","brief":"","deprecated":"since 15.1.6, see {@link plugin.BasePlugin}","type":"ClassDoc","params":[],"returns":[],"extends":["plugin.BasePlugin"],"implements":[],"members":[{"id":"4GxQr6Qx6gJeiEwIddDKb","name":"app","brief":"","scope":"instance","type":"PropertyDoc","description":"

                      a reference to the app/game that registered this plugin

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u09VC_A5AQ5N-HUTMd2pk","name":"version","brief":"","defaultValue":"\"__VERSION__\"","scope":"instance","type":"PropertyDoc","description":"

                      define the minimum required version of melonJS
                      \nthis can be overridden by the plugin

                      ","params":[],"returns":[],"extends":[],"implements":[]}]},{"id":"cx0aoPgS4eMtXL63yDGKX","name":"BasePlugin","brief":"","type":"ClassDoc","description":"

                      a base Object class for plugin\n(plugin must be installed using the register function)

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"I5Y0SXe6DqxYTJfP5lTRG","name":"app","brief":"","scope":"instance","type":"PropertyDoc","description":"

                      a reference to the app/game that registered this plugin

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tbokJiE314jOz3ZNBJVkO","name":"version","brief":"","defaultValue":"\"__VERSION__\"","scope":"instance","type":"PropertyDoc","description":"

                      define the minimum required version of melonJS
                      \nthis can be overridden by the plugin

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eu8B5Ee6kYNgZAYoTbpUp","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"app","optional":true,"description":"

                      a reference to the app/game that registered this plugin

                      ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"ETnhPuNU4Krz42IR09DCD","name":"cache","brief":"","type":"PropertyDoc","description":"

                      Contains all registered plugins.

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4d0cFrMhiOV1IHer79eph","name":"get","brief":"","type":"FunctionDoc","description":"

                      returns the the plugin instance with the specified class type or registered name

                      ","params":[{"identifier":"classType","optional":false,"description":"

                      the Class Object or registered name of the plugin to retreive

                      ","dataType":{"tokens":[{"value":"object | string","kind":"canonical"}],"template":"object | string"}}],"returns":[{"description":"

                      a plugin instance or undefined

                      ","dataType":{"tokens":[{"value":"BasePlugin","kind":"canonical"},{"value":"BasePlugin","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Ulm7WSNMB91BTPexz2vtg","name":"patch","brief":"","examples":[{"caption":"","code":"// redefine the me.game.update function with a new one\nme.plugin.patch(me.game, \"update\", function () {\n // display something in the console\n console.log(\"duh\");\n // call the original me.game.update function\n this._patched();\n});"}],"type":"FunctionDoc","description":"

                      patch a melonJS function

                      ","params":[{"identifier":"proto","optional":false,"description":"

                      target object

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"name","optional":false,"description":"

                      target function

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"fn","optional":false,"description":"

                      replacement function

                      ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[],"extends":[],"implements":[]},{"id":"9BjSDePUQshx7mFho-u3I","name":"register","brief":"","examples":[{"caption":"","code":"// register a new plugin\nme.plugin.register(TestPlugin, \"testPlugin\");\n// the `testPlugin` class instance can also be accessed through me.plugin.cache\nme.plugin.cache.testPlugin.myfunction ();"}],"type":"FunctionDoc","description":"

                      Register a plugin.

                      ","params":[{"identifier":"plugin","optional":false,"description":"

                      Plugin object to instantiate and register

                      ","dataType":{"tokens":[{"value":"plugin.BasePlugin","kind":"canonical"},{"value":"plugin.BasePlugin","kind":"link"}],"template":"%1"}},{"identifier":"name","optional":true,"default":"plugin.constructor.name","description":"

                      a unique name for this plugin

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"...arguments","optional":true,"variadic":true,"description":"

                      all extra parameters will be passed to the plugin constructor

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"Rcp0ZKbipoadsn31X-M4J","name":"pool","brief":"","examples":[{"caption":"","code":"// register our bullet object into the object pool\npool.register(\"bullet\", BulletEntity, true);\n// ...\n// when we need to manually create a new bullet:\nlet bullet = pool.pull(\"bullet\", x, y, direction, velocity);\n// ...\n// when we want to destroy existing object, the remove\n// function will ensure the object can then be reallocated later\ngame.world.removeChild(bullet);"}],"see":["ObjectPool"],"type":"NSDoc","description":"

                      a default global ObjectPool instance

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qU-8m7fm_HlGvgTdOm4Tt","name":"save","brief":"","examples":[{"caption":"","code":" // Initialize \"score\" and \"lives\" with default values\n // This loads the properties from localStorage if they exist, else it sets the given defaults\n me.save.add({ score : 0, lives : 3 });\n\n // Print all\n // On first load, this prints { score : 0, lives : 3 }\n // On further reloads, it prints { score : 31337, lives : 3, complexObject : ... }\n // Because the following changes will be saved to localStorage\n console.log(JSON.stringify(me.save));\n\n // Save score\n me.save.score = 31337;\n\n // Also supports complex objects thanks to the JSON backend\n me.save.add({ complexObject : {} })\n me.save.complexObject = { a : \"b\", c : [ 1, 2, 3, \"d\" ], e : { f : [{}] } };\n\n // WARNING: Do not set any child properties of complex objects directly!\n // Changes made that way will not save. Always set the entire object value at once.\n // If you cannot live with this limitation, there's a workaround:\n me.save.complexObject.c.push(\"foo\"); // Modify a child property\n me.save.complexObject = me.save.complexObject; // Save the entire object!\n\n // Remove \"lives\" from localStorage\n me.save.remove(\"lives\");"}],"type":"NSDoc","description":"

                      allow to access and manage the device localStorage

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"zfnTGv5LL5XgyVMsjgoxM","name":"add","brief":"","examples":[{"caption":"","code":"// Initialize \"score\" and \"lives\" with default values\nme.save.add({ score : 0, lives : 3 });\n// get or set the value through me.save\nme.save.score = 1000;"}],"scope":"instance","type":"MethodDoc","description":"

                      Add new keys to localStorage and set them to the given default values if they do not exist

                      ","params":[{"identifier":"props","optional":false,"description":"

                      key and corresponding values

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"Cx-HUYC_n4ZvAsvdCA5br","name":"remove","brief":"","examples":[{"caption":"","code":"// Remove the \"score\" key from localStorage\nme.save.remove(\"score\");"}],"scope":"instance","type":"MethodDoc","description":"

                      Remove a key from localStorage

                      ","params":[{"identifier":"key","optional":false,"description":"

                      key to be removed

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"ZtlIH4D3-Q_zkLlTA_B_6","name":"state","brief":"","type":"NSDoc","description":"

                      a State Manager (state machine)

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"864hqRpQrQUnOpxHBNUzQ","name":"CREDITS","brief":"","defaultValue":"7","scope":"static","type":"PropertyDoc","description":"

                      default state ID for Credits Stage

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Drihek_Fni96uhogOQDHG","name":"DEFAULT","brief":"","defaultValue":"9","scope":"static","type":"PropertyDoc","description":"

                      default state ID for the default Stage\n(the default stage is the one running as soon as melonJS is started)

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"idP3iGODoOj5eB7ga8idQ","name":"GAME_END","brief":"","defaultValue":"5","scope":"static","type":"PropertyDoc","description":"

                      default state ID for Game End Stage

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OpJ_by0bUMNMUC3cL7v-P","name":"GAMEOVER","brief":"","defaultValue":"4","scope":"static","type":"PropertyDoc","description":"

                      default state ID for Game Over Stage

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fGM_334ELoZQd1jIGZZpV","name":"LOADING","brief":"","defaultValue":"0","scope":"static","type":"PropertyDoc","description":"

                      default state ID for Loading Stage

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WbQ3PJ5CSl7lDxRjx1Zmy","name":"MENU","brief":"","defaultValue":"1","scope":"static","type":"PropertyDoc","description":"

                      default state ID for Menu Stage

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eN-WTXeKIdzAcqDEY8Fey","name":"PLAY","brief":"","defaultValue":"3","scope":"static","type":"PropertyDoc","description":"

                      default state ID for Play Stage

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"II4jkYcu2getLa_MqLnUY","name":"READY","brief":"","defaultValue":"2","scope":"static","type":"PropertyDoc","description":"

                      default state ID for "Ready" Stage

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5QOD3Pa4UbHitH5qg6rMR","name":"SCORE","brief":"","defaultValue":"6","scope":"static","type":"PropertyDoc","description":"

                      default state ID for High Score Stage

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hJbv8U2q9Kzas-ApVup8U","name":"SETTINGS","brief":"","defaultValue":"8","scope":"static","type":"PropertyDoc","description":"

                      default state ID for Settings Stage

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xwUosCovhmBZ6Chme8wc-","name":"USER","brief":"","defaultValue":"100","examples":[{"caption":"","code":"let STATE_INFO = me.state.USER + 0;\nlet STATE_WARN = me.state.USER + 1;\nlet STATE_ERROR = me.state.USER + 2;\nlet STATE_CUTSCENE = me.state.USER + 3;"}],"scope":"static","type":"PropertyDoc","description":"

                      default state ID for user defined constants

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xf0y1YCguydGUD4HtRbDH","name":"change","brief":"","access":"public","examples":[{"caption":"","code":"// The onResetEvent method on the play screen will receive two args:\n// \"level_1\" and the number 3\nme.state.change(me.state.PLAY, \"level_1\", 3);"}],"scope":"instance","type":"MethodDoc","description":"

                      change the game/app state

                      ","params":[{"identifier":"state","optional":false,"description":"

                      State ID (see constants)

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"forceChange","optional":false,"description":"

                      if true the state will be changed immediately

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"...arguments","optional":true,"variadic":true,"description":"

                      extra arguments to be passed to the reset functions

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"tmqRuhhcJvdXIxfJ2oatv","name":"current","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      return a reference to the current stage
                      \nuseful to call a object specific method

                      ","params":[],"returns":[{"dataType":{"tokens":[{"value":"Stage","kind":"canonical"},{"value":"Stage","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"shdi0pXIPpU19fIrqxTvd","name":"isCurrent","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      return true if the specified state is the current one

                      ","params":[{"identifier":"state","optional":false,"description":"

                      State ID (see constants)

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      true if the specified state is the current one

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"_1BGMV3P7xBR4EMcAgaqp","name":"isPaused","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      Return the pause state of the state manager

                      ","params":[],"returns":[{"description":"

                      true if the game is paused

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"oa6VmB1POwL84CUb2fIh1","name":"isRunning","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      return the running state of the state manager

                      ","params":[],"returns":[{"description":"

                      true if a "process is running"

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"BKnqxQWVBxsnXFv89UTWu","name":"pause","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      pause the current stage

                      ","params":[{"identifier":"music","optional":true,"default":"false","description":"

                      pause current music track on screen pause

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"MEYHspf-RYeaiQF6rFTPI","name":"restart","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      Restart the current stage from a full stop.

                      ","params":[{"identifier":"music","optional":true,"default":"false","description":"

                      resume current music track on screen resume

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"lax8kfG059SsWRTyFi6MU","name":"resume","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      resume the current stage

                      ","params":[{"identifier":"music","optional":true,"default":"false","description":"

                      resume current music track on screen resume

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"fxSGoqBA-ob9m9yZO833O","name":"set","brief":"","access":"public","examples":[{"caption":"","code":" class MenuButton extends me.GUI_Object {\n onClick() {\n // Change to the PLAY state when the button is clicked\n me.state.change(me.state.PLAY);\n return true;\n }\n };\n\n class MenuScreen extends me.Stage {\n onResetEvent() {\n // Load background image\n me.game.world.addChild(\n new me.ImageLayer(0, 0, {\n image : \"bg\",\n z: 0 // z-index\n }\n );\n\n // Add a button\n me.game.world.addChild(\n new MenuButton(350, 200, { \"image\" : \"start\" }),\n 1 // z-index\n );\n\n // Play music\n me.audio.playTrack(\"menu\");\n }\n\n onDestroyEvent() {\n // Stop music\n me.audio.stopTrack();\n }\n };\n\n me.state.set(me.state.MENU, new MenuScreen());"}],"scope":"instance","type":"MethodDoc","description":"

                      associate the specified state with a Stage

                      ","params":[{"identifier":"state","optional":false,"description":"

                      State ID (see constants)

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"stage","optional":false,"description":"

                      Instantiated Stage to associate with state ID

                      ","dataType":{"tokens":[{"value":"Stage","kind":"canonical"},{"value":"Stage","kind":"link"}],"template":"%1"}},{"identifier":"start ","optional":true,"default":" false","description":"

                      if true the state will be changed immediately after adding it.

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"DoiBKizVnpSQnn08nE8qe","name":"set","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      returns the stage associated with the specified state\n(or the current one if none is specified)

                      ","params":[{"identifier":"state","optional":true,"description":"

                      State ID (see constants)

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"Stage","kind":"canonical"},{"value":"Stage","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"FiTwnO2E0sRMBTcVvIs9u","name":"setTransition","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      enable/disable the transition to a particular state (by default enabled for all)

                      ","params":[{"identifier":"state","optional":false,"description":"

                      State ID (see constants)

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"enable","optional":false,"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"qCXKcohl66Y2yxx06TTTp","name":"stop","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      Stop the current stage.

                      ","params":[{"identifier":"pauseTrack","optional":true,"default":"false","description":"

                      pause current track on screen stop.

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"NbxrUKDVToRX2a66s560j","name":"transition","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                      specify a global transition effect

                      ","params":[{"identifier":"effect","optional":false,"description":"

                      (only "fade" is supported for now)

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"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"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"YFpgAg6fczHv752gEzYEE","name":"timer","brief":"","examples":[{"caption":"","code":"// set a timer to call \"myFunction\" after 1000ms\ntimer.setTimeout(myFunction, 1000);\n// set a timer to call \"myFunction\" after 1000ms (respecting the pause state) and passing param1 and param2\ntimer.setTimeout(myFunction, 1000, true, param1, param2);\n// set a timer to call \"myFunction\" every 1000ms\ntimer.setInterval(myFunction, 1000);\n// set a timer to call \"myFunction\" every 1000ms (respecting the pause state) and passing param1 and param2\ntimer.setInterval(myFunction, 1000, true, param1, param2);"}],"see":["Timer"],"type":"NSDoc","description":"

                      the default global Timer instance

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mSf6cUCRKclkelG3FRu7d","name":"TMXUtils","brief":"","type":"NSDoc","description":"

                      a collection of utility functions for parsing TMX maps

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"GYugOYP5gYT18LdsFTJSD","name":"applyTMXProperties","brief":"","type":"FunctionDoc","description":"

                      Apply TMX Properties to the given object

                      ","params":[{"identifier":"obj","optional":false,"description":"

                      object to apply the properties to

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"data","optional":false,"description":"

                      TMX data object

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"

                      obj

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"Q62E3Mf-KR5A1hje0wd1c","name":"decode","brief":"","type":"FunctionDoc","description":"

                      Decode a encoded array into a binary array

                      ","params":[{"identifier":"data","optional":false,"description":"

                      data to be decoded

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"encoding","optional":true,"default":"\"none\"","description":"

                      data encoding ("csv", "base64", "xml")

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                      Decoded data

                      ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"dZ2zqYOb6mgJshKOaQSlp","name":"decodeBase64AsArray","brief":"","type":"FunctionDoc","description":"

                      Decode a base64 encoded string into a byte array

                      ","params":[{"identifier":"input","optional":false,"description":"

                      Base64 encoded data

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"bytes","optional":true,"default":"1","description":"

                      number of bytes per array entry

                      ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      Decoded data

                      ","dataType":{"tokens":[{"value":"Uint32Array","kind":"canonical"},{"value":"Uint32Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_rsfNl-42P1Y_0XJcdTNS","name":"decodeCSV","brief":"","type":"FunctionDoc","description":"

                      Decode a CSV encoded array into a binary array

                      ","params":[{"identifier":"input-","optional":false,"description":"

                      CSV formatted data (only numbers, everything else will be converted to NaN)

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                      Decoded data

                      ","dataType":{"tokens":[{"value":"Array","kind":"canonical"},{"value":"Array","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1<%2>"}}],"extends":[],"implements":[]},{"id":"Mb1AZGVLToWPd8e_GA0EE","name":"decompress","brief":"","type":"FunctionDoc","description":"

                      decompress and decode zlib/gzip data

                      ","params":[{"identifier":"input","optional":false,"description":"

                      Base64 encoded and compressed data

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"format","optional":false,"description":"

                      compressed data format ("gzip","zlib", "zstd")

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[{"description":"

                      Decoded and decompress data

                      ","dataType":{"tokens":[{"value":"Uint32Array","kind":"canonical"},{"value":"Uint32Array","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"CPm8ATmTtg_I5SeS1TjfM","name":"parse","brief":"","type":"FunctionDoc","description":"

                      Parse a XML TMX object and returns the corresponding javascript object

                      ","params":[{"identifier":"xml","optional":false,"description":"

                      XML TMX object

                      ","dataType":{"tokens":[{"value":"Document","kind":"canonical"},{"value":"Document","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                      Javascript object

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"extends":[],"implements":[]},{"id":"oROONEdKYd_Dvv3uKIDUP","name":"setInflateFunction","brief":"","type":"FunctionDoc","description":"

                      set the function used to inflate gzip/zlib data

                      ","params":[{"identifier":"fn","optional":false,"description":"

                      inflate function

                      ","dataType":{"tokens":[{"value":"Func","kind":"canonical"},{"value":"Func","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},{"id":"QhIMxcZtrUWdywKLOycug","name":"utils","brief":"","defaultValue":"\"\"","type":"NSDoc","description":"

                      a collection of utility functions

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"uSNrQe8M4UJnafh3uNXot","name":"agent","brief":"","scope":"static","type":"NSDoc","description":"

                      a collection of utility functons to ease porting between different user agents.

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Ax7rf8QjCOTxxdjYh2_Qk","name":"prefixed","brief":"","access":"public","type":"FunctionDoc","description":"

                      Get a vendor-prefixed property

                      ","params":[{"identifier":"name","optional":false,"description":"

                      Property name

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"obj","optional":true,"default":"globalThis","description":"

                      Object or element reference to access

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"

                      Value of property

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"extends":[],"implements":[]},{"id":"oqETMH6ZMc8FG_6DzfqYY","name":"setPrefixed","brief":"","access":"public","type":"FunctionDoc","description":"

                      Set a vendor-prefixed property

                      ","params":[{"identifier":"name","optional":false,"description":"

                      Property name

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"value","optional":false,"description":"

                      Property value

                      ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"obj","optional":true,"default":"globalThis","description":"

                      Object or element reference to access

                      ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[{"description":"

                      true if one of the vendor-prefixed property was found

                      ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]}]},{"id":"E1MyEDOmF9GcHc_r0yIQ5","name":"array","brief":"","scope":"static","type":"NSDoc","description":"

                      a collection of array utility functions

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"FwZxIEuEYsVUPD030rNpr","name":"random","brief":"","access":"public","examples":[{"caption":"","code":"// Select a random array element\nlet arr = [ \"foo\", \"bar\", \"baz\" ];\nconsole.log(me.utils.array.random(arr));"}],"type":"FunctionDoc","description":"

                      return a random array element

                      ","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":"7y3_qThTNGI5za38kaoho","name":"remove","brief":"","access":"public","type":"FunctionDoc","description":"

                      Remove the specified object from the given Array

                      ","params":[{"identifier":"arr","optional":false,"description":"

                      array from which to remove an object

                      ","dataType":{"tokens":[{"value":"Array","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":"JlhOcfcECRDeGuuTj1L8A","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":"5ojuSverhzGoU0BWXCz6V","name":"file","brief":"","defaultValue":"undefined","readonly":true,"scope":"static","type":"NSDoc","description":"

                      a collection of file utility functions

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"NDpZEgmm6lPZQypPptv8R","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":"f7IeADczDMS0XAfBRYpdn","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":"LBl0o-BF-n0jpTdpcy-l_","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":"49FOwC1IXc6f9ZBNXg4la","name":"function","brief":"","scope":"static","type":"NSDoc","description":"

                      a collection of utility functions

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"xB14QBWzwhb__TdpFrEg9","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":"iF_AsMi-jb_6qpqED2wga","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":"tOcVxLxavAAJ-nbd_6NiY","name":"string","brief":"","scope":"static","type":"NSDoc","description":"

                      a collection of string utility functions

                      ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"FWnV66be-KOpHAecGO9b6","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":"5KBhgXNOOFl96l7EEDB1h","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":"Lsyb4L6S4SkTN7d5NIW5i","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":"d4zZQGFsWsfb8rCf9Jgbx","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":"ZOe5NsBN8D09nInooo3AN","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":"s89UR1wuK3DKBsK8i2jlE","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":"fqSDboD5pq-Hag8Kbh1OZ","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":"rr7pg_oYI-UyNlyovjzvs","name":"debug","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      display the debug panel (if preloaded)

                      "},{"id":"kughCLrYggMd4Av2SGAjT","name":"debugToggleKey","brief":"","access":"public","defaultValue":"\"s\"","scope":"static","type":"PropertyDoc","description":"

                      show/hide the debug panel (if preloaded)

                      "},{"id":"lyFCSslAIZqKQwEZx38t1","name":"hitbox","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      draw the hitbox in the debug panel (if enabled)

                      "},{"id":"juMMWPHDrdQNl_tuq7cTs","name":"quadtree","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      draw the quadtree in the debug panel (if enabled)

                      "},{"id":"FIXr8pI8EziQqcOUZ3Hdy","name":"velocity","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      draw the entities velocity in the debug panel (if enabled)

                      "},{"id":"3GHfd0-zIu5EYkED_sHdr","name":"webgl","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      force the renderer to WebGL

                      "}]}]},{"id":"U1WP-2_h8ECCawp3twKp4","name":"video","brief":"","type":"NSDoc","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"DdKs4SGEUS25Hb_S9YA6d","name":"renderer","brief":"","defaultValue":"undefined","type":"PropertyDoc","description":"

                      A reference to the active Canvas or WebGL active renderer renderer

                      ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z-T7SR9tPwfu780m9UpsL","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":"nv8KYuINm1mAi-FhWVY5M","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":"OTGsTqStt4s-tFHT2Q_EM","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":"c-PnF5PJ7WVhvtHql6Skx","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":"lmUjeJRafkeIvehAT4b_M","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":"7ijG1WrmEj9XM5U1FZM15","name":"antiAlias","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      whether to enable or not video scaling interpolation

                      "},{"id":"Df96zvJIZJIy9tltFts4Z","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":"CtDLWZuFgdMnogFWnRrHU","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":"_7Rm9MJ8wXaqX3WxoquaR","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":"-Q4xxCihnn5dZMhtYR7si","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":"T4ei9NxoBn6vPxKqSNWRc","name":"preferWebGL1","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                      if true the renderer will only use WebGL 1

                      "},{"id":"ZAIGYeqVZPM6Mw5f40cVj","name":"renderer","brief":"","access":"public","defaultValue":"AUTO","scope":"static","type":"PropertyDoc","description":"

                      renderer to use (CANVAS, WEBGL, AUTO), or a custom renderer class

                      "},{"id":"0kBEp9vL1ostRYG9CGz53","name":"scale","brief":"","access":"public","defaultValue":"1.0","scope":"static","type":"PropertyDoc","description":"

                      enable scaling of the canvas ('auto' for automatic scaling)

                      "},{"id":"lZdoe-rDvSEgNKSM6KtWD","name":"scaleMethod","brief":"","access":"public","defaultValue":"\"fit\"","scope":"static","type":"PropertyDoc","description":"

                      screen scaling modes :

                      \n
                        \n
                      • fit : Letterboxed; content is scaled to design aspect ..."},{"id":"4YdrvvPVsLoz4-ATrANR2","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":"G1CG0VN5HFTqq5gSxkYKp","name":"transparent","brief":"","access":"public","defaultValue":"false","scope":"static","type":"PropertyDoc","description":"

                        whether to allow transparent pixels in the front buffer (screen).

                        "}]},{"id":"D73qhUSrLwH8OE7ZShu9E","name":"isInitialized","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                        true when this app instance has been initialized

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ntBkgYkamdu2KT0lxDJfm","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":"0DUQH4bsT1rPboD08jYhl","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":"9Mett_EDTYXDc0TIl1wOp","name":"parentElement","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        the parent HTML element holding the main canvas of this application

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8MRdgG2G3JRkqZJ9pXVKr","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":"5ZCyOBFozKBliOgjlcgnn","name":"renderer","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        a reference to the active Canvas or WebGL active renderer renderer

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OfjjVjK47pQEhfssw1sYv","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":"UarHBJ3reYqEAzH_w4t83","name":"settings","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        the given settings used when creating this application

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SYH3qhcseset3kBleDoZO","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":"9tzI4U_7JznDZI34NOHjt","name":"stopOnBlur","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                        Specify whether to stop this app when losing focus

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y3xdnx6Y6sJVg0ZBBQoLg","name":"viewport","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        the active stage "default" camera

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U3DC7StBWRZG_srdF0sDU","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":"yYCxNKVkCXctelMair7nW","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":"tbBUPwk5AqA4-EcpWrm3R","name":"draw","brief":"

                        draw the active scene/stage associated to this game

                        ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"t9ojp-P-8zz_B72WVxMJo","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":"ZIQR2Yckp_9K0hAghQC9I","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":"BheN2-y0P1duskCKPCExN","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":"fC3yWyRD_idq2yXpiVLOx","name":"repaint","brief":"

                        force the redraw (not update) of all objects

                        ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UAePcJKnEqZYH6YMNuwKs","name":"reset","brief":"","scope":"instance","type":"MethodDoc","description":"

                        reset the game Object manager\ndestroy all current objects

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lZxboviJEvQkIz05AQRWu","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":"FugYQinjxIs6mzWuRcLwL","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":"Ei2ZCAaX4isemVfKHshmi","name":"BitmapText","brief":"","type":"ClassDoc","description":"

                        a bitmap font object

                        ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"JDQZVfUu63KxbBSzYaRv7","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":"R88DhquyN9v2peLFwJsvv","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":"T1UCwfWvQw2R9n9cfakVz","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":"6iwHqOmHw0dKxIAzBVTiw","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":"TaBnmT5HVqfTO4YVo6rfk","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":"febPmdD2M0qpEVD_zCGzt","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":"-YDXv3S7QhLKgtyVYu6Mn","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":"_P63V_6S7AZqykFM0KD9T","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        bottom coordinate of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BkdJYHUThA1nrdWJ6yRv8","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        absolute center of this rectangle on the horizontal axis

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q3yVlxdFvwQbjJdq7E9qE","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        absolute center of this rectangle on the vertical axis

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Zk7P7LmZwArLLopTAhYSq","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        the renderable default transformation matrix

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"J0qtYplVbNCJI2E_94uVQ","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        the depth of this renderable on the z axis

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mEb66gIxbVxduEj_UVMS6","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":"y4e98_2DTXiJ_1c6WQa9i","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":"Xt6OwumzjaTlMk3KogD8D","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":"XKYXQ0o4Eeez2TSQl_Vfw","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        height of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L0bGHQvIAQJy_jr2oIjND","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":"9PjA_ecfIL0sWeBG2EJ3e","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":"8AdACuiL86feEA4pgt6_Y","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":"45_prJLYcK7jOF9_kD5HJ","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":"k42BBW5sfWrFLo-2LZjGY","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":"B1U6Wm9EzKyjzGDWBG5Xk","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":"xGKFT_SVKdl7ahcD0OF1k","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                        make the renderable object persistent over level changes

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jfA9wua7ZZJET7d1iwoDq","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        left coordinate of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"213uohVdVdae5S0_z9ETe","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":"KXFpQ4GvdvZTmuO0cygiV","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":"iQxSruoqAkjmrOwT6MszZ","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                        The name of the renderable

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UHX20Sq53NJqOiYFIGzwH","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":"RxrIi6TTfv8TJ5IKfiMVF","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        returns the parent application (or game) to which this renderable is attached to

                        ","params":[],"returns":[{"description":"

                        the parent application or undefined if not attached to any container/app

                        ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"m8LUg8aIrt3UUN__9Nv00","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":"c8EXZsNOJhh0_QG4mWw3e","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                        Position of the Renderable relative to its parent container

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-0JmYENt5kN14UbiNmd9B","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        right coordinate of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7l0hNUCqFQ8S1juB8V5-U","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":"0kT2-jbM4LCBiolyLnCPH","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":"zMSTqOT3ZO8MYEcUL4_lb","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":"INtIaIZ31oNRUlV7xTW2s","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":"i2KtixIjoaBnTblbIy680","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        top coordinate of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mKXYBeSc6pR4UZJwFLg74","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                        the shape type (used internally)

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0qAJ5exlsbtQh7QHCH_Tc","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":"u_jodUOv_kQevbkLKUb2W","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        width of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CgC0LIJWT3kWFZl3Fx84y","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":"-Lf-MKSf6jQFaXm7E_Oee","name":"_text","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

                        the text to be displayed

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BNK0pRX-HEbP4fzdWvaSC","name":"fontData","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

                        font data

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lCSwjVs09ka1KjTDijkYY","name":"fontImage","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

                        font image

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uFdFJDp8V0X5F9pI8Zlx1","name":"fontScale","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

                        scaled font size

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4Am0m4l6ax7AGtiYFeah8","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":"XTdb8Yj6OcAZ-F8S-wbx2","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":"gbbUr78vNWQF8yWyRTjT-","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":"PMwwLXQACC3xu2qAi3QGN","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":"1vbxl5Sqx8QnmgdnGMx9t","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":"Oen2THWdxHUKqxRCgTjOk","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":"9HTwq2E4cngcTslqe5eif","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":"jET-KX_B2rkQewFaOHoXs","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":"cgbgTml5hC8l5e3ne8_ZA","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":"dmPt7ojRMWmFfdZ-Wbiwn","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":"VgVjVSWK5OM1KwBzEwpH9","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":"-QgEA2GcYdcRAsGPhp4JB","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":"HRffm-z_MpJBL-vvLOCZ-","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":"-8RY-BXiQZbtk16oOL19F","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":"n8uaRIfYRKG0grMsIDHcL","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":"0XY2bZkvIM1ekbeJKBz88","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":"CdV_0uBw59CEBUpM9Z0nT","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":"2pyntm2LkUdZYAQ1RnMB0","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":"hmcQfRgoPCYz6lx9nosIp","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":"VpuM8h4tKied_H-N90Odl","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":"fVGQH_fqcelKoLDfmApTi","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                        OnDestroy Notification function
                        \nCalled by engine before deleting the object

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P2j7DxSJ0sPPx-pN4NTPR","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":"3ez5NRxXEw4SqnkbSDVzI","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":"dQDSN3J0Si7rwJ-E6KA76","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":"Wbrs8JDv6VOapO-xfoiWK","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":"tlPhI3d68QNQ2nwr7m6uR","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":"q3KIZl-nRRuk5Hli829rM","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":"ymKzYVk2yuNrNWZDBju-0","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":"rx3NikvPKH1Ft-lcVGLrU","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":"ITyGxOFBxh7TakwEdqUrl","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":"SZLzd0Y24gN8qJ-85-kRS","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":"xILllh3SGny6YuGUP0TKE","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":"VRj21cBqIlhSoDQIYexSv","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":"qDKV-z4nacxlOeDYeB8a3","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":"L-GDnuw16A0Xbkx9xJBxE","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":"eJsafNT5U_w26SSF_0CXU","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":"Tfv0DUZNPOriB8Dd6Uq0c","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":"X0z_8JaQD2gJcAHlyT0LO","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":"mjIYwCasaxujTA5Lc_PtD","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":"2dADWMi2ryOr-e1C2p49W","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":"WYNmYdlOfWC4wLN50WTqv","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":"roZZBxyeEw_sK5-5TJqLC","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":"f97GbA0U60Cbgj7w5DF9f","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":"Lvm3bdZYDXLbXixlS3m3e","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":"U4qN62FUIdQr8F6vRakQ-","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":"FufRXaCtoYljx0S-Cvp8D","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":"7Zs2-gj4_yBiZoOn0ZiYb","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":"ub5C26l31m3C8A9xKJoz4","name":"bounds","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                        The AABB bounds box reprensenting this body

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TZhBX-r3GhjQwJpfvBBcw","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":"H262lzFCcp16Aho_-Tjvj","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":"cIEEldp-ms-297QRGJSL5","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":"zLeqHZdJbmOw_PQ-qIQgP","name":"friction","brief":"","access":"public","defaultValue":"<0,0>","scope":"instance","type":"PropertyDoc","description":"

                        body friction

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SrAjn-UhgbKLwAbJy8-6E","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":"0bmDMxcTLH01qPyGp6nKI","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":"VlJr7COhEZwqVs5N9itM_","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":"toUPr0f8YMXRxe8fbdDxd","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":"gZ-beAaqJHt5t2ITnWexW","name":"mass","brief":"","access":"public","defaultValue":"1","scope":"instance","type":"PropertyDoc","description":"

                        the body mass

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2UsmquZn3XwLwRUvsTxeS","name":"maxVel","brief":"","access":"public","defaultValue":"<490,490>","scope":"instance","type":"PropertyDoc","description":"

                        max velocity (to limit body velocity)

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i8_4CnJo73Xjjcbxd5HS1","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":"QhjdBPvdmWiSNSugEH5pb","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":"McwDMqkpWv7fguaLtUX0C","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":"RbtXF46QpXKlrv8_2uXbf","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":"SQPFr39gyLya1ssojsJzg","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":"ggV2lbLyEnYsh2v4FiveO","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":"RPOEp425sLIflIwAnT4as","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":"JKj_jJvZhXuHfgkC-d8Aq","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":"eB5ukghH4dRJtBBLlAznH","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":"O2LFbd1iwonysRhlGS0M5","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":"FyHxqFEviNq1lPTbrFDn3","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":"mFz_8LFGz-mXasePZcqb-","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":"t4pdbBAEoe6r3wWiEm6xP","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":"Wl53KKWJUq1DLZzqqcovi","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":"S5S7DlAJwNFFiboYq02G2","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":"s3tu96eP-Qj_XwZEW7qyZ","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":"neos96HudWV9NE6W2PDoY","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":"ylI0A65D-iVcMTSNQgqeC","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":"pCAUYfaqwWeU-TsFaMrYU","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":"N4zUhc5tPc8-siUWglDX2","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":"MymqFvWS_Yhq8y8noEkQy","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":"0LrcCSaXdLksNSeKBhgVu","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        bottom coordinate of the bound

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ologot9lDD3XUuQSYxWmN","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        return the center position of the bound

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_U1YGSkJM6cRlFvy-xGGt","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        center position of the bound on the x axis

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mo5QQ7oaKOnWo4O6IOlg6","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        center position of the bound on the y axis

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JWrc-U117CPalRGAJKIQL","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        width of the bounds

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tCvMJK8Hhv56_Jzg2Op1A","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        left coordinate of the bound

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1G8dv1xr0EH_Kk9xyUdn4","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        right coordinate of the bound

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wtks9G5FLfVkmwOyE2SFt","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        top coordinate of the bound

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_zn9eMUEHoBJSk25RSrrP","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"

                        the object type (used internally)

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1LpyOkotb6xstHrpuTaoH","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        width of the bounds

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3Tb0pnaB3kNEPtdPi5mWq","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        x position of the bound

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wD5vcXHXOBaNfxt0oi6MK","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        y position of the bounds

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KSRDgvPhXap4tzYcGknzD","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":"kr_NQgZahZqLRxj0ztzYB","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":"txNEvZ5IznyLEU_ol6UXk","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":"wgC1QazulUkCPMfcDHrvk","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":"fxE06tOTb98Xk6LQAOqTy","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":"Pk2SRHVXXYsMYk1WpFx4K","name":"clear","brief":"

                        reset the bound

                        ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HGrqMYe5hN2BxwZ3z67GG","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":"Xtid46Nw5dv-34ssGkQM-","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":"gujUBiaMmpIxM2xStcBHt","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":"qyQORKy-S8A1RK1syORjH","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":"9umBCeWXuqPJOK4LLjHRx","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":"JNl1bxnrA37WRNl1kuA7b","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":"4c3N7et6PwS0Tn474jV6a","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":"FyIXCLC80rIdjRNpK5OMI","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":"qFZu0w1CTxLKWbigC-5KR","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":"ChZ2M2NO0CvOH2vzOA-PD","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":"SthHv7mwCbafO0F5gdMz_","name":"Camera2d","brief":"","type":"ClassDoc","description":"

                        a 2D orthographic camera

                        ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"VNVfthSOBibD1iZxJGDCN","name":"AXIS","brief":"","readonly":true,"type":"EnumDoc","description":"

                        Axis definition

                        ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"DGxfb3LSCfrX2md-1FnRf","name":"BOTH","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                        both axis

                        "},{"id":"aHENbw6sAkM0Gn3jqQY7r","name":"HORIZONTAL","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                        horizontal axis only

                        "},{"id":"1zyTh2BB8BT5uX8OtJ6Ec","name":"NONE","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                        no axis

                        "},{"id":"KSvYempo2PfHoa6omWpnk","name":"VERTICAL","brief":"","access":"public","scope":"static","type":"PropertyDoc","description":"

                        vertical axis only

                        "}]},{"id":"KVKZEyauAsJXcwKZAe211","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":"9nyfsZRIeXoj_vazbBWRq","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":"vUeZol8dA5t7rWmVhzw2h","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":"E5Q_YWRuNgAWOXLBHqJCg","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":"O6GCewtZ_2i2zjLdN5Haz","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":"gDL8SBYXsIgzCeInllJja","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":"LIhMSJN32D8G7FPpfTMQY","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":"UZ5ORnb3mMLXxDSvCGlmu","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        bottom coordinate of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BxZ8oXPsblfJ8exWNCMgI","name":"bounds","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                        Camera bounds

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DrUjpJ9OBtKSFXzQ07csi","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        absolute center of this rectangle on the horizontal axis

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_KZDkseofYGs_0hvRTiUS","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        absolute center of this rectangle on the vertical axis

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VhCm-wbFq9YPCj0cLjo_G","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        the renderable default transformation matrix

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Di5ToTpP_Ifh-MITkFyaJ","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":"y4m2Zdy-4g9ZaBqwbzUFg","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        the depth of this renderable on the z axis

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jkrOjF_GPR6ib2qhQv9vv","name":"far","brief":"","access":"public","defaultValue":"1000","scope":"instance","type":"PropertyDoc","description":"

                        the furthest point relative to the camera.

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hF_7ZzvM4EGSzyAREMntM","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":"b6B3_w5-dWczPV7W-Pfw5","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":"jgnwVp4e6yngmgrvs_nVM","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        height of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Bj3aD_Y6PwHS1aot6MHUJ","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":"EA9rHY0lQKAxYqXTxNsgs","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":"-G9rb9ifMSWdRs-NXjYEQ","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":"gASi017sK5x7QcypnJ2G4","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":"CATLNyaOVJwQRD0nLsV9C","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":"0AVfbbMBeL4ZAH4neOVDd","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":"Xl6lAv1aFNh8P_7ojNnaP","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                        make the renderable object persistent over level changes

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hYZ71UpEMEjjyQwaf_jjp","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        left coordinate of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3JPZcnnN2sovfeORS32YO","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":"YyaNVcSef5bM0h5iyaiSg","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                        The name of the renderable

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZpKActERuaev10UnlogCC","name":"near","brief":"","access":"public","defaultValue":"-1000","scope":"instance","type":"PropertyDoc","description":"

                        the closest point relative to the camera

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xZVmV8f-dSexvECgv4LPE","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":"wUX-NbfPqTevT_CFKjyoL","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        returns the parent application (or game) to which this renderable is attached to

                        ","params":[],"returns":[{"description":"

                        the parent application or undefined if not attached to any container/app

                        ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"KtwkiM8WKJWwFz-RSK20R","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":"bgcxo-2s74_Pk3VJJ99yC","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                        Position of the Renderable relative to its parent container

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ghzSVoxXseTGGsFOIwl0b","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":"CoLVJ6kmR7hZReRaEtKHV","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        right coordinate of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"euioQx3Gi07l9384RMvra","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":"0vasIRXJuJbf49kJGgGPD","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":"68XwqX_hMMA1JjNh8xejG","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        top coordinate of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VTFTuFMq4U1kDNgtLqlCq","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                        the shape type (used internally)

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MILMO-7DhxZCO7n6Pxtpv","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":"3y_lJshPe_WHYnfsTnXdK","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        width of the Rectangle

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nbmPpVqrdWKKWKqAuAdC-","name":"smoothFollow","brief":"","access":"private","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                        enable or disable damping

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iAUudsbvYoTJx7xCHioyJ","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":"7IozUeTjq6wvP11XyApMw","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":"LSBMdMFpEYUNMEhCxYTpz","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":"S9yoJt3sFFA7PrS0PMl48","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":"xGF5aJEeGL0ek1TYquKk9","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":"3Oi6kbkYqw3Kr9azKHRxV","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":"KgYme3tU65Qz_qEWM-eZC","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":"EIP175UmBwQoVVwZoBw5S","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":"vXQMswPO-vCApjfutCxuQ","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":"NMkPfPWcpyE0CsqhepBlV","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":"Z8mAxuiUzwaqehk4PdojS","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":"RaDkE3oxue70l4Q8MjGQa","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":"KAYvSCcHICSEbz_NDyXEj","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":"iEkzzrQzxgyIl1RwRh8C0","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":"PVvdS58YfsNA-lm4aGofm","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":"HO4fH4KFSO2iBaIDfPc9T","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":"lNVJ2v0yw5nWtP0hitFJX","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":"ZbfDl0gzzcJavVAjoOhQo","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":"eTVzGIqfP3ZRAxSQ2DF4M","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":"JCbZVzLPss5xqgvvfSRJX","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":"rhT9pX2FmkeczZl6vJOg0","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":"6PE_QI2Y-E3iRlAQogAdU","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":"DYJV_ezaC0BMSfZz9twU1","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":"ywY-8ZPQWXJ0_ZD4l-aXX","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":"98n4lZuJ5bxKrLaNxcU7d","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":"QoNXrLU2hjQ_nsZdRNdzi","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":"q5gsDS0lWAbNCkx8kIwDt","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":"Nydlsk4me_mr-MulC2TDl","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                        OnDestroy Notification function
                        \nCalled by engine before deleting the object

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O2RDS_Iw44M9aQsEYzmZB","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":"o663saoa9zArKNSfjScen","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":"tUexPGSfJlJb1hA-ESJTH","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":"ZnppweHjbiLfg6ln2bd0f","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":"ZQ0BdipRIX5jFN5Y8sp3j","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":"1TKN4kfOZoSQqkf_PVLR4","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":"49XpZZYRoAJE9byoDVHQw","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":"EHT7tUwSTh__ZBNIrdTWU","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":"oYcD4RmE2piR4WWbxaTCM","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":"90lJvDEwWnXMUhV2fVjlW","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":"cF5OymP5LFGRhAUoTJ-bd","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":"bUeiz1YTU4mszlzExB8Oi","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":"vIiUjAuzbYTx4UqSBNJKj","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":"za-KBZP4RKQ2eCjuRPhSW","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":"goY6azEBUb9J3Et_MMgz4","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":"GajA09rKhGwWTYai3Y_g8","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":"pvnKtOFPB5Ur17oG4jCf8","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":"JsofuQsSC_MYT9c90MaVf","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":"-3CbQ_zvtxwMHjE8x0dsQ","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":"AiqnTTrougZ-uSSo-Law7","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":"tpzkv2qtgMlCT-3D-4MGa","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":"fm74hzzgoqTwrclxOcMxO","name":"unfollow","brief":"","scope":"instance","type":"MethodDoc","description":"

                        unfollow the current target

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xJHMDP1SqSHyNf7zUw-r7","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":"Piq7NqlmU9aAWt56ZtG6t","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":"qrSvxuy3NC1N_tlwQygf0","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":"hscBKKfcRFLQTloBLZSX9","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":"8z5qOLDDV1R2jGpKeGIcO","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":"WM8pGAzjXz00wwckBanQ7","name":"CanvasRenderer","brief":"","type":"ClassDoc","description":"

                        a canvas renderer object

                        ","params":[],"returns":[],"extends":["Renderer"],"implements":[],"members":[{"id":"PLJw-MNSW48H-3EzDffeW","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"

                        the default method to sort object ("sorting", "z-buffer")

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wl-seuiXUdnvD3M7duM42","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                        the requested video size ratio

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-JSWIdu86fbfw3T2fH0gn","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        return the height of the canvas which this renderer draws to

                        ","params":[],"returns":[{"description":"

                        height of the system Canvas

                        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"W6dGvsg9AzIMftuLQsM0Z","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                        true if the current rendering context is valid

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IciswgNJ6rOR_vbVvflyV","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        The Path2D instance used by the renderer to draw primitives

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ANNN6YmFaB8x3kqvI1FuA","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":"f5tjqiz0AuBu1iTG1T2B3","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                        The given constructor options

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-_ftqqkQE0R4hjqbHmD5I","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":"dEhqLCOGTo0UjiezJR7Mf","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                        return the width of the canvas which this renderer draws to

                        ","params":[],"returns":[{"description":"

                        width of the system Canvas

                        ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"nY5RjRLIwCsS0aTgv_SVE","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":"LggRreMeiwlHhZ8_1Et-v","name":"clear","brief":"

                        prepare the framebuffer for drawing a new frame

                        ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-nt1oIReHwUmaVHXY_FKZ","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":"XtsCKmHuRhfiDRQlWEKyc","name":"clearMask","brief":"","scope":"instance","see":["CanvasRenderer#setMask"],"type":"MethodDoc","description":"

                        disable (remove) the rendering mask set through setMask.

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zOqP3_qSxBbAss-RrYuvv","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":"DGJXtSMLoQDUKg4GQCdK6","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"

                        clear the rendering tint set through setTint.

                        ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O6HOLghXVpPoK4NoCe62Q","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":"fZaQHxlLgRo1g12IcCKeh","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":"COxCSrfqLKDIIaXv6zopu","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":"vE7TP94AnWZhvizzTSXA9","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":"D_R6j784IBxMo0nY0aZ2p","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":"f2rXERk0r4_aMWX1mOqP4","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":"gq6mBWVzb17QrB-I9Q88E","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":"GaGXQTvVVxYYoQ2oXoViX","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":"awsQwH6McplY3dpXk-a3D","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":"yosU-g_UmT4ciN5SKGFn8","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":"Z9FSW3NN9uYXuL9pYG3Ef","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":"lWiv3AUlrPOJHPYmrdo9F","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":"JACpFiC11OH9-0g97kxNx","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":"TffnhSzGN-hJqlj-vXbuF","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":"VaU_2vKqxfg5PCY01viWS","name":"flush","brief":"

                        render the main framebuffer on screen

                        ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cMARf7N9A7_Ejx1bpSWSS","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":"19GNVFHKS6Qao2rPRvZiA","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":"r-t8Opt_-X4qAf8Z3A7xl","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":"AWo782NejWt4YfS98w-W8","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":"R_lp5M22GzHAVPQE03GnM","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":"RJ1ziEb40x2t4I0VDPyxh","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":"rKZIYlpEkZiNB6zbhCz3H","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":"QZt6U9nr7tTnN-fmPqKc-","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":"OjgZUqr9hubKFb8G2YiQ4","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":"ys4Ox8VLAVtWp4e3idvIq","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":"Ya4IxrcEEPR02ap7Jl0fu","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":"xqCFbFXsgZ-TeRkZhVgjD","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":"JNML54eeHRreAnYczebnP","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":"eZ-ct7VA_04DghC4Paxy1","name":"reset","brief":"

                        Reset context state

                        ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_axR3_q1u4-YkPQpL14Nk","name":"resetTransform","brief":"

                        Reset the canvas transform to identity

                        ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w0lLs5O4cdVWQmCKv6kLV","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":"bIIIIK5BCKrLRY1ZZSFZT","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":"mPb6osgR3tbIYsnHFgncx","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":"fv2-R_tjhvfgtE6pmpLAZ","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":"DbUzZJL-rvhsbH3i4yn-S","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":"Yz1BKsnoJcwVC2x8C5Pen","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":"xXXzVcdDn9_QDQw8xqhu6","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":"OfVJPjOHbSSd_twBBqBPc","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":"pptNybUI3plFaxXqaAYhy","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":"6yldXpbKbpXM5qcajqm7w","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":"UWpDd2_wWZxk1IbEt_K8L","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":"-XYwhW_1lYUAWi3yLsUcb","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":"P-yvi_l7E8KLM6B6S4F48","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":"35LZ2zHNFRgUex2ThW0RV","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":"dC7Pdx3V1NGdx9tKP4XrI","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":"1ocNbuJx9qqq2-X53X0XA","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":"stqn3tJVO5ckzqP_MNE6Q","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":"yr-WvGmi_HT2w5BwX_5-3","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":"1Fz0Ng8olp7gmBj32y89W","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":"8k7gFh-p9RA1WZA8-zU0r","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":"MCQTlVOmFFtqJhYVgc4uB","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":"LQ9O5fEPi0G5FmjhJ9vPw","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":"hHyofKTXovTJzTwmbHrze","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":"aYa1EDYVOCRGyrynZJwG0","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":"tTnhQwmUh423zk8U2rnKB","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":"zRhXG_bNkUrZEu_EeIa3-","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":"iYMBisXxVzTcgVFfcV2Uu","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":"hkylblGkoi2FAqtrCBXJV","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":"wH-iFx7-3BBrxoK9OwcHH","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":"k1bA0gfBuDKtu9X1XVrwV","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":"UK6_SHcZPO1nERKkPy96j","name":"canvas","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the canvas created for this CanvasTexture

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V1fAd6nGL0EtH9NQosBTW","name":"context","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the rendering context of this CanvasTexture

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2NpUgjAdMmhCdhLSggbjA","name":"height","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          The height of this canvas texture in pixels

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pPAUfQDEvDn2ylE2mnr3i","name":"width","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          The width of this canvas texture in pixels

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YwBbFR9fdvcXwByr5tpL9","name":"clear","brief":"

                          Clears the content of the canvas texture

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ecAm1jJeWj94BkqZ5Rc4c","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":"oNsvbBjedrOgzJg5nU-D3","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":"jTYLIRlQBZ88ngk4SseSE","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":"v5WM-D2UnHBS9s8GNQByk","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":"zfwSHpJly4aLRhUNb-QxK","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":"6K6oxuBYMxzzrhcnK7f8L","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":"E_iqrHar8ZgiyjO_8goc6","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":"P8L6Jzcp5GrQ4RJZO-_mc","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":"GcSrI1Ly83lO0wqgS5C1p","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":"j62RqXPrTn3fnbu7li_DD","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":"5Xthj6X9kCRi-lUF3mayY","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":"62Hx3HCF1_Ul2hz5VQekD","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":"BpEWXCcDXJFsRCMNkBOi9","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":"N69T0W5A4PkrH5Me1DWva","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          pause and resume animation

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qU2IKsxwB-tjriNJmz-tz","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":"6PT-HOpeUteQRSk7qYhCI","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":"gTndRhtjUe_ArDcERGIxF","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":"FzLLCts6zX7ykihL2PAAq","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":"GwMhSJuvNj9REnvBWwEIL","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GsiMEp3zrcA3cOTmkGTL9","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YbJx_4Ga19Ef8pwcjrPT_","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FB2dtZijdY7r66ZMdSXD6","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1zcz8VyQEDC48SQHo6sEJ","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QwMetYeaFn6_48zpVjIDu","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":"ErIOnrrU-ZMJrUthDS8IA","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":"4mH6ZFhyOcJnRNIBIdPgl","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BqneggfX_8JJEbJtw7bGo","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":"TKyMHxIiodAq6KMfVbGvw","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":"2iiSTQWe8Wtz2G-GEEGhP","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":"y6vsTOluEAtlcWUHGgGYr","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":"EdzvY3kypn1axiWyuwPor","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":"PI0Tn7aEaP1KzxItd4bIm","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":"np4nM--f7VZz1KfTODejO","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eKcIObLwIYrsDkP97Ig8a","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gmhRZFRfIt4EGkd0Q3-qR","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":"Kf4M-rblHnkjxXJGok4xy","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ixgq5neG3nUTawstkyS1B","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":"FvZhYso_tg7LO25qWwgq5","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":"8hFRDBXn7s4hqk9-7voR9","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZVQ_rCR2w1B4QKjX7-DrB","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":"xT6PtGPt3T31ZBnxgr1OB","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5ebYZnlJmbrhnlXlj4gQl","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BeXpBWDsRFatOLqiKnCM2","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":"2ijyqvGx819PtUOTImHKG","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":"x2lWqZ0xR4-zdvcilxzRO","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":"tdvu5BAjrJMQ3s8jo_rFj","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BNVN25Z5nCwPJHT3RNpnR","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aQ-RKx8qVVxDTucylDUoz","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":"L-9UjZxYBxEsjfe2RApRQ","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5SrsFgJe4rWBquvU8Br0L","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":"uFJK9tSLHqeH3AIFwQ_G9","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":"dHk1w-jCfjGvkGoIMPdy-","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":"u7JEBgPeP98AgYLKQgrg_","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":"VgN9yi4S1VpoJCVjlgzuw","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":"X76Yd_AIyokSbZctm_Y70","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":"AhzakUNRQecXdU9nXtmqI","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":"9gAx1I-OqAy3ZXIbLCgcw","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":"DvYcNDQbsbzKoW0TciOZv","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":"h-kH2FL2zwli6C0tdU17-","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":"elaw3trQMYq-gg9m2WG49","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":"1ddEcpsYnHsQRkatjc_Jd","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":"PzYwlOHqq1wY8x8KjEwXl","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":"zOaQCB6e2IUXO3801e62K","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":"G0tTd1raK9JwbWEnatEiI","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":"lA5v2_Dfl1Q9hsvF77p5O","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":"OgPlKVjL_sqnOavhjBMeO","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":"OGVc6ug47Rg646Q7kIIml","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":"cPZPYAYLozsOIzJUmp1fR","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":"SWggOjiipMi3_VnTsR49Y","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":"NrLsQlM_EFvwsiPAnlEpO","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":"dlirRikiJ1bIiTjCjL37J","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":"tfaun1hHZlTyXTa7NWu6p","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":"TUGO9SsLVP173KFG9AgR5","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ldGW2UnlhjCWjUs4L6Bsq","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":"Q2P9ZAVLBsPLLpvmEwNuK","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":"okI7IgKv9rK9UnbMkAsaB","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":"tYaTbizyyeD9faxtivuuX","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":"9xQfHUVKFSMGsFfV3a1P3","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":"qM9cep5OKo1PdJAXBZ8sg","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":"LiSl5tVD3wHzRz4Zipy6h","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":"LXNWbdoqfHTxYLKIOMksR","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":"b07xKeUsLylLcttD5FjIx","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":"S5O6rFA5I62B3q-QuMPVI","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":"UEPUnGzYUuFJkVi41XsV5","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":"ppGSHiUmxoqevlp3VxPEa","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":"hagU_f_oFb9nqItczgsa7","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":"5bnZcWUAP8LrFTQyLqFGu","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":"DYaTjepqhMgPCct8rjtmk","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":"INxsrAeqRS4e4qphQe4vt","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":"X2jy3V7MdXVW5hxojDNz1","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":"Dmu_uPJVXEZffgsvOhUB-","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":"BOuU3Zn1-MjSmHEA5MQxy","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":"nadWzkr4qfA1tod41Cmor","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":"2g24Q1NCAwRlrSZiEiyf3","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":"YfKFh_ozJVDRiBvjZYWZu","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":"LYeyhkwfNbkIP1CtYxu5_","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":"X2MwOC-7XKOB2i8Z8fFiT","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":"nlC-3JZfhxT2RriQBLisi","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":"Q_sjzuJAaWrs3qRYDc6XY","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":"PGBfczEfnj2l8I6r38Ywn","name":"Color","brief":"","type":"ClassDoc","description":"

                          A color manipulation object.

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"KeZ1JreqQno-quI6Kbk1D","name":"alpha","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          Color Alpha Component [0.0 .. 1.0]

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Rp4iZOJ-qlkDeuqsXom1X","name":"b","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          Color Blue Component [0 .. 255]

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9CEgI-nUl0p4g2nmz-002","name":"g","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          Color Green Component [0 .. 255]

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ze56bN2LLsTIsYeklESK_","name":"r","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          Color Red Component [0 .. 255]

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PU2mPXq2t8UOdZCRGt6Lm","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":"Op_YTgjnn-Zr8KqEZWA8N","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":"xmt4JsElmxaYFDBJcX6-S","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":"G1h4_OvVeInGIPQ6jjOV4","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":"Al8RnLN7RPGAh1Eaz45eY","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":"CX58nG_f7Sy0Ri60dKjD5","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":"kIHCH6m-pmD8YSp9dNksE","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":"9b3202-84laMuE4LF-0YU","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":"ZRJs1caJoAlPxY-2DiRtR","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":"D0hQCSnyI70AgTT_mv98z","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":"3YpAUJi2AW_mUWUgaKA5T","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":"d-oyDXUffiTog7-OQr0Ou","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":"TciCmDxkO2cV3OUrX9XOM","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":"rUgL8WuU_8p8mcJKdCtZT","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":"NPtO8ICaS6XH-89Nz3y0M","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":"2JdDIHpvrUJC2fwzPewd3","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":"yp56Opj0huU5-g-ZjLDNF","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":"3ytwQWV5KYByf8s8BEhyN","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":"49TCH48DRxIq1JhBjZh13","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":"f9OK8R77-ZH6Y0_WXnXCe","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":"qV8QL9lqBRhWFvaoKiBLE","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":"s6t3GLAzBeokBDYy5f1Ji","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":"ArHbTfoGmEoekTthakW5h","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":"Gi_2SQ2YcJX_JtiPeAf9I","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":"yMbipFSBgslBdOE6DqTrF","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":"9ov-66SAuDEDvXQkTJXlw","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":"FSFX3UNHQnXS6p8FRJv9A","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":"GQ--3Xl7Vrkp_ZhnZyrv0","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":"zJ_UPPtiAeQ8QF71uS6Oq","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":"kCOxe-2BVS9-Ev_rtZP09","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":"S5ZxWc8NYtZAsukvGiA3e","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bPI3YqYIatngI9zO7g6pY","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L4qPsdMVoRtyyUCRWpO4S","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H_W5ZfIiYuD0NSeicuqLV","name":"color","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          the layer color component

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SQMWwzvQjSZo8wHR6AfhO","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1JzdKCXvILucRJG4TR6p0","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ntzz1xEcaNtwGrmOoZxn1","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":"KxgbbbCt02Fwo1lCnEZ1b","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":"PlqzshWt9JyGQSl-e03Fe","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pyM9SDaDW7Q4_FuFHDWbQ","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":"iDMNp1xQBLw2ZC6Qp5egw","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":"rg10Sni-anKgdSdDANVBD","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":"B8ATKNeaOhrr8wfQxm0gK","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":"PzLEXSIYQp7uaLgYzWsJ4","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":"4WYY0CAtwJDdMQcYE1Z_c","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":"wUrMfYgRQou6G3VhxdVHv","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d8dJkUPlef66szaJPjdqF","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"onSZ5dEyBN5_AdzrwHLgX","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":"yqFZG0OkyRTTi3MOkBZTh","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9v2OzbuMm6ADfs7FDCi7M","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":"n5vatG0SWv_lfWG9x8fLq","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-W_7MDEjQr_1k8FIu1kaX","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":"-Arm9QwOk-jLEiivvRiiY","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0Sh-1nnPNN2Uvg519-BAx","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"t0CboPIL0INWCHhvv-0T3","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":"XOggXCZCvV-ZITr5bXVhq","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":"im_9E2ZuKFwNcv7dDFIra","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4K-kYeLfULiGaJd6VsKpe","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pCL4gd0jEAyo-dKUCCwKk","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":"HX1wJOIh381mLx3fObL6P","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uKyPUjhUd5M3jx4Ku2DFC","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":"I3r4nA9XEvlnSJ8hs-yVR","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":"80A8rqP3jwSsB_PsXM8-E","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":"urcyZSz1L6VQNt0M1-qwp","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":"jX4KtxqUMmkC28HKP1hSF","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":"KqjqZUPP91jjOYkSzjwq0","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":"d6VDAl8BBP26YPrwZQyob","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":"eClHYjnkP9suF2Ykbjwxh","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":"suilf0--Isq05rTSMtaNz","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":"9nprndPhG8UCNMpPvHULT","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":"e1voVOuleBT44sbwWFEXj","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":"LCdRTNldjwm4dWlGoRhp-","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":"5bL-YtUKjQw5h0NBl7HaP","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":"_6rj-FMK0BaNPkCJBz517","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":"nQhsTKNBT4vv8jVOvKzDv","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":"afXRGkOg_m9MV1UxTMVOs","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":"3aH69c0LRGk3xbhXLvMFO","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":"qDQOjHvjLTvF0_2RoVkc8","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":"zrwGHs0cYgiFzRTu_MPJH","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eQm013m2utmQyqg0ZOA9r","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":"IdYbwr07v_tLE_ao1rKgd","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":"yCYATTY-KIcrnPeINGTmp","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":"kE3Nwu_qVKJh-s0PUIQzY","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":"q0YDtusTzZTh665NviJwB","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":"nJyb3LXFLoqXz32-nyK4_","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":"PPVGC17GklgVjpf1O9_HK","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":"h09nOIeTRePIGmbg1yFmJ","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":"X5kzlkbhWvcNAtyXVi1Jm","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":"2SZ_K_lnWEUVuzV2V1ZGL","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":"sf1K9FQg27nmKF72AdUwz","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":"V8MOJDPLoUsB4_4NixzEs","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":"CfNWj-46eaXjtcUiIcgSP","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":"gL_Jk93wWm00FcnYeMIIC","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":"DsLRNlv4-fV-3hW1d5b9x","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":"7oETU8_zGDaQBtjPbratB","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":"IJ_TEPA9xKB9JgyFxLfqI","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":"aDNLfxiPrEC9wZVBPii8_","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":"KHon38pmidPLtNCNRYRAV","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":"YAbp7AYyOTJEs-2uZLOjf","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":"exq9z1pno6CFsGmurKLId","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":"s8o99CNVFxOU9G2sjn2sV","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":"3fXrOO7EowxkAYNVRFcYB","name":"Compositor","brief":"","type":"ClassDoc","description":"

                          A base Compositor object.

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"qUDFHdxSJYgnRUyCNSbep","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"

                          an array of vertex attribute properties

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2KJPj3Y-dOfGnOtQlYy-S","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the shader currently used by this compositor

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"09lF4XDsJCzsYK96jsUYI","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the default shader created by this compositor

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DXQuhWsJrfhJWR_rKwErD","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":"yuWqDzGmT9ycBJqF7C-Tg","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":"eyh6Uf9mU6rmGnbx_Fgls","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"

                          the vertex data buffer used by this compositor

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PU2YuCTPEpAiR-pjArn4O","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":"cFKZts5FwTRKD4mEJ5YJV","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":"mb8-i0ZT6Zg6VAYhYtZOP","name":"bind","brief":"

                          called by the WebGL renderer when a compositor become the current one

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bA7tGMscERW9ZLo7Suwqn","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":"JlopqDZfOcQ3-6ermxlD_","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":"OAQvFaN4G7wf24mU71vpR","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":"laLW_wmriacyE3v76xylR","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":"-RrbIiS6mK3YwEmfwTYaA","name":"Container","brief":"","type":"ClassDoc","description":"

                          Container represents a collection of child objects

                          ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"SEUQIpi_nAuVy_y1eMjDF","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":"dcha_XS_7FgM7GG_4-a-A","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":"5EFTKdMDzscUzj-NJdTVH","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":"x4WmU56GdDe2Dyi-ypliO","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":"YhkR1gyEcg2GcVur67yhQ","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":"4Dmyt1hyM98xneaQXxZvw","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":"y4SWS6miuVLJ7MZEfA8Xg","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":"n8bsevcQeaZ6GxD2DGprg","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":"t7iaYujVZb9xq8kNiu8jR","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":"zM3_kwYn-dDo1dg0Rapz8","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":"_Mljgkh0pdxhfjQ5r_qZo","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ILuVRzapSH3kKSeGurYDe","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"K68aHPx-SAoCg3Dhie68e","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CXYGEBf_Rl7AeavA7R6FT","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":"qEtxaaF3GEtH0Qy92J5nE","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_s9A752_00urXIegCs8jv","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VzobCH7QSR3afOdzuHFlV","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":"sqmBObNQvN0oW4rALwDmG","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":"Pc9VQ6kNUCaJjJKIabonb","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":"nG7-Oww_pge8wACFfIUvl","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mKa1J_8bheHwQy4GOu6p2","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":"R3LyncEmMQwFCBPgAIKV8","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":"Bw0txh6BRGgw_gty2M2CU","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":"Po9ah43kUVvtceK-IS10h","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":"bhHQPZ6W9xmTV09jB7TeU","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":"-QRuGi1SSJVij7WazBppJ","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":"JmvWZ4zQfExpPazX8uEqS","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Yl4wlGZVMfCRRjV_Z-gvx","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"R_8oDdZYxRD86k3ndXyWY","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":"6lGBJ9uuaivNukpX9Y7og","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_MRcCHgBSbaORyVmyGR3h","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":"toIvFIwB8YLHPYREIyoUq","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"190b_FJQ-W80ZNDrveWoW","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":"mHwR45zY88F8PbUrhsl4F","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9x0iY5HhoK3rgSb66WxNt","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Kw0X8qtQEFlqduNi_IgdN","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          whether the container is the root of the scene

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"arFOJffK5yElg0APM3ijn","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":"b-IcaXLiF2EtJP8BsXmiU","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":"KPgFg5mqcp0tCZBLNiqtr","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":"lRIRiyZei2lwgZeVnCTJd","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4wS_kdDjh5a5_KpkEDhCG","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lF2XnsByeq2EZ_HIToNoG","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":"lvDfYhMGTz-1Fzx5zvJmq","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i34OTBb0UyYi9ltg2RSFf","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":"zwuygVXikuX8bWQY3TzFh","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":"XV3GBUg0mnoYBEJROkXnX","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":"opPmw9mczHrueC01DCWJ5","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":"ZLQ-WqxLI7fXbpStUDobt","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":"sZdgdgpiaNF2m0SoYIQlh","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":"B0wbOKorn4RQV5Hg75aHx","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":"Jk8ZpSVLwUmX1Oe-oO_dS","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":"qTEx88S-jpwY0IqBMgH7Z","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":"L21G-VaO_CJDPP-y5pkhH","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":"g2FwlVA_VUMZMMIetPfIk","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":"Rv4uKqM_opMI-t1iXLEBl","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":"-mpHOLQ0z9LP0kdKU-MBI","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":"AbGGhufzMc5TZunq_KB-2","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":"iXj1wl8F4IjMRmTmxYAGc","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":"9teUMgQck49Lm314UZvV3","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":"Idnj_F58iVb8LtIdvmmQ1","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":"c0FGim8J2Y46KOiAIvGnv","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":"dNLGQxSvEKomCR4TGvrmT","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":"F3s43v1Ef84Lch6kk6f6J","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":"atFJX91LYzsGaVRFJwRAU","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":"Idv6Ft7t64Yl_H93JIMcM","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":"LD_Pg3lXwyct54M7U5aH6","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":"6Ti6VfEnhqFKImN2qd3oJ","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":"Kbb3yqjcLXt1Jyygj93Hu","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":"IjEuOCMBb-Bk14DMRxsnn","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":"3N7SzoznhUkhkCX8fAabf","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":"DIaeJXWbCzB4cwoBfgqw4","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":"y5cWD_SEHc_mhGMTYSFZ1","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":"kJrijLi8c5YmuvaOJrpDR","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":"TtRu7f8UY6py3_YXJKsie","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":"0RmEstlxgQAW2dk37zzBj","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":"J-q9y7ZNMXgMX656dmWEX","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":"YWS7bAg24duHSaB9PQaxj","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":"7lXMOaKeu9yw0qGksmXGt","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":"5f4A0ppcjOL1Df_i7sDKg","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":"JbHjUSB9ZM4FhCwJkFN6U","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":"NPBFlhSoZQ5qFZCg_J-M-","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JLJITQmxrFYmAjpICw_1H","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":"BPn2wGBXzQZIJ5NVTPbeW","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":"PMVgGCzvyQ_3-13_EGX1P","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":"RVRmMtDxfBeCzC3Myytuc","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":"L09QL8r9ewxxSyI_xto56","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":"RkQUXx97FgmUoPa6pjsu9","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":"TFpAEMictmzfL0O6d6x0o","name":"reset","brief":"

                          reset the container, removing all childrens, and reseting transforms.

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"biBefPzN4L4p39RSHZhZJ","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":"lK8acGSy0fhuCeNGi3SV4","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":"Y-tM0w03Ad49Hy4eu2BUe","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":"fXNPSxbqpZepc8NtmIbYX","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":"Aow6k-3id78j2j2XLIkyC","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":"RzOywU22-t0v7VQ22HrGo","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":"3wEI8ZeHS8wWdeFi5h4HT","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":"ZDAWLwdIcQzjI33ECZyr1","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":"qEil-byYGjnEqhdC3rpr4","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":"jwCUVaiUNDrvwY7WqT4wP","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":"HJ5LjAoCi9dNt6Y41rB94","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":"O8HACwyBsa7JV0iKgqYPb","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":"qIOYItUSbJ_e_4ECa7z3g","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":"57TtO6w-pqjS8VWBd0duV","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":"cUdtXHbY6XRdFOKj9QZxl","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":"mY31_H_1UK9UvgqhwsZKi","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":"N1aF2xYTcmVy30C12nSNy","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":"WLeXDc6sJhSI3NsfL4BXL","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":"7FBSrGPH9XBeP67jZungr","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":"e2HMwgKNRas1Z2B47V2RA","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":"4JbQjsItRRt786bKyTCrn","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":"E5EsfMDX8vi4sAPzmR-W6","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":"nNVe1-GlU_PwJW8x6telK","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":"hdWZqui2CMMEmD-lH4lH3","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":"0KaoYJ2NDHBVqqynyRNOM","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":"coGfqBFiAdHsSLPRe8sTt","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":"Wgn3Iijtf7mucxMklzPWs","name":"Draggable","brief":"","see":["DropTarget"],"type":"ClassDoc","description":"

                          A Draggable base object

                          ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"CsUvKVVVkX5N0bJElazZU","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":"03w9SCZvlMy_LBzR8rMdo","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":"pBSQg-8PDE6miDTvGzr46","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":"G8m4oKsG_sN-exRA-VBJu","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":"cpMiN46XXyNxlZ4dN_E4A","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":"_XcfBNsZs0m3B1UcCOG2G","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":"FQMvMnYeBXCfcweElA9M5","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":"_1AjGsPRAW2nZqatF_LHb","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Svn5G5iJHBZGxAo6ypBk9","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CZ9EqcfPkHh5s6HavXM4z","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yjV778gNZ24hQak8XwIcc","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s2MFxjwd7X8AoJ0cOzWJn","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"roUcVgBr5ZfRYi5DrQwyB","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":"iRNOnzcRujDla_p3GUG9M","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":"hV69CklAWr90eQm78oko0","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pDzaCPtT6CI6NiLh-V48l","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":"fBrgePNC3BzQxmvDelLtJ","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":"1Snbc6bLEwRIUcEKO-EmR","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":"fXXVti90PIYMAOeguxSGj","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":"RLVzDiBqwIjzUE3GNJoNR","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":"X2srJ1Me1sKD6Bs5tL17S","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":"S92rxHTkUo1Q12lYbyman","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yL6jWqfpqhe9tM2F6qM05","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wu5v-tjaEyUtolaKKZixv","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":"E4QbbpH154A7fEXg-77rk","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wdx4G5yQinDrTp9THOXW9","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":"YLgaH_VGYkq7zzUUww5de","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-KlCwfbzWpMTidVgBAobh","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":"9F9Y7OnUYcTwumnL63Wis","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HV3KzUpq2EmYGvwdwWE6w","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4CxH1C8xAekP6OZWVY4kA","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":"kPCaqEfjH6YGivUyL1Lov","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":"cJ9aXj_Rk03Htswvi7qyM","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RPYmzJLGW3fteLS0Cv8yh","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P7Se-RlBJRHhj5A9jlQP7","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":"_6ME16RTDe6qZjxEbAn_4","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"By80-Fq0d8Ey9AJ5r416s","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":"0Q0X97mIQOZ1ITjIKT-fv","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":"c1c9mMm06dppaz0VdhZCm","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":"vQpMZ2OG94788hlwxDAQi","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":"wiukxIn3p5vPvVeT2TseF","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":"5PIpSnqExM3CnVr7mP5Re","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":"CtPnBjVW5sbOpYo5333t1","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":"nu9t-HzAwZW892KQddo2r","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":"CBhUWOQxjpH05KBEfVcso","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":"NAbAYvvdB9W7Th75K0Byw","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":"C20gCwaUdAC7fLjIzd0gr","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":"QjBFbOPH4tICWSRfOsotW","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":"3wknWoc39DqQRXHw5lk0f","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":"rAnHfyig1ftbE8NAZbMJZ","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":"JlBEQXG25SGFspMQcnAJt","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":"RRpry7HFe6jP69itOvoSy","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":"gc3C3hTzkycZz8e7D3Qc2","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":"ImzC8TflUBeSpxeSRk2EG","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":"OKEVEkMkxg5T1HHMmm6cs","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":"63UYhpk9kJCV2qP7sLdSi","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":"tAsKRDuzD9m2z7dPlj1vh","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":"29vE0lG9QC3GvjzwKlsaA","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":"oQIn-T5Pwtfqmh6Z1wRkC","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5Br8b4e_RrArypFKYQ5DT","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":"EL3gKE09qlV68WVDBdJDU","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":"FldLM53E4SFf6boC_0Bd_","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":"raCNJMPOOZ6X10GE9igYz","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":"jU67ukmB8TqDUhJu6QJRd","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":"U4Lyxt3ehei853LK0Z7ae","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":"JBb4t6XtIR6SAhteoRNbj","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":"TfDXc3qMmoLwiuL23RQkY","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":"kC9OQAI2ogIlZQZtoH7iJ","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":"tuODo3aTiY93u7JqS11T1","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":"Ll7ggvCnT-TzTFXhi2yTl","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":"ENy6Nlpt1Fwpbj2X3tvcf","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":"Cdcu6nQ16qEOeYMrLoSma","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":"Bqpc3eiePbEfj9UM3EyV1","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":"2jCEm2dmr19vGtRRzEpzl","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":"oAnGXDVnQYWZ3OiXd3D-_","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":"ENVnGFb_K0E1YfYVuV5-L","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":"Tai6vHuM45v8_ovZsbs1Y","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":"3rVLkpxkMm_KBWXEInkqc","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":"Yb9c6AsUAR0B3MSG5-ELf","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":"MRUw4es8uQ5CDbTBb8IBR","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":"eI3p2LMJl7PmYNAZGa4pd","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":"Zyu9Qn2AMjpM0emTmBC6D","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":"5IjqaguzOgZ_SFYuVmrwt","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                          dead/living state of the entity
                          \ndefault value : true

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hES6i7i3gb8YEyIE3EXJa","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":"giwY8qAbWShPG4Ow9UKFy","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":"rKzoHntv4fpXPod8_8j5K","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":"BQQEpkkbMzkvRm4NUA3-t","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":"ADcoDwLL8JQvf7Nm0NPkS","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":"jngGMWp5s1CJLnIF4MosF","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":"b0AjqXLhaUp1IPfcJJguR","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the entity body object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8i-iHIaUR-HStktlkNddU","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"axXH7NQp0iXrr1FhS1WdU","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BWNIb31bXiwHdXTdA5RMj","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uc-JfSihq9BJEj68s3sGL","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7Byw6ytrESj3GVlPL2B2A","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ysi_Fy0eFZuCXXe1jRxRs","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":"xr_3QIFRf6jCzbn1bue62","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":"7yMDtNRqJM3CK5YQUDKUK","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CdSvf9pY5enr-h5aQzqtW","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          object unique ID (as defined in Tiled)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WbnkagCrmD-lo5bE1pE7L","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":"8REEwluwy9q-ItRgtniqH","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":"pwNgWphoy4-wLDgOUFuoD","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":"1-ItNnMiy239imcxi5HHq","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":"IfEeUcWMSZqK7qv2mIMPy","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":"XdHLAIv5MfBRp0gN-K-Hr","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":"hqHWQLm7j70zlfGLo6sb4","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EjV5Uv9IyQNfv0acbZn4F","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"knnXWWga0Wk5FrmvOFOLQ","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":"inIsqqMSu0DGhhzdr0HGI","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ayY7L5Oyuko-QKEtTdKhZ","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":"0z-9fK12D9k9bm2HGkQRj","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"IFuIKMf4AqJYTpGgV7snl","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":"N7v2XvJ2jAa5ELRc0K3OQ","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZbG31HlqSA7PjwOkIH8wo","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":"rInO6CBxhsGJbZHqpOnOg","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nZhAcnLfqwfsYb6fff4xP","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":"SvfhvMlT9Bk0QR4jffC6a","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":"1YeyuzZdm8evBwN3-m4V4","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SodnROx2ZYGBNgekyek-6","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          object type (as defined in Tiled)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-fAQIMJ5e12ZCdpN1FT38","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":"PGFmxnT8CQDKDpAVUrMSK","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y4uTZzaLW_NqKKXu7nihr","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":"zrCCSebPsk5SlWeBh66BG","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":"FCKxo84m58uhnVWJ48Zuw","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":"RVpNx3Zo_sBBUoTAb77rL","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":"T56WLtN1GQxfH5Cf1H7DZ","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":"1GbHG55KY6VQ53wa2i2_B","name":"copy","brief":"","scope":"instance","type":"MethodDoc","description":"

                          copy the position and size of the given rectangle into this one

                          ","params":[{"identifier":"rect","optional":false,"description":"

                          Source rectangle

                          ","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                          new rectangle

                          ","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tdIWPoz8csjY8aqTiAaVt","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":"c3Ctu-S0o_egBcZ_Hb4Yy","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":"oipxJ5aWgmVY5AfmR7uWQ","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":"Dqgz3AThyJCJFnP04QskL","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":"rcN9dlwPprAB-5lkObEPR","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":"6nIg58M4xQW4lcGcLLD5L","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":"FDYVCbDslh4n9_eAxEyW_","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":"oV0P48yRRo82bEUW9c15U","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":"vsq3o5lZGF63TmSxVxPU7","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":"c3Tem7a8Sfpi6rPypL0YT","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":"A99BuJ8ecig9X55MgD-px","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":"dwpYMW5yEjpDYDhntuDIF","name":"onBodyUpdate","brief":"

                          update the bounds when the body is modified

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7fXJ6di8X3lFD_K2NKDHX","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":"d0J-lls35KJQxRYneUp2n","name":"onDeactivateEvent","brief":"

                          onDeactivateEvent Notification function

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bqEGfyde80hn8mP1CDWl3","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"svgpRIkg0R3qZILQSgbIs","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":"aDei7gFUHdIT34apDEwUN","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":"bze4A9laDOFbGDEuIYo1n","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":"4F-kRItmVDURsQWdXjKU6","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":"Ust5PW_Abc1Bp5t0vu3eM","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":"ZaQYlSsYIbIz5zZxCJDJA","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":"o6xaYNYOF8KjBsFBa5jhd","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":"upZwcrSgLbwvZKgjWQXyJ","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":"OyqYvZ3bthkEL-X1b4e5q","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":"ZwDvZS4L5pVD6pGcLXMTt","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":"oBHBBeogMsW3inckkXOkY","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":"EFOjYEZeHRVf614vzksXI","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":"pN6PheJu3n3sMkL61PIYp","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":"tl-lpoGO9KnhEosoZc09E","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":"Ex5SaAqBnsD2zsm26_Yy0","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":"qwQwAuOT1ZQUBQXUPtGAG","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":"W11WdbITWm7pMnoAXp86L","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":"rGurKcjfvClfnhjnFOBmC","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":"BG255AhZm-oezxNfGY_Nd","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":"VtNkCTsUZKIBIipQmpI3s","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":"4v4q5R7EjGedEohOBM7an","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":"unn48ZuelJOb8WMuF1CkO","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":"U_IyKGbqIWK15abJxEqzo","name":"DropTarget","brief":"","see":["Draggable"],"type":"ClassDoc","description":"

                          a base drop target object

                          ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"HVFXqydKfWn_TYbsj5QHO","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":"JBEntwDgMCGyJxoj4k4q4","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":"yCxxFO_nPNHuLGTT3ukDd","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":"U6ZhFgNbap1-gDpt3_5-R","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":"YhKpdDlu4eKbqTevPyfBf","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":"J7PIZG5tr6yXzaTHSNzvu","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":"N3fIuo5MKGeijGFkz0Qqs","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":"HKL_u0D9LHZCrbLPVbAed","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1P70DhTW2vPlWehQgbO-2","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uoOwRcn3_Wo68iRmgJeLE","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Qu_POKGWQZTXj2zvNUavP","name":"checkMethod","brief":"","access":"public","defaultValue":"\"overlaps\"","scope":"instance","type":"PropertyDoc","description":"

                          the checkmethod we want to use

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-npRCCBwQz1-zVqqfAK7t","name":"CHECKMETHOD_CONTAINS","brief":"","access":"public","defaultValue":"\"contains\"","scope":"instance","type":"PropertyDoc","description":"

                          constant for the contains method

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"plQPalgVMH2SaCxQJf8jD","name":"CHECKMETHOD_OVERLAP","brief":"","access":"public","defaultValue":"\"overlaps\"","scope":"instance","type":"PropertyDoc","description":"

                          constant for the overlaps method

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d4cblYNI34ut4L8-XOBNl","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1GBP-hGea19lItuPkQ-fL","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mw2K-lmB39msRXnGB26ft","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":"OJdr0MAcz_8pUyNJi2YzM","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":"o_zbOmXMnaMAMSV_N7Txc","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rMotDaNvBN-R1v2SWUc2I","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":"hKNCkEVbPFtJvxcao96ks","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":"jWGdo5IXHLwM9kHlryMrV","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":"CwZ7vif7srTJtSAEJEcMT","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":"DeYvuqJ13dZiae7BYLTe_","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":"KJUHjTBani-O26q-tC17-","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":"t7LrUpL223DqmFeTmhqwx","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Mlwmw5UsZ2_GcurFQd3ap","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F3M9rYVJOQ3ExM4tehPo1","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":"y3navT9SHLLuXnLOD50qP","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"90YWLSatpnx3Y3ls9jkT-","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":"8yfWWhiJLGi1aGksUZImk","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Cj1qj2GIq_1B_14qgLi6A","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":"mcOliXn6WgIforZ8jePFs","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"69olvjXPIxOhvENkUpHgH","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C-Utu5YsTT2LCGpOE56Zv","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":"I_eBNNshBlAnzJutFNI7V","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":"cYQi68kI7W5_xIXj3kvad","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d5q1sgkJ4pwuqECcosumW","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nMEhZpAvLVvnWocC7KKfq","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":"XyuLPrAFT1xPEDxx9_Obz","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RRjFuT0iBKEnW9otEVPpk","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":"d7jJx4dR5Q3LTNyyJfMHb","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":"bY4qwt_WtUxpKwS9X8uxh","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":"D5SFHo1dF4tu6FgOeCe56","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":"KzlmYdIPsGk12NU2h0iiN","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":"jzEhxokdJJ05wiGWgoSYW","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":"JlX47yO5mqNcJyE9um0RE","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":"a47WDOy9kzPrHdPKzTn-l","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":"oTm5G5jEjQ_pPDcRJ0OaK","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":"sZbmADmWP44zMoZxd0NzT","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":"hHtgaUcN8GDNW32FPNMrn","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":"7ssmJPNtTIoQkzspvGda_","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":"ENMpSlLUWugq60Hi45VVD","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":"MZZoOuUcYYaQViAZ0yoGE","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":"QexrrjKpkOoH5WkTXgdq2","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":"imA3fmpIRY7Dms-BrNpeV","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":"JxVvrG44ivKBtvOgeKHoy","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":"w8wGyl4gBbFeL1u91P1mI","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":"1F8SBAjlUwW9lQEoUSs3f","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":"5py7PVIjMIT5THh5GzdWS","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":"YEX_qNs2XXBTYWBN-TN_I","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":"KC2p7t2KmGL3KYV2mqpRw","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AA33X88SrQQGFYVTpa5WM","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":"1u4ZtR92K9e-fd4dua38d","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":"b61uEBfDaIC9VMQnsuahH","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":"ZXr21JTDaoR9dBG1sZv2t","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":"5qHyjQCy_2LvUbKevvbjC","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":"42f3ZOW1UO9rGyV1E9glc","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":"CuDj20t1ArKmaXecTmEbd","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":"DsjW50EAUa6NiAPOWc2p2","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":"kbrl4Y3K8K97m5TeKgr9B","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":"TAcICwN9wRXKFy1xMDhis","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":"stQvFtN8pan5c0oesPwk5","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":"bZQUxuRT3dBPMOex872St","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":"Q8MjpuzkrcSKOOf02IKyk","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":"WPioc8ZT-yeoaXEoBwSxE","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":"pzzinE6qUUVxh4QmmjSoM","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":"f6ysMN-670dmaXVhea6zN","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":"7ce6sRdh474sSlMDxT56n","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":"u3Np8nh7AKFCgaxWFMBtV","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":"vfK4usLkq4OUau4fOadnM","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":"nZcxRutIcuUUWPTiyH9s7","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":"qH4HK0MlcLSYcttzDEpPY","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":"gj_WuLrjLzUkbRnhjYW38","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":"98VTd3397PthgOUIrw7gl","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":"8rO31_IA-z0k5a0vt26y2","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                          dead/living state of the entity
                          \ndefault value : true

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CpKboWDCa23sgXSwBGyJ3","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":"BH-R_rqhsYX4CfSghcjhS","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":"X2QstQWZINXD8Md6TKFet","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":"xUkWWetnuINx6gqf1QSaH","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":"hFJyTo0uS4bCgbmKhIpof","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":"cbb4yzO0FVIPQTFIhsTUO","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":"O_b6BBHizNtkZaMDVQno2","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the entity body object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XVt6WWQYWagTEi4Jjp6kx","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N3r1bWWz6ukqzdW08z-2h","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QfqwsztKQVs9ODoVt9isT","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7aLCBa6PkuPZrBg3QitB7","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pJ_03mJQTxWUQwF7fTVLT","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v3_g9V0oy4awcKXbYk-Xh","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":"XTAD8GGR1_R4ldx-F0V5u","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":"4lRAzogRy-fFEXhIjikvJ","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aAfwKZmeIQykEhG_g4fQS","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          object unique ID (as defined in Tiled)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H3kAngLR2qv7vIk0YM7gH","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":"o7s7vbNpiHMSo3ebz89Mt","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":"9uQ3YM3ZF2uxCjb7DHl2X","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":"oJGclDL5h4_3xkIFcgg1t","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":"OD5g5oBcfC5HG5ts14kwT","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":"c41OXia4iS8OIC6MyoxyP","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":"ScX1DNzzFf2P0bZpBMGZD","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Tg0m83x2sK9Iovq2q3fpS","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dI7tv_P9wMyl7mLHYOmJ1","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":"NKk8ojD1BlufHJMBRpYq1","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fICn0eK0-4HPWfU6WOKRY","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":"5DGo2ftfc7vyAQGHkYGLF","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"fJU5ZnzFWfwd9X7BoKw-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":"mDOPnISw9k2stL0V43SA4","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c5VyergT8gBcoZjTSV3mo","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":"9_SyoscHTEFmRl56davOl","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DtzAN0_63PhCp-OkFM-pL","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":"wByp9-XE8il-lop8DPxLl","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":"fFFgADijMpOL2CDnpsemt","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FlORgEML2hNTPQHsOdH-2","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          object type (as defined in Tiled)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0lhHt46XDmg3XoJIG0dEm","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":"NU2mQFODC4FVHbjtX5MT-","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"f7TTAddJxcF5ZYBCCG0cd","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":"3D64QosI7AG0Vx3jeZu80","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":"T2mQsDUpKWg3GtBBoU21B","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":"CKoZdKqLzDcYjUn_qCB6i","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":"S1MMusXLrH1m2L8g-efUu","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":"Vx2PXs1cn2IA5z6C-IW2T","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":"-tEXjQIMS3838YqF9Fntl","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":"yO21nLnu05gCK7rXJqsbP","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":"OhFJ6BVMorWIzrqY30saZ","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":"hAA1Y7he9M7j2d36UocAB","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":"M1n2UxatwfkszLy2g0ZGU","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":"c1nKX11OZn39YMktC669y","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":"XeDk1RyXnJ5PqydXAZAMA","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":"VvwCBRaP5v3aGm2I9O-oK","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":"q-KF_TSgcwvjAT_cEe_eF","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":"lRkaMXzMHcY25WsQEC26c","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":"oIiAzCBLKDbsuqN2Tykzb","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":"icLkC9KT76fzzL9lZC6QD","name":"onBodyUpdate","brief":"

                          update the bounds when the body is modified

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JJ50strMd4KS3JqDYbLSp","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":"ZNjKMpqQJUuAzVseHfOOK","name":"onDeactivateEvent","brief":"

                          onDeactivateEvent Notification function

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"piyzVHauXC62E574GMDQA","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9AvUjPPivBmaBwXw7eEIV","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":"0rNZvZVB1rseFocxHS8Wz","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":"6aoDb2BpWAX8MI0b6YHVu","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":"fsnah2VK1Ht_2SsginFKq","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":"Z6fxQ8pZZL8suAxrU_E6r","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":"j5y2q11HaGsOk0eXBrKbB","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":"L7USQHyBXTu7gj3L7WgAU","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":"6vlkpR5yr5So-J64cT8fE","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":"RVIGjnkQDspndbWMBgn0x","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":"_l38548GiYpYorWeN8YbF","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":"uv8gRZeqU-DzGnhloD6GI","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":"4X3aEeZs6sT4jV5q3t46B","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":"9X-Tb4SqDey39yr6MehmK","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":"cGCtUmeLn_9A3xeo_ObZV","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":"abmvOvAzTxmcp-tL1-SD-","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":"o8i5eniDyxSHOD-xEth3Y","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":"-nBwaA4JYfSPZiUkXxHYD","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":"NunZmcig7FGh5K_kouMTY","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":"6nVmbWpCUz0vCS8eujFbu","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":"z5n8IGN0-nXmwblxVjNwD","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":"a9RDNEt4UIP86NxLwJODg","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":"Is-BFJSQ9igEGgFuLicYM","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":"uNFiJ8iOdNaKgCa5NJx_P","name":"Ellipse","brief":"","type":"ClassDoc","description":"

                          an ellipse Object

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"QtFa05PGDBlA6gDSwAaKN","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          the center coordinates of the ellipse

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8Uj29OASyZPVXXdf1VIaN","name":"radius","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Maximum radius of the ellipse

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"icWm6lNpRw30saSwLMXis","name":"radiusSq","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Radius squared, for pythagorean theorom

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wp0AJHPbhG1Hai7Z9MKAR","name":"radiusV","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Pre-scaled radius vector for ellipse

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8m3VP1D3yxlMdFAY8ZxEY","name":"ratio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          x/y scaling ratio for ellipse

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xvUb7acfTD_opskk4aju1","name":"type","brief":"","defaultValue":"\"Ellipse\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wcf7yqeBvGqaeAn2W7ENu","name":"_bounds","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

                          The bounding rectangle for this shape

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WzCXCL7NaD7l3h-FM6b3e","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":"5l8bH_YhJpYYlJ8kRU2XE","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":"aiPMSa7JhWgy8zCeIXVi_","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":"BoX9xypNn0_l4CWVjiNXY","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":"kWvrO_7Guw9LihVol_1Fj","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":"DV1BIxv3Dk3FvA4nzMggF","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":"6A746PeYLqn7YDHbCOSYa","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":"Uxfn-Z8_PsiEh0QHqHRMf","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":"_xlmRKb_geowqgCb5ggrK","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":"LsEZGkZGeg1kcmEknZzHJ","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":"nWjhcM0bP3m9DMtrzBSyV","name":"Entity","brief":"","type":"ClassDoc","description":"

                          a Generic Object Entity

                          ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"NPnZWijLbJnWVHcqrv3bh","name":"alive","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                          dead/living state of the entity
                          \ndefault value : true

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7CbFjgaTVmkdL2CgB3HMv","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":"u0BOQpb96rQLP3GwP5yUA","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":"uSG7P7K__iG6rRJhGeKLG","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":"MdZExMK5HCEBZ6ItYHJL9","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":"v1NmBxjQ0VqhDpDxJDdG-","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":"EpG7ksCYzdGp35Ky9IfJx","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":"NKqz98De6eoIDk9LRW05o","name":"body","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the entity body object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Kvs_pqDvpKi2BoGMVzfJK","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oiT3aRyU2q3oUUTLQQVlx","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RCZ_7xQOWFyc1ZlZVMdUt","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0Wi7ZbtgVz_lnWH_lpsV4","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eKC-YTSk8-hOpT57Gs-Fb","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LxyAWNurQBDniR-lFa-as","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":"fd9bAtgB1UNtYl2w8wC4W","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":"C0HUwWcPwU9QXGq4LJdbl","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"w75SXgbuLEkf34SKCFX9n","name":"id","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          object unique ID (as defined in Tiled)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pvoRjrH3QCWds_xZH7ZYk","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":"GHcjgYSseIbLEvs6h-2AY","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":"b4tDL55bdlg9sJASb0icy","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":"mW8mnIOhjqLD6LA7PstqN","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":"bTIZg77u2MUY-pb6bBdzE","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":"SazWyDQOa1jfjSXBGcyjL","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":"HGNa1uoVEOCirSFw2kGtW","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"W6Tw3J751C-Av3STklqsN","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MghgTfD9NNr52qQ9YiW7t","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":"9witBYcNkOTB88kIAy5Ni","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"msaVpSE0sWPh8Ttp8-QEO","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":"9n3NgZkuxSTl5AqJ-41HU","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"gQJ0ke1LjVRNdxsC2SG0s","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":"sOWcriRf3f3ih5uF77Buz","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hLaGZQ-twAj4ktd7O2ZjJ","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":"8xD3iQsoHRRqsXOyZcRBa","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KxHhNzXO9P_ZgWOvM0VBH","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":"mZsFGCzgjsTtZvDoGEBjD","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":"6CpKMqyfKP5xz8cVyCAc4","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"79ubOJHofhZxIDEsbshHI","name":"type","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          object type (as defined in Tiled)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-ll8kVnFRkDV8LkktRKb1","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":"AncGrjEDnr3sbtdM1MmRg","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HYeU0ga9r1rd1fEAEk8O_","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":"hySD04O4ovJbN2a93pP6q","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":"fwueQb-iKe_o_GKmQm5y0","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":"3jQv-q2fyc-Y0R1LsfIZd","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\nthe 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":"g-4839VeV_azbTx6w7Dhc","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":"D4ds8zF39MAldk_8QuTfo","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":"A_vFO4evKw1IfVgjuZ9JA","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":"2wWclRxP5gyacY6qYo7Jj","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":"n27_aQ6GCAQQGCGP-CozO","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":"oZTWXXOXq6eyhd6_LZjKq","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":"n6fasLhOxf2L9fkYfKTX1","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":"GaSKGedqVuyzdVgQ--rXy","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":"VZDbrbAtaT_1OQVKlJzm6","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":"5lsRV-uqNfIAbk8ScHYVP","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":"tsBvZsUnMXCNbBlp2HlXU","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":"IWWgev9RAkvZKecDzP365","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":"oWrmckZd7GWg1aJ7AeQSI","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":"upT4pl_kBCXmR8jnIm5PG","name":"onBodyUpdate","brief":"

                          update the bounds when the body is modified

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L7Ui4mU8YvonXJ4BNrBP5","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":"okJXIo71HKUIQZACMXIyB","name":"onDeactivateEvent","brief":"

                          onDeactivateEvent Notification function

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FKrwQWCq5gisJOMkuOEiD","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KioLxuhsZMaxIKWf4Ab0A","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":"NUpCKEexkdbA_dNfKQhdz","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":"TOMU0dwStBOp0m3VuONAC","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":"YfiTVsB9NLfWEBRIEs6rJ","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":"pS4vp0CUhOCNdgDKXZIpm","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":"JuX37CAfX1rgIRJHgIaQU","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":"7gJ39sRLib6-ocyHKyS53","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":"zw5_mj7u69gw0XLyc0Dis","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":"qMY9Ce-W6naVhMQ2PEHNf","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":"mlQI5u30PWdK-3Rd4vrUk","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":"eTzadPH5NKz6G515Rcy5X","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":"0kRO61wN9XrV_85GbqiWQ","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":"AG6j7cw8wWZ-atVWpSLly","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":"bv1p52DzXs6wEjEfevWgN","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":"BmpkAecodGT6lPnNIEb8u","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":"zQLlfP7hVVzEx_WydzzU9","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":"FCdosm9fkokS7w3zdWsrv","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":"7V5u7HwqBXKqfHyOuAv2t","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":"z2yPbzDi0ns6c5l-eWSDF","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":"nYrXn3Lm62sPu85XxDBTX","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":"ZqQrxKZBWaWBoD3RGSGbm","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":"Jz_pPgwMneC0ZqEdckvIw","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":"XHquXAzbh2RrS7-W8QcKJ","name":"GLShader","brief":"","type":"ClassDoc","description":"

                          a base GL Shader object

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"l_z2eK7bnqs53I6l1HrdZ","name":"attributes","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the location attributes of the shader

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KlKzdr4OhMUyLQnTl5ZIz","name":"fragment","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the fragment shader source code

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"klmXkLB9l9adoOHtMxOZN","name":"gl","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the active gl rendering context

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JxkT8_UTno29YR0EVC-LN","name":"program","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          a reference to the shader program (once compiled)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HYbmSKpkbDR3s0McCjm14","name":"uniforms","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the uniforms of the shader

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XGSIg3PQSCT_joMYqWUAC","name":"vertex","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the vertex shader source code

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_obrKKRhHw-awQ7vyGXd3","name":"bind","brief":"

                          Installs this shader program as part of current rendering state

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nDBopj22pPNlboiQThIg1","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":"U2yoMFRsjyOqOdMet7ymG","name":"destroy","brief":"

                          destroy this shader objects resources (program, attributes, uniforms)

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ErOr71d-7asNB75RiK5DN","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":"QFD2mnttuCmVZzzvh015o","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":"Ae0HfsNdiRrDIZxH6bViB","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":"Y9UwEN6N-WA8IRRP6Qps0","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":"W5w0lTM2EqxgdyVUpj080","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":"KoZ172u424VzdlXkXBGG3","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":"lEjc28g-bdUXyxxrXISVV","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":"-ZgDsaQDCY-TxSJF5DQI8","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":"DpSNe88R9xFoIqaIFZ6yN","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          pause and resume animation

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-pMUm6PivwP92Nnwu-qpd","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":"1IkhEFPHYaoV53Uz17F57","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":"U6OituRpFJttrhrRNtExj","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":"myEfzxXzKouvdoDm96uVA","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":"Xl24k9h6JK2Bk58WB3NIw","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s0UNW1xpF0qS2qar5llBy","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XbsQ7jPGXmMD1i2yWfcDO","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y0W63WmE8Dg2IpDGGbMXe","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yTZtI2rOoee_Iioxbg3yd","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ezlvDeZWqQrj-Zb3Kd-iS","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":"H2POjmt_thbJ7n3vSHgDI","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":"5NE7B7Fp5WvH8btTKjebO","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ki-fp3sSwbJKkH8aov7De","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":"ZuJPXqN0vwX06g29H3qwC","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":"sQrPrjG-zopUNuXc8djrE","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":"IVhZe8eQOorQY4ALpSqwr","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":"WZwOAXkGHiKjH1Aigx4dQ","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":"pUNbH-65POy_3f_dhwWiJ","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":"zYkyOEvz4KWa-4qcTsrzE","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MXX9NWs67aQDUz1eBxEV6","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rurkUrpiiL3m04mg0KrjB","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":"YcdOEEt9__X-VlqqV6_V0","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yOnLD9fbZOOxEWFMP664W","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":"QTPkLLphCO-zwksv8cmPX","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":"Nmv_T0IxTHoqrhuPfbaqE","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UMkISwyBbK4T-45Epcktu","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":"iql1J9hUzdpiG1Xt7PCUR","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H--ULZaaoIvGENnKreC2g","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IH--1r6WS7mXouGkOWP8M","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":"9JnEds7IYNFM1I8jrYly_","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":"IupdboLDNe9ei-USdNCkc","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":"u9IGCzRON7Ug5G23dFTDf","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"R8id47AuMAxhsMdmg1ZdI","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OpydECO7UuGbDPH7G6J3q","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":"RfkCjemBZAhYibWK1rLbd","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qC_N9kTtVOYwPFdhxCXaz","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":"ePrpnZ3UD88v3YZUpHULc","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":"s43jLodj5fxA7pO8pCvOs","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":"_K-tC1TE3ZlaoKp6-VGZg","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":"Tk4zTmN0MzwPOx-Am8TiP","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":"9zowcpxQZEPSMyeIwxGqu","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":"iij3Qqgd1HUh4vHnbPYuq","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":"VWWWkVnpYnK2LWqvIHfvW","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":"TYotWYZK8q7TrYEHzESOW","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":"PjxkRa_shHVThcEA2DP8z","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":"6wpD_mtgIEx1lpek3aFTS","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":"axSuntBIh8SsxeREMHBgx","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":"LaH9ImJ_U21k1K--9bffV","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":"ueHzNarVrYjPklGIN5ely","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":"KRMzV6xAwxPVUb0kKJNDF","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":"4kXTAItYqxpTFj39cEcUh","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":"hQ8T1OoV8v58PtqKGRa-b","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":"vTmQBuLzXZ0KQrQGRBXDR","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":"upr6GjpJvR7HDQ_pr6A4u","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":"Ky0IoC-erQfUd6cNyxgAc","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":"A3EKyRmjrBCoCvoff16d-","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":"Cm876J8mUq6lyfP0DJM1T","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":"9e8aUQQW0AqL0wz8khiVJ","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":"nsw4Z5iu9_JW83ZhQwhdo","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TVUqwzKJWOvvLbZEXkcAp","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":"rtd3qSwD_okVMg9pwqQ8t","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":"JlC4nI0gkKEhHtljX_bVD","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":"zFRwO5zGDS-nihXb7Kj94","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":"wpxQ1ES4h7wnkXFrDODTe","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":"zuOxJao1PP0siBrV_hJ5B","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":"7o5IlfGteF_fH_ThOEptp","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":"IvfqnBqJPIcnUi2MyqjEs","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":"Q9Tc5kwPCmd4ezGO1Y208","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":"DUNLlgTNanNUFF1l79Oy0","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":"Bp-yoazv8MP4-HvlSvAAN","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":"0GSQTjZvUm4teT0vZTaWt","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":"xqeN6jJGmi5aSqBSIeia-","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":"0_WqM4pmEzkmsFV7o0ZZ0","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":"O6Nc1tPjgMPHWjiShyMCb","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":"PKib6mYv0i-8gpCjBzPoS","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":"mvK3hnVlm_LnoYlP7w5vM","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":"BvTpif1Ke40NUeCc92w0X","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":"yC5_EFFEHZMLqQxsB5By7","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":"l2rLDc41fIE5O99nnTy1g","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":"G0U2i6qDsJU51E9VQJk3H","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":"dgkqCcUiADWyVkOPVxC1v","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":"7SAN2i0fqrSOCBy9ToUkH","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":"Q1mjRGY58DtAXKkqODjr8","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":"foBO3E6Br2I9kMzO835Au","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":"P-XV68aOkLNkeF1PMDvUh","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":"ktF88S1gRPmraL2ktTmQG","name":"ImageLayer","brief":"","type":"ClassDoc","description":"

                          a generic Image Layer Object

                          ","params":[],"returns":[],"extends":["Sprite"],"implements":[],"members":[{"id":"mYRiQpGpU9jbWMO9-9xvG","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":"jNvnBFx3V-ZOPL6VhCmGw","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":"ptAC5jSIng29AWLu76v8r","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":"0mMyWWjx3xuhFdOPCT2z-","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":"-VGC-OihF0xiJ_2_PKLX5","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          pause and resume animation

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ljE9JfMMa9kigv6e4cCxW","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":"JRVC_q8skpJLx9b80KzBG","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":"BTnCPoJC9SMNoH229z08o","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":"16Yzx8pgpXvJSk3x7MeSj","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":"p4bljuqBLywUH0bIpo_2o","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H3nV5m09oP9-Q782SrUBO","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hKMH-AJWw6OrmDJO4HdS2","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PNu0PSqyenxs6YK73Caff","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MyuRwHnkzRCITfzNn00e8","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hMfWnGDajl7Z9rr1cnAc-","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":"2cAoMa9DRn4SgBvss1tHX","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":"XZmPF7Spf78U_YRz7_LOo","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e2vzBvwZec3caH4PUzEVK","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":"TUxA2w2MklpHsVwj_L5CI","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":"MIDsWz3QfSo9syTBeSULO","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":"wOcooXLyqxIcLcpfqRh7h","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":"hUiTvodmMxlWhWlcmCasA","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":"vwLAvB78hjojbmxdTJQ8B","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":"MD_1up-_j7donA_XSHxak","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IYJBQxJ5eku1MSsI1PUnQ","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9TnxlW59XolVSm7K1jYr_","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":"v2aMOihtrxVOOWQlN5jzH","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WpnzPjVxlkPp-3ceiJ1zY","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":"DbkPazMHhd0ZhXyAGurf9","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":"qtdN1ZFznRa-rJCyGfyy7","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"68uR1F1Bn6X2Gu_MMioBH","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":"Pzx6FzZQAbupswe7q2_eb","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r3KdkRQFrYeDCOWn9j2Uw","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":"KT3jAF18M0jCDr1T0ocge","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":"sbba5WI7qVTXQuR4oD09Z","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VfaSQ-S4wBS78cVy-nkHU","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":"R3KBJU9oADvXbEfv2CbME","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":"yPDuMHd4mDGOXse-80eWn","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":"Ocx4GTemTT8LUBLUJcOTc","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6qDJzj-yKKOiXpcdp5Q3D","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tvjfGMMZcRBXHrK0_7Jtv","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":"NiR51SuyYCwY96igBbj-_","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DyGXXfJy0nvD7KWrAld8n","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":"f6eWQsOpIq-zyKlBObcMS","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":"cIc-ioX7KBiq3VK_Ex9tr","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":"icoC0zW-q6kRdwY5wTV_r","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"

                          clone this rectangle

                          ","params":[],"returns":[{"description":"

                          new rectangle

                          ","dataType":{"tokens":[{"value":"Rect","kind":"canonical"},{"value":"Rect","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"H1eGbmJwC6uBU-WxPdYMZ","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":"ANQ_fLz3FqgE6V-5Mv2DE","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":"fXGJ-HA8TQua_OwVSLK4-","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":"j8js3K44tPNU3bHtV8RQ9","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":"AS1bli31_6mmtDFqvVwsl","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":"EDuuve8wxLxs2t-uKt8hz","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":"gK1AJQ261gmbxJfkn2O2X","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":"u_lYWM4pTwE3YkcRWYf0E","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":"lA_b-aSxi5GIFMmagnC3w","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":"HHN_ZBvC8GJjannqe-ryj","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":"7UZENI8z6ldBq7BLvXEzE","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":"myJWdi1FtgNBcTga-yohU","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":"IjV6V29j0hE9m3UPErJKj","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":"vQ69L19Eu463lqRuWj1wX","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":"5R2I6HhSmRfn5WGELZmV6","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":"BkB3xKbPnA-UwGk8hq_zm","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":"Okq5ZyeZoy7opRtSpeNBh","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":"ay8tGOh0dkijM3_aIMAbf","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":"1aLNdvKxWRZmo0KanbrcW","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":"S3HwdIA0rFoRSrELIUwca","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KDL8xDxqVK3hMDBLym1eG","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":"w3xrbpXVf6Ussp2DuU59f","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":"P0qzst0VbbRqjp-1-1Bed","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":"HOat_youN6Cjhjm9rqzZp","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":"6Q_t8y6qwdyqOfyb210jS","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":"8YzMvQv8rLSKN9Gz7TFs0","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":"3BdRB7qKFSqKU-OnkLpgg","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":"ylNOs_4zUp6x91gnao3zb","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":"g9lkTuQZ4OBCFis3uzF8v","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":"rdih_PRgVlQRoer0cPEhA","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":"hSaQd58fg7uxp8F5wyuI1","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":"AwM7oFtourbsuehTQmhKS","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":"_CfD4XdrZXqXozphuTqgy","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":"lRcwpylvRulMWtKtap5J8","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":"fxqITKV_R9bA1e2o8BrOl","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":"V9OgaoIpiNp14RgkzxYOP","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":"CVFNdU2x3TGoGcnn6l5pV","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":"jD4aVyAJ2S11NbVd4GFXz","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":"eAyzJrBsI8dBTgk6uw4TQ","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":"I1-vtss5Q0QTp2uSkf_rW","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":"NRc_8t9reckbQMeL1tjDB","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":"lVDIIezck3qZki_oYMOE-","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":"3N3qhm1U-ml1zM8cSRG1P","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":"MFwrc5d3NtIM5C-GPtpP7","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":"N7idRgEKs8J4gGCjfYlX9","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":"W5821YBUK16VgM6-cSO8j","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":"YeYxPTTZSzVtDvPnk0ZTG","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":"_XzQNUiCZg-K6yb5RbKIp","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":"5TMYYMeZorbBAVueW5nXP","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":"ybznZtuU5PPTE5AWec6YM","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":"52li8W_ngzyM3VsMpUx45","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":"U48kPCXRk7LVpDGVDVGOR","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":"vnMpfUIcp9Qi8j0xZtErX","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":"XeiO8QlVwPUHQbjxXTdoq","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":"Pv3hHNoT0FjN2crLrR-gK","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L4gdpqqTu8PSfLzI-N_bW","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GNnAbbZ-H0wS5wF2A1TWB","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1W9o_XAmi5zyJyLfnHc51","name":"color","brief":"","defaultValue":"\"#FFF\"","scope":"instance","type":"PropertyDoc","description":"

                          the color of the light

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6QhLiqi8rFk62FU4bwR8E","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jFeaoKEwY9jZ0zVe73o3Y","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iYjKQ724B-i5Bq7gowr2R","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":"TPazRQehp7E9O1kw_Aaf-","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":"FxIMIopoUmoozkQEGCBT3","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OATRouUX3gg5Cu429N5VW","name":"intensity","brief":"","defaultValue":"0.7","scope":"instance","type":"PropertyDoc","description":"

                          The intensity of the light

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KkNZ1vrRaLdsAwe85WPgy","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":"pxNpCFTgDV_QxZacZtFFH","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":"x-IoB-p9ukD6t4mkU9Kw4","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":"l4yQJAH0lesLVaj1Pe4ES","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":"YAi1vV6XNWy2YfCAcN2kZ","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":"ccuDSErbUQ8iUswkKNUe8","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":"lWDS6vLbJLpHALAS8jn4w","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kHRElJGJG4HT5f5R7F3QQ","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YNK2v75U9ChPPJ_YuSGJ1","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":"3O-Lo83SFL1Qinmd9z9oI","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i4320P0Yx35dBU702ZC4k","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":"k6pSoYSOrbRms2DmoldXD","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"dEIuSDDA7WnNuzyYZABUB","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":"7d0q09PTHcoFgzW1VqFil","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qd7nAUaTgxf0ekkmUahmM","name":"radiusX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          The horizontal radius of the light

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HrTIcGT0qwrZHI2hZcFBO","name":"radiusY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          The vertical radius of the light

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"y0uh54RJLzGnFQfXBhDW6","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"19S2yAE77SBoAmxaqUxl_","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":"AeakzUMkjmhiLu7dQtssK","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":"Tkvoan7S6LHIK41X7BRgL","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"g7UJAKZNW71V3GQMHqxZD","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lBV0-4X9ZbysFJCoG8sS5","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":"YCW2T3Uy845HIvoUadMsy","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_RwWUqpanhMTPkVm_Q2gP","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":"ILucPEEV-FhRiMP20JxF1","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":"xNcBnBH3ij2IuCPGmZfji","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":"za9xqLJHdWFp5wJpKhvt6","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":"fBmevRZUYlm0P7LhPr3F2","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":"7RIQJ6IXLovWz0MRJz_pj","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":"GHQ06GppxEEfZ_r78mfdP","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":"aFilzNAYMy5IqvxnA9IHf","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":"v2fJgPdlyjwCUwXzOVnIy","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":"a-O6xiuUetDNADaXFDJ3S","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":"oldrXS6UNj7LlbEuC8ZgG","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":"Wut38i1Kaplzum80qDc5V","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":"OCMznglAh04-xSe3dLQe1","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":"4Cc8IE6lcSJgw6Y4uIT0K","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":"bZGXF2V6Y3EKXjuwIZ207","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":"pZ_zcP9I4GY5Z3AOjtZZa","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":"3E7Bcc6griSAk1znOkcj7","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":"gf3QieL9CG-tKHw34fA0h","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":"oJECVht0Ys3grDarxaZz2","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":"IjcbnWT7jjLV7H02zVG8S","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4sPGx376VE7xULRkMxyx4","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":"UpwGCvu4QeiBM4JgO6I8J","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":"2256-UYJCAg8Cy1XP9mr5","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":"Rfer4x2HSavvPNyz1szT2","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":"usLOKpJDgvBjVjXCGLzNt","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":"6rc6gkzUIPxVAgFOFOWxY","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":"ytt1gNUt-0WhOkYy8WGmf","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":"zzvYjLcCz0VkevJ6ZElL6","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":"nyyHCkpU1WygJiaS5CH1d","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":"NM8WojgDO_0e-XefJmyp7","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":"tq1SIjUmWebD3N05QcrE8","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":"wWicTXI4BOcB6yToA6K7x","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":"3EYHKwaENzOT7aJsUcSy-","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":"lKWefuVfKDSJV1TN_JcwV","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":"8KEWmOvWR2jPPstGRt6-2","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":"NQlbq-XboqbAzYq8bLWT_","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":"FyUvCyWS-p__LaMDV5n6_","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":"QVaDyhUEOi5dPOp9Xit3t","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":"03sOXmAjb_eXoFe-3hjg5","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":"p9kal_ZQ10sHJzRYlNLNh","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":"NfCxK6pSRBDIuq8gNxgrP","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":"970NCEhy4OaSN-ls98wlQ","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":"kj3-aSz56mR77pfz4PA53","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":"Sj0py0jDb6o7m8o0wKWsb","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":"a0bVCH174rUPZF91Q6cXs","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          origin point of the Polygon

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eTsBzn07mtvQtjHp25Quq","name":"type","brief":"","defaultValue":"\"Polygon\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9eOIheKnABV6BK4fGIgY2","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":"U3kq8hLAeSI-sN0eYx6ya","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":"ZTnhubN5ouzjt-K-86ZfP","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":"iqCum8ZVvG6sbz-f8k9ML","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":"VFwALUXmToz3spHScN8yg","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":"q3ER_HkS9FMb8RQ_gyWgF","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":"mcJVptkaviK8e9gAQIczu","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":"ruVrWVICC-__AP_9L_gIz","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":"qkbhUMv1tMICbkZ4hEjKL","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":"j3hE_UmRhAcqUAELRJUcs","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":"QeQ3GilbHha43SJJo3Wnm","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":"IJsE_Z1tnbUg7uQk6c8tB","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":"Nr93F3OH0oO1BDHh__4T7","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":"MLusDnAsVVX2TwXAWiJi5","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":"Tnor4K37DFaaDkaPlxwgP","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":"zI3RytLRb3unzKqjouVUJ","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":"G9ulQuqgQyhp9SiHnJfwU","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":"vtCZ64qUuCj9XVq5iAMI2","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":"Y7IWI489tcaaIS89yFNfO","name":"Matrix2d","brief":"","type":"ClassDoc","description":"

                          a Matrix2d Object.
                          \nthe identity matrix and parameters position :
                          \n

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"TbzcyZ9gEx8_gNA58EiPZ","name":"tx","brief":"","scope":"instance","see":["Matrix2d.translate"],"type":"PropertyDoc","description":"

                          tx component of the matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UPefECzIKkLDHiKx6gCfo","name":"ty","brief":"","scope":"instance","see":["Matrix2d.translate"],"type":"PropertyDoc","description":"

                          ty component of the matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y2zYwRh8ZocMsvrOlUgwe","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":"MKj8wkKV1NaHAnuwE_UdO","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":"tExImhnTsrik2h6kzCMy8","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":"1C5py1pIaneWu5fToy_nj","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":"BJ1is6miODF_yQHxsdy-O","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":"B5MiF5lExiXL83IxcyVte","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":"nBnPOLDtfzCVHLOYjOc2k","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":"MVFLwgEZ0p0XlG9xf8GaP","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":"W7d_6e815V_POYTCENtgx","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":"-hoGS3DOv6YTDFvqNyCUn","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":"xGKuC5gNcAs8WRuFIXZmq","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":"tkIsd85rzv2A2Fnl7TzLd","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":"6MHM3sDI3-i2OggFe75j6","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":"DF4psaRrKyCnkPScGzB1U","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":"xkDN3Yw6GmZNxWxK9Qv1L","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":"mYee-IFsiMbSyATmb4jlE","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":"pTp2G8Zw4B7Ot75mATTV5","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":"C7Jn-2QAYRHOeQ59Fvt9X","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":"cXdAp6TYK_uc9xb8c9JJu","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":"1VSsPzJX77IcbxtABW2Tn","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":"DIMHWqYAfmVdgqxSjMAp5","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":"wKi4KZ6e6LGyCvkSruC8X","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":"a43WYHMoW4sxGDffDFFCi","name":"Matrix3d","brief":"","type":"ClassDoc","description":"

                          a 4x4 Matrix3d Object

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"w7reGkiuMSXPyzWaxO7wX","name":"tx","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          tx component of the matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7z_dfywdeTsYNU99yw0Rn","name":"ty","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          ty component of the matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u2EZYXHnxKN6FlNVwHwK3","name":"tz","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          ty component of the matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CmipUQcsdgkKH6mSZ4zL4","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":"6Ddn7uH-CQAjkcir3VheL","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":"nKAXivVnkpuYRovpPbGPV","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":"z8BeAkNoiEZHOZ8XjW8sg","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":"RHaCDs47Eg9whXUsdl2Lo","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":"r6yM6oF5b1btiwCI3GEcZ","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":"gR0ZJsiNlbyes-1VpnGcd","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":"ye_efZ3QUOcr3mWA5cNL2","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":"aXClA4srv2PQW_ORjByK-","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":"rPK-3aN5J-BHffHuyz8Zd","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":"j8itINvnOyC6ywf0mpBT7","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":"XnXUxCXTGBV1gPVeVca1a","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":"jitdNhRATi9V55gQYMSH-","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":"Gz24wiir_vVXAFbiK068I","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":"j8wUA3mNDJtv81EhINr2f","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":"idTpbujDKr7BensNlimFU","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":"EZXjrsVtcM19p_wXQvJRO","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":"T3AKflCidlzNOxwyrzpvo","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":"rF_Nm_QpX_5rTpmAO6xvM","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":"ciEcjycJaT9Gij17oFyto","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":"uAQbI-aNorVn6Kupm2ZWd","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":"EN4hbvYXmZlaWOxlfz_cJ","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":"19MWawxXxzyFrfbK2F9G4","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":"i8YIWlNS-K24myEH_7O1V","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":"uuwG7agdnWD-qLSB82KeE","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":"sozwz8n-hfCOd7u93eQMJ","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":"q2rjizHClpv5LYis779Nd","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":"0mI8d7m4yFgbs3dT2McrB","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          pause and resume animation

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LJO0EP7k3OfMR00a4JtcC","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":"N7RaVAkFmQdx_zAOP08H7","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":"CdXPBl0AANY_O8wsOTVp3","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":"R8eogvaFI4MgoluN2aIC8","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":"hU5uubTLzLCNAPlodDgzZ","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FBwjeqKP6GV1Ha0BQoLAo","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UBhGgSYAZrUSWoZ9nCGBM","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Y33-tUhwerHABn1SP_vVs","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MNdwPKYf93ByfbXFy_PRl","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I0Y_-HkL1qd6S3kg7CWdi","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":"Ma7VZg9GzNXoZ_6ovvXoA","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":"HLy0hxGPyeXsUjbFus29x","name":"height","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          height of the NineSliceSprite

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OBAxj1Wgp2y9cZBQRqF3y","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":"fwmj-GbkCxOB8SoaQiLRt","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":"j0WymdOTj9Lz1CoCg_RBk","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":"9-w7IpbfVS0s_BSwox1KF","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":"nURqMMKsNIF78bMTThOg8","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":"akDkW1jQJ6r7IBqxPWtJn","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":"ls-RHwDw6w-elAWhKgRB9","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rp1BUalI-yN2a1gA13fe3","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1ANCWsX57oNAPQB-xvKlk","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":"5szLUW6BZ-AFlfTkhEjbm","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I-nsK-rjRpZBzmqHiFL_U","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":"ZNXzuFiTgCorOatAm7J1g","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":"6ZunCFPekQ06aujmdl2qB","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"SP6BSI9tkq8aj0uEI_eF2","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":"nSNEO1ToCHZ_HsbRM49a3","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Szmt_lz3Sa02286x1KatS","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RRvCV8-_muZL6-1p7Wd4z","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":"QT_tbepiI-iL_TTTTPwNn","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":"e-X6RLzzfm6chiU9jxIQp","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":"_bfE2iEM7gOaotSCkucwn","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IdacQvbdyvjI2iAbt9lYK","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cK0ebmjLSRveKB3AbgqWV","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":"1sdeqir0c4dJq5mX0SCAy","name":"width","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          width of the NineSliceSprite

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XGUU8320SaSwo2_9HWGYv","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":"UJ9HS85BcuQ2Ub1qn99p-","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":"GX5NxvO_Rw2EUyCv15mDG","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":"iqeRoyBQ_9dNr6-y41wE6","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":"BW5zxoX3SVeac96_7JUYb","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":"aZVD6om5VwEjeGGfQINxC","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":"yZwAYrXMSpYKuPqgp9us7","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":"f0b_ii9U76xqIcT0YAvwL","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":"zbqKuIROs4d49s5YVN5WA","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":"E6Wiiv2CO-jecj-y7A4tH","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":"k623tYXGHbt6ngRePXOA5","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":"b-YSz5Maf60q_F350YIh5","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":"hzYH9NgYQlSijFFPpcOg0","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":"o3mbY4SN4lRYdtNErUOaQ","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":"PO7VhJCY3Psv5MyZnjvGR","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":"-nvnKzGvyb97AUMxxyO5h","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":"OLz1bGdHgjPmHi6vfQAv2","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":"CIFYKmP5FGNaZUsdsQZr4","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":"Hn2ir5DDAkFDg76kysMnU","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":"TDEjsBPY-aYS6z1qoiwbv","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":"YWtnWnOo7TrGKlrH9WWJz","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":"2lnL4Bcrc9YyynaxbWgSh","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":"OV4UAwlW97Fem6X5UxsH2","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":"6eWACdAUua68jBIfAJT-k","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hsxXgvatFDxqM3Ly_2Uc8","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":"qVo1MZmlZBzLIhHhjUZqq","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":"cEyTeLDqCmLemnNirho5P","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":"ESGrBZr_e5tOWC3HiriMM","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":"T_1jdzniLu0fJ9lX4W-v8","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":"zdAqUK4uhpkg0mzRhIlvO","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":"hDrVz5XAvOmKN3yRnBRzr","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":"jtK510ndEeacDDwCPYGat","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":"SleKb8otwXggOQJTZ-TN6","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":"WH9vbjheMdFWQcq9dWpIC","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":"_E2RpF-IqC1s_TbtHheiU","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":"YdmKA5gz0HBz-za8ZT5W7","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":"iWJPVHRpbUxLBv7auOaXI","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":"I8ZJdvPkIh7-GOOLvna4v","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":"WuD8Ena2bQWjTCLfj4h_e","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":"yRXerdZd3h6iiivfW1-2y","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":"OsLBPEiQfpDUxYXlz4X-W","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":"eHvSxoRplItXYwh0CAMz6","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":"HJlJDZpIzwvzXR1bT0LL2","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":"-Rjxu9esVXPyzAbg_Tzb7","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":"TgNGmjs7TMY0ChCNvg3WG","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":"f1WPs_5VKOFEfX72zd7cE","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":"_wERuSmNBN-RYkGLHfm4v","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":"1LTyT_9J1_fsoFdH8WH3S","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":"jpalia0qDD1yUunHwSuEV","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":"8uTP_Vm-lVOkpxY2EoJhx","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":"gyFcjdMQxdP2kSYYd1dHQ","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":"M6T9v_wkpIKjSLhncb8i_","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":"ox4XcegZ5HDwzDEuAhjLV","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":"JQO5si0lbBJL8_Z0ISvkf","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":"EkP5ZbceAe-H2W-ZvTWFh","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":"LsyOx2khH_yX2FrlwvM3j","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":"veg865VZ_a-Dw7RuyRoOG","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":"njQSlfHBBycZA1P4T0b1I","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":"JbcaAFO8Nk3tOKDouaEkt","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":"v50Nq4S00kggX2-y40pxU","name":"x","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          x value of the vector

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oD1v9_Un8fgci04jRxYKN","name":"y","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          y value of the vector

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nw3_TdHrFeYQmisp_2E32","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":"v35qCPGrbOVRWJSFsUHCl","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":"65miacNBFfKQQYNKX4su3","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":"3bTQ1wn6V04Qcyky_qK2X","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":"ImiBLdT3rZDzT9ZlKW0Bv","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":"6O6C59Rf-AleTF_FWyofu","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":"912QQBJ7I1cllDyw7XmZh","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":"xxSvdETnqRfDyiDwSr_TY","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":"TK-L0khXjfHBJXpBuKr4x","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":"Fc4PYNujT9qmlgu4ut02b","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":"8oAOIAC6e6ZBJmQeZ4YxB","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":"pIsGoC1nPbwPPo4wzlPTn","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":"1JWcKN2SRDssg2r9CcuI5","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":"RzAnoxy0PYbVhx-e7puNL","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":"by1a2aSnHLMiLiw8zUi9H","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":"k6iyL5PANNQI9o8i6ikwE","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":"lJiSLIv1JMs836sovHIpy","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":"d1zc295ZL_c7ZWMglmanx","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":"ZZq4aACi3qQaUJ9kiZsTE","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":"FQxwW6LbwHttZd8ddj3dZ","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":"1N_-lRX7HMpuYprs6dI5v","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":"eqisOWllUT1guF3lYnU1t","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":"DtiLuEeIubX41RGzhS6ns","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":"TxRVRdDir2KIk3NaZKCel","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":"oI9Leja4ArD5PtLbj7zn9","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":"GneOYpYww3qQPa0IbOM0i","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":"6XB25JMSpn11KEdo6Rs9O","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":"03fLkd7_cl576iukonVGK","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":"H5QTo2Ns8Im3JKPGQVsrb","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":"-1ZltsLLPQwX5_5s_Kuqn","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":"F_WNp6Z-Fwpgjdhj4K3Ky","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":"5BbTKpIH_yagoDBH4FGIB","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":"inlQpYYVz__dGO6oerJ18","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":"ICANhkL2m2JtSCqaPWoJF","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":"afmeMMFzTCMOPh6RSyYNY","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":"4JRHQjFQoaS4k_eAsecYq","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":"SgCMnG4-YCHh-RTIwykmZ","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":"TBuLeEUlNEpIRjVW5BpOD","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":"6kRW8IYc_e6xeVyFc96z8","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":"FjO6qzieiAYUJumbia0U8","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":"AawTu8Pj59ckH50UcxVi5","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":"xxhK3waLZqyfi01TxmKov","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":"xVXOaF0BmaDbLy89SxXMu","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":"A-4wppYf-T-OdDvCCiXxX","name":"x","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          x value of the vector

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"d0Kgi6ZJ2L06tPHokpOyJ","name":"y","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          y value of the vector

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"U2-HnvIdcuMEkAnDV3U0o","name":"z","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          z value of the vector

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FGRke4EF10uMbqkwrB5u1","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":"KTaYFeekCx3z7tB8FPKuJ","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":"422Z08Rq_3FX55itgsWBr","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":"_y_u0Go2V0HmCQwsqh4WW","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":"fYMfRuU_2iR5rsp1q4qLn","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":"Qzt4V-SzjCuGzvkDK0oym","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":"Z36EisHcfWs3Fl7iHcL3x","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":"HlAkeifx3YcXJ645TvKqo","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":"3RDekUjAn5tJKS32VHw0i","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":"rbnDuHHIIaY6G7Qgo0pUC","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":"-aQgTLsi1iQuXMokhg4GL","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":"6WPMp6O4OcN2gJI8o2po4","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":"ALgThm42Qt3DKCdZESZ53","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":"6dcyzcbhFVIhvrJ3ffvrt","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":"RM9UZfEtqlnZ3r5KEaHHy","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":"jRkqpDtsu-LfXynvF099G","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":"G7C6FiOMh9gLBvGGeAowH","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":"a2SEtpYmntzU0i0uw7odr","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":"HJ-meGT-V3ML-4eSQh9au","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":"fo0HtspMR8LQE4J8t921h","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":"WWCZ5VpoPzK6sZt3shBvd","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":"tuRdre4abUEvGCPUXEaXE","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":"QJyOO2yT1FQVHgb6UfKcE","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":"FDXja8yZs_RuLzrIvVaAA","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":"WiJnMSH6NchXxlS2UyMGD","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":"Z47fsgvFh6PczRsnXUZM6","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":"Wp5hrwEAu2Z9XDrA6HlXe","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":"xvfK4nUdqrBnOv5RuAdNg","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":"zaryJGbC2fqnBd2-wimY4","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":"DS8piYFDF3QVseGaPvXmT","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":"AwwfkvwpAY5bBaYzTDSog","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":"lApyP_X-9qJQOd4Qi5ChR","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":"x20-xduwyjnf7owPdcpU8","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":"Y8BRt4lRrEs5N0I59OKO1","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":"oILMxozxKbg6dznlY363B","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":"XJIPKWcwK0KQ02RV1Xjo9","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":"nYUjrlf9NxYa5Un9FmUR2","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":"CIKU2HpQcQd4c7DcA5WGU","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":"KYdAy9CMXBBqZCI40m-xV","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":"LaqXXteVVpnloEBLiwhup","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":"I_N2O9dd-pF6weudO0tLo","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":"n3NqKi32rrO3KigmSCqia","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":"UgfGX-amxi7KPhpoRNCoZ","name":"Particle","brief":"","type":"ClassDoc","description":"

                          Single Particle Object.

                          ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"nvdweqYnlpG0npuHrMjoS","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":"BnVBwS2Rn6xc4du29_MV9","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":"WZ7TcZXlX3LdorxmFgeVX","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":"Q_BuRk44u90W3HPsxGm88","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":"i_fXrUNriJAO6rKDdbCJG","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":"Hp92VGtHECcb1tdvYO1uS","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":"WUwS0lprST-rXN-WxmIUh","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":"SmLnC2EhZLTFe5Tn3yr7t","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EjaOYqlU2Di1sXzdqBTzM","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"B_Wg_t3DedWWjboRtRA5C","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zeaH3lHB9kJp7uIjbyFDt","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Gs3cdBmyQJYjGXcr6VGXD","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TQ-N7z6XCgEx8Pq17ky_T","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":"TAbvclZ4vndLKaWrtFvDi","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":"AuZA7Edl94iYFguH3fZWn","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BXNJmJA4x0fc9XnT222mS","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":"Fail2UTFNFeZS2511gj18","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":"Am2A7lCbSRMQf3s2P-Pen","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":"mCLbe9D4pe_I507-jgFBa","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":"fQHtoHJtB5giyBTGXbJjb","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":"dAMjAOcz1hs6RMNUuMidQ","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":"R551RmBM4vQ-JV-qNh22B","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nFeLSRN366hEMhcIocQ9L","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JV4RCPeiRiN5XX6iuU8gv","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":"rh9Wors-vlKao4bSm0ggv","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"D6P-bUt7MdHmUqMovSfmC","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":"3UMkF7M7aCNG1MwkGe4EZ","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-RVfVUhFwb82AgHZWIMbA","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":"IZUmklHqRKT8eZUJeqMoc","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fgbImj17gQ9cCOOaW6riX","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xXemnYQZQ48IWSS5m0uwz","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":"41T11V1gNuccxk2d17yxI","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":"wpT-oBZojTZ7Cvw_W1Sak","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wIdH0JYC-gaV6KTZLSuwI","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wiUY52D-8ikD7DC7qDPby","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":"iUIX4B55hrKC4WrJSVmMX","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C_yFRgstZESRXqRVDja_w","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":"Mmx2-U9lj_n8RzOr35KV-","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":"4lCCsthCpKHjK8-YuHQbF","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":"uC-ggebuXgMF19vYnl0CP","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":"q032n5ivQGlMjpEvZrbdV","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":"FmEqk17rJ13biu3Mkr9u8","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":"dZH452oRIXL-4tmzgYxL6","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":"r7fV-H7RkAJ_q1VkGEvA0","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":"K-LVVtpRdR3DhoYzsqwGF","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":"oiBSs3Q9oq7csbsWU9BJg","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":"-6mQZXt-ZTcSJ11RNuUm_","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":"1hRTrP9oLW2u9A7OGUwGZ","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":"bOW8_kv1m34IWqosaNR6t","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":"7PTg82np9hx82q0UL-tJs","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":"rUzd6a6h20fXmgEZBP899","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":"0RDcgC7K_CMJd4WmM08IE","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":"XlnxNPjZZTXbR65cgXZrT","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":"5s4pDjT9nUOE5-gVBbAy2","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":"eQu7aBY-4qLllS-Qb-ARU","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":"ydZmB1mjye58rkz-2S26C","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fakm73Wx_EHV-vRlxxZ97","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":"0Da41fEFF7mXYYUFgdyVc","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":"eVsANtrfJVs8nSIsM09LT","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":"ISbIAnayiZI-9lRLCHBbO","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":"dui_vMp0LYLNqgiXeV7Mt","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":"KbepnZ-S9naAQKlyUtCEy","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":"5URaMycFcW2TkRWtNk6Au","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":"KxLAJ57sqSv4RbTRKODNH","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":"6W9qAU_ELtIhVcOCZwZj8","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":"_bZCRgUWSx-4SZzM05X11","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":"R67R1DYbzVJTir44DklNX","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":"gfFMnV_UNcYCdagZe2PcH","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":"eyuzodP5DWX0lruqFtSt1","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":"25d4go67lHLMVJnI-UhO1","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":"EzaeKXeNDiLmdXVjzzLAj","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":"H_k5y-KJL7-tGJablbCwD","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":"VRKTBUnX4d-XuDi8mcf4O","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":"jDBiFnhHdSgt0-7SehzAY","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":"0lzyVCRN_3RP8IuSDLtSP","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":"Kf8MB9kVyRJtlMChPUF3n","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":"E8WgasZ-Mt2TznvqRi1i-","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":"Met9MoIXWVv29VyooWdYg","name":"ParticleEmitter","brief":"","type":"ClassDoc","description":"

                          Particle Emitter Object.

                          ","params":[],"returns":[],"extends":["Container"],"implements":[],"members":[{"id":"yItbeBctihXORKywhebRD","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":"FzMwI8nR9g9gXk--FOVl8","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":"2S33d8QglVu3uSdeotKei","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":"tso2h8eVgBHdU4WAsXGh7","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":"-5DBufDxJeiXK8iD4_kBf","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":"QSDdBfJBoP6xsWcl3zf9C","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":"emwsSFuCK_Oar8G6ii9xi","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":"cqGlFDn8cMl7Pd20x69e9","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":"BpNfLIYL2elGsLZHyaqp2","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":"om6PvKOFZGJbvhyET20jR","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":"f08j0_ETrXybQwVS0v8WK","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Mxl0IcdLm-X0MmdvdBdoL","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P0vhgCL294DfjfFD7uBXK","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RmEGKF-iF7iE7dx2UUHvO","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":"7BkmBQfki2PXXUSoaRl9I","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mS8hfhFHdKlVBOu4jM4DA","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O-6r1LmCad9rhFY1q5aX2","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":"H1rBv7x6C4TwOSG-FsyNO","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":"cOf_b1BTVCSG5VzgcbEcx","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":"dkJEAW_K_TkSrw5iUXxiz","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kXg5EHYIDKil7DBW02ofN","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":"zSFKJzP88HlP8VKezcRSC","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":"0YadfnF6ifcikw7NraxC_","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":"Azi1xilyeFfk3uZgiV6Uc","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":"lszQQI4bv8mrshnSVZR3F","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":"tRpwDW-po20lil-Ii8xM4","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":"nYrJ6wKx8Nfu1rv_iDTzL","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"S-5HnKi-nz-fU7M1iWWpS","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uORbNnc9390yisA9d4uJI","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":"iPHeLbANdiOJxGsjHSBEm","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sa3KU0ChiRAbRHKSs6MmR","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":"EVoeKsj-_wCa2Zp9wZSxI","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"qvBO30G3V-qxOQ1rjGkMS","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":"9GvcqVJK5AdCDZvVYOC5g","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rOMD0qP-_hfs-9N1dGNAT","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fNBYimeYL7ex7T8OG7u-_","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          whether the container is the root of the scene

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5KfVzb_Y8h2yeZ-51Lga0","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          the current (active) emitter settings

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XrjFVxKomUqvrZ2SCjVbW","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":"piobfGLbtcSQqx8vtAdwu","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":"lj51xkph-oKwxsBr-qD_G","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":"scRei8WWNVDHgcpKfq02z","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8jlu03YQFe-U2WPB5LJNb","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TylydBwbVoD-AfJdGAvAJ","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":"I_xXCNvWfpkv11QP26HzF","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1OyErq364rIa4b5mIvHRj","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":"fRRdgjNZ9nH9F1Onn-_0a","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":"AQKnN80g5LjpiBJcLJW1M","name":"angleTo","brief":"","scope":"instance","type":"MethodDoc","description":"

                          return the angle to the specified target

                          ","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Renderable | Vector2d | Vector3d","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2 | %3"}}],"returns":[{"description":"

                          angle in radians

                          ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"S_aFx9nfd3vVv6-GhOgPs","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":"VunQPtuZA2MYLiksgMnLA","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":"ZXvqxISJwo1oa1uS6AkBa","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":"AjBasPHBOgmhoIOYZumVV","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":"-bLgf0I33WX1utLLTHXsi","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":"rrx0UtRqrymqSiBe-dDJS","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":"kCHlWu-njxUgUWjQvS40T","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":"zb1z89L9lu6O9CfpE2vAj","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":"6U0rW51EVnpq24PBg93bq","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":"b4_QK4CUwh9LO7bkuZ9OD","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":"YquYVUvShFaL6NbMzRbzT","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":"depg2__X6SpzCJSHcLbTD","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":"rIB_3JTaRGtC5SVq27SXD","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":"wfbg9QpPDBZP_96Yi0rtd","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":"_P-Je0D4_7hH585ZOqvyC","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":"xYmGmAPY9qkJ_Ea4rd4KZ","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":"9QQ5wg_IeOHMFzH0dMMW1","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":"-HxpnRjJ8BjySIaCnRdnE","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":"X-3JT9lb-1XtFfvJhitGP","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":"CFEDuQqf__gc1lGPX5VzK","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":"QgIG-q_sr_aSXwih0Xv-x","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":"UH-v_4tiwiUbdOFmxSNXs","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":"ZCUo3JsYJmqlS0TRHiZmG","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":"NeloJa2L89ZoNEhaRygy6","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":"6LArkGRece3Z33DDrfsAK","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":"AFYr3NnR71Njjzp7v704H","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":"KbrN5HaW1CUmhiB2zLqmp","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":"DDTPft4FrApBGwvJ34QHZ","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":"u6I5Na_KvQof7VuFdw5Ny","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":"WslM-lSi_o1uDzFGfOYVM","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":"AO5MiRgQBpdHbr9JFyiSM","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":"mzII2GaOiugECmWAgt5r7","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":"D4aAV9-BKS6YLm1_-y5a0","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":"nTMF3hsFh40dTtvKGX1zU","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":"mxoPpv-HnaihT2aueWFpJ","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":"r5qr4SmvUe6wswbRHaxpd","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":"oe4tTpg8CDygkickgwbVb","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":"VJYLh5Udtl5AsmlypwyWs","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":"u5L4UIUx9DapF_I-UQndv","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tukkpl3J_EnusZ4EFzrZ4","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":"451NWEV3osp_3VS3yOUXb","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":"VhplsyZvJHeDVdt6e_BGp","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":"eTZFXeTI0trrcxmL7DgS-","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":"lB_kwro4S5UUk1eL5EyKS","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":"bqX9RdBXD1BAuercU0b7z","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":"JaccqplwNfW_VSZe6vt7V","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":"FRRzE7NztG5rovSqUACBK","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":"BbgfuyKEaeJweHgp8-QVv","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":"5CF_NDYKQWnD3MD8wCU8K","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":"624bMloUXaA9q3eTpSu6G","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":"P7twsfjx1ND0O9HmP97HX","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":"aTYzxJxGqC2ZHdkkrfzLK","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":"NMqZ8R8Cu_zYoNKTEU148","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":"Wimj1otDt4uF9XQZ-SGn6","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":"p7XSaoSbu8KriVH_nRAnY","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":"vYtyy2yVGSuo2398FC197","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":"-Swfj4kt9q2OnX-hmFeod","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":"QaCHxUKpouDRBc4QRNYs_","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":"HWpUziwhfFoDxMupENDUK","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":"oNA5i1k_CYfQf3DFgUBw1","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":"nH_uipiBrTJos3PxxlmGa","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":"z_wod-vGfZ1caLVZfutpv","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":"5aPTbC0sqUBR6USRJFltO","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":"MFCkHOstMvkf8c6Y1-HCe","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":"TLAr5jB_0m8I4tJ43Q7ZP","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":"Hkr7OdOf0pY8gTbuLXvYi","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":"3xXj3DXpWg8LE7jyTpJMN","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":"Sa98RnSD6vZj8mDnC5Ggs","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":"ov1Dvff2abzLmD41WMPwX","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":"nAPYsntAez4U6kTaZ8Zl3","name":"Path2D","brief":"","type":"ClassDoc","description":"

                          a simplified path2d implementation, supporting only one path

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"v5AiX1uW0wAOdsYkeLwvK","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":"HY3VWClEj3s757NBGVVHy","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the points defining the current path

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e41BK7wPBNwOqaLNYX1Q8","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":"DFF_HhPaW_oIX4vSyz5dG","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":"PDILFjf-0Z-bj9z7q2xl4","name":"beginPath","brief":"

                          begin a new path

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EpJ0nGwXj44FuFzatqqHr","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":"Zmwb0reXx-3dQ6m8UUGYE","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":"1i5murdHosrWbYdm1BbaE","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":"fNr6ErQWYtMGYlvDDfyB7","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":"OoNSgssmdvU6H5D8c-QLz","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":"KfdSBap-CMW33ybvOKcs9","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":"oV5YovCKkdgFipFmh2Onb","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":"icUgUdMN7uX5J-Q8WoJUp","name":"Point","brief":"","type":"ClassDoc","description":"

                          represents a point in a 2d space

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"QUqA3M40dd5j2u5ecTnoK","name":"type","brief":"","defaultValue":"\"Point\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jc36C8iLC2EXa2TkbWGfS","name":"x","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                          the position of the point on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OHYCbET2UaLpVRDGuEr2K","name":"y","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                          the position of the point on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6W5Kd8hqaRPeZwGZPRZ4A","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":"bI3MLz_krtqALMWYtY3RQ","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":"Ovs6zsKc8Bn1BW2Ql4VXw","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":"OAtiZfKZ3Xs0WmcVh6OV1","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":"6VbPWykJ34gft3EbqNJID","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EnIoBSZslEGTJzooZ81Or","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":"ad1f0NtDWuKuhcZNwndcu","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          return the center position of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7oiQTEDLsq2M6Y03NnFcO","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          center position of the bound on the x axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MKmRXEq9_HpnHBbp9L3YT","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          center position of the bound on the y axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lzOvrUQ9egYxv_x5kfD16","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":"txv4grrGcyJC2f-O4RAn_","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":"Y0Td4ZyE3_OxU8tJJc0Go","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":"8trGoQGbPTI978bYRvgfz","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":"CNW6vovFyZqL-6lnMhiFW","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":"fpSsG1GDgIZwdTQUgcmHd","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":"IiucGCWkjhfp360GwbgTd","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":"7up_3RGrjft5S-72A-v5B","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":"HSXQofKLhoUZ26Ul3zeJy","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":"11f-gCb-2AKaATKfyF825","name":"gameScreenX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                          Event X coordinate relative to the viewport

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"atTDX-JCJqynX7WS5e58C","name":"gameScreenY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                          Event Y coordinate relative to the viewport

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"q_9e8MImVPdI2qqbdUjVN","name":"gameWorldX","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                          Event X coordinate relative to the map

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uJ4Q0aHoOgBp6DqilZIyP","name":"gameWorldY","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                          Event Y coordinate relative to the map

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_7I4SiONHNcG_BE-0NhtP","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":"fzDOtZ0AJqaoaxECogGgE","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":"yK7M0FNSnf2RcjTxvPss_","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the bounds

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9BoKB93hrxxVgsRrkbVSU","name":"isNormalized","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          true if not originally a pointer event

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ckeuxj4XfCqnPpfJSu0db","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":"3nARrQujPaYSKrdS0XNeB","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oc02d1lY4D0L26z5bSd6c","name":"LEFT","brief":"","access":"public","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                          constant for left button

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QW7_Uss4GT9JEkzUdQP0N","name":"locked","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          true if the pointer is currently locked

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SuksUoTXS3toN8aWHNr25","name":"MIDDLE","brief":"","access":"public","defaultValue":"1","scope":"instance","type":"PropertyDoc","description":"

                          constant for middle button

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KsVXI-tn1FRmy6jRa4nQg","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":"0DXVlm0AuKA45up2zoCWI","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":"ny1PThc16ftqWt8GDr2Jx","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":"CasWvns3_c4nycBDf4czr","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":"2Atlk2jV2-lKdyqXMFmL8","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":"OLi9XQOmLQSYKexMZ7LQT","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TpmPuTOtCJ146BeuKUKsr","name":"RIGHT","brief":"","access":"public","defaultValue":"2","scope":"instance","type":"PropertyDoc","description":"

                          constant for right button

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3jAowhFFBxMvIFXSPrc73","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a6yQPCD3V42wGOfVj_Jqe","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":"ir3DYZNGrGyzIZPamC9uc","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the bounds

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BvxQA6Zu4fxJaqQWjpENc","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          x position of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1nxCfFTbt-jj9VtQka_EB","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          y position of the bounds

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2QQbqaT8KKzNrBMH-Z6U8","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":"45nqmO598zbRfQPBJkviP","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":"4tmrGjO8GQ4SmLdXBnkhN","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":"qP_sa0lFOksoVc6iIctVf","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":"dgkitUHX0WBsgupCHwMyY","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":"_4tVtmCtrZWC3iQfG8RYw","name":"clear","brief":"

                          reset the bound

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DmpEPoqYfTVPROitc5ilH","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":"zdaTNwnsNUfP6BkKkUNjF","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":"qkPWpOvrfKNsw3wvkbJnh","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":"T5CVKx1lq-bVHIwRjgMnZ","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":"a9WIjdvXc4ILe7iDCe8A_","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":"1dvfm0TJ18vCjbqpB_uoj","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":"OJeOix2FFip6YnD8Y1Uvt","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":"bk_3wqlfOYOAKQHX5MVCw","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":"OuQX1KkGQsssPJhshQIeS","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":"F0U1RW6dbHRWsmA1XT-A6","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":"jC-R7vWOSwP95nTPVYjKo","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":"YH04p5wePuHFg2O5OUbqM","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":"5v864OYDXhcUlkefqwKBf","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          origin point of the Polygon

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xkXpJeXlYtHLW-qtjDKQ4","name":"type","brief":"","defaultValue":"\"Polygon\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"eNfe1NFO9UHSJfhuBjO36","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":"a5YZXd0LCeHZumac7N3eG","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":"ERtqZKOvuz0Z4xBTW4Sly","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":"bSdZo0iqPvZi7YF2YCVR7","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":"9Wr_BAXuvFtz0IYZLF9lQ","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":"przVMP4dm6So4GUt3WiTz","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":"hL2t1wMopCy_TLJrMT73m","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":"IaFENEpLBIAOq6kunneoR","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":"ZhCOHul8WaIJNLvkIyUOU","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":"qVZR-QHMQjOEwsJtHtK6Q","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":"m-67F7FjPkmIqYSko1NCq","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":"i9vv6Ek3pKFK3bvnjEWdz","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":"HiA8AoyoE91Awppsn7ePJ","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":"7uUEZmUb9VGyI0vGMkUJ6","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":"7NxJa53N9voEd-qjak9Jt","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":"Inwb3zmP1I2r3VAQKLE2m","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":"JvnHpSiNjAKSSOXxiBQGp","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":"KVO0idRPF_PUAzzIVY-X-","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":"LjdnQZVNyF12Pc1NgzW_i","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":"dXbuY7s7xIeSUsi_kGaw9","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"

                          an array of vertex attribute properties

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CMjkFiEcEZkO3Xrch3zf4","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the shader currently used by this compositor

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bYPrJtxw_jQ3eU1iuNvcD","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the default shader created by this compositor

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"dyI0j5RzdaFnbF1KBLbi4","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":"tNeg6ssfbQdYwDm5kIY37","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":"21ytevYHz__F5Lkj8T1V0","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"

                          the vertex data buffer used by this compositor

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RQtyTcAW2sWNloLsg17Hg","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":"fviEKjtL_a8NKKTj7KY8C","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":"BC4-N1s1OWY6oPqPnWhvc","name":"bind","brief":"

                          called by the WebGL renderer when a compositor become the current one

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1oLLJsPAKbEla54u6DMWG","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"b8YXb6TGJ0h4mWyi5zy8k","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":"rd0nOBGhy-7MlpFhcTN8Q","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":"ME9eKC4dPYHm3dB564ckf","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":"XdyfZoRKn8sm-11r5Rode","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":"hZjSlMRB7aaRakn-92vp_","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":"gi4tG-LdzVOhmdwoLP5q4","name":"attributes","brief":"","scope":"instance","see":["WebGLCompositor.addAttribute"],"type":"PropertyDoc","description":"

                          an array of vertex attribute properties

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"G3nYC_jl1tt5mBcv1GvR7","name":"currentShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the shader currently used by this compositor

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wTDCfdjUy6to0B-NZ7JRN","name":"defaultShader","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the default shader created by this compositor

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5hq1U0H2awvM51SwjgMp5","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":"nzXOkgJEg5_QVzh-137kM","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":"jWtWibBSnW9NlnslhZupo","name":"vertexData","brief":"","defaultValue":"undefined","scope":"instance","type":"PropertyDoc","description":"

                          the vertex data buffer used by this compositor

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lP-uCSiXHG5ajIXsHUzuw","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":"wmxBaCyBXyHdjf56dAPAg","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":"TI1PSNOnnf1x1a_u7WMzz","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":"dgpV_c55KIFb26RLsT5Dl","name":"bind","brief":"

                          called by the WebGL renderer when a compositor become the current one

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uT4cBKkPUgJKcAUxIEfNb","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":"uf9jFKWC5JuECsTqag738","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"2rTfHfLYtX2otSXtYhel4","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":"KvYWPIGM9sfN3bDpaoihd","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":"MTA3dc3HXLp9thoOiQFgK","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":"viLrc1KzatlvErqwHui29","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":"rpCCssYo6Vy2dmnO408Tj","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":"-dbnNN6hHOG0Wee8DJdw9","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":"KmDufCzA4Ywkil8KOZjS1","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":"az0KeICzAcg6eTwipZi4V","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":"J3kARB_BQxfGyICPOh3n5","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":"RIbYTb-w_bM4NO-Vk7vVw","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":"xf5__nZ3TW5C6OyCVVLTN","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":"qXK24ClEzoO5Qm_6P1q4T","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":"b53mC_rg1s1c7Mn_pyA7J","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":"gw9X50awpEeDp9gK7hNKe","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":"VK6XPcsJa9tZkFHTMLNiH","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":"rkFSSSBayURpiSTTXKl_P","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":"ctpgL_BsLafLHlMRx49BK","name":"Rect","brief":"","type":"ClassDoc","description":"

                          a rectangle Object

                          ","params":[],"returns":[],"extends":["Polygon"],"implements":[],"members":[{"id":"rF7AtytZp9fmutjYc0tK0","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JqdrZnoeiyiaRB-77TwZM","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iltY53Tgn-RG8sduZoWPx","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5tJj92Bi1EuAEqgUXk8YZ","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jTmacRAGd51h0MLfbATr4","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"q2ysSSBg46NYWMWgjbSgB","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":"kLdY24h0FTY6dVaaKx1kR","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          origin point of the Polygon

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LddwOpWOhVZVQBxFBsAWN","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"51BD40X3pu7zbFeTIkF7O","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u947dHUTQC0D1F3tN4xdc","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k7PxVg_QvUlOaKYu7Yz5o","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SFcAmo1so04JeSbPOwwi5","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":"oJ-mJtXGdaXMVIFpbeQ54","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":"L7PQwbwoqlJvA2Qd-2xSU","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":"6o0Yo83p_nO3F5_i8wzoV","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":"a3B940vWE17Ys4ZGP2SZl","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":"hdNfmOJhCPVSgXhRJGtP_","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":"bKhjSFWT1aygKNrJq7YgP","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":"he6IDf18F_wzdNKUQZpBt","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":"IVJAHkb0CpvsYXEfaY_uB","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":"dkIh4oL0oG_aVhC3hN6qX","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":"PgEGVUvzRMG-ZEYQ8tXFK","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":"segokgFv1NFxHGIh9tH4I","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":"HihS_IBiSJT_6O-_5kuG5","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":"-xYKuLNqT9EpneoGWDO96","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":"i8jeMMiVLRLlSPJm-cONP","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":"x34vbDUSu3eq-BnV-eSnL","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":"lP-X_ERnKFaXlhpOUH9Lq","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":"qMjvXW1tyvXae1cqGTDi4","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":"J0KoSNvMZOo_T8T5H8HMi","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":"0XZ-6D84lKYjZjz_9V_l3","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":"m3tZc8h5Axo0SicXHmssN","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":"T2IcCKTQ57GuMgM8fIPP5","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":"ZeGoSVr6ha5Zv4567wRj2","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":"zqKwfWKd7EjnOAcSWobl-","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":"gaBYe3bd79fj_3zFWeAnK","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":"rA605A91QiX2mCVvKID8_","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":"jHrjH8xdkQmjReMcUXD_I","name":"Renderable","brief":"","type":"ClassDoc","description":"

                          A base class for renderable objects.

                          ","params":[],"returns":[],"extends":["Rect"],"implements":[],"members":[{"id":"PxMzQv0a5LXY1engmY9vK","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":"3j4euNFIWVR8TJ7BunSD0","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":"i188f4OXD7qxuea7f-tKY","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":"9JquNwu-vo2tqMvCQ1iBX","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":"1TpXLTsjqAUQrbRMTfI8K","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":"4Kl-OjfhEqltq7OorQxGB","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":"gydxplxO-jncmf3MLvDtR","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":"qtr1IoVqG42wN9GkR6svQ","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Zv5JYo5USqu0Yh_OB_pcq","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wS5l4EuOomYEW54mdKseI","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uY0GbxuV9pnsIfIjWuReZ","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Lvf2lWrjuLd31PlDUwhYH","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"i0_QGIcS9Yp7MpSIRB0DM","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":"ynNn3zFbG2-RhccwLnMCo","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":"RpJzQk2iwHKFOW_15kHFt","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FmB_1q3Wbh2wKQzY7WGd1","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":"oWf8aoShmnP-Asy-EKN-b","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":"iQsVo-BsNYIKuXLIG3RmJ","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":"A0OuLz6U3wa2Pceky9l0-","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":"q3S8CFTOaLATTz8DFqHYn","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":"c7tr7MoHWR1l55ROdcSUS","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":"Ga_l0-bBVLsVErv6RdA0G","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tH-bSPhCsuf-DPKTpS9H_","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MALglXgJ2m7BIDTn1MEnR","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":"hZK2rNSfS-5-1RkKpEHF7","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tm0rzYc3uKf6S4qeiUq0P","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":"5u76IccMFlhKBbGjduNGa","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"__Tka25_RxdKzt6sCQyT6","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":"vNBeg8NCWsa-JLK2bRto5","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P8C9EuFAZUMctmqfqLtvk","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tvODZ7Z5hDSbLKKLJlkYQ","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":"qDXPLO_h5d9B0cxJ0EDZc","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":"E0N71L9B5_1cKEF_MXUJ1","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O7s6BK7JEOGajHf138M9_","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5DEb18rGTiJvRtrnBw-4f","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":"SIzfTEneJYTkiUfPp7lZ2","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T72r1qm76CROWXOcCKe4O","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":"kwaEDW6HBUDbTlSAmHCwK","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":"C0_i2q_H9BKUHsxFbwDjs","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":"M4iueC6tw0dWAs8IT6fHT","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":"8InMhc95gRlk5dv-KpHJJ","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":"iiJ0NtlJAWESn1oeBSEk4","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":"C_CX1WsxgVPoQwg43NQw9","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":"em9INQPGShnbw8Nqtwd4b","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":"vvLiuOYsfqWtGKuM4IKjB","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":"BLt2L28hFXVb6yLT8As5W","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":"5CkPDplkIpkZRM6Wn8lA8","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":"UIIcTkWfQXFbEjdioV-Jc","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":"aLkQwldg6a-8rdn-0b9Q1","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":"YQMtt4bZPPrL0gMIiI1W6","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":"ktC4R023SjW3P5aJ4Kl_x","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":"kNz992Ddk1ThGp2oXkCDa","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":"qAC75LKtrUlHrBezu5ZK1","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":"FQThJgAx3SQ5ucyfjNh_x","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":"vbn0AHE_PwOy17oiL4S2L","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":"DfKiEoHnHzwJw6S9njV4R","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xki5wU7ERzUfFMc4hWCQW","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":"GhQ16bmE6sMN-0qhUZd4x","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":"jINveFK3ab9TeFhb1rJjm","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":"-pvqzNE1_9StEauvG3p3m","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":"nZoo8RDzzEcKKZOxI28Fx","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":"_awaR26YI-Osufl_rATAC","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":"Kgfjzrcxu7Jdgh5qB-5X0","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":"GckZRoGX0dVC44h7CqBkz","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":"YpLUYKn8suHNcYibFukJH","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":"OyUu7n4FQD2z7sFPyCs90","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":"5S9YC4GXnle7Xa9GsdrEh","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":"RPyWuYRqDa9eQp99DTEDO","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":"PWxl6whYhZ2aVzVsrZItk","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":"NxAVt6AKHvkLWHEFsRl6z","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":"aA14BKa0J1e96zIbwjB1F","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":"5MQ_x9ehLShvS3p9gFM7w","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":"bjTVeyAqP9ln5S29HLVHV","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":"oLa7zQXZ5XAl-zjL7LJDs","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":"CsJurCqU-y6egKX9tKj2F","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":"bMi9ggZ7_0X5IixfJAxm3","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":"8_fE92MQi0w2BqAdcoRtH","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":"azFoH79iblgL9amUAse9r","name":"Renderer","brief":"","type":"ClassDoc","description":"

                          a base renderer object

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"GXXBXlnEpNz7fqIw4wldz","name":"getHeight","brief":"","access":"public","deprecated":"since 15.12.0","see":["height"],"type":"ClassDoc","description":"

                          return the height of the system Canvas

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Op__EIjLg8Hz-6uBFaGih","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"3zBVysC3PFFJUlM_PbE6a","name":"getWidth","brief":"","access":"public","deprecated":"since 15.12.0","see":["width"],"type":"ClassDoc","description":"

                          return the width of the system Canvas

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"nhCtRUD1YJMDD6AaEMNo0","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"U-3YzQLHIU4MzF2grL2Sc","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":"zc-Ox5s4FIlBCbES8hCGv","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]}]},{"id":"5sW5buQM48kkiX1xZjiRR","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"

                          the default method to sort object ("sorting", "z-buffer")

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Yns7zyKioUhgxe2uVeGEQ","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          the requested video size ratio

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4F_oZ5Sy-dBftYVId-uZC","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          return the height of the canvas which this renderer draws to

                          ","params":[],"returns":[{"description":"

                          height of the system Canvas

                          ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"1yO-DSp3npHZ7GDh5kk63","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                          true if the current rendering context is valid

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z0P0U7R7Jk_3T3zWJFuIo","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          The Path2D instance used by the renderer to draw primitives

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VjQgFk9eaBiYaMHbPHjKt","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":"WHA13Zj6dyPMsh2Vh3nok","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          The given constructor options

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vUhMZPZaIuEFpYad2tiM_","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":"o9haq9fo4ypMYIBzlp52T","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          return the width of the canvas which this renderer draws to

                          ","params":[],"returns":[{"description":"

                          width of the system Canvas

                          ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"YaHLZGytFYAttRGkLKrm4","name":"clear","brief":"

                          prepare the framebuffer for drawing a new frame

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xSeAclfR_5BSXnsCiACBq","name":"clearMask","brief":"","scope":"instance","see":["Renderer#setMask"],"type":"MethodDoc","description":"

                          disable (remove) the rendering mask set through setMask.

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8Em86qtbYhOW6s73UXnTH","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"

                          clear the rendering tint set through setTint.

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"j7cOZvUumSWVpOoByCRry","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":"6PIlgUbMnie8gpPZE_yvG","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":"h786Rau8rLTjESlroifLM","name":"flush","brief":"

                          render the main framebuffer on screen

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Q_8LGyC8e5rtQlv6y0xF8","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":"PDhz7WaSx1TGLwqFZF7al","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":"ItoRgk4jDPiZh-Q7otygu","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":"8pb6-oM-WuR5qN3jNyaCV","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":"D_uT7E_yvOV3FmoLClHmX","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":"e2HC8rBQitNoE6M7cLkjD","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":"MRURH5aOJOfba_s3QifZk","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":"sTzANkFWtXXAwRbH62Pwo","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":"eq1JHL0j1Na0EVPCWppER","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":"-w5wS-byKZJbyhzIu6rhV","name":"reset","brief":"

                          Reset context state

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"btHnhQ-T-z8Cmfyww3xHt","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":"ucSiIpZ4jz1kw0lI1wOa8","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":"V0Hh4G-wzhfhCSTVHfqUR","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":"YZTJ8Rl9MOmeDpJxfetg0","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":"wxpbqPBd3bAwZlSByEzyQ","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":"xT8zWn0I_4P9NRdDSgMT9","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":"8wAXNHHbeRKQImICSd-Wg","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":"SFL1kNgzY4uK6vDv0_ufR","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":"0725VjADCFM8QWDPFz3sq","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":"e9iu15owq9uzH-TjWqTxv","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":"Tq1kZiZ6UcWQ5qUuwl8zh","name":"ResponseObject","brief":"","access":"public","type":"ClassDoc","description":"

                          An object representing the result of an intersection.

                          ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"uXhUGys2XXyiAo_DDl-cf","name":"a","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          The first object participating in the intersection

                          "},{"id":"15SjIrCL4-pk96yJLJMue","name":"aInB","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Whether the first object is entirely inside the second

                          "},{"id":"4BHdCdJLEFai7IXfMRhwS","name":"b","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          The second object participating in the intersection

                          "},{"id":"xi6Lq_SFhqTdFyQB1zRz3","name":"bInA","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Whether the second object is entirely inside the first

                          "},{"id":"9yZKAv7Kc5BgdCyWhBMSo","name":"indexShapeA","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          The index of the colliding shape for the object a body

                          "},{"id":"xmvoDArmyZLd8kDHfhUbr","name":"indexShapeB","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          The index of the colliding shape for the object b body

                          "},{"id":"L5tiL1drOBzh54EYQJLtM","name":"overlap","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Magnitude of the overlap on the shortest colliding axis

                          "},{"id":"vJkYox5wb75FejnIYTIPx","name":"overlapN","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          The shortest colliding axis (unit-vector)

                          "},{"id":"7MSNqqgm_Mq-CfMylUua2","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":"ahP9LoHR_yl5emu7c2992","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":"i2Z8S7fNVys6EboB07wr8","name":"RoundRect","brief":"","type":"ClassDoc","description":"

                          a rectangle object with rounded corners

                          ","params":[],"returns":[],"extends":["Rect"],"implements":[],"members":[{"id":"-vVpUOGPtoj1dJLJt6gK7","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vhfbZEfzDfB9H21Xjq-21","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ajlRkZmID8CDzp4iiGlKe","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_bU9C542d7qAClfAze8Cd","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZdruHNGUtho2qvTHiIjgB","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6Nv38xcj8SCMpq76VC7sz","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":"DCLK8slSc9TqBilMvLE-Z","name":"pos","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          origin point of the Polygon

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sO51jXU6XTdQA9M8iClZ6","name":"radius","brief":"","defaultValue":"20","scope":"instance","type":"PropertyDoc","description":"

                          the radius of the rounded corner

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VEeGpYpAD98vNlZpbN6am","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9yJMG7gYFlFQITzFN9hNX","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LTtFFiJfqvmw_AQIrQl3d","name":"type","brief":"","defaultValue":"\"RoundRect\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"htEPUzDmphKLJ9wrE5SVM","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6qUbNVRRbPcCtMQuBrzhY","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":"oBermf1TEY10udVWJzIPz","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":"Naq3MQxng5nQVtMZe9AHy","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":"xl_iQfWP4OVPy1yZvG_ZK","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":"2U5v_rDgIvPT4xnsAEswp","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":"PxDDlaDeBRpikd5dCkxtB","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":"EWMi-qHc4DwzcTBp0FQfk","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":"QwVXkm_jrVsRxXl5zQ7bg","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":"wOWrWEUrnBMjY5SnYMKy_","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":"m7eGztTLlP2ZzV0B0e8wv","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":"kB_nJqmtRCWFIEjhyCVlf","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":"6f0J6wcvz76itSd9g5K_E","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":"aktxrvPWmLlaSGg4TjUp9","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":"IGoXjFYAmhKX1kdaH_mBr","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":"zidYVgKKJPc0tmB6UPvyq","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":"Cgnnt7qc_iZqPCqRvjGbr","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":"jSK0iHhuBH0YH9lE9pSkv","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":"_e5CEYywRSj-v1xLamewV","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":"PJ4yWBVdGzaRunQnJcMkp","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":"YuwIoPa0QqfPXJZlPjyUJ","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":"Z_7bEQxEG1UdzwxLDzL9V","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":"__DFfywy-KgWusgWc76bN","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":"XnA9_oIhV9LDaeAt5psyG","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":"o5pqwKpmM3N4cQJT08Vnb","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":"Uw4Rk-f5538j9y8WdZSVu","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":"DnxdxG7hl3WUs_wQDqRKe","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":"wEgAr3cRwTqOzCeNp1nrS","name":"Sprite","brief":"","type":"ClassDoc","description":"

                          An object to display a fixed or animated sprite on screen.

                          ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"wmAXGA5TiZuO6VsYMIC0X","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":"f1aVBiv-3lb0L4L6RWedF","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":"vZOKu07sBQcjWy0pN5gQO","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":"As3YGjITQezvDQ42RYB3b","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":"5QUTAWbSL3LGB-LzDzhLc","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          pause and resume animation

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HLWsRtrjMLsJi7e_BspgX","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":"RK2mKSYU7iDDuhsje6EWj","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":"ifTBVsncXnBiQ64NM0s7K","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":"2YYi4XmPLQ5zCUjFksTwT","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":"BytsTIiVcD7co-X7dOvUS","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_VKajyslw0XWTPnVzXU4L","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JxsnwVNwuVWhgq0N8jsgo","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mSClmf1coTji2cTLgbarI","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RR-dBUDLdiJgnuu8ydTd5","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yzwTUiaAUJR3mLcIpzBYY","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":"51Te7Yi0rMu7FsuD6beRf","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":"flVYmEyEA93RwsXuDJGXs","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8k6w02MtuOa87duxqmG3j","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":"IPBs1HjJuv0GlfztFP9f2","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":"K7xQwow2HeQyF8KqfHc7j","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":"QMSgdX4HWNW_ByDryPleu","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":"f1ZI9AFMJu6Hh3XBc5y6t","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":"D0tusg-a7NVVuwCuGGy9y","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":"v8MCDc3hF1IUVWCxfecA7","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yoVAQ7UzWN4yz2FWLW807","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vb2qcxGodS2uWf0vMO1e5","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":"_8jQSpLnEL0cb80I4Hdxx","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rpUvZ2ORBG2dqNHWyT1hQ","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":"NTyS5gvAhbn7YpybsmSnJ","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":"H9GibqCzJGr4v2PzV0QLK","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"_DZMgnnIAEfANUblk6C4Q","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":"71tBN9addb-0O83ZW-Oqn","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"817uJDsQeVUBEQ_xZJZcV","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-ZuNT_DoqjNrW2JHcN0HP","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":"JTxsyRuEHQkr7Ml5MQfrc","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":"0HkCpKWBbY4Hb_nSInm1Q","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":"g33F5-pQf8P5HMhdjpwDl","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"qtjeVuy9CiCAgb4t3j1_B","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kzi_MXpdHBX0fGJqFOUni","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":"yjpCZrnyUhGXDgfzGn2MR","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oU2aFfbW7nrmJj8k2VEG3","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":"hesVlAu5xHtRPi6AJRNnZ","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":"QU0KFd8uNskyMLvpQ_S1b","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":"KiEiX-KT_-bRJlmLfhT88","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":"-Eoa7kLq1GGWWwb2zezUn","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":"aHxxpzTHiaiF0sDXWZ1tC","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":"f5IwOisJ_rJBCO9_YY-vm","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":"_6WK7pE_xKtzr74tPN3Lo","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":"WMNrCpDZc9k2XKYy5lC-W","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":"fTLUEdW66QUhuPaMV8ufb","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":"OkRJeJtRHgWTVt0Gx3Bmh","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":"z9xQjLpYcuJ_pfOBxabFI","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":"8wAh_QlQk3cki9PiD6VXf","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":"8ERDOplYoG6So94__IT5a","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":"PDawEqeY99MwVoSMwPtJ2","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":"vKI7FZ_RBZMMXthL2jeqJ","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":"2eWvPczhbSDdWLOgi25I-","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":"jClXlc9EfWFjZqq8MHPst","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":"IGG7rjsbRgpUrucfYK9OD","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":"0tq7sYpl_A4av-Ev0pd-M","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":"V4EQhasqIyOey2ETV202N","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":"X6LPjXTfPdZN1pBvQm9YQ","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":"Nu42GuWktOnC8N7Z_4mjR","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":"Jzt8vtSxFvJyACZjJUanh","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xrKXZSipmvrEv3KMVKrsh","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":"V8WVi0prpE-SqIjZpJ30B","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":"gDgB92FYStPXQVRCWu7Kn","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":"TCmF-pg3Fi_RI-AGjMDFj","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":"7DSUeqVApucpmhfSFS_23","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":"HfJmGYSrSnPfNqHFM8ohi","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":"WHzLkr95pgE_Th-fuG4-R","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":"ALCE0PKReZ5hArjTOy97a","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":"wq6hEbzTmfK9gZYOXJWho","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":"kTVlyYKdrC3YQAI1jPG09","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":"I0Jzy0IDKP18qsD2Ws8ZJ","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":"TYNg1oq0aDZyckQmSAKrV","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":"tSR5zNGPO2Cj1tSJk8ImC","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":"TAJVQ0RblRyYAdsV2UNt3","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":"L5vPbSQcyIvQPhrYzx7mc","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":"3Zy9ZElpm4WthNZYCCICS","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":"uUosdKzSARvIztF2NuiPT","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":"M9JeA9_9IWbgIXJJ_dmKe","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":"tGMhSG-ocY4hzs0_DZR3g","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":"n17jLKZKxxB2HKOkic9LV","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":"5-4U_8zz-NPhwhD_eOSJB","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":"wDqInWvUzOeaTrRw-P7t7","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":"-ugBjk_pD07NGcpBijkwC","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":"EMm8zdgkBsAj-6SuHhGZs","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":"nU6U7fxzThqPvDlgvOAlE","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":"250QEwdiqfYyuBv0wxv5E","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":"6KpCx3QtSg0VNwUFDtT-6","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":"EMu0UdfY5vh5osGIHOtrd","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":"h6VYnLkAVO206j4MYi2nB","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":"6D_s9c32PKQYvWvT9Cyos","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":"gsiNPm61kvY3xWPb_nqve","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          The given constructor options

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xNvLHnI0Qs8Tes4La8M40","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":"KmZZCwnVVe7rizHtDItcH","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":"V4BSMW4dZn-GakI9Q-RbF","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":"nFGjWKZdAMntBZPvCT5vF","name":"Text","brief":"","type":"ClassDoc","description":"

                          a generic system font object.

                          ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"oh0-8wbpZsxoGd7uZ5c7s","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":"vQq-3CIbHugmZaTVc05Ly","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":"TGvSJAI8xHlDKlqQrC5ip","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":"36W5V-woYEylVKKvbWBNk","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":"YXMs6-Qv8kTOcFiq5fR8M","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":"BGJW_TUIozcXs7MUW03eO","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":"-nNzJfK3Rnlt8uR0F0MH8","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":"azNCgUYcim_7gQq_8-8C2","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Te0iKzDU4qkfvR0h5XOED","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the horizontal axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ndtTeXPd51o5b96x-Xc2I","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          absolute center of this rectangle on the vertical axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0WtVx_yCAbSDBrzTrqePM","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the renderable default transformation matrix

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ix5nPLZ0l0krH8LjkBD_L","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          the depth of this renderable on the z axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4brKVC9jgXuqx3SL6ll_C","name":"fillStyle","brief":"","defaultValue":"black","scope":"instance","type":"PropertyDoc","description":"

                          defines the color used to draw the font.

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6MLajCLRQia3w_w1VgQTP","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":"qH-5sQmYd_9ZgJ0CUEABc","name":"fontSize","brief":"","defaultValue":"10","scope":"instance","type":"PropertyDoc","description":"

                          the font size (in px)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e2HXYPIzlRldczrTMzSNR","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":"fW5ZECxQ4l0y0EIMvRbEj","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          height of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cZCPLIf1jJ1S9_bD8L9Ft","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":"XyaaeNJC6coq38FcLSVxf","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":"IvI6DjPfLeBuEbZW6Akbl","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":"yKf3LQNz7W2pqiS1F1ZFQ","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":"e9A1cs0JOW4a13AzmDcuR","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":"VzZPLYPI3bkjDdMIuKT0p","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":"Z54XJkY6JqOXgCsMr5K9w","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                          make the renderable object persistent over level changes

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lXJDrgr6CVqHHkm8Xgjtz","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TN0_9YR7geDukKezpRt8i","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":"meHD7ocOc3ragFkFLPFUi","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":"ko7s7vy3_F7yT3rjSj9ef","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":"Vrck4HzPUtHg5XeKgn1rl","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                          The name of the renderable

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VOUFcbBpQqVuoBuLO8Wkd","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":"JKS6Q1Kp4wk3BJMOYwSrE","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          returns the parent application (or game) to which this renderable is attached to

                          ","params":[],"returns":[{"description":"

                          the parent application or undefined if not attached to any container/app

                          ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"oyu85jyeNj5nHrEU-ziki","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":"96amLfABUYf-SzLNTxKgM","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                          Position of the Renderable relative to its parent container

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AUJrB2pq9Q8ofmy1M1ym8","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"flknvOyyP59MYAYOJuyEF","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":"pxly2STM2Tbzd76om6CQe","name":"strokeStyle","brief":"","defaultValue":"black","scope":"instance","type":"PropertyDoc","description":"

                          defines the color used to draw the font stroke.

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nJ_doMkUFTF53lxCrZNKE","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":"560V5hBobUKBeX7WgmXg-","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":"QxOPwu_42V4kgXvb78HyU","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":"AFNreutPUy0ykrjGflsss","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"elU5DTskwaHNKgGkN-eDE","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                          the shape type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AUc0nIuNtngH_c_hjUO11","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":"VKijmAu9_ZbvWVxnfJnAf","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the Rectangle

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xb1AF1ZrOcIhD_erdCjIo","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":"46iIuWtJ57p94EPMQXa0o","name":"_text","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

                          the text to be displayed

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ruHHdmPH3BwqQVdhBU513","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":"BHyPELZCXURTR7yVUXIkF","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":"G6QFoddyD7yC2s2gyIDm9","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":"g10aQ-v_f09X_vZA4pMV7","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":"mC0_DqqGwPQRLBmo1hyAA","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":"ksviHNMMu5gczox85mJ1-","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":"fNaFpp5Clei-IxtK8FFJc","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":"M9PsV8e5k1gdMjxSCIkqd","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":"yaHGtP49nyfwPwC1E8Z-8","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":"DB0zACYmDlSYUfAV9M_Rm","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":"TIUn0Yr7o_jPFI8CNV2nb","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":"fS7NG0kPRjPZtrDVID6AK","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":"g_JZ1ljAiR-K0ofk0wbgD","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":"gZN9zlW2NYpvnLa0043uh","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":"BGq5sdDMEywyM2Ew8O6_P","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":"SEYWypiaKiyXS4-w4X2rb","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":"sZmvHl7vrYLCefuDcwbzY","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":"mZr9XJpQ2jIpeXuqkgdqf","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":"qKsWnTk22oy-tLCx9JANo","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":"33vNQ1VyL5sSxlKTR2Ggw","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":"gxNceJCIG68FXZl7J83Q1","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":"-6Hiuh8bysSnpRscRu7rH","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":"k0sb3rB1kGnVsg2Lxf3FQ","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":"MaqIDk0x7OBwIrc8U2xE3","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                          OnDestroy Notification function
                          \nCalled by engine before deleting the object

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T8Bum1Z8g0_64FR08JDi-","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":"yv4S2afxknlcBffi1cfQG","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":"BOIM4FilGcBw3HEa4GbXW","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":"CN8Q49kIGkncgzsa4E7vf","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":"ScfKx6vHOZ2XjNvolGu6C","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":"kh0taUprBE1UWaWPXif_p","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":"dF-hLn7LPEQglu4w1Uug6","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":"YXWReIi5jMbfPEeuMWpNU","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":"PGcQ_o9w5beXSqD4JnAW3","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":"siLV0YP63OrgPozExNVyq","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":"LMnUSIH3HwRnC4sbY59_y","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":"H7PPsJ6_iOazJEC9LZNNN","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":"ZAQwbJ0LT9XYaKXReBVkN","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":"0_LL60wiQja_wscAiul_A","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":"xIYFhs3pjieqVzaXuNVEm","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":"A7RnpI003tn9CTfTES9_5","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":"qHYrPy1pIXNLGiy7dAYq2","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":"CPr29bKFpb6oTi1ksRRKB","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":"Go1C6mbJ4yv8JvuypQ6O1","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":"buE1HpRanUB6YbKXP081v","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":"UdmWMr7IKFPpBy29sWa_3","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":"cf5iHehzrGZzBECaWrGS2","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":"1Z7BuzgESi_1gYVqQ459R","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":"vR4rGdad1RTpPo7SmkHfd","name":"TextMetrics","brief":"","type":"ClassDoc","description":"

                          a Text Metrics object that contains helper for text manipulation

                          ","params":[],"returns":[],"extends":["Bounds"],"implements":[],"members":[{"id":"D1AZrTmz-dcIEZiUNqGqR","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":"CPaAutXy1qew8IVMTvluc","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          bottom coordinate of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"b3PRDngXy-ZP8LHhFKQMy","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          return the center position of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"T_1SWFtNKgVQVHBCPQAFF","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          center position of the bound on the x axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oHllwGBVAEno3AqKJRA-W","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          center position of the bound on the y axis

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Er1aXyqlafZCw5x2858Cj","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the bounds

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hhWu2CLzGqCRP16v6B__s","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          left coordinate of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"R0Emad43rTJj5QarfWu7z","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          right coordinate of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vv1O6j8NVQtMaDHGC60ER","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          top coordinate of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XYlrFJ5cyPFb_agRwCbpR","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"

                          the object type (used internally)

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"c1xKP1p0M-F2HIsFlY6PA","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          width of the bounds

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9ZoftSqJOQEae0Phm0832","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          x position of the bound

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_YCoK9OZQY5-PfhVPWJda","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

                          y position of the bounds

                          ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pM4HBgIvY0bywd45mdpYK","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":"b970c-pXtW8gr3l0bG_7r","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":"5-fIKdUKNkgKIGpdqKcsb","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":"0STXRQFz-1IsaQStNu4JZ","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":"Wyz6JV1mvi0LPw5M-sWrB","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":"5pBX6WzLunWEhtN0zli8k","name":"clear","brief":"

                          reset the bound

                          ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XjkP2cTpDU5xZ5L7lEyqX","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":"QW0VvMIp9WxnIlHPDb38B","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":"w0TAVcU8EtX-ZWMilyWUs","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":"8htY0sy4e4YacfYKmw_UW","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":"cgBuG3whJAwM46wvhqkLY","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":"QzTsQjMEdJv3RRWgcCU6B","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":"_36mBuW4NCdypcVFDlV_N","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":"kjvX9uRtFUtCJW6VxNzKD","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":"1ysf-JUXKXnY9PCm3FJAk","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":"wW1KUwaGtm_ZoxGNPrYOH","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":"1Vf390bEnZCCDqzpsyood","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":"S2ndJa34bQPRCuOQCn7vY","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":"gOI0GiHBibdM6QCxvYqDr","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":"Mt4DOu7nnsNs2LfARt1LF","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":"Uxt_UzzxLDcSDW0rjWZSh","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":"Owlw7jf68cPsbArdPrlAP","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":"-QDiuWYHYRYLmyLVBUQtq","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":"8Dv6cceVHGKHkR8RqM-JZ","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":"PnHpD9MrVF1lvj9xPN8ij","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":"7XEC8BW0p-IYA_A0PcxHS","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":"6p24hYnKvJbXWF25hlNl5","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":"6wa_S7CcBZkKqZ-z8nj78","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":"7swzSW3Z6eR0QQrS_PuGF","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":"Lj8G_fFEciU7fQdpzvmLl","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":"5QfsLB-zny5ClUwkU9Stf","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":"dvg1Fz4Zh6L7Cw7jSa0-n","name":"Tile","brief":"","type":"ClassDoc","description":"

                            a basic tile object

                            ","params":[],"returns":[],"extends":["Bounds"],"implements":[],"members":[{"id":"gpt34XTWFLhYYIVju21JJ","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            bottom coordinate of the bound

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wWEQD9jFyhvApMnHlhJsy","name":"center","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            return the center position of the bound

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"a1oT9FkElGdkX8YgC-qXq","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            center position of the bound on the x axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"P1MaibCbi_Ibi9XPOPuET","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            center position of the bound on the y axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rt0AAoEc3nZpCbWMOIZZf","name":"flipped","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            Global flag that indicates if the tile is flipped

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cnX1iOkbLb3cTivLsWLMr","name":"flippedAD","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            True if the tile is flipped anti-diagonally

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Dq7hUk3ysET00foI3Wrk4","name":"flippedX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            True if the tile is flipped horizontally

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"KgmzVvhm4PO3IdR2aHK9t","name":"flippedY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            True if the tile is flipped vertically

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V1wHTD8K6EgammmcTwvhk","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            width of the bounds

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HxsmRmAeSF4MPR_rj089J","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            left coordinate of the bound

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v_cxXyhCNh39-LeJn8ogS","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            right coordinate of the bound

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mGkuJlGzYVpPECWBlU9Bo","name":"tileId","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            tileId

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"W7srnCo986Ibw8J-cwSTn","name":"tileset","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            tileset

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AkrrRFr67kddrSiQ997Rq","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            top coordinate of the bound

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fCTJDLLzFeTdddaq9bf5C","name":"type","brief":"","defaultValue":"\"Bounds\"","scope":"instance","type":"PropertyDoc","description":"

                            the object type (used internally)

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HxsWa47ioPSzLKlCKkBGU","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            width of the bounds

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"I5kNZnzsoxrPyeepJoN2T","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            x position of the bound

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CX7bPpVAGcs5HmVi7hBWj","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            y position of the bounds

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mWCo--7M71pEFpctKRQLa","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":"N0RdxWHzvl2cqf2BAkyPX","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":"yvmNLufEZCGHvjph8UEa0","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":"5C2unieNdBn3nS6FSOKKV","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":"E4kkQ4qcjLP9NmSCSDWmE","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":"hrk4uKTPF3k84ttNOHu8U","name":"clear","brief":"

                            reset the bound

                            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ueBdhJdSh0Xr39i4dXBfA","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":"MppjQzTo0I0zdm1JYxL_T","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":"h0DLmr2qa_ow8CT5mjuAX","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":"HAE1qB0Q4K0vJqIgrLo6L","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":"SPRhGG09fa5u3xRG9bKEY","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":"pAOsPxnWN_p5dt9N3fvYo","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":"wz4k7t3RGf0CGUUiSl0_e","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":"yHyKMuMxr71pSXwTfY8o-","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":"DHT5VRtDaw3VYZgg1Y7fd","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":"pWPZm8u-bFc_ruz9Da3Nr","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":"hG9fnOzPhEn9JCpgjHBvk","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":"ZE_GLXU_L0kGedaVrEDWA","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":"xEI3wyJxxm1WOYbQuvkJB","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":"dga8NOXj3hIHnoXzpeJ7R","name":"interpolation","brief":"","defaultValue":"false","scope":"instance","see":["tick"],"type":"PropertyDoc","description":"

                            Enable/disable frame interpolation

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NfESzfDH0phpAXrgvaxdi","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":"6FwN4SWjeNi_Tvqn_SmOG","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":"0e7Awd3GhGo5KqtKgl8pT","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":"GNpcIBpFCN5DeVDe_p-Yk","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":"XiIlYW_I16079DErG3oV-","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":"ZtcwzcHgizbeexWwPSpZE","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":"j7bWSfTTj_4Dws11jU8y7","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":"OiuGmQRAY07-Ub-zsfq1m","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":"6XwwEOYopFlDEP_2rHRlU","name":"TMXHexagonalRenderer","brief":"","type":"ClassDoc","description":"

                            an Hexagonal Map Renderder

                            ","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"WP2Sp7ck93EN7qRJL0qKK","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":"gbBupFSP0fvf4k2WaCtTs","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":"QOORLfx0j-apm_DUIDs81","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":"JfibTcBOjFB8-IzkFTCrz","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":"nmGaw6eBru5nkqqNBpc1H","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":"bA-vV2_8TNbb8DL2Cqp2k","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":"5ZC7zE3H3sgDGMhvnch-P","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":"AO6Jg4gTRDXOgK6tHcaK5","name":"TMXIsometricRenderer","brief":"","type":"ClassDoc","description":"

                            an Isometric Map Renderder

                            ","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"ELzpKU-YDT9FfXmEwN4nI","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":"tuh1w5jtv2tMM8HKXQJKW","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":"UpHeVKMCx2uRiitZo7rii","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":"chpaQDAQ-5dIcB641K-Ph","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":"GhWz_yXtF0hzufj8ndEm8","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":"aULqedw4xit06WYr74y_C","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":"5N1stZ_hlel3YUrpK7VcN","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":"fUehKNa6kLgso4GJoNjWg","name":"TMXLayer","brief":"","type":"ClassDoc","description":"

                            a TMX Tile Layer Object\nTiled QT 0.7.x format

                            ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"zdOY_D9g1zX9G1Igimchp","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":"XipCS3hWvqEmTC7YJCCrQ","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":"ZOsILuFQXy99Lw3tA8ZZE","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":"18buRAvJ2ov-aYYtQ9BfH","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":"rikoJgpOyvByEKNKjNeaH","name":"animatedTilesets","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            All animated tilesets in this layer

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oiPp6WAjXvqBCVQnjzvSq","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":"MNTIzmjz6fmtN4qq9dCDi","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":"qKmUOLZe7Vfg9MqQDCpt8","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":"IfNs5vsZMXcKwQ1Ojlj9j","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            bottom coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"00Kgjjo1Q23t6S7OhdG6m","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the horizontal axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cGTKWVvWJvmTVAgulR-Zn","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the vertical axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aJF-IkSRK0hZ3IxnZaKJH","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the layer class

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"p4yHP4a5CMcDNInrLsBJ5","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the renderable default transformation matrix

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tKGzJNkOEPgNv5dsTfoUx","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the depth of this renderable on the z axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LcoB9ZomXPYKSEr5e1Dcv","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":"TQtc6Fpi66s13O94Jj4p3","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":"E0NGcvuBNA-Eh9JkJjD89","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            height of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"m_uayeGwesDGJNum2FZ7A","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":"RAGSM2Qj63DZqYLnU6Z0h","name":"isAnimated","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            Layer contains tileset animations

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QV-ruqy_bARkHigaQkTZv","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":"daSOA1bhj8XT0eAGGJSwq","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":"09PDzcXiE5iCypXcY7cho","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":"RDXKbuk_IuYMLiwa7Sfx2","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":"2bzaUj_BU6jvDXA79pqNS","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":"yY3Ky5hCKuso-A6jEvPjQ","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            make the renderable object persistent over level changes

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vQHq3Eq3l6aQYSqvq04sR","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            left coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RLtImh29uyMQdZWr8gNzE","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":"ftvcQgxceOy81Usa86J3P","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                            The name of the renderable

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jYrf6RZ1W-9trFAbmxMCG","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":"MZbObCM1CqD_RuYej8KRG","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            returns the parent application (or game) to which this renderable is attached to

                            ","params":[],"returns":[{"description":"

                            the parent application or undefined if not attached to any container/app

                            ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jvC8eD4bus7kZfLss4p2g","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":"bR8nZOqstNq0XZyd3tKfM","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                            Position of the Renderable relative to its parent container

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"r0dV0Jt03LvIEeuAS-Iny","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":"-mS63fTMgwT5iZpZQ3PA3","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            right coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"H3YP_ec5VemBFsfeFi2Fv","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":"wF8EJ0NI8uhSbnKdwd55X","name":"tilesets","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The Layer corresponding Tilesets

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"wVKOxQpInUBJ4BFdboIO-","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":"RJ4W349bwYUyOYNdxC_vx","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            top coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cYmtLx7gm4yH4mwwPNt-5","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                            the shape type (used internally)

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pTEyaiUaqoyQXsJ5POCfL","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":"-_FJ6NbQ0m0pN3iYm3qEV","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            width of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mt0LtTM0bNetXb3mog_Qf","name":"x","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                            Horizontal layer offset in tiles

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V7PNQ-UoGAV1k9GSbLgi0","name":"y","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                            Vertical layer offset in tiles

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TfNHF9BmYkduw-5B_ye34","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":"5YUnV9408TM5sAiTlrTPf","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":"ylBdlL3cuet4pdgvtLLQJ","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":"sdtwKbSeM8PK55DG-g8Kz","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":"iiwt5k2RnxwqSx0YsCCa-","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":"WTyYgZoVS5NHxwhWTVWx6","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":"lavu2FbivwS7oLl8P6Y3J","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":"B138ZB8eb8aCXLNaL0m_S","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":"4T0HJ3dMLjVxzBOXHekuB","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":"RItptviWUhYZOdlxXe9iA","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":"4eTVlHy5eB3VBuETFHq49","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":"bVYUnXo-n9QexGjd3Lldt","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":"274IcTdD8xlp7fCrbSuE9","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":"uZx_vx8-FfDLzTraIGa6O","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":"j1y2WR_JNtU5U8SXxReet","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":"eE_KVaFAL81kuJAtv_9J9","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":"UzPloDS5Fl_dgkYi2UHoN","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":"VW4G0hxNsDKtxUCPPJZAs","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":"meqm_LgLZeIt0jmexfoV5","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":"dfBhnZNI8_jGFbAa7X9X4","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":"IonsEHppfLNlQULPuVzL4","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":"oMbbiTAZlVnnKsDxsVo-S","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":"gm4ZyoeEWDRkQV26c15yF","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":"kj3DwWocwgs9C_n0IMWF4","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":"P3GT5jsrHDArV7LmLVWTL","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":"DVvUhruZUekYKKVrJ2HZn","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                            OnDestroy Notification function
                            \nCalled by engine before deleting the object

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"cJ_q4JjfB7MnY0ileEylh","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":"TC_Srg3APT3elnGWatQPn","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":"nvdPABSWyRkaHWikDMQuS","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":"2hTX2DMDCQjezA9I5u4v7","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":"_FZuOpzWL6OXwWgXM6U1j","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":"ujc_Io2G1WymegFN_qnNC","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":"ocKZWJMdz6CBkKgC9Dwjc","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":"t0X7Vn_KSIpln41wTFMJR","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":"yyaT3df0ApX-pGkddWdkS","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":"oyj9QXfbjbx8GtcerOZIe","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":"J9xNCP7wU_be3iLMhMYIY","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":"0c_RoPdPYp6qpA5uc2Ka6","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":"nZtQRhJ1FKVrPObAxTfm6","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":"s3A0xSZqRf-VXFpVLwb61","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":"DvFz2FgMr1A91tWLSrhfO","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":"35qMhQ8LFqW29zJP3F4Cb","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":"OcR3CXEwKyuvR--5xB9HH","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":"rjQlY93vS8jM2GTbBu9u8","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":"VpNXA8CNL9-FYEZcBgdx_","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":"qTJgHxPWiWpI6Y5AHtk1x","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":"EeH0bitK7bRRgahkd0fRX","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":"aFMNcAZZHNyQE8xT0ogZw","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":"aUsyXon0S2pTo3svYFEBM","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":"CAuNmUSNR49PvyREPy16U","name":"TMXOrthogonalRenderer","brief":"","type":"ClassDoc","description":"

                            an Orthogonal Map Renderder

                            ","params":[],"returns":[],"extends":["TMXRenderer"],"implements":[],"members":[{"id":"bz6DyKauOtlS6n6Pv_V1z","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":"rtDttc3ykiiKvf1MdK6QT","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":"gdkqVEBAv7nGbaUVMsZzC","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":"RvF12PkODCuZg0TniNRTI","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":"9vpKSUBYrRFoY4LrV-9sR","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":"CBHttKpfTBQb18L2EfH1O","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":"ci7RYirIvhzG04BVItpal","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":"Pl9BpsjvkxKIo4tmlIohm","name":"TMXRenderer","brief":"","type":"ClassDoc","description":"

                            The map renderer base class

                            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"2kPvNNFT1OmfHykjjQu2E","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":"OTKAYEbqc2qFD4OL-LE9S","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":"nBCPZSiQnsLC6m6_Ibzup","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":"EKbk68WpMSKrha3POMDs3","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":"L0vNKezwYhPqXUiMPquLb","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":"gwnCUMTLNHWHQmu8pKFgs","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":"OYCirZuDzG8C0JuZ9Szl9","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":"7Gt6EXCtMgqXe-p1HNlSd","name":"TMXStaggeredRenderer","type":"ClassDoc","description":"

                            a Staggered Map Renderder

                            ","params":[],"returns":[],"extends":["TMXHexagonalRenderer"],"implements":[],"members":[{"id":"GXmDLRwaBd1tEgsIcXZtw","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":"PijedHrmKS6qDz3WGbfrq","name":"constructor","brief":"","access":"public","scope":"instance","type":"MethodDoc","params":[],"returns":[]},{"id":"mAh7gTk5YOkM3p7XDDMAp","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":"8ZSByc67AnddYGVzPMIzX","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":"MDqBfgYtVWxWtqH028a3D","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":"CCGJOU30W0-sCBxPbp1xG","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":"RziJLgWlsxRVFYI8079eb","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":"WHGIqVjOZjUnYgiVx_5x3","name":"TMXTileMap","brief":"","type":"ClassDoc","description":"

                            a TMX Tile Map Object\nTiled QT +0.7.x format

                            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"t7RQDtG5m4k5Lpe-fM1IK","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The map class.

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8csp_SWPlOSVmPaZkrUYx","name":"cols","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"

                            width of the tilemap in tiles

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QpCmS7O_JeMSNIrCSPgRi","name":"infinite","brief":"","defaultValue":"0","scope":"instance","type":"PropertyDoc","description":"

                            is the map an infinite map

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JTR7v8t7XA8HjtsbC6BAl","name":"name","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            name of the tilemap

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ed6nL4nFtROyZcZVrVvmq","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":"wZtv4i-ZdcXrvrcx9RbV2","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":"WLgArr60elNAIfJfxGHuO","name":"rows","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"

                            height of the tilemap in tiles

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Eh3qbkcDo9ae76RxGDH5K","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":"VKH-qZqnMPgjH38bOe1xD","name":"tileheight","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"

                            Tile height

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AdRzE9kNitKe5PjOgE-hA","name":"tilewidth","brief":"","defaultValue":"-","scope":"instance","type":"PropertyDoc","description":"

                            Tile width

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nLO2RX-xuURoymbjOVure","name":"version","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the TMX format version

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Wrqdu96pYSlMqxG6UhHhq","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":"Th0kSkkxRhiT7aGXEsoRI","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":"Oy5cL7yyuCXP2Npi4_STN","name":"destroy","brief":"

                            destroy function, clean all allocated objects

                            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"tbMIqRbESKtFXmQdIxvNa","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":"OamkFQZtOY_FKeVJely0U","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":"PKC17c72-rJFiDB44OUjF","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":"Aw8-avrmjLophRXzQJB-m","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":"tCj-7JKBQUMZa-HddEdRF","name":"TMXTileset","brief":"","type":"ClassDoc","description":"

                            a TMX Tile Set Object

                            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"UIal1-G9-Xo6Syg6loCyG","name":"class","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the tileset class

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8ONdXe5z5tClly2gXoD4f","name":"isAnimated","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            Tileset contains animated tiles

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yFPcJXoJckBHS0TAbPfot","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":"VZPdfoCE6baAIHiMAcb28","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":"5I3kr50ddC_I3hvoFeO8R","name":"animations","brief":"","access":"private","scope":"instance","type":"PropertyDoc","description":"

                            Tileset animations

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3dmXoHASgc-Sg9nP7hlo4","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":"d76D9Q_E6TzerH41Bndcc","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":"QfSQdSggMrftzfnU_5m8u","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":"UBZV7DcdnJu6SZyltGBbv","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":"RII5XnuLPPx5NRweIQXXA","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":"1Wke2pIPVc7D5oJrcEw_n","name":"TMXTilesetGroup","brief":"","type":"ClassDoc","description":"

                            an object containing all tileset

                            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"2-CzWKQd0ComT9pdvZeaS","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":"08wHty3esXyS-e5617-AM","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":"8X-rFfvAykOHnHM1MzNR8","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":"x1eveCjo6ntqQMU7tRHS8","name":"Trigger","brief":"","type":"ClassDoc","description":"

                            trigger an event when colliding with another object

                            ","params":[],"returns":[],"extends":["Renderable"],"implements":[],"members":[{"id":"yXa1hlneD-HYDGU6AX4WQ","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":"FRCk9si0jatpd7BjpN1w9","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":"Q9Dix0fIgxP7ZbvYsW2MC","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":"cNMR-Ob-PKwaNgSzTMrvh","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":"VFH1bLB9H9JAtphORzmpq","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":"yympsowXt2APXjjxVrHuc","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":"nyjzUW6ru4muyYu6wGJRq","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":"d0kngkLXc7jz-taZSaYso","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            bottom coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GXtLi9TXLk7JKt7KyV7LD","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the horizontal axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kKTY2xQDs_-XxjKfHQZFO","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the vertical axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"seDU5aubfYDs3vQl3Pj8v","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the renderable default transformation matrix

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1pVh7swM_75tT4XswAgyX","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the depth of this renderable on the z axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vfmdmBAwjw9u_1HB2ZxVH","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":"85mj-ku4u2tIkiDi2jd_Y","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":"S5QErpjHeuHetKSjYdypR","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            height of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LFZdMNHMeYmhOD5eAK7A_","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":"XWoNubY10j5nuTt48IAyi","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":"HA0OVtM4NA81i8T3JePxk","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":"H31VXKRnindB46q7rjqW4","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":"77H34fJM55L2E7jS2UNoN","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":"x_YX5he39kbGMFm4zD5IJ","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":"zuwnChs_Vn-gB99VrUZCx","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            make the renderable object persistent over level changes

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6mHiZvlHmmMtuFDFanwpA","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            left coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NmbS8nzbXwlLVXcqoWKLC","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":"DeH8IPsY3kmXGLuJAxx_q","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                            The name of the renderable

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_DrHLik642pSZVTTleA7d","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":"oh6vekvIDxqU4hWFQb8L9","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            returns the parent application (or game) to which this renderable is attached to

                            ","params":[],"returns":[{"description":"

                            the parent application or undefined if not attached to any container/app

                            ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"OSCz68AV-6E-7Kr7_z3b7","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":"9DRwz3Ub3A69BlSp2zZj8","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                            Position of the Renderable relative to its parent container

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nCIbJwxInn8xA96zUTDtv","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            right coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TSLynZhPwLCS4q5xZuTTs","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":"Owh3eNG530IMrQJuxrBK3","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":"9ByjfsfbFJKty-qEfMDYp","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            top coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6m8zgHLupmrGXk1uLFdqc","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                            the shape type (used internally)

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TxvjFlDTm0ZSJ8GpYyP4I","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":"samP4_ntfrtu0IAHsPBxT","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            width of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"0gpl_MvMClJQ-4tcuKE7u","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":"4JtmhkwXjez4vf499QkQZ","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":"BKIOxoIi8Wc1QxUEVNoSC","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":"QO4i_SmPAO_5Ar_tRCfZT","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 | 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>"}},{"identifier":"settings.duration","optional":true,"description":"

                            Fade duration (in ms)

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.color","optional":true,"description":"

                            Fade color

                            ","dataType":{"tokens":[{"value":"string | Color","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"string | %1"}},{"identifier":"settings.event","optional":true,"default":"\"level\"","description":"

                            the type of event to trigger (only "level" supported for now)

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.to","optional":true,"description":"

                            level to load if level trigger

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.container","optional":true,"description":"

                            Target container. See {@link level.load}

                            ","dataType":{"tokens":[{"value":"string | Container","kind":"canonical"},{"value":"Container","kind":"link"}],"template":"string | %1"}},{"identifier":"settings.onLoaded","optional":true,"description":"

                            Level loaded callback. See {@link level.load}

                            ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}},{"identifier":"settings.flatten","optional":true,"description":"

                            Flatten all objects into the target container. See {@link level.load}

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"settings.setViewportBounds","optional":true,"description":"

                            Resize the viewport to match the level. See {@link level.load}

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"egClEt8X-L7ht8UL89n9A","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":"c7FBD87sl1mxFMIaOamtn","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":"61cSzKXymdETwFssPDfIg","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":"DY7OM6N4WWXZqdci4Bezo","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":"3AH6tMUlYksehtNfHoCvL","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":"ql8QHP6Ir3uzYasNMEns6","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":"8Z3bCBN-oWnY1PRAAdpVG","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":"qKpEWm9eKA_gB9-r2pDOW","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":"PZwmFn7X7F1Rpt6zI0-tI","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":"IGaZ9ho2PS9_m90TgDjzx","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":"uwnbig7nPSdYeTYgQ9d_M","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":"DWVtc3n5EISK6d_dhN7Xa","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":"1lOGfRImpnqj9-gfjW59D","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":"jE85eehJrKL406rcq5OhZ","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":"RthE_P-CXIxp4ibY6m3Y1","name":"onCollision","brief":"","scope":"instance","type":"MethodDoc","description":"

                            onCollision callback, triggered in case of collision with this trigger

                            ","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":"PEKH10FumwpUhhfEfy2sF","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                            OnDestroy Notification function
                            \nCalled by engine before deleting the object

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ApcQYZdGCmVfaCZJu4K-L","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":"8JKz9aAGgALJfhh0QM48w","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":"xzp5OKBuIrNFK8YlBI7JS","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":"tmbEqBRwg3_nCTKDf1wMS","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":"zRYW_Hh_t2EcqKHGG2BNJ","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":"uehOMcMdfWFIc1_mrKBcM","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":"-wYCX2GdqhX2V-VGSRy2m","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":"IaMbLwOpzaHihji5iHrln","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":"gwAFtagMpVnio7Ow8knG4","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":"QZYbBAsZh5IOBW818cgeV","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":"5gDwaaWquotVNxWxXwWjr","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":"UH7ZR8l9_JGHzCmnI5oxK","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":"QBuu4IovRvhZKt5lCxTfE","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":"JYf90VHwSEDd7VQdFAzo7","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":"iwVnHue-dZJ799xai4Zx7","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":"4qnRCuTABT0oVDkdLwAwd","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":"XgiFm4PzZ3T-Nz2MrCK1p","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":"OwpLzdKe9GHT3rpTbpAwc","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":"4FDOxEKkG0eQ4aoDW9i_2","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":"ulaJ0ASVVDvigUcuUjzEu","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":"aYmDpzNcfg9bqkjD8lnzZ","name":"triggerEvent","brief":"","access":"protected","scope":"instance","type":"MethodDoc","description":"

                            trigger this event

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jpkk1ihstCwYAMBlj4Cxd","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":"i7M9mZ6YhBRGDcynCsdAW","name":"Tween","brief":"","type":"ClassDoc","description":"

                            Javascript Tweening Engine

                            \nSuper simple, fast and easy to use tweening engine which incorporates optimised Robert Penne...","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"Ki4hXv1XuYYUdAWhA5N1-","name":"Easing","brief":"","access":"public","type":"EnumDoc","description":"

                            Easing Function :

                            \n

                            \n Easing.Linear.None
                            \n Easing.Quadratic.In
                            \n Easing.Quadratic.Out
                            \n Easing.Quadrati...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"u8whHpVRk7t05-ILpHgYH","name":"Interpolation","brief":"","access":"public","type":"EnumDoc","description":"

                            Interpolation Function :

                            \n

                            \n Interpolation.Linear
                            \n Interpolation.Bezier
                            \n Interpolation.CatmullRom\n

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8axIk7GQNHWfzK5awKMYq","name":"chain","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            chain the tween

                            ","params":[{"identifier":"chainedTween","description":"

                            Tween(s) to be chained

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"B7Wa8Y7DfPk99VqF8NKqB","name":"constructor","brief":"","examples":[{"caption":"","code":"// add a tween to change the object pos.x and pos.y variable to 200 in 3 seconds\ntween = new me.Tween(myObject.pos).to({\n x: 200,\n y: 200,\n }, {\n duration: 3000,\n easing: me.Tween.Easing.Bounce.Out,\n autoStart : true\n}).onComplete(myFunc);"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"object","optional":false,"description":"

                            object on which to apply the tween

                            ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}}],"returns":[],"extends":[],"implements":[]},{"id":"w3LP-FEx8yqQbeFL56TEM","name":"delay","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            delay the tween

                            ","params":[{"identifier":"amount","optional":false,"description":"

                            delay amount expressed in milliseconds

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"n8bejbtF8zzAXnV_uXWEy","name":"easing","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            set the easing function

                            ","params":[{"identifier":"easing","optional":false,"description":"

                            easing function

                            ","dataType":{"tokens":[{"value":"Tween.Easing","kind":"canonical"},{"value":"Easing","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"9T2Kv9Zx_-QtXOfBrjs1C","name":"interpolation","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            set the interpolation function

                            ","params":[{"identifier":"interpolation","optional":false,"description":"

                            interpolation function

                            ","dataType":{"tokens":[{"value":"Tween.Interpolation","kind":"canonical"},{"value":"Interpolation","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"0tp_CijjXslX3tvw2DBEk","name":"onComplete","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            onComplete callback

                            ","params":[{"identifier":"onCompleteCallback","optional":false,"description":"

                            callback

                            ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"e_sdJowsHotNISD5IGNAO","name":"onStart","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            onStart callback

                            ","params":[{"identifier":"onStartCallback","optional":false,"description":"

                            callback

                            ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-26l7HgF56iA9paXAq-m1","name":"onUpdate","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            onUpdate callback

                            ","params":[{"identifier":"onUpdateCallback","optional":false,"description":"

                            callback

                            ","dataType":{"tokens":[{"value":"Function","kind":"canonical"}],"template":"Function"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"fwGnguXQrbzV84r4zhZqH","name":"repeat","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            Repeat the tween

                            ","params":[{"identifier":"times","optional":false,"description":"

                            amount of times the tween should be repeated

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JzSZUsdUcF2bmr-lsAj7F","name":"start","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            start the tween

                            ","params":[{"identifier":"time","optional":true,"description":"

                            the current time when the tween was started

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"MgeqmJPtG6_na5Q_uoRNk","name":"stop","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            stop the tween

                            ","params":[],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"bhJ5mLWuoPrBYxeQR1LIQ","name":"to","brief":"","access":"public","scope":"instance","type":"MethodDoc","description":"

                            object properties to be updated and duration

                            ","params":[{"identifier":"properties","optional":false,"description":"

                            hash of properties

                            ","dataType":{"tokens":[{"value":"object","kind":"canonical"}],"template":"object"}},{"identifier":"options","optional":true,"description":"

                            object of tween properties, or a duration if a numeric value is passed

                            ","dataType":{"tokens":[{"value":"object | number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"object | %1"}},{"identifier":"options.duration","optional":true,"description":"

                            tween duration

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options.easing","optional":true,"description":"

                            easing function

                            ","dataType":{"tokens":[{"value":"Tween.Easing","kind":"canonical"},{"value":"Easing","kind":"link"}],"template":"%1"}},{"identifier":"options.delay","optional":true,"description":"

                            delay amount expressed in milliseconds

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options.yoyo","optional":true,"description":"

                            allows the tween to bounce back to their original value when finished. To be used together with repeat to create endless l...","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"options.repeat","optional":true,"description":"

                            amount of times the tween should be repeated

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"options.interpolation","optional":true,"description":"

                            interpolation function

                            ","dataType":{"tokens":[{"value":"Tween.Interpolation","kind":"canonical"},{"value":"Interpolation","kind":"link"}],"template":"%1"}},{"identifier":"options.autoStart","optional":true,"description":"

                            allow this tween to start automatically. Otherwise call me.Tween.start().

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"D5EB0FJVES1Y0HnyhQVjB","name":"yoyo","brief":"","access":"public","scope":"instance","see":["Tween#repeat"],"type":"MethodDoc","description":"

                            Allows the tween to bounce back to their original value when finished.\nTo be used together with repeat to create endless l...","params":[{"identifier":"yoyo","optional":false,"dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

                            this instance for object chaining

                            ","dataType":{"tokens":[{"value":"Tween","kind":"canonical"},{"value":"Tween","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]}]},{"id":"jjRaF2nV47LWRKe7jLSg5","name":"UIBaseElement","brief":"","type":"ClassDoc","description":"

                            This is a basic clickable and draggable container which you can use in your game UI.\nUse this for example if you want to d...","params":[],"returns":[],"extends":["Container"],"implements":[],"members":[{"id":"OlqgRnWBvPSaMukthWjW3","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":"VffftluZ18DbSQaZC_St_","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":"ocLOSvofeGnNN8YsmUDrU","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":"qsT2TQApQYjiXl_KVFB1i","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":"vYn_HPmkML2j8xr9ApSaZ","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":"P69WQM2cQbe-zZJleNaru","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":"NZQZAQhYxSwjTt4qtPeAQ","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":"qy79HKGc_IkT_Uy6VtG9T","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":"SRATwV8VTXNkpES1ywye2","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":"StFSFql0YBTkb0dFygYVh","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":"yW38b9yVuAFS5P_SiEFr1","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            bottom coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"PF7yDVM0oojPfpREcuJ9x","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the horizontal axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rHj4LC9qKGKwRaAb1-PoS","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the vertical axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OwNwX1kuiT9-4GHkY4Dvr","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":"vdlngTkpTyF3wRQ__D06U","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the renderable default transformation matrix

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_gqBTu52jxy41JFdumnhW","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the depth of this renderable on the z axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"saieshpKLopWbMMloMeXX","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":"6Mk8Y6vSHF10AVy_YCHjB","name":"floating","brief":"","defaultValue":"true","scope":"instance","see":["Renderable.floating"],"type":"PropertyDoc","description":"

                            UI base elements use screen coordinates by default\n(Note: any child elements added to a UIBaseElement should have their fl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ARgDzISgZ1VAEfnOmo-cv","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":"T71pCWkm-8oeldZi5vhFR","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            height of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QpMdKNiaI1aLkEHv7QNXZ","name":"holdThreshold","brief":"","defaultValue":"250","scope":"instance","type":"PropertyDoc","description":"

                            Tap and hold threshold timeout in ms

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DTq3PONi336CVPTvcnCEI","name":"hover","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            true if the pointer is over the object

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"kJTG827ZxeWR0r-MJg54B","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":"2Zcx5TCom5O7CPmg0v2zX","name":"isClickable","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                            object can be clicked or not

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"L7hZtXvml174hWVwD-3Gw","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":"X-oLYpNACigmWUoYRt581","name":"isDraggable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            object can be clicked or not

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"h2KWmzvIbfOg7GZZ7dh18","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":"biku-ZLTRJGp55tc8xKMr","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":"_dpePB-zmCY3vHRfgeaqI","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":"Jg3S_3B1AwIXrpo1s02Ap","name":"isHoldable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            object can be tap and hold

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IHHd8oCV7nphu76sO3F39","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":"mbBOOi5EluXYSzLLrbDBb","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            make the renderable object persistent over level changes

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WQXx5aE7vy2KbiriJ6bg1","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            left coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DyTXrULjzRWX3lsMGDG_4","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":"n1ouWoRfL8dPE4ZmvKmhS","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                            The name of the renderable

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"251rYcwVAZPoXIDNCLSLP","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":"yJx837u_yd-RtUA8AsZxO","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            returns the parent application (or game) to which this renderable is attached to

                            ","params":[],"returns":[{"description":"

                            the parent application or undefined if not attached to any container/app

                            ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rxIbp1qpRl7x3VAZOP8-C","name":"points","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            Array of points defining the Polygon
                            \nNote: If you manually change points, you must call...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"edJRSp_q3dOoZNtICcjdq","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                            Position of the Renderable relative to its parent container

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"MvCm9AXaOqv6U3-KPQ2Qm","name":"released","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            false if the pointer is down, or true when the pointer status is up

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"xCIMQI3v6c0JW9w6mSRD_","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            right coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"oYBf2263SHR1Yvg9LLCHc","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            whether the container is the root of the scene

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"WQHLH_fxFxjMl5W49YSCq","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":"mXTkwVvY2a9rLGIkhN_8A","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":"RCTBIffFO9rrf6RZUCXeK","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":"5K64OCT5fP6Wth-B0UfE3","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            top coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AJOEZGVgGENxPsUXt8Nxd","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                            the shape type (used internally)

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lyNvQ7F0b82JFDZATCGdp","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":"O8Oz1tax-b_7BF0N2RGGe","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            width of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1SikCNHpcBsBdFDwGdf6M","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":"VBstR_1AqfUWY4zSlF9d2","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":"bXyRQ3u9fF8U5JL2SIPXv","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":"tinfFCjX56zJXVnf1YXew","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":"ZHxqJZGVa8MokbYlyeLyZ","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":"zOppIElC3I7uwo4HhdM20","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"

                            The x position of the container

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

                            The y position of the container

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w","optional":false,"description":"

                            width of the container

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h","optional":false,"description":"

                            height of the container

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"ELJx4pKCWsWz8rJssMDBz","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":"tQ0qLxWyP9BKzTcl0Drmm","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":"s_hXjNtpIsUMahouQUYqT","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":"yQ96IZikZ39bJna_fLXi4","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":"TpqMZAXDoQRHd6Z5evQJR","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":"3u6VlZgLpKQ5SD2u88UAZ","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":"H0jyKWZRWATQmzDKcAM6p","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":"Z-VSvRppFp6y1TYSoseH1","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":"9l1o3et2I8Rpo-1pna1pc","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":"ENKtHJb49Ct9iWLC3JP-6","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":"Mx0MVX2M52eJbD0934NvJ","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":"oDJaJ6n6T7OboIYtX0YGv","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":"A0Gvj2XlbdmbkBlY-0zE0","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":"809ZXyNh9YeQZE6u3S474","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":"2M1KKgsDoYqJj0cehzN37","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":"NdWijPdM7cOtnFS8dQ9Py","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":"kbc4furGkltI3vrnhFrdF","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":"5_NVirOqz33U-ihdFrUAw","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":"myKVlJwbzYbT_hwJFFWG_","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":"pznMClm15lwFeGZmNZRlS","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":"HVEVrryyHqIX-28sqR4dV","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":"45j_gj3ao4xtqeCBhUoQR","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":"ByeCe7h7_aGmaJEYLmBc5","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":"CkoFyb5iIs47aJK-SIy_H","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":"CFaswOW4_GL8HwUfiUY0J","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":"hiU9l4QJDXK852La_OM7a","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":"ZEb8tQVIH-dsJXXG0bW07","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":"SWNsHy8EMramJWOnBWto1","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":"plmqKPh1UwnXXFoUyvS9H","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":"XCy1EGfLl51sgFtKJKzod","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":"W5P2Xt6sYpdjNMmyEhHCd","name":"onClick","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the object is pressed (to be extended)

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                            return false if we need to stop propagating the event

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"i5Da26rsu1LPgO-sc8zhx","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":"mmyGm37ccgUKw-YSG0b9d","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                            OnDestroy Notification function
                            \nCalled by engine before deleting the object

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"sf1vqbsbmueukstuUHT6u","name":"onHold","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the object is pressed and held
                            \nto be extended

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Z7UmmIb83oUAgaqYKncW_","name":"onMove","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the pointer is moved over the object

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"066FbhPOLtThLGX986uXC","name":"onOut","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the pointer is leaving the object area

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"lwbx7sG0qvGU5r3ndlBMV","name":"onOver","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the pointer is over the object

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"HQ8erSWM_iNkfabFzoVwn","name":"onRelease","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the object is pressed and released (to be extended)

                            ","params":[],"returns":[{"description":"

                            return false if we need to stop propagating the event

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"8rDWZwNBQWOi_RGtY_7eu","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":"6J11ALnatn449pT7FUT7K","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":"gZ1c2OttQFZKNVANN-QtY","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":"J7icxmjdYuxIv79RgTGv7","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":"2blBdxzISgo-1pqo-Fmb2","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":"ohi5eo7DrAIoD2iYWbH5n","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":"3iu2b2ylV_iY76vZZIWlm","name":"reset","brief":"

                            reset the container, removing all childrens, and reseting transforms.

                            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YBB4RuiCXycNfNoZ2gx8H","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":"JL3KLFur3pZ19ixCaSg_v","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":"Grejl0eLFB3CeeK_rf_n8","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":"ba7rxHbW-3VTkUEsnRBUH","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":"omLTpM73YlxyzzQmPOaqx","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":"sG2TEU646VUbLJPWiCcB0","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":"vM-L2LqXfHyKwpz_0ttbo","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":"lD5WYgJyHhW9F2IuhG41d","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":"_IDTGzjSUmKOGB4YW9Yru","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":"5wF6D7Yig0E63dzBOkCwr","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":"PNX3MxKs2zSZb9nfBtPmI","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":"10CjgdcJN89ung0mPPvHZ","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":"YzJSFpaCMIQxBVgUt8NxV","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":"X8lQH-5cOFn_c2ULdaMUG","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":"upEwLa7SBMkkjNvdxIcxy","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":"8VlB0c5hAdX_pS34D890p","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":"TEaorABNngDRaW1f_1-y1","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":"e8jtbovWwZ6ps1Yjg7Mkz","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":"njG53zZS3tuuFIZIiM5KY","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":"ZPhkk_1Q3-y8sTmtxJ-8N","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":"XnGSSi1G72pB_vxYNOKUZ","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":"-JMnS0qbLUN7R7p6qwsbI","name":"UISpriteElement","brief":"","type":"ClassDoc","description":"

                            This is a basic sprite based button which you can use in your Game UI.

                            ","params":[],"returns":[],"extends":["Sprite"],"implements":[],"members":[{"id":"aixvmlUxXC9cR0vz1-788","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":"EAEQ4FStg1rMgoWrKKswm","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":"px4O_R6XXqTg7iDmJu1sL","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":"GCkBE5e0MWDK4WVml3l4y","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":"DkEvAr5wiFiwW7mV2R8L8","name":"animationpause","brief":"","access":"public","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            pause and resume animation

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6-Zy1Oxwt3QfcMN6sg6AI","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":"bcrw0lnrp75VmYs1_kMY6","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":"rucsyyaMLkbR3X7v5U_Gi","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":"2bDx7FSGg-BIKATbHqzYt","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":"lv3qbuJ2rwDExzpY8zf0C","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            bottom coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DmEFtMF1OKJc5BHA1klfV","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the horizontal axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"NZkvoXtfBTZ59thG94ivz","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the vertical axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rZz2IRT5MPv6POot-wrRE","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the renderable default transformation matrix

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"GRFy9vmiu2i5Q6gSwxInj","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the depth of this renderable on the z axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ab4rcYssDOo-RyTTyO1rP","name":"floating","brief":"","defaultValue":"true","scope":"instance","see":["Renderable.floating"],"type":"PropertyDoc","description":"

                            if this UISpriteElement should use screen coordinates or local coordinates\n(Note: any UISpriteElement elements added to a ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FCyhCzGVAcbRorAUTA7Z8","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":"18HLhEIysKVcwN0TCuAXD","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            height of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yFdV-lqZWMtmjdClzWeSU","name":"holdThreshold","brief":"","defaultValue":"250","scope":"instance","type":"PropertyDoc","description":"

                            Tap and hold threshold timeout in ms

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"nhbGBKNVmAuIWFv5Pz8Fb","name":"hover","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            true if the pointer is over the object

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RQ97drHBu15-zRUfLO3Us","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":"FONKhoelIRBwYAW4UyXA9","name":"isClickable","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                            object can be clicked or not

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Ql4GWmopRSMG7cTFJaJhn","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":"_UmWblA6Lgz2jbZRQ479R","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":"5FHmL49EgHhERWyWp3yBQ","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":"Yw1S2IfFfpbqQPpI2wxWD","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":"R_hyxFEIp21e6I3uQki9Y","name":"isHoldable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            object can be tap and hold

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zCAiPbyXIb8CjlkZ-S3bS","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":"WJbrTGPkuVd9kve7XxHWH","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            make the renderable object persistent over level changes

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IdL5k1-4sP-bBFdPDSHb7","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            left coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xv3f4K4yNzdXaBKFy0U86","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":"UeCVO_sSZPR3eXzffS_c5","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                            The name of the renderable

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zSMq530OgNi4fBhrDek0t","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":"X88SJwypJJ8YU2ohPWEz_","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":"TIDev4_neQyF_N1j2RI0X","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            returns the parent application (or game) to which this renderable is attached to

                            ","params":[],"returns":[{"description":"

                            the parent application or undefined if not attached to any container/app

                            ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"ZCGjVGR4tKlv8798DfB1H","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":"RnWpm_Gyk26eJzQfbgo5x","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                            Position of the Renderable relative to its parent container

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"R7QEtD0ct7XeZ236OCmX6","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            right coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5vi-hBuns0Xph-tWzC6ME","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":"MO9rcf8mZ6qQJWYc2e2DM","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":"ueSwhY-PCXKO7uFjYomSA","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":"5Es0D8HT4Khx8qR3rUvkY","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            top coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YOTcc3KaRBYEPTxCJeXOt","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                            the shape type (used internally)

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aKMP-0CM0RF7WofhQBndq","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":"pjpiBn3HWZKUeMhA5BGKY","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            width of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"UHIz0H7XOHeiM59vzQ9DL","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":"x-n6WLXHvVBLQvhJifu9s","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":"2hzc6taOqZ0y_uIUHOf4W","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":"unB4C_j-P7tOKCM9XHy7K","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":"YgvnJsfmqeLxJK5IAFeFQ","name":"constructor","brief":"","examples":[{"caption":"","code":" // create a basic GUI Object\n class myButton extends UISpriteElement {\n constructor(x, y) {\n // call the UISpriteElement parent constructor\n super(x, y, {\n image: \"button\",\n framewidth: 100,\n frameheight: 50\n });\n }\n\n // output something in the console\n // when the object is clicked\n onClick(event) {\n console.log(\"clicked!\");\n // don't propagate the event\n return false;\n }\n });\n\n // add the object at pos (10,10)\n world.addChild(new myButton(10,10));"}],"scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":false,"description":"

                            the x coordinate of the UISpriteElement Object

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

                            the y coordinate of the UISpriteElement 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":"dfE3qYzwlZs3-d2kBuQwN","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":"fzczv7CJiUfb4JdqFoLap","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":"J2HUxdk8MfZxKUbu1JMpi","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":"K2DHhrum24PW5pWUUjxxn","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":"U13xZM760Wz_DInwGVaOz","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":"YMCFagmbhLU8HBXh8j9pT","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":"UqF-tv8y-1IDqhA5tG9hR","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":"yJf3QV_6EcWhb_RZDcE_B","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":"PxJxu7GzN0CmuXIRDNGpG","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":"sRZaqMHwuHdhRi2bHO1gA","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":"Xk6lz0WQymjIK1vF1C53E","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":"1h1XPBjc6Y9sI3L7MYD1q","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":"a5k9ubQLa_7kvSJzn22pP","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":"yGgynwOwEGSW5uOqs1qZB","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":"Cpi7WWB_d0ULjfmxJi3tt","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":"NZJCK1Ydb0XnfzrDjVKUG","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":"YSdajQS_kI0mBvqi9dif-","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":"N3B2ECVYgh02xJYDLF_B1","name":"onClick","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the object is pressed (to be extended)

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                            return false if we need to stop propagating the event

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"G41KAkXHz8JTqsKrld2aI","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":"9DyE2GYicGhMWwem8Tv3o","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                            OnDestroy Notification function
                            \nCalled by engine before deleting the object

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4Llu-YuJDpI4uRgOU8bt0","name":"onHold","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the object is pressed and held
                            \nto be extended

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JVQbJZN8p2Og1nagiq-ED","name":"onOut","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the pointer is leaving the object area

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"Y1SIOAhClPwRKwr4xDi6o","name":"onOver","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the pointer is over the object

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"ZiqTlGFmlSwKcK6sIhkiQ","name":"onRelease","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the object is pressed and released (to be extended)

                            ","params":[],"returns":[{"description":"

                            return false if we need to stop propagating the event

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"jwYsj7kY0dx0vhAiCnAvC","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":"7kq3I8yPGzaejxfdYHrMt","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":"80OPaTB4pIv9vBbRUjmFN","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":"wEDOsVgckfx8R8W70OX7n","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":"s4pXHvhHIv6Wv7s_ZxPu-","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":"frLm37hPdL2LEubFq-QLV","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":"OwQwAwY1_DrHrdfaiq8aA","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":"tIXH2qeiDNMg7brj3icNV","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":"idKYKbPutNzBq4CZAw9jn","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":"BaIGlkgDUEsD2VL92fC1B","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":"dfu8E4das-KmHKRfu44f5","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":"cE9nttx0-xdxlwBwNER5b","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":"8GDr5Q_WnWBLBeO7edggl","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":"GtUbCgw6KZyEuaViKpa0_","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":"DYIoLaU1KbmunHhepiGk5","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":"dmI5_pLXqj8mWSRmY1D19","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":"FJZGFA4V0cofsOHZ06Xw1","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":"tcz4C6xbiG7Hxo4U7n_C7","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":"GuNWJOW2j0qEyfpBXbDiE","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":"_oI5mDJ5hSuqcv69e1bEP","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":"aH85p6oTOJYYKtpeOS2wT","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":"60-vQA1yizkLpERaK4qYG","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":"47E1_Ul5q9kcAbwXqaWvz","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":"Us7rycWQBBVFkeJgOFbmZ","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":"q7B6CFu-8rc759sK3oc5E","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":"6bGmcZSGQxEMCOUCBAkYd","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":"nV0-AUxvR2auotttUlq1C","name":"UITextButton","brief":"","type":"ClassDoc","description":"

                            This is a basic base text button which you can use in your Game UI.

                            ","params":[],"returns":[],"extends":["UIBaseElement"],"implements":[],"members":[{"id":"4ehJEoqlKQa2mAFxYX6XJ","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":"hp2o5aea9JXf3s9tbTsct","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":"cYhKqIxP7gfbGZAt3IX7F","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":"SHocb3Rq23ckuSArW9-6i","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":"TsB0FnNKFN5TJ562yjN_z","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":"z0CmgHnYPkONZRnCarydc","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":"sYcf7Z9fg4QJAsipa-6Zo","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":"7vbXL4i8d0wAgM-TxyDhP","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":"Cd4CITZm_pmYDHQrHLHtA","name":"bindKey","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The key to bind the action to

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"_VH60CAoxDQRUO6TTnyxn","name":"bitmapText","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the bitmapText used by the UITextButton class

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LuBxVND7NKUSn8TiDLB-l","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":"9vgv_1oAO3b2_fE8ZqPzO","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":"vjX6WLtqjEVWz7nuD7D9a","name":"borderStrokeColor","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The css value of a color to be used to draw the border

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jQH19n1cyWTkbcI3QEu7F","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            bottom coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"pXyaeTtVuB8lPQTYiiaFj","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the horizontal axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LBL-IX4uf9LDMkus-GiT_","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            absolute center of this rectangle on the vertical axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CUEvVb1Bh6GT0yX-MZeFV","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":"ZN98x80ts6YAojlxmAinO","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the renderable default transformation matrix

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"V6AnTg6C90vRF0wHxqbJC","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the depth of this renderable on the z axis

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"k992S_hWq5f6q0KArCQ2W","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":"A_QWK3RAeF4NNkj9kgPt4","name":"floating","brief":"","defaultValue":"true","scope":"instance","see":["Renderable.floating"],"type":"PropertyDoc","description":"

                            UI base elements use screen coordinates by default\n(Note: any child elements added to a UIBaseElement should have their fl...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"TvB6x_Ws1AN-sMwwEwYSw","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":"eS__eA3URePCfgnEsCPCB","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            height of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"mRgjp37KOhGG3fwZ7Vble","name":"holdThreshold","brief":"","defaultValue":"250","scope":"instance","type":"PropertyDoc","description":"

                            Tap and hold threshold timeout in ms

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"XzqIutmOjIUvLLLaHyR8B","name":"hover","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            true if the pointer is over the object

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bbH0zCqL1FmjEA9P3E5F3","name":"hoverOffColor","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The css value of a color to be used if the pointer is nothovering over the button

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ndrMbwRDc84E6OtEzt279","name":"hoverOnColor","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The css value of a color to be used if the pointer hovers over the button

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AZSWTO3k1LRMlphRjwMVe","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":"odkZBqJ4HeVR0fXUhreON","name":"isClickable","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                            object can be clicked or not

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"OMpJyI0OogvAf_DLjVadK","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":"a4s_F9nWHJpUsLemIYSrC","name":"isDraggable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            object can be clicked or not

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BD9deeDHZzroKuU3uW6Rg","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":"7kilQX68dh97f0aSgU0B1","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":"uTKKteG0u7VDI0vKbaU1L","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":"itA1diVJH2G0dUSv-Vmo8","name":"isHoldable","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            object can be tap and hold

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"CUPBAUws31zHnc1RwGX55","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":"pjQzwuA1twEd-Z9h-UBfX","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            make the renderable object persistent over level changes

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"N26ZUsiRRWE07JFWiWd4J","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            left coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"e0RGqMRG0JHf2Y75wwz3-","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":"cEuNaNOQCkJCnht1VwMb1","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                            The name of the renderable

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YS4S0JU3haQpmhh6pQMf6","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":"6vKFLxzgaCx3_4f08_E8m","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            returns the parent application (or game) to which this renderable is attached to

                            ","params":[],"returns":[{"description":"

                            the parent application or undefined if not attached to any container/app

                            ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Iq1HbtR4gfVWw31DyoQsd","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":"wQwk4OhhrTu0jb-AQSAPa","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                            Position of the Renderable relative to its parent container

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JjWeEeqO_frx4I-c4-Nda","name":"released","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            false if the pointer is down, or true when the pointer status is up

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"q1EBfUlSXfb3kMkBrYoZA","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            right coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"v4UH7rsQuAx4ljwB6VaX7","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                            whether the container is the root of the scene

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"s_tujpGeeufx3Od_KVrcW","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":"eUlUUck4g05rqClLmpImS","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":"SWLGM8c8UmT7iN7ysfCij","name":"textAlign","brief":"","access":"public","defaultValue":"\"center\"","scope":"instance","type":"PropertyDoc","description":"

                            Set the default text alignment (or justification),
                            \npossible values are "left", "right", and "...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"m0ThLFyMQQ1XYxK2Ak4Qf","name":"textBaseline","brief":"","access":"public","defaultValue":"\"middle\"","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":"thOOUSPF_pp8EIw1gDZLo","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":"DjeSkp7rlZxjNft1z3pZj","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            top coordinate of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-huUzvHyZKFU7Y_8d1_sx","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                            the shape type (used internally)

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"AAI39-abxT28Elba8gSWG","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":"_kGXE4bRxa2ayUOcyj7Qw","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            width of the Rectangle

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"hOKOEPlnLLZ3B-TfOK7Hv","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":"8QbD5dHI_BDxLvUku1ZDR","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":"no47ASU00zfATr9xay8kT","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":"t0I7QEUMsqNRbWHGSFjYK","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":"4k3mdyejKVvyxyVT8FPZV","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":"eXKlBH8ChEfamLiX2-7Ek","name":"constructor","brief":"","examples":[{"caption":"","code":" // Create a new Button\n class PlayButton extends UITextButton {\n constructor(x,y) {\n super(x,y, {\n font: 'my-font',\n text: 'Play',\n // if you omit the next two, size is calculated by the size of the text\n borderWidth: 200,\n borderHeight: 20,\n backgroundColor: '#00aa0080',\n hoverColor: '#00ff00ff'\n });\n }\n\n onClick(){\n state.change(state.PLAY);\n }\n }\n\n world.addChild(new PlayButton(15,200));"}],"scope":"instance","type":"MethodDoc","description":"

                            A Bitmap Text Button with an outlined background border, filled with background color.\nIt uses a RoundRect as background a...","params":[{"identifier":"x","optional":false,"description":"

                            x pos of the button

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

                            y pos of the button

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.font","optional":true,"description":"

                            The name of the BitmapText font to use

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.size","optional":true,"default":"1","description":"

                            The scale factor of the BitmapText

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.text","optional":true,"description":"

                            The text to display

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.bindKey","optional":true,"description":"

                            The key to bind the action to (default: none)

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.hoverOffColor","optional":true,"default":"\"#00aa0080\"","description":"

                            The css value of a color to be used if the pointer is not hovering over the button

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.hoverOnColor","optional":true,"default":"\"#00ff00ff\"","description":"

                            The css value of a color to be used if the pointer hovers over the button

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.borderStrokeColor","optional":true,"default":"\"#000000\"","description":"

                            The css value of a color to be used to draw the border

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.fillStyle","optional":true,"description":"

                            The css value of a tint color to be used to tint the BitmapText

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.textAlign","optional":true,"default":"\"center\"","description":"

                            horizontal text alignment

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.textBaseline","optional":true,"default":"\"middle\"","description":"

                            the text baseline

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"settings.borderWidth","optional":true,"description":"

                            Width of the button

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"settings.borderHeight","optional":true,"description":"

                            Height of the button

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"p9EZPP2XAz_RtfT5eDpjy","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":"2C4qYMnq3Qvpw-JybjsJL","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":"A-0AwgMKiNBtUJs7DTG_u","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":"-o1lgt6OHVBsaO_pn-tRd","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":"XZByPPHviTbXHUAAdyd9g","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":"_ytDOERl-dx1cMaUDuyRI","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":"w3FAkjAat7l4HrNOl_IJd","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":"PJ14P0RL2dhzpgltGSYm6","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":"FB9DoF_5fMNQxYCjIUKT0","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":"WJ2hbCOGO8whCgG06q2dN","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":"G8AUrJKJtNWgAzT-kwjH9","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":"0GA7-MIfYvdS8KPPvZrnB","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":"HjVTYHo-8wAXPCPZ5pMCC","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":"kuFVBNRwSOgwlpnhpVvbw","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":"lb4rjMIF7d2-bdJzvjC1c","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":"8sA5yOn6S69aEWfgLycs0","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":"QoaOBdm__Ry6tpWM6rat6","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":"HYYfPnl91YDPoFkVzjOba","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":"vUXGl0dBluF9YyJQ7FqHs","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":"p13MVJMtt_yxMJTPKb8ZT","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":"bX37ZSaRpWnvnScwQ2LXj","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":"UNuFQoGHgkmY47yd3ol_g","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":"mxq14fGy7R1VxGjDkVeCJ","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":"B5k72jn2NQNrLrRMUnRxH","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":"jLuwMK7wmXrsr_R8SUC_O","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":"iTNY6UZbfWDBMAN5DF7wu","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":"B14_3zcYB6114LsShN_GO","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":"8vqJfvCBjzvZumKWbdo-h","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":"v8Yx03PXLzVvF1_JQicPM","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":"YGucPl6v-PlF2qf4deCdx","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":"5hCDXscOiK8tQ19kTI7Vv","name":"onClick","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the object is pressed (to be extended)

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                            return false if we need to stop propagating the event

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"aYoBNyGxGFkY2cDy2famV","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":"ACiCRwAUJBPEQMez5QTkH","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                            OnDestroy Notification function
                            \nCalled by engine before deleting the object

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"zRiy3UuXvRZL-VQWplkpf","name":"onHold","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the object is pressed and held
                            \nto be extended

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"IiAxxWEUEOHpV4Nm5ZOOu","name":"onMove","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the pointer is moved over the object

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"2ylbZaRMw-ubB-OV1zPjv","name":"onOut","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the pointer is leaving the object area

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"zosu9VNGhAjR17gyMu9C-","name":"onOver","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the pointer is over the object

                            ","params":[{"identifier":"event","optional":false,"description":"

                            the event object

                            ","dataType":{"tokens":[{"value":"Pointer","kind":"canonical"},{"value":"Pointer","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"4ZtV9bk9Vi8jncrKgQuKN","name":"onRelease","brief":"","scope":"instance","type":"MethodDoc","description":"

                            function called when the object is pressed and released (to be extended)

                            ","params":[],"returns":[{"description":"

                            return false if we need to stop propagating the event

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"ML5KhNsiZNnbgvmxIexNn","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":"NPgeo6LIN8ITtkXiYgu1I","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":"eLBfkpaHAwep1imOj9lb0","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":"yy1X34nPwhXH0-kNBfrf1","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":"WWU4K2zpf6ajZNibzctuS","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":"yMM89a_e4Ga2WMRA4whwz","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":"pvJ3uL5hVIJf2pvPJwo01","name":"reset","brief":"

                            reset the container, removing all childrens, and reseting transforms.

                            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Nvn8YBi72u0pqFod5k7oC","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":"eMCaIhuMY-CjlmyIAsQlz","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":"wsIYphSHsUGdS-5H0pKhf","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":"eUXoMbVMWddWiqRa_oTsm","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":"nsa5ZHVqmHxKx_wy1rm2_","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":"hXLTEPLcdLla6rQIVXehr","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":"vhCQRwbN1MA2Oxh9xEGsj","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":"V9v84ylB6VvoaI_wqzYVc","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":"bXu8BJtugChxgaWiPVo5l","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":"v5K-DRE-hSki9lPmddrgo","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":"YO7iUpU0xsJjbtmBbCoxP","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":"ADIGkEjLcQNlH32yOi0xq","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":"NP40pdjD5v4WovPeM7qRA","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":"Zt61xvsKIGpWHr4Nah6F2","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":"NqJaywvrQM35xeFJYa9xd","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":"dgbQGPGjpVniTxA3u_Bq6","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":"-7P1JPq14Vg2qIkE-1MU2","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":"EZ721J0HPkC81dRbn37rX","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":"5g6Eo9t8VB2e7g60kugCg","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":"qQl2JmggPc7hONXxf85Hg","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":"itelgATfMKwA4DDtYqA7c","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":"Le1nK6Y-rZJGrTXYWDu5k","name":"Vector2d","brief":"","type":"ClassDoc","description":"

                            a generic 2D Vector Object

                            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"kigLkgPsa7fpQPpp83i6a","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            x value of the vector

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jab7Xk-Ynk9G3KI4dgzTy","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            y value of the vector

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uIM0HcRR_VZG-VdX6n0T-","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"rOrPErM0gPm_Bw8s8zp2J","name":"add","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Add the passed vector to this 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":"uOQgJlqiwxHUqDGUZnxt8","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":"vgjsSznX_g-606z5ut5Wz","name":"ceil","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Ceil the vector values

                            ","params":[],"returns":[{"description":"

                            new me.Vector2d

                            ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"3TFhRyNJa2FtCSMIVdgRW","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"2Q63XQ-0sC30yNGgT0U1O","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.Vector2d

                            ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"UKy9B881OwFtMMmIU7YLs","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hPSZy8sU-Tt5_rRG4GSEb","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"

                            return a clone copy of this vector

                            ","params":[],"returns":[{"description":"

                            new me.Vector2d

                            ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"mPsHqKvjD3vEzhcEWIT9g","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":true,"default":"0","description":"

                            x value of the vector

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"0","description":"

                            y value of the vector

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"TvPkqrsiFwJSCe5uho9jx","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":"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":"KZcI_a11NhG5pSEwRCsFj","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","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                            The cross product.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"A8cC-z7ItXA0BZok86Tfi","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","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iOB4gaitaUcNDZVYXuqXl","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Se2yNIi4gFbZzlkPxtE1P","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","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                            The dot product.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"aKOYSCy9Jpw_UbqFdhp9C","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"

                            return true if this vector is equal to the given values or vector

                            ","params":[{"identifier":"x","dataType":{"tokens":[{"value":"number | Vector2d | ObservableVector2d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","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":"ZnddePOPk0Yea62QMtrWM","name":"floor","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Floor the vector values

                            ","params":[],"returns":[{"description":"

                            new me.Vector2d

                            ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"k4JQSO3qSDpNj6oYfsfgN","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PgW-byN7LMbevYdxe6fOW","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":"lzc0dk_VQsWGTiipyGiT8","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":"s6advpuTPtBGtNRCOpnDg","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","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}},{"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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JbJDXGTi6EFi991WcNeuF","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","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":"fQskYwZ_nhjAattz1CY_I","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","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":"MJP_e1VJcWGxkARQxqjjd","name":"moveTowards","brief":"","scope":"instance","type":"MethodDoc","description":"

                            interpolate the position of this vector towards the given one by the given maximum step.

                            ","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}},{"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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"iaS6N4LoYms0akboLAnqw","name":"negate","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Negate the vector values

                            ","params":[],"returns":[{"description":"

                            new me.Vector2d

                            ","dataType":{"tokens":[{"value":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"s0FMnXXRgCKgDbJpe2y_E","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"jsNvNt-Nytfop8kPvF2bc","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":"tETBS2vVc-u7gr11gQjga","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"wJ3CAuu2CrVRy5uR9Mrt5","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":"gyFHY-Bvg4MSyUuE9v3wR","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":"XnsF48Gy-xAW5ss5KVsgv","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"K7IqzH1K94U1U0QAmF6pe","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":"Vector2d","kind":"canonical"},{"value":"Vector2d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zP193T95evEOQE-XJvzVg","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","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":"SOjq8wOLfv4Tb4Vc-6mJd","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":"kn-8AvEDSn3ehMURyXrKs","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":"EoKILJ2bIT7rf_XC3YeZ1","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":"idFItpQISDOUTLOuPvi-L","name":"sub","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Substract the passed vector to this 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":"ukbjiK-jhHe7w6gDXFpC9","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":"PRa8WDMhBNI2NaLyddszA","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":"B5wzHKQIqdUVHBd_pVLvr","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":"v1uHJrPO7pLCM3x_A0Xxp","name":"Vector3d","brief":"","type":"ClassDoc","description":"

                            a generic 3D Vector Object

                            ","params":[],"returns":[],"extends":[],"implements":[],"members":[{"id":"aYaZT_vbi_gHjCa9ENtRk","name":"x","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            x value of the vector

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"EMrBBYqYOj_f2BGXHJg_7","name":"y","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            y value of the vector

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"VkbgOkr6JYBNqennBPz9d","name":"z","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            z value of the vector

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bqrpbDohY8iseqai6SINv","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"zOrJmcSxkuQA5QnlzXSL0","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","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":"86NcuAHwVsljLrrxXGHPc","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":"emhcMXljH7X-WGnBVM8Mm","name":"ceil","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Ceil the vector values

                            ","params":[],"returns":[{"description":"

                            new me.Vector3d

                            ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Vj0TeQXCktVoJCoZHe6ho","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"g-A-RGYHTO45jSUxe2UXQ","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.Vector3d

                            ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"W9biugvBq-prqRvZY1sOz","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"F4X1rGBzU836VGPToJk4q","name":"clone","brief":"","scope":"instance","type":"MethodDoc","description":"

                            return a clone copy of this vector

                            ","params":[],"returns":[{"description":"

                            new me.Vector3d

                            ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-wphxjq36b75sP5Qs2Av7","name":"constructor","brief":"","scope":"instance","type":"MethodDoc","params":[{"identifier":"x","optional":true,"default":"0","description":"

                            x value of the vector

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":true,"default":"0","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":[],"extends":[],"implements":[]},{"id":"j4BpL1ZWTCbILIteAUoQ0","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","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":"UOaB9u1GFti3w5-MYAeNU","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","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"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":"vUZeNBGfpSWQ6zF8dBdwh","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","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","kind":"link"}],"template":"%1 | %2"}}],"returns":[{"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"JmYSSFYTnhUoxjYZXYVwn","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"PCuNlqfrS5h5ZzJBu_p0n","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","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","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":"IJldPSry3jYgPx2qedR1N","name":"equals","brief":"","scope":"instance","type":"MethodDoc","description":"

                            return true if this vector is equal to the given values or vector

                            ","params":[{"identifier":"x","dataType":{"tokens":[{"value":"number | Vector2d | ObservableVector2d | Vector3d | ObservableVector3d","kind":"canonical"},{"value":"number","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"ObservableVector2d","kind":"link"},{"value":"Vector3d","kind":"link"},{"value":"ObservableVector3d","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5"}},{"identifier":"y","optional":true,"dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"z","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":"KeGpL9aVAOc51gEtd86aM","name":"floor","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Floor the vector values

                            ","params":[],"returns":[{"description":"

                            new me.Vector3d

                            ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"COoheSbxWJ6KR4xL9W-x7","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"BoTIi5chsMwBIfc53Yj2Z","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":"4veNEaQeVl5GMUzZVG8D9","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":"lNKoNdreddoAGEnZVUBOi","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","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}},{"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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"LgfrUDvE6hKOzUI21LbQe","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","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":"mQhKxW2ziGjpqFfvxWdB0","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","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":"sXOEWX5J98QPjALI696vH","name":"moveTowards","brief":"","scope":"instance","type":"MethodDoc","description":"

                            interpolate the position of this vector on the x and y axis towards the given one by the given maximum step.

                            ","params":[{"identifier":"target","optional":false,"dataType":{"tokens":[{"value":"Vector2d | Vector3d","kind":"canonical"},{"value":"Vector2d","kind":"link"},{"value":"Vector3d","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6ZW43sNmXZZGCVxPfNFt6","name":"negate","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Negate the vector values

                            ","params":[],"returns":[{"description":"

                            new me.Vector3d

                            ","dataType":{"tokens":[{"value":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"XkCsjfmVHf5ZOY9ToWnCa","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"hJVg36yWYPPdn_NLx6N1J","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":"7KE7-CNSRldsQSf3uV0oN","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"8UF86D2krfFbB2-pzvJHf","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":"KQEtU1gFgHZ22NH1WTw_B","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":"R2PnBNiM2zHs1KE1Sm3qv","name":"rotate","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Rotate this vector (counter-clockwise) by the specified angle (in radians) around the z axis

                            ","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"R0ViPDvK_kdoYaRJiWdZK","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":"Vector3d","kind":"canonical"},{"value":"Vector3d","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"NYkR8-bm1Du_muCPbpVC7","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","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":"rOCyy9fAYVhlL8u0_n4Tb","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":"ubZ9ncP4ZEgkriu0Df1iM","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":"T_v5VhtiH-655VZlUhOW2","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":"tsS4n-KZaoBjZk0yYtVFl","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","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":"deyVQpFkTikMc9fU-1go4","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":"gcK9cbVkE7CBY-pkyyiwL","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":"bel5Yxe1n5bKLBwwqYLgi","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":"Z4FwwHqOAKZguFdqW09uK","name":"WebGLRenderer","brief":"","type":"ClassDoc","description":"

                            a WebGL renderer object

                            ","params":[],"returns":[],"extends":["Renderer"],"implements":[],"members":[{"id":"pUisSviCSlH4NwV0NKuym","name":"compositors","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The list of active compositors

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"RSsXV2lF6QmfL6bZOLLkO","name":"currentCompositor","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The current compositor used by the renderer

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9lWsTxNdxK1pa104VS0QV","name":"currentProgram","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            a reference to the current shader program used by the renderer

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"vwqFv7SviPy0kgWaMnmZR","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The current transformation matrix used for transformations on the overall scene

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Xsbr_tDo97DkB5kIWuLhc","name":"depthTest","brief":"","defaultValue":"\"sorting\"","scope":"instance","type":"PropertyDoc","description":"

                            the default method to sort object ("sorting", "z-buffer")

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-nth9EkqkOQFnRBJ52wkV","name":"designRatio","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                            the requested video size ratio

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Pdn5Rzs--hRUz1rwTDuoa","name":"gl","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The WebGL context

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"aWMwwqQ0jWthT1P4_7kKg","name":"GPURenderer","brief":"","defaultValue":"undefined","readonly":true,"scope":"instance","type":"PropertyDoc","description":"

                            The renderer string of the underlying graphics driver.

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"fA8WFhz8xU6Ec1U42b78Z","name":"GPUVendor","brief":"","defaultValue":"undefined","readonly":true,"scope":"instance","type":"PropertyDoc","description":"

                            The vendor string of the underlying graphics driver.

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"uycah2FIDaIpl1FzqBUJg","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            return the height of the canvas which this renderer draws to

                            ","params":[],"returns":[{"description":"

                            height of the system Canvas

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"tUytOw38qJpToMQ1FLZ2v","name":"isContextValid","brief":"","defaultValue":"true","scope":"instance","type":"PropertyDoc","description":"

                            true if the current rendering context is valid

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"iCn20hK6mjSCmJL9V6FYM","name":"maxTextures","brief":"","readonly":true,"scope":"instance","type":"PropertyDoc","description":"

                            Maximum number of texture unit supported under the current context

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7NNHSSsCpc8xcmByelXjg","name":"path2D","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            The Path2D instance used by the renderer to draw primitives

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"yBrqHLH90rdZnrnLphnaz","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":"OwrVqzrIhXB3H9W-DizEA","name":"settings","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                            The given constructor options

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"4ymWtJllvqe1N-VFgI3Al","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":"DgA_JRBA9YJcPZ2j54k28","name":"vertexBuffer","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            the vertex buffer used by this WebGL Renderer

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FccIVzlo4lBRak37ys8Es","name":"WebGLVersion","brief":"","defaultValue":"1","readonly":true,"scope":"instance","type":"PropertyDoc","description":"

                            The WebGL version used by this renderer (1 or 2)

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"3xKYtbX1A-4wfJ9IRohHD","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                            return the width of the canvas which this renderer draws to

                            ","params":[],"returns":[{"description":"

                            width of the system Canvas

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"-NjPS4l1TmnHYlXShKQXN","name":"addCompositor","brief":"","scope":"instance","type":"MethodDoc","description":"

                            add a new compositor to this renderer

                            ","params":[{"identifier":"compositor","optional":false,"description":"

                            a compositor instance

                            ","dataType":{"tokens":[{"value":"Compositor","kind":"canonical"},{"value":"Compositor","kind":"link"}],"template":"%1"}},{"identifier":"name","optional":false,"default":"\"default\"","description":"

                            a name uniquely identifying this compositor

                            ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"activate","optional":true,"default":"false","description":"

                            true if the given compositor should be set as the active one

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[],"extends":[],"implements":[]},{"id":"zM8ExRegGNETTYUMFKIqF","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":"CL0tVt9DO9cWZ286oQkuk","name":"clear","brief":"

                            Clear the frame buffer

                            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"HZMJHFb50flxvgwGL8U6G","name":"clearColor","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Clears the gl context 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":"UK-cy6HeLG8p4lMPwWOe8","name":"clearMask","brief":"","scope":"instance","see":["WebGLRenderer#setMask"],"type":"MethodDoc","description":"

                            disable (remove) the rendering mask set through setMask.

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-lSvs-1SlA19HqROh7veR","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":"06DEup942bsIAn4LmirMH","name":"clearTint","brief":"","scope":"instance","see":["Renderer#setTint"],"type":"MethodDoc","description":"

                            clear the rendering tint set through setTint.

                            ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gnC7coRBPMVWikiiFwzmA","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,"description":"

                            x axis of the coordinate for the upper-left corner of the rectangle to start clipping from.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

                            y axis of the coordinate for the upper-left corner of the rectangle to start clipping from.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"

                            the width of the rectangle to start clipping from.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"

                            the height of the rectangle to start clipping from.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"DvASW22cLdI_OV2mqJqn3","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":"wUn98qaFJ8-Su2xkX79UR","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":"gKVit1bc3b1VweYtfw2nN","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":[{"description":"

                            the patterned texture created

                            ","dataType":{"tokens":[{"value":"TextureAtlas","kind":"canonical"},{"value":"TextureAtlas","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"y9IwPbbspUkCCJdCNUvoH","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 to the gl context

                            ","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":"xzKO5Hg9SAw9hwsL2oZyQ","name":"drawPattern","brief":"","scope":"instance","see":["WebGLRenderer#createPattern"],"type":"MethodDoc","description":"

                            Draw a pattern within the given rectangle.

                            ","params":[{"identifier":"pattern","optional":false,"description":"

                            Pattern object

                            ","dataType":{"tokens":[{"value":"TextureAtlas","kind":"canonical"},{"value":"TextureAtlas","kind":"link"}],"template":"%1"}},{"identifier":"x","optional":false,"description":"

                            x position where to draw the pattern

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

                            y position where to draw the pattern

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"

                            width of the pattern

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"

                            height of the pattern

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"iZJ0mqgUOy7X0b_XGRu9n","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":"ihnHWK8Tr4EofgnhzaRMk","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,"description":"

                            arc radius

                            ","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":"oMXQ9Uaa8JmuBa5gAIhjW","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":"1NSPimfdLuM0fFicn9n0_","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":"NLVdycNIK6YNxXlTCTCLN","name":"fillPoint","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Draw a a point at the specified coordinates

                            ","params":[{"identifier":"x","optional":false,"description":"

                            x axis of the coordinate for the 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 point.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"PlnipXS_MqWcc5m04ju_A","name":"fillPolygon","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Fill a 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":"_7HbcAumQnHYUGZSV4haP","name":"fillRect","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Draw a filled rectangle at the specified coordinates

                            ","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":"Y508idcbyW-wNmZ8nLlFC","name":"fillRoundRect","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Draw a rounded filled rectangle at the specified coordinates

                            ","params":[{"identifier":"x","optional":false,"description":"

                            x axis of the coordinate for the rounded 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 rounded rectangle starting point.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"

                            The rounded rectangle's width.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"

                            The rounded rectangle's height.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"description":"

                            The rounded corner's radius.

                            ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"yYegf5q4G-aaKAj4MalCs","name":"flush","brief":"

                            Flush the compositor to the frame buffer

                            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"YPOI7oMzh_SxiCBUcWE2b","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":"JVzD6Y9_aOdpupHk7ykQq","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":"a5sqc7bCzKY87wNZVsFPX","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":"jzxBfSGutTRbe18Puj2Il","name":"getContext","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Returns the WebGLContext instance for the renderer\nreturn a reference to the system 2d Context

                            ","params":[],"returns":[{"description":"

                            the current WebGL context

                            ","dataType":{"tokens":[{"value":"WebGLRenderingContext","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"Qy-xk1IrWJbtpY1HMF5GC","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":"wxx4POUurkfqfdCBtMF7S","name":"getContextGL","brief":"","scope":"instance","type":"MethodDoc","description":"

                            Returns the WebGL Context object of the given canvas element

                            ","params":[{"identifier":"canvas","optional":false,"description":"

                            the canvas element

                            ","dataType":{"tokens":[{"value":"HTMLCanvasElement","kind":"canonical"},{"value":"HTMLCanvasElement","kind":"canonical"}],"template":"%1"}},{"identifier":"transparent","optional":true,"default":"false","description":"

                            use true to enable transparency

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}},{"identifier":"depth","optional":true,"default":"false","description":"

                            use true to enable depth buffer testing

                            ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"returns":[{"description":"

                            the WebGL Context object

                            ","dataType":{"tokens":[{"value":"WebGLRenderingContext","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"j-s9n6Solh86joDzppUB_","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":"xV4ZwiJKO_iym-j0w-89f","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":"DGvjRxHWXqDmWHRcV6krh","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":"nB6BdxQu4K8XK2OiSiZL7","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":"LmKxyH-Y8JUTzFapwyXYP","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":"BA_OSuZ0Aql3kbhtOL8Wj","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":"1PbYGeW50xyh2AEfR5I5D","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":"clWVdInQP0Si5UgnWTTyO","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":"oae0vvLOy-tPZXolUoRQw","name":"reset","brief":"

                            Reset context state

                            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"DQkyLV6xWm9IzMInJCXh_","name":"resetTransform","brief":"

                            Reset the gl transform to identity

                            ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ICYHoiDCY3pVvH_jzkNpk","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":"Lg1AmhWiIbs0ojrJZVtZy","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":"95e_LJJ2M86zcogmsfsxp","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":"SxePs_9SJJFfobr1DO-PD","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":"mtsZictMFY9tAXHg1KFgB","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":"hS6OUSEmlPBkV5WiD-A_5","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":"ZMdkp7F2B5xQteAM1wD8c","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":"U_E2yO7VlOmzA_S-6DaL-","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":"gl","optional":true,"description":"

                              a WebGL context

                              ","dataType":{"tokens":[{"value":"WebGLRenderingContext","kind":"canonical"},{"value":"WebGLRenderingContext","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"eiKsYGBCNhgC0dnzrjkTw","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 string.

                              ","dataType":{"tokens":[{"value":"Color | string","kind":"canonical"},{"value":"Color","kind":"link"}],"template":"%1 | string"}}],"returns":[],"extends":[],"implements":[]},{"id":"ri-YwoIuLrK_92XB7tcmS","name":"setCompositor","brief":"","scope":"instance","type":"MethodDoc","description":"

                              set the active compositor for this renderer

                              ","params":[{"identifier":"name","optional":false,"default":"\"default\"","description":"

                              a compositor name

                              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"shader","optional":true,"description":"

                              an optional shader program to be used, instead of the default one, when activating the compositor

                              ","dataType":{"tokens":[{"value":"GLShader","kind":"canonical"},{"value":"GLShader","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                              an instance to the current active compositor

                              ","dataType":{"tokens":[{"value":"Compositor","kind":"canonical"},{"value":"Compositor","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"L4czkr-hV_kWkGaFbq_aQ","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":"oB3C1SUc9TJklhMcKgjQS","name":"setLineWidth","brief":"","scope":"instance","type":"MethodDoc","description":"

                              Set the line width

                              ","params":[{"identifier":"width","optional":false,"description":"

                              Line width

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"bggl4DjB1JR7auq2PAXrb","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":"

                              a 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":"0Rw_h2C6OHaXE7qT-7yp3","name":"setProjection","brief":"","scope":"instance","type":"MethodDoc","description":"

                              set/change the current projection matrix (WebGL only)

                              ","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":"SnzZ-tpS8cUlNfb7EEShI","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":"rXn1GfhG3VfDiMkxfUq5G","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":"lSY_XmSadp0EcvCQvm9z5","name":"setViewport","brief":"","scope":"instance","type":"MethodDoc","description":"

                              Sets the WebGL viewport, which specifies the affine transformation of x and y from normalized device coordinates to window...","params":[{"identifier":"x ","optional":true,"default":" 0","description":"

                              x the horizontal coordinate for the lower left corner of the viewport origin

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y ","optional":true,"default":" 0","description":"

                              y the vertical coordinate for the lower left corner of the viewport origin

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"w ","optional":true,"default":" width of the canvas","description":"

                              the width of viewport

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"h ","optional":true,"default":" height of the canvas","description":"

                              the height of viewport

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"2scR_zIzoquu9NHoBldce","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":"wGzg_qjqNriDtW64aBAGF","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,"description":"

                              arc radius

                              ","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":"M2zBvkdp74X6p6fWJzFdx","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":"jXk2vEO7AZtDAYvKegEye","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":"LZU79A2WeNCOZ2AIdtcNt","name":"strokePoint","brief":"","scope":"instance","type":"MethodDoc","description":"

                              Stroke a Point at the specified coordinates

                              ","params":[{"identifier":"x","optional":false,"description":"

                              x axis of the coordinate for the 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 point.

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"IHbIz39qFJi51jAXc7gXQ","name":"strokePolygon","brief":"","scope":"instance","type":"MethodDoc","description":"

                              Stroke a me.Polygon on the screen with a specified color

                              ","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":"XLsYQm6th1WvnrO7QXqUU","name":"strokeRect","brief":"","scope":"instance","type":"MethodDoc","description":"

                              Draw a stroke rectangle at the specified coordinates

                              ","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"}},{"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":"8Dh48ps35ZWsi6mU5Hplw","name":"strokeRoundRect","brief":"","scope":"instance","type":"MethodDoc","description":"

                              Stroke a rounded rectangle at the specified coordinates

                              ","params":[{"identifier":"x","optional":false,"description":"

                              x axis of the coordinate for the rounded 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 rounded rectangle starting point.

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"width","optional":false,"description":"

                              The rounded rectangle's width.

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"height","optional":false,"description":"

                              The rounded rectangle's height.

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"radius","optional":false,"description":"

                              The rounded corner's radius.

                              ","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":"sLOkdX2UH0ovGRx40mJ7k","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":"SsKiDdgc0lciaJ9cUp3uk","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":"XVzFRXqixMqzX43JdwDwU","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":"YbADrI9qsk9mNqJ_05rgH","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":"ggpNsHjA6B7WdenBJ7OWA","name":"transform","brief":"","scope":"instance","see":["{@link WebGLRenderer.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":"MwRS_b9JpvD3JV1WnzM0W","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":"umextkeBdxAmhWZ2LQlrT","name":"World","brief":"","type":"ClassDoc","description":"

                              an object representing the physic world, and responsible for managing and updating all childs and physics

                              ","params":[],"returns":[],"extends":["Container"],"implements":[],"members":[{"id":"D6rZ9qSP2p6xeTESGuJug","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":"kjq7Miq_Z_L3NT2DDKrNH","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":"tmbueH72WalTCdkSuWsbK","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":"zzT8YE4bSuf3282S0czbD","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":"y0t7MHBoF_RI5Vh7BIBlt","name":"app","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              the application (game) this physic world belong to

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9frFOUiMgHm97J3mbfLu9","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":"a3fmgThQ3Wx1iUaaP7ybp","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":"-6ix3bV4RriY2dxYXwDSW","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":"rlAzWo0fpcg3Pe6G1iCuS","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":"SuhITWBawJ0FSr8yjl-sI","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":"26UOiFxDQ9UTEJfGLlRlV","name":"bodies","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              the active physic bodies in this simulation

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"SndidJJHixm2jz2QiBvEo","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":"g4tO9mGVffkCE6YQyBnj_","name":"bottom","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              bottom coordinate of the Rectangle

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6KJSl3qRxcbJDz7ceZ2jo","name":"broadphase","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              the instance of the game world quadtree used for broadphase (used by the builtin physic and pointer event implementation)

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"8KX6JNApIb4MvLZCfh8Tp","name":"centerX","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              absolute center of this rectangle on the horizontal axis

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"5lz7DSCsalKiKdZy1XfG0","name":"centerY","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              absolute center of this rectangle on the vertical axis

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"Tl2ZiRLAvkjdk6npk2a-n","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":"FseXd6q0Kr-aaS8DWFBy-","name":"currentTransform","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              the renderable default transformation matrix

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O96MQB8fnrNbgPhcVj2-3","name":"depth","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              the depth of this renderable on the z axis

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lw7aFaRI6CEcQnL1taddU","name":"detector","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              the collision detector instance used by this world instance

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-ltEYH5jFAoU53pjDwSo9","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":"Bxl0-AootBrxGi1MspH87","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":"FRpn8tYNffibPKkOc6Ks9","name":"fps","brief":"","defaultValue":"60","scope":"instance","see":["timer.maxfps"],"type":"PropertyDoc","description":"

                              the rate at which the game world is updated,\nmay be greater than or lower than the display fps

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"6YgaJLlCNkJWv7ltNSqos","name":"gravity","brief":"","defaultValue":"<0,0.98>","scope":"instance","type":"PropertyDoc","description":"

                              world gravity

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"77XIYf0gFCmqOrp3Z7rZr","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":"n1dCRLANAOZD7TAm8VFB0","name":"height","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              height of the Rectangle

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"rPJvfazEjMbjEj6ALmW3u","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":"RRdX-3i8vkKETX8_CCXbK","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":"x0Oozu6bL6RMU3jWIT1bh","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":"f5l-6b9sSSN8xRi_JMPCA","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":"7418muQvOl0yS6cBc-857","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":"wpC_9I1Zn87c1GtTpXeUU","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":"7dE0XCwjFbajyEsJckJyh","name":"isPersistent","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                              make the renderable object persistent over level changes

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jsDG0wwULHuplysx3EZK4","name":"left","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              left coordinate of the Rectangle

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9MUUDFIXTFNvTPVjZ88QA","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":"98SWcawY731iZBsK1ISNG","name":"name","brief":"","defaultValue":"\"\"","scope":"instance","type":"PropertyDoc","description":"

                              The name of the renderable

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LdNHHrSz4i9Q0hd0TTXKh","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":"8wMYjJZZirV-PHHAcTwbX","name":"parentApp","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              returns the parent application (or game) to which this renderable is attached to

                              ","params":[],"returns":[{"description":"

                              the parent application or undefined if not attached to any container/app

                              ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"g-VtV0bscHmPtUSpEvNNm","name":"physic","brief":"","defaultValue":"\"builtin\"","examples":[{"caption":"","code":"// disable builtin physic\nme.game.world.physic = \"none\";"}],"scope":"instance","see":["Application.Settings.physic"],"type":"PropertyDoc","description":"

                              the physic engine used by melonJS

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"LrS-MUOUERAAwm-qF3Rhb","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":"V4nxdePrIH-3mFzCaNKB-","name":"pos","brief":"","access":"public","scope":"instance","type":"PropertyDoc","description":"

                              Position of the Renderable relative to its parent container

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"7orCJfM1z_ItwSIgCq1mI","name":"preRender","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                              Enabled pre-rendering for all tile layers.
                              \nIf false layers are rendered dynamically, if true layers are first fully r...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"9QeHoR6WkcDffrIz4vMYC","name":"right","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              right coordinate of the Rectangle

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ZM4ROhP6TH-auNt6pL5yB","name":"root","brief":"","defaultValue":"false","scope":"instance","type":"PropertyDoc","description":"

                              whether the container is the root of the scene

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"duyNE-ZwJBqBrd1J171oR","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":"f6eo3xDJvmQ0NeN8ewaOJ","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":"ayayceKG__p_nCAmsjPQV","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":"Kq_smXRNzMnfeaK-K0VUK","name":"top","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              top coordinate of the Rectangle

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"O3fVk5XYhaJb4uVElUXas","name":"type","brief":"","defaultValue":"\"Rectangle\"","scope":"instance","type":"PropertyDoc","description":"

                              the shape type (used internally)

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"C6YVM8SgudD0ZN2_UDeQH","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":"UJBdeW2VVph_RzTmKdHxL","name":"width","brief":"","scope":"instance","type":"PropertyDoc","description":"

                              width of the Rectangle

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"1EeJlXjGLzaWepDk-7pxw","name":"addBody","brief":"","scope":"instance","see":["Container.addChild"],"type":"MethodDoc","description":"

                              Add a physic body to the game world

                              ","params":[{"identifier":"body","optional":false,"dataType":{"tokens":[{"value":"Body","kind":"canonical"},{"value":"Body","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                              this game world

                              ","dataType":{"tokens":[{"value":"World","kind":"canonical"},{"value":"World","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"eV-7agARmTV9C2aW9RTXR","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":"W0ieuqbdQEN23GyoGxv3r","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":"Kj0QJFDiWBgULNuwRp4Qh","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":"X0JoBAQdXuHe7gVdC--ps","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":"KaI6gRSe25SWqwCoWnuZP","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":"hN9QJgk8apawRcwGaVUBR","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":"Mk82sqf_wsGglp_IOns24","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":"oK84XocQxQUeOlQITTGUz","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":"YCgMB8DGl18nKIaSAc5Xk","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":"efFiniEa_Qh5mzIGMeYc6","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":"-Y_2XWQL5abZn0WpKse9Y","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":"QvMg1F0znMgh5zoVFAYOu","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":"Rv7N6ukV-Fc-yIie6i1dq","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":"9qwfxw-R8i_M0NxzDdsEr","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":"_7lQ10_yxZpJh7EhtoiLp","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":"tuoOcoG8soVdFhVmLNT-y","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":"qUgiJ6k6i0XmL1ytIi--Z","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":"1f04t2HLs8vgTV6qEwtEF","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":"mFkwbbMhZrf61PCqJHl40","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":"nAJeuiXjFJQOxHGGwUjvd","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":"Pb7aSZLrlIm26XT0mvA8T","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":"Go_d8hU3w9zvB4t399DAJ","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":"6op24fTFo2gVkBSA2Dci7","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":"h9pVxSTZmztWivOsGL5FK","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":"Pn2Ey_FFFz2MZvlk_EPmD","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":"UUTxSca_tLv-hHogfekqp","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":"W67Dj_SclvfVIYSmLRzmw","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":"n21KVsxI_KUQeksTAzED4","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":"CrLeIvbBQfDfMF6p8d5wL","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":"OAMjB1eFWFUDYOpfoC1c2","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":"nbBKq4uW3CxWmw83TorPX","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":"_bKfUm-EhRGLFdYGZu__b","name":"moveDown","brief":"","scope":"instance","type":"MethodDoc","description":"

                              Move the child in the group one step backward (z depth).

                              ","params":[{"identifier":"child","optional":false,"description":"

                              Child to be moved

                              ","dataType":{"tokens":[{"value":"Renderable | Entity | Sprite | Collectable | Trigger | Draggable | DropTarget | NineSliceSprite | ImageLayer | ColorLayer | Light2d | UIBaseElement | UISpriteElement | UITextButton | Text | BitmapText","kind":"canonical"},{"value":"Renderable","kind":"link"},{"value":"Entity","kind":"link"},{"value":"Sprite","kind":"link"},{"value":"Collectable","kind":"link"},{"value":"Trigger","kind":"link"},{"value":"Draggable","kind":"link"},{"value":"DropTarget","kind":"link"},{"value":"NineSliceSprite","kind":"link"},{"value":"ImageLayer","kind":"link"},{"value":"ColorLayer","kind":"link"},{"value":"Light2d","kind":"link"},{"value":"UIBaseElement","kind":"link"},{"value":"UISpriteElement","kind":"link"},{"value":"UITextButton","kind":"link"},{"value":"Text","kind":"link"},{"value":"BitmapText","kind":"link"}],"template":"%1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16"}}],"returns":[],"extends":[],"implements":[]},{"id":"6uwSorC6WGdjWqjrbyULh","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":"Lcfzu2VySnOFtVcB1YQfO","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":"BZPtxE_H58drAy0zMVnST","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":"6xT-rQE_NbNlVJLxTh93N","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":"GANEWpweZWFvP6Lzm8b4T","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":"L164qDDNetfMZjbE1DcNV","name":"onDestroyEvent","brief":"","scope":"instance","type":"MethodDoc","description":"

                              OnDestroy Notification function
                              \nCalled by engine before deleting the object

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"jT9o7Lo6UZqUI333D1SnC","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":"XgsNoY3HPgbBEG_DO7TC5","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":"2HPvZo8nL4CSTJWb6wRb2","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":"8bS8b_mZvHMjeAhjiVhhX","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":"Kx50DLLDdy661RUE4Zuun","name":"removeBody","brief":"","scope":"instance","see":["Container.removeChild"],"type":"MethodDoc","description":"

                              Remove a physic body from the game world

                              ","params":[{"identifier":"body","optional":false,"dataType":{"tokens":[{"value":"Body","kind":"canonical"},{"value":"Body","kind":"link"}],"template":"%1"}}],"returns":[{"description":"

                              this game world

                              ","dataType":{"tokens":[{"value":"World","kind":"canonical"},{"value":"World","kind":"link"}],"template":"%1"}}],"extends":[],"implements":[]},{"id":"6O8W3wJeoaPhZLiNA56rQ","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":"My3phcdf9FTIKqw0koh1z","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":"cTQKTOmEOI20GuJoq2beO","name":"reset","brief":"

                              reset the game world

                              ","scope":"instance","type":"MethodDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BsA4G9fKsg9qw7SNI0-oi","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":"7ykqcpGM8qCAPMoh9_c1h","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":"--65e-uXMxrSVNMb83m18","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":"9XvHSYY1xtHW-Z-RtjzaG","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":"o-tOWe7PsCb0aS522eM9o","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":"3I7Ps2oWeTfMC-5JB7OMy","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":"a-7yXfZ9X7dBi6oHLcgxA","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":"sN3zfJnYNRu9Sew6e8Fny","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":"Xq_GBVbXjpwOBA3ksonxe","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":"YdbfMRRzsKkpzgets1g46","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":"omPQk4xIyJGrAw2OW_0J_","name":"step","brief":"","scope":"instance","type":"MethodDoc","description":"

                              update the builtin physic simulation by one step (called by the game world update method)

                              ","params":[{"identifier":"dt","optional":false,"description":"

                              the time passed since the last frame update

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"piWjlAdY21fj-T_U9fkAU","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":"I2YvrZLL_1hmgC9TB2Qol","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":"BZOCZzEqWLOORdeBg8Hru","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":"SLrTAjroWV1yznibzzaXm","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":"fqbhbJgO-K7ps6qsqWwca","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":"i9Rpu6tZh0Uy9ZHAdkki4","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":"bGyb4YRzoBsW8XLwSkqOB","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":"VODk_I_vJnTdhEW8tRAMb","name":"update","brief":"","scope":"instance","type":"MethodDoc","description":"

                              update the game world

                              ","params":[{"identifier":"dt","optional":false,"description":"

                              the time passed since the last frame update

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[{"description":"

                              true if the world is dirty

                              ","dataType":{"tokens":[{"value":"boolean","kind":"canonical"}],"template":"boolean"}}],"extends":[],"implements":[]},{"id":"MMIEt5cUE0lxbFxP6KU2R","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":"rp_g2xyv229voiDWsAcY4","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":"6zxA22DaPD_myUcliG-K3","name":"bodyApplyGravity","brief":"","access":"private","scope":"instance","type":"MethodDoc","description":"

                              Apply gravity to the given body

                              ","params":[{"identifier":"body","optional":false,"dataType":{"tokens":[{"value":"Body","kind":"canonical"},{"value":"Body","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"duGzkxNgnIO8siXXPfwjx","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":"WEV3Ye_GEWWLvV4nC0TZY","name":"AUTO","brief":"","defaultValue":"2","readonly":true,"scope":"static","see":["Application"],"type":"PropertyDoc","description":"

                              constant to auto-select the renderer (Attempt WebGL first, with fallback to Canvas)

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"2e4Vm5HL3Rh-yizq11NBl","name":"CANVAS","brief":"","defaultValue":"0","readonly":true,"scope":"static","see":["Application"],"type":"PropertyDoc","description":"

                              constant to select the HTML5 Canvas renderer

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"JcsO-jSiVRwpcW1U7y8Bg","name":"version","brief":"","defaultValue":"\"__VERSION__\"","readonly":true,"scope":"static","type":"PropertyDoc","description":"

                              current melonJS version

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"BwfV6bVlvJtNW2EhSA8Lo","name":"WEBGL","brief":"","defaultValue":"1","readonly":true,"scope":"static","see":["Application"],"type":"PropertyDoc","description":"

                              constant to select select the WebGL renderer

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"lYtlS_2R152LH-WxhxX91","name":"failureLoadedAssets","brief":"

                              Assets uploaded with an error

                              ","readonly":true,"type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"ysNSlUPeI4ueQFTd0KrxH","name":"imgList","brief":"

                              where all preloaded content is cached

                              ","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"gR-BLDonjgsC1Epvmb8M5","name":"initialized","brief":"","defaultValue":"false","readonly":true,"type":"PropertyDoc","description":"

                              a flag indicating that melonJS is fully initialized

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"QPC3neY8FTTgRchRSjfJC","name":"parserInitialized","brief":"

                              keep track if parsers were registered

                              ","defaultValue":"false","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"-o-nQLgoeVvF4wgKMGsSy","name":"parsers","brief":"

                              list of parser function for supported format type

                              ","type":"PropertyDoc","params":[],"returns":[],"extends":[],"implements":[]},{"id":"FMI3bphiXGGf1jf7BkRkX","name":"skipAutoInit","brief":"","defaultValue":"false","see":["boot"],"type":"PropertyDoc","description":"

                              disable melonJS auto-initialization

                              ","params":[],"returns":[],"extends":[],"implements":[]},{"id":"bRbIboKPBZnfKAFLtGQKt","name":"boot","brief":"","access":"public","see":["skipAutoInit"],"type":"FunctionDoc","description":"

                              initialize the melonJS library.\nthis is automatically called unless me.skipAutoInit is set to true,\nto allow asynchronous ...","params":[],"returns":[],"extends":[],"implements":[]},{"id":"F6ym2eIKgrdYDjpMqfVh2","name":"consoleHeader","brief":"","type":"FunctionDoc","description":"

                              display information

                              ","params":[{"identifier":"app","optional":false,"description":"

                              the game application instance calling this function

                              ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"sfBQHcSQlANe1OSKQhMTA","name":"warning","brief":"","type":"FunctionDoc","description":"

                              display a deprecation warning in the console

                              ","params":[{"identifier":"deprecated","optional":false,"description":"

                              deprecated class,function or property name

                              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"replacement","optional":false,"description":"

                              the replacement class, function, or property name

                              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}},{"identifier":"version","optional":false,"description":"

                              the version since when the lass,function or property is deprecated

                              ","dataType":{"tokens":[{"value":"string","kind":"canonical"}],"template":"string"}}],"returns":[],"extends":[],"implements":[]},{"id":"EN7DP4aOJvkd7Kvyv-K9v","name":"onresize","brief":"","access":"private","type":"FunctionDoc","description":"

                              callback for window resize event

                              ","params":[{"identifier":"game","optional":false,"description":"

                              the game application instance triggering the resize

                              ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]},{"id":"_taG8mdFZGSdsowwJ5cRS","name":"scale","brief":"","access":"private","type":"FunctionDoc","description":"

                              scale the "displayed" canvas by the given scalar.\nthis will modify the size of canvas element directly.\nOnly use...","params":[{"identifier":"game","optional":false,"description":"

                              the game application instance triggering the resize

                              ","dataType":{"tokens":[{"value":"Application","kind":"canonical"},{"value":"Application","kind":"link"}],"template":"%1"}},{"identifier":"x","optional":false,"description":"

                              x scaling multiplier

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}},{"identifier":"y","optional":false,"description":"

                              y scaling multiplier

                              ","dataType":{"tokens":[{"value":"number","kind":"canonical"},{"value":"number","kind":"canonical"}],"template":"%1"}}],"returns":[],"extends":[],"implements":[]}]},"registry":{"pkg-5x707GV1sB_PPXll0hCC5":{"uri":"/melonJS/docs/melonjs.html"},"AIj5m7dCi4kTZD4uy3Cmw":{"uri":"/melonJS/docs/melonjs/audio.html"},"DF_Z6Pr6CcdagSor1RO68":{"uri":"/melonJS/docs/melonjs/audio.html#stopOnAudioError"},"QrBJm7dzcTH3SVZP7g3q5":{"uri":"/melonJS/docs/melonjs/audio/disable.html"},"QQeDn-2eKgUDZJNU2MI2M":{"uri":"/melonJS/docs/melonjs/audio/enable.html"},"1gIov4DPTeI-ZBlvTHHDo":{"uri":"/melonJS/docs/melonjs/audio/fade.html"},"sjijEeMpNhLe9be2MhH9Q":{"uri":"/melonJS/docs/melonjs/audio/getCurrentTrack.html"},"7h-Z4Xg246ycw33sZnqj_":{"uri":"/melonJS/docs/melonjs/audio/getVolume.html"},"3H0JeAydUJfxMoDdS5hs8":{"uri":"/melonJS/docs/melonjs/audio/hasAudio.html"},"BENni6E_JJ1YMiDWa2xot":{"uri":"/melonJS/docs/melonjs/audio/hasFormat.html"},"Ik0E9PutiWpj9CLck4Ha-":{"uri":"/melonJS/docs/melonjs/audio/init.html"},"n5LT68iRcfp4_J81ubm8b":{"uri":"/melonJS/docs/melonjs/audio/load.html"},"S1_Hyp07p-SOCEovystA4":{"uri":"/melonJS/docs/melonjs/audio/mute.html"},"-SM_Pu1JeJexJ_f5VMoL5":{"uri":"/melonJS/docs/melonjs/audio/muteAll.html"},"PpHUShk2ad0Msq-1UNX1J":{"uri":"/melonJS/docs/melonjs/audio/muted.html"},"eKW9bGkCg2BeOlkGo9LAr":{"uri":"/melonJS/docs/melonjs/audio/pause.html"},"nUkxEAfKCth4GQZyhafdc":{"uri":"/melonJS/docs/melonjs/audio/pauseTrack.html"},"LeFWzPmX1RdzMHLSVhHxE":{"uri":"/melonJS/docs/melonjs/audio/play.html"},"ViTk2mUT9zuhmjLtaudzA":{"uri":"/melonJS/docs/melonjs/audio/playTrack.html"},"xh5NKYVhKYJdBpBC5uriN":{"uri":"/melonJS/docs/melonjs/audio/rate.html"},"nx2Vza4hzzQesGgmFOLrA":{"uri":"/melonJS/docs/melonjs/audio/resume.html"},"lS3-WLR9tcPI8cheKnK3y":{"uri":"/melonJS/docs/melonjs/audio/resumeTrack.html"},"7FXhHfF825d7IJLFl7FmJ":{"uri":"/melonJS/docs/melonjs/audio/seek.html"},"4jzyUAcjVEZ-n0bXnRJz8":{"uri":"/melonJS/docs/melonjs/audio/setVolume.html"},"PiQ7KGwU-h3u66dhcqpA9":{"uri":"/melonJS/docs/melonjs/audio/stop.html"},"TRbfrtcCQe1IKQIGBgDvz":{"uri":"/melonJS/docs/melonjs/audio/stopTrack.html"},"VqqtB5cdQfPBviENOuUau":{"uri":"/melonJS/docs/melonjs/audio/unload.html"},"urUA6pHk1mqu9nEtM_kgS":{"uri":"/melonJS/docs/melonjs/audio/unloadAll.html"},"tHGi-mp4EGKqqLCsC4H1Z":{"uri":"/melonJS/docs/melonjs/audio/unmute.html"},"VfC3rrmIm4KxZ_bNbqH_z":{"uri":"/melonJS/docs/melonjs/audio/unmuteAll.html"},"d63FQAfNVK7P8v_gSMFjA":{"uri":"/melonJS/docs/melonjs/collision.html"},"kFWlyNwFK1JzQYlkBTUc3":{"uri":"/melonJS/docs/melonjs/collision/types.html"},"_1w-XkTzIVNz0HNhdpcL8":{"uri":"/melonJS/docs/melonjs/collision/types.html#ACTION_OBJECT"},"exqqTrzo4d4sFHUYOI1oL":{"uri":"/melonJS/docs/melonjs/collision/types.html#ALL_OBJECT"},"dd42pAs1_UZfFr9OeFjK3":{"uri":"/melonJS/docs/melonjs/collision/types.html#COLLECTABLE_OBJECT"},"am48diLTicMZSMHg_cpjF":{"uri":"/melonJS/docs/melonjs/collision/types.html#ENEMY_OBJECT"},"HfLnHsuqq5Cg1BPeASY53":{"uri":"/melonJS/docs/melonjs/collision/types.html#NO_OBJECT"},"_MNePunWIogIqpCe2G3yJ":{"uri":"/melonJS/docs/melonjs/collision/types.html#NO_OBJECT_"},"f1IcBoJajNkhb1BIbUJpd":{"uri":"/melonJS/docs/melonjs/collision/types.html#NPC_OBJECT"},"7L8hgg-tkmWya5_0szdbC":{"uri":"/melonJS/docs/melonjs/collision/types.html#PLAYER_OBJECT"},"TXGd8uGRAHTTQTOSnlxHc":{"uri":"/melonJS/docs/melonjs/collision/types.html#PROJECTILE_OBJECT"},"5pllY4j_0920zQrRVCSyl":{"uri":"/melonJS/docs/melonjs/collision/types.html#USER"},"hL_l1S9KAv-Wjh-x1Hl9L":{"uri":"/melonJS/docs/melonjs/collision/types.html#WORLD_SHAPE"},"VS2Gh_p0L2BrX0oqXMcNF":{"uri":"/melonJS/docs/melonjs/collision.html#maxChildren"},"mO7Y8f6ToAeyKtvbFMBMZ":{"uri":"/melonJS/docs/melonjs/collision.html#maxDepth"},"HRXLmhxaDR8siKpGkwKRk":{"uri":"/melonJS/docs/melonjs/collision.html#rayCast"},"60CjiKGpC9vH0wAFGjBDA":{"uri":"/melonJS/docs/melonjs/device.html"},"rLzVZQmX6rI8LQJULYR-1":{"uri":"/melonJS/docs/melonjs/device/platform.html"},"RUMxvNN7a9Roo9qxAxb5A":{"uri":"/melonJS/docs/melonjs/device/platform.html#android"},"YCY3NywrEPBFLm6iuAdWx":{"uri":"/melonJS/docs/melonjs/device/platform.html#android2"},"Q7evuKDnvmeZK2b_s6gA-":{"uri":"/melonJS/docs/melonjs/device/platform.html#BlackBerry"},"DznEoXCPyM0pbPRbclD6g":{"uri":"/melonJS/docs/melonjs/device/platform.html#chromeOS"},"0Z6ZJTp4JgA10dz8WoOm_":{"uri":"/melonJS/docs/melonjs/device/platform.html#ejecta"},"KJYsgxXqfuP1G10sOFZy5":{"uri":"/melonJS/docs/melonjs/device/platform.html#iOS"},"uB0C6CwCnWSIdUTngtIlD":{"uri":"/melonJS/docs/melonjs/device/platform.html#isMobile"},"2RKW_mdjRqevtqu1EmzT1":{"uri":"/melonJS/docs/melonjs/device/platform.html#isWeixin"},"o7eZfXUjhEeG3gErLGUEL":{"uri":"/melonJS/docs/melonjs/device/platform.html#Kindle"},"COP7SbNI1PREUvmq1Gpl4":{"uri":"/melonJS/docs/melonjs/device/platform.html#linux"},"KwHRYBPvBf_QVuhyICA3l":{"uri":"/melonJS/docs/melonjs/device/platform.html#nodeJS"},"wEhgGKsEKD03ILJJ9-TXi":{"uri":"/melonJS/docs/melonjs/device/platform.html#ua"},"GASknrQ5Ax2b2xQAAwARq":{"uri":"/melonJS/docs/melonjs/device/platform.html#wp"},"TnkBUM3OFx5t35x-gjSMc":{"uri":"/melonJS/docs/melonjs/device.html#accelerationX"},"SsohbpaA2kLyy3JESCrAk":{"uri":"/melonJS/docs/melonjs/device.html#accelerationY"},"DUNLNqtJqHf1VXj7j4R7s":{"uri":"/melonJS/docs/melonjs/device.html#accelerationZ"},"s5qjxJhOWDt8vbbDNBHu1":{"uri":"/melonJS/docs/melonjs/device.html#alpha"},"39ruehanRMV1gelklhMHv":{"uri":"/melonJS/docs/melonjs/device.html#autoFocus"},"3V3WvBf1pa7m6PM878vQQ":{"uri":"/melonJS/docs/melonjs/device.html#beta"},"3fIsGu6hD63fK2im76rrx":{"uri":"/melonJS/docs/melonjs/device.html#devicePixelRatio"},"9dL8Wa07_s5_3EfvlHD5U":{"uri":"/melonJS/docs/melonjs/device.html#gamma"},"tVVg_R82Z7-fpnanPxdPN":{"uri":"/melonJS/docs/melonjs/device.html#hasAccelerometer"},"hi-hfXUKqhcJ1EOibRf28":{"uri":"/melonJS/docs/melonjs/device.html#hasDeviceOrientation"},"TH4z-23QCuhZEOhspEGsz":{"uri":"/melonJS/docs/melonjs/device.html#hasFullscreenSupport"},"8WJfJkOrHTcbhb-ZTv-ry":{"uri":"/melonJS/docs/melonjs/device.html#hasHTML5Audio"},"OLUeHJks1eeJz4spI275e":{"uri":"/melonJS/docs/melonjs/device.html#hasPointerLockSupport"},"09JU14rwJ-fEFZUNnPucJ":{"uri":"/melonJS/docs/melonjs/device.html#hasWebAudio"},"HcnNRDlEo5BsUgkjwNlcj":{"uri":"/melonJS/docs/melonjs/device.html#isMobile"},"L3daV_POMErY0hr95Y18u":{"uri":"/melonJS/docs/melonjs/device.html#language"},"08xxE6bjWyXrIVj8Uphj8":{"uri":"/melonJS/docs/melonjs/device.html#localStorage"},"TAtqplk7qQMuBGJT1d2Lr":{"uri":"/melonJS/docs/melonjs/device.html#maxTouchPoints"},"asgZJ7UklukyPJ2HQJBZt":{"uri":"/melonJS/docs/melonjs/device.html#nativeBase64"},"pTEeWw_4QWyvrJXy418kN":{"uri":"/melonJS/docs/melonjs/device.html#offscreenCanvas"},"mnrHLrPG37wOZJWZXJqrD":{"uri":"/melonJS/docs/melonjs/device.html#pauseOnBlur"},"MCXo22_aobFfr9vHP2b1-":{"uri":"/melonJS/docs/melonjs/device.html#platform"},"6yfx3IyWvLF331QWWSrjr":{"uri":"/melonJS/docs/melonjs/device.html#pointerEvent"},"VSSax4vJ1BPc0tuOtyUcF":{"uri":"/melonJS/docs/melonjs/device.html#resumeOnFocus"},"waDWZ_QGyuGC7L5P7MuJA":{"uri":"/melonJS/docs/melonjs/device.html#screenOrientation"},"DQj3ZEeuHpxnX6XuqlLmP":{"uri":"/melonJS/docs/melonjs/device.html#sound"},"e1qHPu5xTCj2D25arMmMK":{"uri":"/melonJS/docs/melonjs/device.html#stopOnBlur"},"P1YCjrBr7AbsIMtXepOwI":{"uri":"/melonJS/docs/melonjs/device.html#touch"},"4WeWZ2OKBRc_0Djg3A-cF":{"uri":"/melonJS/docs/melonjs/device.html#touchEvent"},"s5s6TG7BsIlJHKKSxrB_t":{"uri":"/melonJS/docs/melonjs/device.html#wheel"},"ccqGb1W4uyl9DjFPg8jrN":{"uri":"/melonJS/docs/melonjs/device/enableSwipe.html"},"tScNmXP23Q7v3cABkjjne":{"uri":"/melonJS/docs/melonjs/device/exitFullscreen.html"},"tzhnNLXMBzh94H_uOhJyu":{"uri":"/melonJS/docs/melonjs/device/focus.html"},"hWDHzaKQeBO2oCdj-xA-f":{"uri":"/melonJS/docs/melonjs/device/getElement.html"},"RpI_D1VNNu5MLfVJwDAvl":{"uri":"/melonJS/docs/melonjs/device/getElementBounds.html"},"ZBOnCCi3j3MrkR9WZxd4g":{"uri":"/melonJS/docs/melonjs/device/getParentBounds.html"},"7iLvOhSgO6p5fesaCUIAH":{"uri":"/melonJS/docs/melonjs/device/getParentElement.html"},"AAcE3BoUhrqKCjFKVDVyr":{"uri":"/melonJS/docs/melonjs/device/getScreenOrientation.html"},"qGaNHzaxMivTkpKf6Atdp":{"uri":"/melonJS/docs/melonjs/device/getStorage.html"},"bja42krJk1VRWyZT3WED-":{"uri":"/melonJS/docs/melonjs/device/isFullscreen.html"},"FllCW045bIIUmY48Iabwk":{"uri":"/melonJS/docs/melonjs/device/isLandscape.html"},"vnV2Qu9zK-RcXu_p8vza3":{"uri":"/melonJS/docs/melonjs/device/isPortrait.html"},"fY6CBGi38PEjvxY2lByk1":{"uri":"/melonJS/docs/melonjs/device/isWebGLSupported.html"},"JzEHWPb6SvAjJvfsNK8w_":{"uri":"/melonJS/docs/melonjs/device/lockOrientation.html"},"I5Io7kV1KPDiVB98lwPgC":{"uri":"/melonJS/docs/melonjs/device/onReady.html"},"G97WetpOTcRfqfEq0iQnn":{"uri":"/melonJS/docs/melonjs/device/requestFullscreen.html"},"7sYgWvk9HT95IHNI-9IJm":{"uri":"/melonJS/docs/melonjs/device/unlockOrientation.html"},"EDXMglsyYd3tIz_KZtvOA":{"uri":"/melonJS/docs/melonjs/device/unwatchAccelerometer.html"},"zUrmSuhjw_20t5HuYNu1h":{"uri":"/melonJS/docs/melonjs/device/unwatchDeviceOrientation.html"},"hNtt68Fw2mRl2EncZYI3_":{"uri":"/melonJS/docs/melonjs/device/vibrate.html"},"nF_RPHqMFNFYPQwpdAAgv":{"uri":"/melonJS/docs/melonjs/device/watchAccelerometer.html"},"h4i1Lpl5bJd44Ewhjgxhd":{"uri":"/melonJS/docs/melonjs/device/watchDeviceOrientation.html"},"sKs251q7BAxOzhurzq_1e":{"uri":"/melonJS/docs/melonjs/event.html"},"LKSeC0yBRlnnJO3xTd3Ec":{"uri":"/melonJS/docs/melonjs/event.html#BLUR"},"UF7ykEnAr3zh4snekeNb_":{"uri":"/melonJS/docs/melonjs/event.html#BOOT"},"Lzb47lKeiH3uIIfQ9lxnY":{"uri":"/melonJS/docs/melonjs/event.html#CANVAS_ONRESIZE"},"LmvSbbaubIjZbMlnvgbkl":{"uri":"/melonJS/docs/melonjs/event.html#DOM_READY"},"n69HqN4Jud-SD1gvWIIei":{"uri":"/melonJS/docs/melonjs/event.html#DRAGEND"},"Edj1TlorIBDa0LQVaXzdr":{"uri":"/melonJS/docs/melonjs/event.html#DRAGSTART"},"HUGtEWYZmG2rqXu5_GImM":{"uri":"/melonJS/docs/melonjs/event.html#FOCUS"},"-rson2hy9VuYFDG35cOzm":{"uri":"/melonJS/docs/melonjs/event.html#GAME_AFTER_DRAW"},"IdslF8RyHcSkc4bXXt7zj":{"uri":"/melonJS/docs/melonjs/event.html#GAME_AFTER_UPDATE"},"ZTkcnTVSh-9Nng4TH2nzu":{"uri":"/melonJS/docs/melonjs/event.html#GAME_BEFORE_DRAW"},"rcPAhK7FzHRJUfeT_6_2r":{"uri":"/melonJS/docs/melonjs/event.html#GAME_BEFORE_UPDATE"},"kNmuvgkzSm6QZDBECIoTT":{"uri":"/melonJS/docs/melonjs/event.html#GAME_INIT"},"v5KGuTGuVxY9DEIN7y142":{"uri":"/melonJS/docs/melonjs/event.html#GAME_RESET"},"tD0XCEFoNw0aYpFpL_qc7":{"uri":"/melonJS/docs/melonjs/event.html#GAME_UPDATE"},"Qmo8U6hufv_CMjGssu53s":{"uri":"/melonJS/docs/melonjs/event.html#GAMEPAD_CONNECTED"},"6T3wi_-ua-upi5Vp3e47a":{"uri":"/melonJS/docs/melonjs/event.html#GAMEPAD_DISCONNECTED"},"u8w5t_9aKARBIY8z7XPSo":{"uri":"/melonJS/docs/melonjs/event.html#GAMEPAD_UPDATE"},"yjLRhS3uU-mc7USBUCiNO":{"uri":"/melonJS/docs/melonjs/event.html#KEYDOWN"},"A9Uct_0eEWUHiU6CfeUm0":{"uri":"/melonJS/docs/melonjs/event.html#KEYUP"},"KfiPURAurwopzYNYeMDDm":{"uri":"/melonJS/docs/melonjs/event.html#LEVEL_LOADED"},"5n7kZ_to2HnPiUuvyUEXs":{"uri":"/melonJS/docs/melonjs/event.html#LOADER_COMPLETE"},"zlrDZhH3YnqAIyVMlHp5o":{"uri":"/melonJS/docs/melonjs/event.html#LOADER_ERROR"},"i_VoRm3gwLkyKPjxDqFl8":{"uri":"/melonJS/docs/melonjs/event.html#LOADER_PROGRESS"},"7_gWN4q-j06yAdz1yknJZ":{"uri":"/melonJS/docs/melonjs/event.html#ONCONTEXT_RESTORED"},"WDw6wNJXru-VLx15bjIBH":{"uri":"/melonJS/docs/melonjs/event.html#POINTERLOCKCHANGE"},"DUwFsbpdkBKkx2UI4-lJ7":{"uri":"/melonJS/docs/melonjs/event.html#POINTERMOVE"},"61h5LQsnbDG3B9stycdwe":{"uri":"/melonJS/docs/melonjs/event.html#STAGE_RESET"},"pf37kiSPImM5HRu0oHG5P":{"uri":"/melonJS/docs/melonjs/event.html#STATE_CHANGE"},"PqkXed9NFCsQZX175C0eo":{"uri":"/melonJS/docs/melonjs/event.html#STATE_PAUSE"},"nn7ad1vEZljza-ajcophq":{"uri":"/melonJS/docs/melonjs/event.html#STATE_RESTART"},"QsOOpu0YtworQ5vWjOA20":{"uri":"/melonJS/docs/melonjs/event.html#STATE_RESUME"},"b_DcI8WZL0WVsRbzlrhAY":{"uri":"/melonJS/docs/melonjs/event.html#STATE_STOP"},"BlkItN-OAbPc37fZ7JuWD":{"uri":"/melonJS/docs/melonjs/event.html#TICK"},"pJV5GTq_FJkfrr_YH4-rq":{"uri":"/melonJS/docs/melonjs/event.html#VIDEO_INIT"},"Nh4cqHZIZDXgOlZ9q1Ooj":{"uri":"/melonJS/docs/melonjs/event.html#VIEWPORT_ONCHANGE"},"b8Kpyy601WTt60kuHmf-I":{"uri":"/melonJS/docs/melonjs/event.html#VIEWPORT_ONRESIZE"},"ps0sPU9nSAQO7hlHS42EC":{"uri":"/melonJS/docs/melonjs/event.html#WEBGL_ONCONTEXT_LOST"},"pQFr1gukVGR14H5E4CXfn":{"uri":"/melonJS/docs/melonjs/event.html#WINDOW_ONORIENTATION_CHANGE"},"alWvCotzKUuRUrrh3qF5-":{"uri":"/melonJS/docs/melonjs/event.html#WINDOW_ONRESIZE"},"WKhZStSkOGxMSY2_yIE6Y":{"uri":"/melonJS/docs/melonjs/event.html#WINDOW_ONSCROLL"},"DZ5sqvshUzzaw1FdlQ9WQ":{"uri":"/melonJS/docs/melonjs/event.html#WORLD_STEP"},"ykuXX9vCQO2chU2yUu-8W":{"uri":"/melonJS/docs/melonjs/event/emit.html"},"C_ztYYLOITjIIs_ldeFii":{"uri":"/melonJS/docs/melonjs/event/off.html"},"FSAcyvtPKYgK4C-_ZEqXY":{"uri":"/melonJS/docs/melonjs/event/on.html"},"q8SrUE9Jp2oAOikaW4tRC":{"uri":"/melonJS/docs/melonjs/event/once.html"},"Y6wdPun1AT7dPC66FlT_N":{"uri":"/melonJS/docs/melonjs/game.html"},"cj9ia8-2fLtsummAZOmVP":{"uri":"/melonJS/docs/melonjs/input.html"},"GwHKi0fyzEx9SmCqpBLho":{"uri":"/melonJS/docs/melonjs/input/GAMEPAD.html"},"25qN2xSvu5CkRRNQyKk0x":{"uri":"/melonJS/docs/melonjs/input/GAMEPAD/AXES.html"},"NkKTULiF0OVmyev4jDiPr":{"uri":"/melonJS/docs/melonjs/input/GAMEPAD/BUTTONS.html"},"Gdf7IfnPNfObvXlGA0pQ5":{"uri":"/melonJS/docs/melonjs/input/KEY.html"},"ojo0C1yRwTY2A0laLfgBQ":{"uri":"/melonJS/docs/melonjs/input/KEY.html#A"},"d2_iTl0XaXEwPqIle77wb":{"uri":"/melonJS/docs/melonjs/input/KEY.html#ADD"},"zWVWMRAaJ7q9omPL3cwLW":{"uri":"/melonJS/docs/melonjs/input/KEY.html#ALT"},"Mm6O8OftPqq9lcKGJyCCw":{"uri":"/melonJS/docs/melonjs/input/KEY.html#B"},"_jXtmvMYmXZhtF9PzYrof":{"uri":"/melonJS/docs/melonjs/input/KEY.html#BACK_SLASH"},"JqqlwqRELqtYQfUE7g5v8":{"uri":"/melonJS/docs/melonjs/input/KEY.html#C"},"S0DOkJam4vjhFOX7Ei5V3":{"uri":"/melonJS/docs/melonjs/input/KEY.html#CAPS_LOCK"},"Q6szdrDFFctjwujPzddtO":{"uri":"/melonJS/docs/melonjs/input/KEY.html#CLOSE_BRACKET"},"UAbav0f3gvUDfRAP0KgHJ":{"uri":"/melonJS/docs/melonjs/input/KEY.html#COMMA"},"b4uWqKWk42klmmdQS0X79":{"uri":"/melonJS/docs/melonjs/input/KEY.html#CTRL"},"EF4jVpsqr3Ca-1YKlLAi6":{"uri":"/melonJS/docs/melonjs/input/KEY.html#D"},"0uWc6EqsYFOae58oadvch":{"uri":"/melonJS/docs/melonjs/input/KEY.html#DECIMAL"},"HyCpLrtAuHRL-FNUKepVV":{"uri":"/melonJS/docs/melonjs/input/KEY.html#DELETE"},"LVL6PKeYyZwZxglsh9Gkp":{"uri":"/melonJS/docs/melonjs/input/KEY.html#DIVIDE"},"CDJ08iVDyUyhnY74UVF8l":{"uri":"/melonJS/docs/melonjs/input/KEY.html#DOWN"},"6y8p_3c3q982xrpp-J6yV":{"uri":"/melonJS/docs/melonjs/input/KEY.html#E"},"ayX4LyxXhTNt5t-7XHO8l":{"uri":"/melonJS/docs/melonjs/input/KEY.html#END"},"ZvfZDxga3RNwRE3DihXUr":{"uri":"/melonJS/docs/melonjs/input/KEY.html#ENTER"},"poBaUwdH2M8aVcbYVXgQ1":{"uri":"/melonJS/docs/melonjs/input/KEY.html#ESC"},"YiRMW_Q3rsyqcrRWpYWBO":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F"},"ceapFI3JE0vw0mqiuZ5RU":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F1"},"INPm6JeQwpIUFP6GlwiYa":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F10"},"ceyo1JLz5cL2506lJDG52":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F11"},"z_VyP8M5dqC9GWVJwqtIM":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F12"},"AdHqcKYNuVLFiqTaakK1w":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F2"},"0lmT2kW1RVJxTkPoe0R8e":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F3"},"PEfQ683ED0kaFSEtQfOGc":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F4"},"95ZinHKXG-xFxPlzEMXca":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F5"},"wnicB65a6Kyw0ROuuUgXq":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F6"},"IJJzZTZeT71VAGDudmw95":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F7"},"yezuM17bF0hFlFKr1S8gz":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F8"},"UsnH4Vi5qFrWzObL496_M":{"uri":"/melonJS/docs/melonjs/input/KEY.html#F9"},"vSmRio__121pWpVcrNTav":{"uri":"/melonJS/docs/melonjs/input/KEY.html#FORWAND_SLASH"},"oDLEMH4a8eQ8_EsQdOeL3":{"uri":"/melonJS/docs/melonjs/input/KEY.html#G"},"cOWe1VHWd9nz6dclGbcbm":{"uri":"/melonJS/docs/melonjs/input/KEY.html#GRAVE_ACCENT"},"qqWbpJcc8Mo5SOV1wzmCH":{"uri":"/melonJS/docs/melonjs/input/KEY.html#H"},"9zIdyglCXj3MUL8SuH4ae":{"uri":"/melonJS/docs/melonjs/input/KEY.html#HOME"},"g2jbfpLezzVq2ydRESAvY":{"uri":"/melonJS/docs/melonjs/input/KEY.html#I"},"7pA9_hWyt9aevYeNDo5LL":{"uri":"/melonJS/docs/melonjs/input/KEY.html#INSERT"},"BKEf0GyzoDL4Zf1k0oMo5":{"uri":"/melonJS/docs/melonjs/input/KEY.html#J"},"F0vkoyhX3zVObP7A1rrA3":{"uri":"/melonJS/docs/melonjs/input/KEY.html#K"},"mIgV2bOl2q170flAXoSYb":{"uri":"/melonJS/docs/melonjs/input/KEY.html#L"},"kqwGRFFD4h0GCGsqm-sYk":{"uri":"/melonJS/docs/melonjs/input/KEY.html#LEFT"},"Hcpxd3JpGOOc2-Y0FeeeQ":{"uri":"/melonJS/docs/melonjs/input/KEY.html#M"},"Het1VVC_822c29rrrm2ij":{"uri":"/melonJS/docs/melonjs/input/KEY.html#MINUS"},"BH_khUO-lwfk4sJiYAQsD":{"uri":"/melonJS/docs/melonjs/input/KEY.html#MULTIPLY"},"6injZoPP6pivnHpyH6jOZ":{"uri":"/melonJS/docs/melonjs/input/KEY.html#N"},"pvSOy5Tq85Hh6rCGzeK4l":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM_LOCK"},"CT0dE7tS4JBdz3r_u1rEa":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM0"},"8awajR_Bd3sRYBPv-j1AY":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM1"},"F2TJc2M_3EnrUn41t5yVJ":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM2"},"GXcZFr1FWZEshgrlpYRlS":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM3"},"_ayNyPA1Vi1Zq5CBLiBe4":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM4"},"quLO9cft5wwAUn-Fglg8Q":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM5"},"xBQ9-_ADnHYwk_2vjeCio":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM6"},"gXBvj8SykmMmH5LIvkxMt":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM7"},"i62054jUZGOen2JA9nWyo":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM8"},"yj1V6wGGtJoDetQ2NOOKq":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUM9"},"ohVLARaWwwP7iwI-oX2xS":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD0"},"vsqcjmY7SewxDV4reYrar":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD1"},"KC3DJk3Qfz8qndoMK2928":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD2"},"PjQ-sBJ_x978OcoEszAcY":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD3"},"ZpjkTSETaBQej1l6tpPoL":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD4"},"8db2dUd0NzInqfIw0k1--":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD5"},"jQusCtHS3r07B3a1QBgXA":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD6"},"H60OomHyNwQD5mdsQX7eE":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD7"},"ZWftSNIGBV7tdT1vStD6t":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD8"},"T9-uWYOEnROctPK8bQABy":{"uri":"/melonJS/docs/melonjs/input/KEY.html#NUMPAD9"},"F1aIJjTm9YAz0rN3yt5oo":{"uri":"/melonJS/docs/melonjs/input/KEY.html#O"},"HYsu1pk4tG32DRTJ9bOIU":{"uri":"/melonJS/docs/melonjs/input/KEY.html#OPEN_BRACKET"},"3P5qfSAQuLZWM7AggHT0d":{"uri":"/melonJS/docs/melonjs/input/KEY.html#P"},"cpCn6_c1ANHuOr_7zJO1l":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PAGE_DOWN"},"nrVleGvc7W8aa9DTAjidT":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PAGE_UP"},"kbHEWV8LXbJmsNz-Nfxl9":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PAUSE"},"L-OBaPZtvzk-8fFhxqmlC":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PERIOD"},"RIuKNdXQluu07w0DYsW3z":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PLUS"},"tGdjFeK-1X2-EqFjQ1aIK":{"uri":"/melonJS/docs/melonjs/input/KEY.html#PRINT_SCREEN"},"6LDqdklqP70wd45KXrXvI":{"uri":"/melonJS/docs/melonjs/input/KEY.html#Q"},"qlPlfzqhryr4PKk9aHD_u":{"uri":"/melonJS/docs/melonjs/input/KEY.html#R"},"EWA-yvS9RpBXZv5A1cJ6Z":{"uri":"/melonJS/docs/melonjs/input/KEY.html#RIGHT"},"6xHPdL8J4E_qcqs1iyMBW":{"uri":"/melonJS/docs/melonjs/input/KEY.html#S"},"jU8LV4dUhw1e2_mHLkILV":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SCROLL_LOCK"},"Rk9WBf90LnXZTr7Fb9fnu":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SEMICOLON"},"t_Wah4yzMMud4GJKKEMrO":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SHIFT"},"LLN_DEjZF89ucZ4ZI9YPn":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SINGLE_QUOTE"},"JVHofBgnvnsqqSmE45Ojj":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SPACE"},"_7iD7KI_LglDCPp9fqX52":{"uri":"/melonJS/docs/melonjs/input/KEY.html#SUBSTRACT"},"PUweKB3BBowKEOr15-V-V":{"uri":"/melonJS/docs/melonjs/input/KEY.html#T"},"-JUoWv_gHs7pMDJcZPDHg":{"uri":"/melonJS/docs/melonjs/input/KEY.html#TAB"},"gPOYYgA-xbDIEMDGpJwJ8":{"uri":"/melonJS/docs/melonjs/input/KEY.html#TILDE"},"DaoERQl3f0yndj6wl8R_l":{"uri":"/melonJS/docs/melonjs/input/KEY.html#U"},"Wv6BrL9aOd-zOjGWKusrB":{"uri":"/melonJS/docs/melonjs/input/KEY.html#UP"},"yKhV1XgrpvJiFEeNM9ldE":{"uri":"/melonJS/docs/melonjs/input/KEY.html#V"},"IKTcF_iBq7fo_mTiUwKic":{"uri":"/melonJS/docs/melonjs/input/KEY.html#W"},"E5ZjSJEhFeoOS7ZsUvRtW":{"uri":"/melonJS/docs/melonjs/input/KEY.html#WINDOW_KEY"},"9k8puqVfM7C8GUX9eGVU4":{"uri":"/melonJS/docs/melonjs/input/KEY.html#X"},"DjGinpH4VgXgsCg3uXbdL":{"uri":"/melonJS/docs/melonjs/input/KEY.html#Y"},"LO9VbpqXkKe4dofAUWy4j":{"uri":"/melonJS/docs/melonjs/input/KEY.html#Z"},"9lgWZL271A1l2qZ76FmS9":{"uri":"/melonJS/docs/melonjs/input.html#keyBoardEventTarget"},"D_WnnV3tTQ9JOnf_awPr6":{"uri":"/melonJS/docs/melonjs/input.html#locked"},"w6kjjeS0rG_DIImLsw2IH":{"uri":"/melonJS/docs/melonjs/input.html#pointer"},"Du9v-gdcmZm2hu04SIf5c":{"uri":"/melonJS/docs/melonjs/input.html#pointerEventTarget"},"F_72zjU9_hid1TNjR0Z1j":{"uri":"/melonJS/docs/melonjs/input.html#preventDefault"},"7mAsRPmDkaotOJy6ABiZI":{"uri":"/melonJS/docs/melonjs/input.html#setGamepadMapping"},"aqbJRr8ttfHpOpfPAVfWh":{"uri":"/melonJS/docs/melonjs/input.html#throttlingInterval"},"9wV2ZoppFWUXxtydiwqrn":{"uri":"/melonJS/docs/melonjs/input/bindGamepad.html"},"RdQPALmifBUabucUQOwq9":{"uri":"/melonJS/docs/melonjs/input/bindKey.html"},"0lTli-9MMjwfbpzQ3W-Rm":{"uri":"/melonJS/docs/melonjs/input/bindPointer.html"},"piPfGmlUw0V-3bQxVNh-A":{"uri":"/melonJS/docs/melonjs/input/exitPointerLock.html"},"pM_HDmwUDYsKHQf_iRuTk":{"uri":"/melonJS/docs/melonjs/input/getBindingKey.html"},"ftZ2-aUwXhNGibEX72cF4":{"uri":"/melonJS/docs/melonjs/input/globalToLocal.html"},"PndVJvCePlodnBY8ArGbM":{"uri":"/melonJS/docs/melonjs/input/hasActiveEvents.html"},"OYHQYTAciA8hLmiGTj27Z":{"uri":"/melonJS/docs/melonjs/input/hasRegisteredEvents.html"},"8eIHFIoBbcF6E8_MBYPP3":{"uri":"/melonJS/docs/melonjs/input/isKeyPressed.html"},"a6hHDYwE9AVEofqUVobXr":{"uri":"/melonJS/docs/melonjs/input/keyStatus.html"},"wb6hNPVb7JEkPkwOiq7OW":{"uri":"/melonJS/docs/melonjs/input/registerPointerEvent.html"},"BEAnJn2Hq2novt64SsNbn":{"uri":"/melonJS/docs/melonjs/input/releaseAllPointerEvents.html"},"gcFasH2zEi8V9E6sAtOY2":{"uri":"/melonJS/docs/melonjs/input/releasePointerEvent.html"},"p6qvU1v5r6mpnRrlvETm1":{"uri":"/melonJS/docs/melonjs/input/requestPointerLock.html"},"KsZJatMOWFyVq1Zxya5aL":{"uri":"/melonJS/docs/melonjs/input/setGamepadDeadzone.html"},"L_wcfqWZMbCHjSqxs_0uw":{"uri":"/melonJS/docs/melonjs/input/setTouchAction.html"},"rjFhWuYv5f_B5qwPJ7nmR":{"uri":"/melonJS/docs/melonjs/input/triggerKeyEvent.html"},"2WwClRJTOnnvzI84I4vrV":{"uri":"/melonJS/docs/melonjs/input/unbindGamepad.html"},"LsbCuFAf3HWwDsaBPWcd7":{"uri":"/melonJS/docs/melonjs/input/unbindKey.html"},"tqHeg77FFgCqwpHPGxB4m":{"uri":"/melonJS/docs/melonjs/input/unbindPointer.html"},"oHAhpj4b1Wy3Nlp9y72o0":{"uri":"/melonJS/docs/melonjs/input/unlockKey.html"},"CSf_l3mpYBmiPNnDHV6aJ":{"uri":"/melonJS/docs/melonjs/level.html"},"sfZ7D6phTmU-Xs08dc3cF":{"uri":"/melonJS/docs/melonjs/level.html#add"},"bJJ0sQa3Dh2jLOYP-GGxr":{"uri":"/melonJS/docs/melonjs/level.html#getCurrentLevel"},"m3XF3Of4d1V_GZNnauG59":{"uri":"/melonJS/docs/melonjs/level.html#getCurrentLevelId"},"pw2ag6VD6lc5BiTxFURjQ":{"uri":"/melonJS/docs/melonjs/level.html#levelCount"},"OYUmN6TS9rpYbvZPKiHl8":{"uri":"/melonJS/docs/melonjs/level.html#load"},"tPM_p-lQJzgoX2rqHD9nM":{"uri":"/melonJS/docs/melonjs/level.html#next"},"ifrEPgcMGyI1aErkD3teq":{"uri":"/melonJS/docs/melonjs/level.html#previous"},"71UHr5urTfu9ug5pUT8oL":{"uri":"/melonJS/docs/melonjs/level.html#reload"},"KcAnEH24vA_5_qazA1XlC":{"uri":"/melonJS/docs/melonjs/loader.html"},"OEF5DjYzfOOcJxzyKHre0":{"uri":"/melonJS/docs/melonjs/loader/Asset.html"},"Sgnxmi_ekvRxwYsbSus0K":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#data"},"BC4vA7Q6olaaeygQ-E67x":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#name"},"Vt8dQP2k6JIKfv9KtkfcQ":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#src"},"oGflV-vc2jGuKtIUsIVAp":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#stream"},"tMoD1yC1VBok2V8bu8tpn":{"uri":"/melonJS/docs/melonjs/loader/Asset.html#type"},"cmn_KkmbyI8Qfc6Fb2Xun":{"uri":"/melonJS/docs/melonjs/loader.html#crossOrigin"},"HxZBC8DWpPUh1wTk66pL9":{"uri":"/melonJS/docs/melonjs/loader.html#onError"},"cKGey5oKMDJPH_bTJwPBN":{"uri":"/melonJS/docs/melonjs/loader.html#onload"},"0GDRCLM-rQL_NmPBWbv_g":{"uri":"/melonJS/docs/melonjs/loader.html#onProgress"},"8LICi_yU6TQR8ymjjPbUh":{"uri":"/melonJS/docs/melonjs/loader.html#withCredentials"},"OZmbUnleXKhXTlCb8QnIH":{"uri":"/melonJS/docs/melonjs/loader/getBinary.html"},"fR7IQC0NP8Xb62VIgvlkq":{"uri":"/melonJS/docs/melonjs/loader/getImage.html"},"2mRtI9loOrUcaDd6-GLnu":{"uri":"/melonJS/docs/melonjs/loader/getJSON.html"},"AsQqsk4mDV1Hya-8xRTxz":{"uri":"/melonJS/docs/melonjs/loader/getTMX.html"},"2JvOZOGWt4ZwKz_dXOBDk":{"uri":"/melonJS/docs/melonjs/loader/load.html"},"K22P6ZRXZ7hegCcvGl9Hb":{"uri":"/melonJS/docs/melonjs/loader/preload.html"},"kSR9veE1C3FB3b1gG5Gz5":{"uri":"/melonJS/docs/melonjs/loader/reload.html"},"JQTzIk-gL0PjOqkCkQolW":{"uri":"/melonJS/docs/melonjs/loader/setBaseURL.html"},"ozLM5HUiEy1ehq2Y0kFjz":{"uri":"/melonJS/docs/melonjs/loader/setParser.html"},"nekx2m5qOkxfpZ7cHBEWn":{"uri":"/melonJS/docs/melonjs/loader/unload.html"},"enTq_URrH-Gycr0lzMTPT":{"uri":"/melonJS/docs/melonjs/loader/unloadAll.html"},"kh3BgQ_YqaKaoPE2jPz9n":{"uri":"/melonJS/docs/melonjs/Math.html"},"2_c8WOW88zFszZQFFjWPa":{"uri":"/melonJS/docs/melonjs/Math.html#DEG_TO_RAD"},"hZ-W828jdeGPz2c0i6YFU":{"uri":"/melonJS/docs/melonjs/Math.html#EPSILON"},"9lCcExEaW-tsxNR3wXlkE":{"uri":"/melonJS/docs/melonjs/Math.html#ETA"},"zRfJGfrNVdKCidiJJbQhq":{"uri":"/melonJS/docs/melonjs/Math.html#RAD_TO_DEG"},"18lVueCxzJUn1uuiCdPhN":{"uri":"/melonJS/docs/melonjs/Math.html#TAU"},"PemZIBM5pRFCv95Gn9Txz":{"uri":"/melonJS/docs/melonjs/Math/clamp.html"},"xdRlfKoV9PNobi-Yy3PLG":{"uri":"/melonJS/docs/melonjs/Math/degToRad.html"},"lxCfxvDJSCiAdOWX2iyIf":{"uri":"/melonJS/docs/melonjs/Math/isPowerOfTwo.html"},"usJiLemTZVGIJ9rOL-Pyy":{"uri":"/melonJS/docs/melonjs/Math/nextPowerOfTwo.html"},"s8Hxaw-cpznrlfzK4A-M6":{"uri":"/melonJS/docs/melonjs/Math/radToDeg.html"},"fmaJLFSJYF3fiCfDXr5dr":{"uri":"/melonJS/docs/melonjs/Math/random.html"},"d4dfUPTgEp4dBH27yI-5i":{"uri":"/melonJS/docs/melonjs/Math/randomFloat.html"},"7-g2GByo2opr4HYrjpudC":{"uri":"/melonJS/docs/melonjs/Math/round.html"},"WHgkgxg71viBQBw0j7XRd":{"uri":"/melonJS/docs/melonjs/Math/toBeCloseTo.html"},"ZaRhIFCXT_IVEq2zJ-d8P":{"uri":"/melonJS/docs/melonjs/Math/weightedRandom.html"},"DX0HEXNW1uHFl0JX2NxQ2":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html"},"dWDD5EfsT--rKBWtJAuAn":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#angle"},"qx0vu0FsRjoCSi5gs5uoj":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#angleVariation"},"NMzSjEz1ea7Zkpm4h4GdK":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#blendMode"},"tx6dEJPWjd1P1QsCMalDP":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#duration"},"S5O4tvxkVXZlVRUdxOWXP":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#floating"},"n6lFCXz9GZ7p0KORXM6cG":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#followTrajectory"},"HWWJ_yYRgntdx683XpDqJ":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#framesToSkip"},"lTgWJsk-Hcb_o15_AjwYr":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#frequency"},"AmjGqZXp3tyT5un49c6I8":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#gravity"},"LJlmVbH-GFTmz9E8vcub3":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#height"},"0_jiC5aV8qXJwgmaa6oaL":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#image"},"Q7XL0CHgh4E84RwQZyfqQ":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxEndScale"},"qjJI7BxYt93mCcZxKtJ9x":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxLife"},"1911wiUXoCey9TnT2q0gI":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxParticles"},"5x0Iu4XJ3HiNeU7zVFQc0":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxRotation"},"gMA7EEio5io7jwfvkpkkb":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#maxStartScale"},"FK0GBOvcmnwJTEQkiCo81":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#minEndScale"},"yIf894Z_TZLrzsafUpMtj":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#minLife"},"MR5CZcjVM1QD_n71b2OtT":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#minRotation"},"v_IM5wt3xSzzxkc0d3xI9":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#minStartScale"},"p6duHicBM7XeFReke6itP":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#onlyInViewport"},"U4mEATiK7r_mUgWjbevHd":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#speed"},"eFSipLoM8w-vnHODyOyrt":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#speedVariation"},"yUH7G0VGSMU8pwgaV6NAf":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#textureAdditive"},"GSvzz0NfX6MiwmG6xFUNT":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#textureSize"},"g5g1_onRvUZt8pfgTNuE5":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#tint"},"9RFNeBNktlqgH_Ck_l93A":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#totalParticles"},"0uv4XrzbippqQ5DHELxEM":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#width"},"hndhKReXFNJLHa6jCqelt":{"uri":"/melonJS/docs/melonjs/ParticleEmitterSettings.html#wind"},"x9Fwx64EAsa5i6DboRP9P":{"uri":"/melonJS/docs/melonjs/plugin.html"},"XI6UP8hbm8aJHgKrY63G5":{"uri":"/melonJS/docs/melonjs/plugin/Base.html"},"4GxQr6Qx6gJeiEwIddDKb":{"uri":"/melonJS/docs/melonjs/plugin/Base.html#app"},"u09VC_A5AQ5N-HUTMd2pk":{"uri":"/melonJS/docs/melonjs/plugin/Base.html#version"},"cx0aoPgS4eMtXL63yDGKX":{"uri":"/melonJS/docs/melonjs/plugin/BasePlugin.html"},"I5Y0SXe6DqxYTJfP5lTRG":{"uri":"/melonJS/docs/melonjs/plugin/BasePlugin.html#app"},"tbokJiE314jOz3ZNBJVkO":{"uri":"/melonJS/docs/melonjs/plugin/BasePlugin.html#version"},"eu8B5Ee6kYNgZAYoTbpUp":{"uri":"/melonJS/docs/melonjs/plugin/BasePlugin.html#constructor"},"ETnhPuNU4Krz42IR09DCD":{"uri":"/melonJS/docs/melonjs/plugin.html#cache"},"4d0cFrMhiOV1IHer79eph":{"uri":"/melonJS/docs/melonjs/plugin/get.html"},"Ulm7WSNMB91BTPexz2vtg":{"uri":"/melonJS/docs/melonjs/plugin/patch.html"},"9BjSDePUQshx7mFho-u3I":{"uri":"/melonJS/docs/melonjs/plugin/register.html"},"Rcp0ZKbipoadsn31X-M4J":{"uri":"/melonJS/docs/melonjs/pool.html"},"qU-8m7fm_HlGvgTdOm4Tt":{"uri":"/melonJS/docs/melonjs/save.html"},"zfnTGv5LL5XgyVMsjgoxM":{"uri":"/melonJS/docs/melonjs/save.html#add"},"Cx-HUYC_n4ZvAsvdCA5br":{"uri":"/melonJS/docs/melonjs/save.html#remove"},"ZtlIH4D3-Q_zkLlTA_B_6":{"uri":"/melonJS/docs/melonjs/state.html"},"864hqRpQrQUnOpxHBNUzQ":{"uri":"/melonJS/docs/melonjs/state.html#CREDITS"},"Drihek_Fni96uhogOQDHG":{"uri":"/melonJS/docs/melonjs/state.html#DEFAULT"},"idP3iGODoOj5eB7ga8idQ":{"uri":"/melonJS/docs/melonjs/state.html#GAME_END"},"OpJ_by0bUMNMUC3cL7v-P":{"uri":"/melonJS/docs/melonjs/state.html#GAMEOVER"},"fGM_334ELoZQd1jIGZZpV":{"uri":"/melonJS/docs/melonjs/state.html#LOADING"},"WbQ3PJ5CSl7lDxRjx1Zmy":{"uri":"/melonJS/docs/melonjs/state.html#MENU"},"eN-WTXeKIdzAcqDEY8Fey":{"uri":"/melonJS/docs/melonjs/state.html#PLAY"},"II4jkYcu2getLa_MqLnUY":{"uri":"/melonJS/docs/melonjs/state.html#READY"},"5QOD3Pa4UbHitH5qg6rMR":{"uri":"/melonJS/docs/melonjs/state.html#SCORE"},"hJbv8U2q9Kzas-ApVup8U":{"uri":"/melonJS/docs/melonjs/state.html#SETTINGS"},"xwUosCovhmBZ6Chme8wc-":{"uri":"/melonJS/docs/melonjs/state.html#USER"},"Xf0y1YCguydGUD4HtRbDH":{"uri":"/melonJS/docs/melonjs/state.html#change"},"tmqRuhhcJvdXIxfJ2oatv":{"uri":"/melonJS/docs/melonjs/state.html#current"},"shdi0pXIPpU19fIrqxTvd":{"uri":"/melonJS/docs/melonjs/state.html#isCurrent"},"_1BGMV3P7xBR4EMcAgaqp":{"uri":"/melonJS/docs/melonjs/state.html#isPaused"},"oa6VmB1POwL84CUb2fIh1":{"uri":"/melonJS/docs/melonjs/state.html#isRunning"},"BKnqxQWVBxsnXFv89UTWu":{"uri":"/melonJS/docs/melonjs/state.html#pause"},"MEYHspf-RYeaiQF6rFTPI":{"uri":"/melonJS/docs/melonjs/state.html#restart"},"lax8kfG059SsWRTyFi6MU":{"uri":"/melonJS/docs/melonjs/state.html#resume"},"fxSGoqBA-ob9m9yZO833O":{"uri":"/melonJS/docs/melonjs/state.html#set"},"DoiBKizVnpSQnn08nE8qe":{"uri":"/melonJS/docs/melonjs/state.html#set_"},"FiTwnO2E0sRMBTcVvIs9u":{"uri":"/melonJS/docs/melonjs/state.html#setTransition"},"qCXKcohl66Y2yxx06TTTp":{"uri":"/melonJS/docs/melonjs/state.html#stop"},"NbxrUKDVToRX2a66s560j":{"uri":"/melonJS/docs/melonjs/state.html#transition"},"YFpgAg6fczHv752gEzYEE":{"uri":"/melonJS/docs/melonjs/timer.html"},"mSf6cUCRKclkelG3FRu7d":{"uri":"/melonJS/docs/melonjs/TMXUtils.html"},"GYugOYP5gYT18LdsFTJSD":{"uri":"/melonJS/docs/melonjs/TMXUtils/applyTMXProperties.html"},"Q62E3Mf-KR5A1hje0wd1c":{"uri":"/melonJS/docs/melonjs/TMXUtils/decode.html"},"dZ2zqYOb6mgJshKOaQSlp":{"uri":"/melonJS/docs/melonjs/TMXUtils/decodeBase64AsArray.html"},"_rsfNl-42P1Y_0XJcdTNS":{"uri":"/melonJS/docs/melonjs/TMXUtils/decodeCSV.html"},"Mb1AZGVLToWPd8e_GA0EE":{"uri":"/melonJS/docs/melonjs/TMXUtils/decompress.html"},"CPm8ATmTtg_I5SeS1TjfM":{"uri":"/melonJS/docs/melonjs/TMXUtils/parse.html"},"oROONEdKYd_Dvv3uKIDUP":{"uri":"/melonJS/docs/melonjs/TMXUtils/setInflateFunction.html"},"QhIMxcZtrUWdywKLOycug":{"uri":"/melonJS/docs/melonjs/utils.html"},"uSNrQe8M4UJnafh3uNXot":{"uri":"/melonJS/docs/melonjs/utils/agent.html"},"Ax7rf8QjCOTxxdjYh2_Qk":{"uri":"/melonJS/docs/melonjs/utils/agent/prefixed.html"},"oqETMH6ZMc8FG_6DzfqYY":{"uri":"/melonJS/docs/melonjs/utils/agent/setPrefixed.html"},"E1MyEDOmF9GcHc_r0yIQ5":{"uri":"/melonJS/docs/melonjs/utils/array.html"},"FwZxIEuEYsVUPD030rNpr":{"uri":"/melonJS/docs/melonjs/utils/array/random.html"},"7y3_qThTNGI5za38kaoho":{"uri":"/melonJS/docs/melonjs/utils/array/remove.html"},"JlhOcfcECRDeGuuTj1L8A":{"uri":"/melonJS/docs/melonjs/utils/array/weightedRandom.html"},"5ojuSverhzGoU0BWXCz6V":{"uri":"/melonJS/docs/melonjs/utils/file.html"},"NDpZEgmm6lPZQypPptv8R":{"uri":"/melonJS/docs/melonjs/utils/file/getBasename.html"},"f7IeADczDMS0XAfBRYpdn":{"uri":"/melonJS/docs/melonjs/utils/file/getExtension.html"},"LBl0o-BF-n0jpTdpcy-l_":{"uri":"/melonJS/docs/melonjs/utils/file/getPath.html"},"49FOwC1IXc6f9ZBNXg4la":{"uri":"/melonJS/docs/melonjs/utils/function.html"},"xB14QBWzwhb__TdpFrEg9":{"uri":"/melonJS/docs/melonjs/utils/function/defer.html"},"iF_AsMi-jb_6qpqED2wga":{"uri":"/melonJS/docs/melonjs/utils/function/throttle.html"},"tOcVxLxavAAJ-nbd_6NiY":{"uri":"/melonJS/docs/melonjs/utils/string.html"},"FWnV66be-KOpHAecGO9b6":{"uri":"/melonJS/docs/melonjs/utils/string/capitalize.html"},"5KBhgXNOOFl96l7EEDB1h":{"uri":"/melonJS/docs/melonjs/utils/string/isBoolean.html"},"Lsyb4L6S4SkTN7d5NIW5i":{"uri":"/melonJS/docs/melonjs/utils/string/isDataUrl.html"},"d4zZQGFsWsfb8rCf9Jgbx":{"uri":"/melonJS/docs/melonjs/utils/string/isNumeric.html"},"ZOe5NsBN8D09nInooo3AN":{"uri":"/melonJS/docs/melonjs/utils/string/toHex.html"},"s89UR1wuK3DKBsK8i2jlE":{"uri":"/melonJS/docs/melonjs/utils/checkVersion.html"},"fqSDboD5pq-Hag8Kbh1OZ":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html"},"rr7pg_oYI-UyNlyovjzvs":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#debug"},"kughCLrYggMd4Av2SGAjT":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#debugToggleKey"},"lyFCSslAIZqKQwEZx38t1":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#hitbox"},"juMMWPHDrdQNl_tuq7cTs":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#quadtree"},"FIXr8pI8EziQqcOUZ3Hdy":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#velocity"},"3GHfd0-zIu5EYkED_sHdr":{"uri":"/melonJS/docs/melonjs/utils/getUriFragment.html#webgl"},"U1WP-2_h8ECCawp3twKp4":{"uri":"/melonJS/docs/melonjs/video.html"},"DdKs4SGEUS25Hb_S9YA6d":{"uri":"/melonJS/docs/melonjs/video.html#renderer"},"Z-T7SR9tPwfu780m9UpsL":{"uri":"/melonJS/docs/melonjs/video/createCanvas.html"},"nv8KYuINm1mAi-FhWVY5M":{"uri":"/melonJS/docs/melonjs/video/getParent.html"},"OTGsTqStt4s-tFHT2Q_EM":{"uri":"/melonJS/docs/melonjs/video/init.html"},"c-PnF5PJ7WVhvtHql6Skx":{"uri":"/melonJS/docs/melonjs/Application.html"},"lmUjeJRafkeIvehAT4b_M":{"uri":"/melonJS/docs/melonjs/Application/Settings.html"},"7ijG1WrmEj9XM5U1FZM15":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#antiAlias"},"Df96zvJIZJIy9tltFts4Z":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#consoleHeader"},"CtDLWZuFgdMnogFWnRrHU":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#depthTest"},"_7Rm9MJ8wXaqX3WxoquaR":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#parent"},"-Q4xxCihnn5dZMhtYR7si":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#powerPreference"},"T4ei9NxoBn6vPxKqSNWRc":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#preferWebGL1"},"ZAIGYeqVZPM6Mw5f40cVj":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#renderer"},"0kBEp9vL1ostRYG9CGz53":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#scale"},"lZdoe-rDvSEgNKSM6KtWD":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#scaleMethod"},"4YdrvvPVsLoz4-ATrANR2":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#scaleTarget"},"G1CG0VN5HFTqq5gSxkYKp":{"uri":"/melonJS/docs/melonjs/Application/Settings.html#transparent"},"D73qhUSrLwH8OE7ZShu9E":{"uri":"/melonJS/docs/melonjs/Application.html#isInitialized"},"ntBkgYkamdu2KT0lxDJfm":{"uri":"/melonJS/docs/melonjs/Application.html#lastUpdate"},"0DUQH4bsT1rPboD08jYhl":{"uri":"/melonJS/docs/melonjs/Application.html#mergeGroup"},"9Mett_EDTYXDc0TIl1wOp":{"uri":"/melonJS/docs/melonjs/Application.html#parentElement"},"8MRdgG2G3JRkqZJ9pXVKr":{"uri":"/melonJS/docs/melonjs/Application.html#pauseOnBlur"},"5ZCyOBFozKBliOgjlcgnn":{"uri":"/melonJS/docs/melonjs/Application.html#renderer"},"OfjjVjK47pQEhfssw1sYv":{"uri":"/melonJS/docs/melonjs/Application.html#resumeOnFocus"},"UarHBJ3reYqEAzH_w4t83":{"uri":"/melonJS/docs/melonjs/Application.html#settings"},"SYH3qhcseset3kBleDoZO":{"uri":"/melonJS/docs/melonjs/Application.html#sortOn"},"9tzI4U_7JznDZI34NOHjt":{"uri":"/melonJS/docs/melonjs/Application.html#stopOnBlur"},"y3xdnx6Y6sJVg0ZBBQoLg":{"uri":"/melonJS/docs/melonjs/Application.html#viewport"},"U3DC7StBWRZG_srdF0sDU":{"uri":"/melonJS/docs/melonjs/Application.html#world"},"yYCxNKVkCXctelMair7nW":{"uri":"/melonJS/docs/melonjs/Application.html#constructor"},"tbBUPwk5AqA4-EcpWrm3R":{"uri":"/melonJS/docs/melonjs/Application.html#draw"},"t9ojp-P-8zz_B72WVxMJo":{"uri":"/melonJS/docs/melonjs/Application.html#getParentElement"},"ZIQR2Yckp_9K0hAghQC9I":{"uri":"/melonJS/docs/melonjs/Application.html#init"},"BheN2-y0P1duskCKPCExN":{"uri":"/melonJS/docs/melonjs/Application.html#onLevelLoaded"},"fC3yWyRD_idq2yXpiVLOx":{"uri":"/melonJS/docs/melonjs/Application.html#repaint"},"UAePcJKnEqZYH6YMNuwKs":{"uri":"/melonJS/docs/melonjs/Application.html#reset"},"lZxboviJEvQkIz05AQRWu":{"uri":"/melonJS/docs/melonjs/Application.html#update"},"FugYQinjxIs6mzWuRcLwL":{"uri":"/melonJS/docs/melonjs/Application.html#updateFrameRate"},"Ei2ZCAaX4isemVfKHshmi":{"uri":"/melonJS/docs/melonjs/BitmapText.html"},"JDQZVfUu63KxbBSzYaRv7":{"uri":"/melonJS/docs/melonjs/BitmapText.html#alpha"},"R88DhquyN9v2peLFwJsvv":{"uri":"/melonJS/docs/melonjs/BitmapText.html#alwaysUpdate"},"T1UCwfWvQw2R9n9cfakVz":{"uri":"/melonJS/docs/melonjs/BitmapText.html#ancestor"},"6iwHqOmHw0dKxIAzBVTiw":{"uri":"/melonJS/docs/melonjs/BitmapText.html#anchorPoint"},"TaBnmT5HVqfTO4YVo6rfk":{"uri":"/melonJS/docs/melonjs/BitmapText.html#autoTransform"},"febPmdD2M0qpEVD_zCGzt":{"uri":"/melonJS/docs/melonjs/BitmapText.html#blendMode"},"-YDXv3S7QhLKgtyVYu6Mn":{"uri":"/melonJS/docs/melonjs/BitmapText.html#body"},"_P63V_6S7AZqykFM0KD9T":{"uri":"/melonJS/docs/melonjs/BitmapText.html#bottom"},"BkdJYHUThA1nrdWJ6yRv8":{"uri":"/melonJS/docs/melonjs/BitmapText.html#centerX"},"Q3yVlxdFvwQbjJdq7E9qE":{"uri":"/melonJS/docs/melonjs/BitmapText.html#centerY"},"Zk7P7LmZwArLLopTAhYSq":{"uri":"/melonJS/docs/melonjs/BitmapText.html#currentTransform"},"J0qtYplVbNCJI2E_94uVQ":{"uri":"/melonJS/docs/melonjs/BitmapText.html#depth"},"mEb66gIxbVxduEj_UVMS6":{"uri":"/melonJS/docs/melonjs/BitmapText.html#fillStyle"},"y4e98_2DTXiJ_1c6WQa9i":{"uri":"/melonJS/docs/melonjs/BitmapText.html#floating"},"Xt6OwumzjaTlMk3KogD8D":{"uri":"/melonJS/docs/melonjs/BitmapText.html#GUID"},"XKYXQ0o4Eeez2TSQl_Vfw":{"uri":"/melonJS/docs/melonjs/BitmapText.html#height"},"L0bGHQvIAQJy_jr2oIjND":{"uri":"/melonJS/docs/melonjs/BitmapText.html#inViewport"},"9PjA_ecfIL0sWeBG2EJ3e":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isDirty"},"8AdACuiL86feEA4pgt6_Y":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isFlippedX"},"45_prJLYcK7jOF9_kD5HJ":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isFlippedY"},"k42BBW5sfWrFLo-2LZjGY":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isFloating"},"B1U6Wm9EzKyjzGDWBG5Xk":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isKinematic"},"xGKFT_SVKdl7ahcD0OF1k":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isPersistent"},"jfA9wua7ZZJET7d1iwoDq":{"uri":"/melonJS/docs/melonjs/BitmapText.html#left"},"213uohVdVdae5S0_z9ETe":{"uri":"/melonJS/docs/melonjs/BitmapText.html#lineHeight"},"KXFpQ4GvdvZTmuO0cygiV":{"uri":"/melonJS/docs/melonjs/BitmapText.html#mask"},"iQxSruoqAkjmrOwT6MszZ":{"uri":"/melonJS/docs/melonjs/BitmapText.html#name"},"UHX20Sq53NJqOiYFIGzwH":{"uri":"/melonJS/docs/melonjs/BitmapText.html#onVisibilityChange"},"RxrIi6TTfv8TJ5IKfiMVF":{"uri":"/melonJS/docs/melonjs/BitmapText.html#parentApp"},"m8LUg8aIrt3UUN__9Nv00":{"uri":"/melonJS/docs/melonjs/BitmapText.html#points"},"c8EXZsNOJhh0_QG4mWw3e":{"uri":"/melonJS/docs/melonjs/BitmapText.html#pos"},"-0JmYENt5kN14UbiNmd9B":{"uri":"/melonJS/docs/melonjs/BitmapText.html#right"},"7l0hNUCqFQ8S1juB8V5-U":{"uri":"/melonJS/docs/melonjs/BitmapText.html#shader"},"0kT2-jbM4LCBiolyLnCPH":{"uri":"/melonJS/docs/melonjs/BitmapText.html#textAlign"},"zMSTqOT3ZO8MYEcUL4_lb":{"uri":"/melonJS/docs/melonjs/BitmapText.html#textBaseline"},"INtIaIZ31oNRUlV7xTW2s":{"uri":"/melonJS/docs/melonjs/BitmapText.html#tint"},"i2KtixIjoaBnTblbIy680":{"uri":"/melonJS/docs/melonjs/BitmapText.html#top"},"mKXYBeSc6pR4UZJwFLg74":{"uri":"/melonJS/docs/melonjs/BitmapText.html#type"},"0qAJ5exlsbtQh7QHCH_Tc":{"uri":"/melonJS/docs/melonjs/BitmapText.html#updateWhenPaused"},"u_jodUOv_kQevbkLKUb2W":{"uri":"/melonJS/docs/melonjs/BitmapText.html#width"},"CgC0LIJWT3kWFZl3Fx84y":{"uri":"/melonJS/docs/melonjs/BitmapText.html#wordWrapWidth"},"-Lf-MKSf6jQFaXm7E_Oee":{"uri":"/melonJS/docs/melonjs/BitmapText.html#_text"},"BNK0pRX-HEbP4fzdWvaSC":{"uri":"/melonJS/docs/melonjs/BitmapText.html#fontData"},"lCSwjVs09ka1KjTDijkYY":{"uri":"/melonJS/docs/melonjs/BitmapText.html#fontImage"},"uFdFJDp8V0X5F9pI8Zlx1":{"uri":"/melonJS/docs/melonjs/BitmapText.html#fontScale"},"4Am0m4l6ax7AGtiYFeah8":{"uri":"/melonJS/docs/melonjs/BitmapText.html#angleTo"},"XTdb8Yj6OcAZ-F8S-wbx2":{"uri":"/melonJS/docs/melonjs/BitmapText.html#centerOn"},"gbbUr78vNWQF8yWyRTjT-":{"uri":"/melonJS/docs/melonjs/BitmapText.html#clone"},"PMwwLXQACC3xu2qAi3QGN":{"uri":"/melonJS/docs/melonjs/BitmapText.html#constructor"},"1vbxl5Sqx8QnmgdnGMx9t":{"uri":"/melonJS/docs/melonjs/BitmapText.html#contains"},"Oen2THWdxHUKqxRCgTjOk":{"uri":"/melonJS/docs/melonjs/BitmapText.html#copy"},"9HTwq2E4cngcTslqe5eif":{"uri":"/melonJS/docs/melonjs/BitmapText.html#distanceTo"},"jET-KX_B2rkQewFaOHoXs":{"uri":"/melonJS/docs/melonjs/BitmapText.html#draw"},"cgbgTml5hC8l5e3ne8_ZA":{"uri":"/melonJS/docs/melonjs/BitmapText.html#equals"},"dmPt7ojRMWmFfdZ-Wbiwn":{"uri":"/melonJS/docs/melonjs/BitmapText.html#flipX"},"VgVjVSWK5OM1KwBzEwpH9":{"uri":"/melonJS/docs/melonjs/BitmapText.html#flipY"},"-QgEA2GcYdcRAsGPhp4JB":{"uri":"/melonJS/docs/melonjs/BitmapText.html#getAbsolutePosition"},"HRffm-z_MpJBL-vvLOCZ-":{"uri":"/melonJS/docs/melonjs/BitmapText.html#getBounds"},"-8RY-BXiQZbtk16oOL19F":{"uri":"/melonJS/docs/melonjs/BitmapText.html#getIndices"},"n8uaRIfYRKG0grMsIDHcL":{"uri":"/melonJS/docs/melonjs/BitmapText.html#getOpacity"},"0XY2bZkvIM1ekbeJKBz88":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isConvex"},"CdV_0uBw59CEBUpM9Z0nT":{"uri":"/melonJS/docs/melonjs/BitmapText.html#isFinite"},"2pyntm2LkUdZYAQ1RnMB0":{"uri":"/melonJS/docs/melonjs/BitmapText.html#lookAt"},"hmcQfRgoPCYz6lx9nosIp":{"uri":"/melonJS/docs/melonjs/BitmapText.html#measureText"},"VpuM8h4tKied_H-N90Odl":{"uri":"/melonJS/docs/melonjs/BitmapText.html#onCollision"},"fVGQH_fqcelKoLDfmApTi":{"uri":"/melonJS/docs/melonjs/BitmapText.html#onDestroyEvent"},"P2j7DxSJ0sPPx-pN4NTPR":{"uri":"/melonJS/docs/melonjs/BitmapText.html#overlaps"},"3ez5NRxXEw4SqnkbSDVzI":{"uri":"/melonJS/docs/melonjs/BitmapText.html#postDraw"},"dQDSN3J0Si7rwJ-E6KA76":{"uri":"/melonJS/docs/melonjs/BitmapText.html#preDraw"},"Wbrs8JDv6VOapO-xfoiWK":{"uri":"/melonJS/docs/melonjs/BitmapText.html#recalc"},"tlPhI3d68QNQ2nwr7m6uR":{"uri":"/melonJS/docs/melonjs/BitmapText.html#resize"},"q3KIZl-nRRuk5Hli829rM":{"uri":"/melonJS/docs/melonjs/BitmapText.html#rotate"},"ymKzYVk2yuNrNWZDBju-0":{"uri":"/melonJS/docs/melonjs/BitmapText.html#scale"},"rx3NikvPKH1Ft-lcVGLrU":{"uri":"/melonJS/docs/melonjs/BitmapText.html#scaleV"},"ITyGxOFBxh7TakwEdqUrl":{"uri":"/melonJS/docs/melonjs/BitmapText.html#set"},"SZLzd0Y24gN8qJ-85-kRS":{"uri":"/melonJS/docs/melonjs/BitmapText.html#setOpacity"},"xILllh3SGny6YuGUP0TKE":{"uri":"/melonJS/docs/melonjs/BitmapText.html#setShape"},"VRj21cBqIlhSoDQIYexSv":{"uri":"/melonJS/docs/melonjs/BitmapText.html#setText"},"qDKV-z4nacxlOeDYeB8a3":{"uri":"/melonJS/docs/melonjs/BitmapText.html#setVertices"},"L-GDnuw16A0Xbkx9xJBxE":{"uri":"/melonJS/docs/melonjs/BitmapText.html#shift"},"eJsafNT5U_w26SSF_0CXU":{"uri":"/melonJS/docs/melonjs/BitmapText.html#to2d"},"Tfv0DUZNPOriB8Dd6Uq0c":{"uri":"/melonJS/docs/melonjs/BitmapText.html#toIso"},"X0z_8JaQD2gJcAHlyT0LO":{"uri":"/melonJS/docs/melonjs/BitmapText.html#toPolygon"},"mjIYwCasaxujTA5Lc_PtD":{"uri":"/melonJS/docs/melonjs/BitmapText.html#transform"},"2dADWMi2ryOr-e1C2p49W":{"uri":"/melonJS/docs/melonjs/BitmapText.html#translate"},"WYNmYdlOfWC4wLN50WTqv":{"uri":"/melonJS/docs/melonjs/BitmapText.html#union"},"roZZBxyeEw_sK5-5TJqLC":{"uri":"/melonJS/docs/melonjs/BitmapText.html#update"},"f97GbA0U60Cbgj7w5DF9f":{"uri":"/melonJS/docs/melonjs/BitmapText.html#updateBounds"},"Lvm3bdZYDXLbXixlS3m3e":{"uri":"/melonJS/docs/melonjs/BitmapText.html#onAnchorUpdate"},"U4qN62FUIdQr8F6vRakQ-":{"uri":"/melonJS/docs/melonjs/Body.html"},"FufRXaCtoYljx0S-Cvp8D":{"uri":"/melonJS/docs/melonjs/Body.html#ancestor"},"7Zs2-gj4_yBiZoOn0ZiYb":{"uri":"/melonJS/docs/melonjs/Body.html#bounce"},"ub5C26l31m3C8A9xKJoz4":{"uri":"/melonJS/docs/melonjs/Body.html#bounds"},"TZhBX-r3GhjQwJpfvBBcw":{"uri":"/melonJS/docs/melonjs/Body.html#collisionType"},"H262lzFCcp16Aho_-Tjvj":{"uri":"/melonJS/docs/melonjs/Body.html#falling"},"cIEEldp-ms-297QRGJSL5":{"uri":"/melonJS/docs/melonjs/Body.html#force"},"zLeqHZdJbmOw_PQ-qIQgP":{"uri":"/melonJS/docs/melonjs/Body.html#friction"},"SrAjn-UhgbKLwAbJy8-6E":{"uri":"/melonJS/docs/melonjs/Body.html#gravityScale"},"0bmDMxcTLH01qPyGp6nKI":{"uri":"/melonJS/docs/melonjs/Body.html#ignoreGravity"},"VlJr7COhEZwqVs5N9itM_":{"uri":"/melonJS/docs/melonjs/Body.html#isStatic"},"toUPr0f8YMXRxe8fbdDxd":{"uri":"/melonJS/docs/melonjs/Body.html#jumping"},"gZ-beAaqJHt5t2ITnWexW":{"uri":"/melonJS/docs/melonjs/Body.html#mass"},"2UsmquZn3XwLwRUvsTxeS":{"uri":"/melonJS/docs/melonjs/Body.html#maxVel"},"i8_4CnJo73Xjjcbxd5HS1":{"uri":"/melonJS/docs/melonjs/Body.html#vel"},"QhjdBPvdmWiSNSugEH5pb":{"uri":"/melonJS/docs/melonjs/Body.html#addShape"},"McwDMqkpWv7fguaLtUX0C":{"uri":"/melonJS/docs/melonjs/Body.html#addVertices"},"RbtXF46QpXKlrv8_2uXbf":{"uri":"/melonJS/docs/melonjs/Body.html#constructor"},"SQPFr39gyLya1ssojsJzg":{"uri":"/melonJS/docs/melonjs/Body.html#contains"},"ggV2lbLyEnYsh2v4FiveO":{"uri":"/melonJS/docs/melonjs/Body.html#forEach"},"RPOEp425sLIflIwAnT4as":{"uri":"/melonJS/docs/melonjs/Body.html#fromJSON"},"JKj_jJvZhXuHfgkC-d8Aq":{"uri":"/melonJS/docs/melonjs/Body.html#getBounds"},"eB5ukghH4dRJtBBLlAznH":{"uri":"/melonJS/docs/melonjs/Body.html#getShape"},"O2LFbd1iwonysRhlGS0M5":{"uri":"/melonJS/docs/melonjs/Body.html#removeShape"},"FyHxqFEviNq1lPTbrFDn3":{"uri":"/melonJS/docs/melonjs/Body.html#removeShapeAt"},"mFz_8LFGz-mXasePZcqb-":{"uri":"/melonJS/docs/melonjs/Body.html#respondToCollision"},"t4pdbBAEoe6r3wWiEm6xP":{"uri":"/melonJS/docs/melonjs/Body.html#rotate"},"Wl53KKWJUq1DLZzqqcovi":{"uri":"/melonJS/docs/melonjs/Body.html#setCollisionMask"},"S5S7DlAJwNFFiboYq02G2":{"uri":"/melonJS/docs/melonjs/Body.html#setCollisionType"},"s3tu96eP-Qj_XwZEW7qyZ":{"uri":"/melonJS/docs/melonjs/Body.html#setFriction"},"neos96HudWV9NE6W2PDoY":{"uri":"/melonJS/docs/melonjs/Body.html#setMaxVelocity"},"ylI0A65D-iVcMTSNQgqeC":{"uri":"/melonJS/docs/melonjs/Body.html#setStatic"},"pCAUYfaqwWeU-TsFaMrYU":{"uri":"/melonJS/docs/melonjs/Body.html#setVertices"},"N4zUhc5tPc8-siUWglDX2":{"uri":"/melonJS/docs/melonjs/Body.html#update"},"MymqFvWS_Yhq8y8noEkQy":{"uri":"/melonJS/docs/melonjs/Bounds.html"},"0LrcCSaXdLksNSeKBhgVu":{"uri":"/melonJS/docs/melonjs/Bounds.html#bottom"},"ologot9lDD3XUuQSYxWmN":{"uri":"/melonJS/docs/melonjs/Bounds.html#center"},"_U1YGSkJM6cRlFvy-xGGt":{"uri":"/melonJS/docs/melonjs/Bounds.html#centerX"},"mo5QQ7oaKOnWo4O6IOlg6":{"uri":"/melonJS/docs/melonjs/Bounds.html#centerY"},"JWrc-U117CPalRGAJKIQL":{"uri":"/melonJS/docs/melonjs/Bounds.html#height"},"tCvMJK8Hhv56_Jzg2Op1A":{"uri":"/melonJS/docs/melonjs/Bounds.html#left"},"1G8dv1xr0EH_Kk9xyUdn4":{"uri":"/melonJS/docs/melonjs/Bounds.html#right"},"Wtks9G5FLfVkmwOyE2SFt":{"uri":"/melonJS/docs/melonjs/Bounds.html#top"},"_zn9eMUEHoBJSk25RSrrP":{"uri":"/melonJS/docs/melonjs/Bounds.html#type"},"1LpyOkotb6xstHrpuTaoH":{"uri":"/melonJS/docs/melonjs/Bounds.html#width"},"3Tb0pnaB3kNEPtdPi5mWq":{"uri":"/melonJS/docs/melonjs/Bounds.html#x"},"wD5vcXHXOBaNfxt0oi6MK":{"uri":"/melonJS/docs/melonjs/Bounds.html#y"},"KSRDgvPhXap4tzYcGknzD":{"uri":"/melonJS/docs/melonjs/Bounds.html#add"},"kr_NQgZahZqLRxj0ztzYB":{"uri":"/melonJS/docs/melonjs/Bounds.html#addBounds"},"txNEvZ5IznyLEU_ol6UXk":{"uri":"/melonJS/docs/melonjs/Bounds.html#addFrame"},"wgC1QazulUkCPMfcDHrvk":{"uri":"/melonJS/docs/melonjs/Bounds.html#addPoint"},"fxE06tOTb98Xk6LQAOqTy":{"uri":"/melonJS/docs/melonjs/Bounds.html#centerOn"},"Pk2SRHVXXYsMYk1WpFx4K":{"uri":"/melonJS/docs/melonjs/Bounds.html#clear"},"HGrqMYe5hN2BxwZ3z67GG":{"uri":"/melonJS/docs/melonjs/Bounds.html#clone"},"Xtid46Nw5dv-34ssGkQM-":{"uri":"/melonJS/docs/melonjs/Bounds.html#constructor"},"gujUBiaMmpIxM2xStcBHt":{"uri":"/melonJS/docs/melonjs/Bounds.html#contains"},"qyQORKy-S8A1RK1syORjH":{"uri":"/melonJS/docs/melonjs/Bounds.html#isFinite"},"9umBCeWXuqPJOK4LLjHRx":{"uri":"/melonJS/docs/melonjs/Bounds.html#overlaps"},"JNl1bxnrA37WRNl1kuA7b":{"uri":"/melonJS/docs/melonjs/Bounds.html#setMinMax"},"4c3N7et6PwS0Tn474jV6a":{"uri":"/melonJS/docs/melonjs/Bounds.html#shift"},"FyIXCLC80rIdjRNpK5OMI":{"uri":"/melonJS/docs/melonjs/Bounds.html#toPolygon"},"qFZu0w1CTxLKWbigC-5KR":{"uri":"/melonJS/docs/melonjs/Bounds.html#translate"},"ChZ2M2NO0CvOH2vzOA-PD":{"uri":"/melonJS/docs/melonjs/Bounds.html#update"},"SthHv7mwCbafO0F5gdMz_":{"uri":"/melonJS/docs/melonjs/Camera2d.html"},"VNVfthSOBibD1iZxJGDCN":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html"},"DGxfb3LSCfrX2md-1FnRf":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html#BOTH"},"aHENbw6sAkM0Gn3jqQY7r":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html#HORIZONTAL"},"1zyTh2BB8BT5uX8OtJ6Ec":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html#NONE"},"KSvYempo2PfHoa6omWpnk":{"uri":"/melonJS/docs/melonjs/Camera2d/AXIS.html#VERTICAL"},"KVKZEyauAsJXcwKZAe211":{"uri":"/melonJS/docs/melonjs/Camera2d.html#alpha"},"9nyfsZRIeXoj_vazbBWRq":{"uri":"/melonJS/docs/melonjs/Camera2d.html#alwaysUpdate"},"vUeZol8dA5t7rWmVhzw2h":{"uri":"/melonJS/docs/melonjs/Camera2d.html#ancestor"},"E5Q_YWRuNgAWOXLBHqJCg":{"uri":"/melonJS/docs/melonjs/Camera2d.html#anchorPoint"},"O6GCewtZ_2i2zjLdN5Haz":{"uri":"/melonJS/docs/melonjs/Camera2d.html#autoTransform"},"gDL8SBYXsIgzCeInllJja":{"uri":"/melonJS/docs/melonjs/Camera2d.html#blendMode"},"LIhMSJN32D8G7FPpfTMQY":{"uri":"/melonJS/docs/melonjs/Camera2d.html#body"},"UZ5ORnb3mMLXxDSvCGlmu":{"uri":"/melonJS/docs/melonjs/Camera2d.html#bottom"},"BxZ8oXPsblfJ8exWNCMgI":{"uri":"/melonJS/docs/melonjs/Camera2d.html#bounds"},"DrUjpJ9OBtKSFXzQ07csi":{"uri":"/melonJS/docs/melonjs/Camera2d.html#centerX"},"_KZDkseofYGs_0hvRTiUS":{"uri":"/melonJS/docs/melonjs/Camera2d.html#centerY"},"VhCm-wbFq9YPCj0cLjo_G":{"uri":"/melonJS/docs/melonjs/Camera2d.html#currentTransform"},"Di5ToTpP_Ifh-MITkFyaJ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#damping"},"y4m2Zdy-4g9ZaBqwbzUFg":{"uri":"/melonJS/docs/melonjs/Camera2d.html#depth"},"jkrOjF_GPR6ib2qhQv9vv":{"uri":"/melonJS/docs/melonjs/Camera2d.html#far"},"hF_7ZzvM4EGSzyAREMntM":{"uri":"/melonJS/docs/melonjs/Camera2d.html#floating"},"b6B3_w5-dWczPV7W-Pfw5":{"uri":"/melonJS/docs/melonjs/Camera2d.html#GUID"},"jgnwVp4e6yngmgrvs_nVM":{"uri":"/melonJS/docs/melonjs/Camera2d.html#height"},"Bj3aD_Y6PwHS1aot6MHUJ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#inViewport"},"EA9rHY0lQKAxYqXTxNsgs":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isDirty"},"-G9rb9ifMSWdRs-NXjYEQ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isFlippedX"},"gASi017sK5x7QcypnJ2G4":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isFlippedY"},"CATLNyaOVJwQRD0nLsV9C":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isFloating"},"0AVfbbMBeL4ZAH4neOVDd":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isKinematic"},"Xl6lAv1aFNh8P_7ojNnaP":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isPersistent"},"hYZ71UpEMEjjyQwaf_jjp":{"uri":"/melonJS/docs/melonjs/Camera2d.html#left"},"3JPZcnnN2sovfeORS32YO":{"uri":"/melonJS/docs/melonjs/Camera2d.html#mask"},"YyaNVcSef5bM0h5iyaiSg":{"uri":"/melonJS/docs/melonjs/Camera2d.html#name"},"ZpKActERuaev10UnlogCC":{"uri":"/melonJS/docs/melonjs/Camera2d.html#near"},"xZVmV8f-dSexvECgv4LPE":{"uri":"/melonJS/docs/melonjs/Camera2d.html#onVisibilityChange"},"wUX-NbfPqTevT_CFKjyoL":{"uri":"/melonJS/docs/melonjs/Camera2d.html#parentApp"},"KtwkiM8WKJWwFz-RSK20R":{"uri":"/melonJS/docs/melonjs/Camera2d.html#points"},"bgcxo-2s74_Pk3VJJ99yC":{"uri":"/melonJS/docs/melonjs/Camera2d.html#pos"},"ghzSVoxXseTGGsFOIwl0b":{"uri":"/melonJS/docs/melonjs/Camera2d.html#projectionMatrix"},"CoLVJ6kmR7hZReRaEtKHV":{"uri":"/melonJS/docs/melonjs/Camera2d.html#right"},"euioQx3Gi07l9384RMvra":{"uri":"/melonJS/docs/melonjs/Camera2d.html#shader"},"0vasIRXJuJbf49kJGgGPD":{"uri":"/melonJS/docs/melonjs/Camera2d.html#tint"},"68XwqX_hMMA1JjNh8xejG":{"uri":"/melonJS/docs/melonjs/Camera2d.html#top"},"VTFTuFMq4U1kDNgtLqlCq":{"uri":"/melonJS/docs/melonjs/Camera2d.html#type"},"MILMO-7DhxZCO7n6Pxtpv":{"uri":"/melonJS/docs/melonjs/Camera2d.html#updateWhenPaused"},"3y_lJshPe_WHYnfsTnXdK":{"uri":"/melonJS/docs/melonjs/Camera2d.html#width"},"nbmPpVqrdWKKWKqAuAdC-":{"uri":"/melonJS/docs/melonjs/Camera2d.html#smoothFollow"},"iAUudsbvYoTJx7xCHioyJ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#angleTo"},"7IozUeTjq6wvP11XyApMw":{"uri":"/melonJS/docs/melonjs/Camera2d.html#centerOn"},"LSBMdMFpEYUNMEhCxYTpz":{"uri":"/melonJS/docs/melonjs/Camera2d.html#clone"},"S9yoJt3sFFA7PrS0PMl48":{"uri":"/melonJS/docs/melonjs/Camera2d.html#constructor"},"xGF5aJEeGL0ek1TYquKk9":{"uri":"/melonJS/docs/melonjs/Camera2d.html#contains"},"3Oi6kbkYqw3Kr9azKHRxV":{"uri":"/melonJS/docs/melonjs/Camera2d.html#copy"},"KgYme3tU65Qz_qEWM-eZC":{"uri":"/melonJS/docs/melonjs/Camera2d.html#distanceTo"},"EIP175UmBwQoVVwZoBw5S":{"uri":"/melonJS/docs/melonjs/Camera2d.html#draw"},"vXQMswPO-vCApjfutCxuQ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#equals"},"NMkPfPWcpyE0CsqhepBlV":{"uri":"/melonJS/docs/melonjs/Camera2d.html#fadeIn"},"Z8mAxuiUzwaqehk4PdojS":{"uri":"/melonJS/docs/melonjs/Camera2d.html#fadeOut"},"RaDkE3oxue70l4Q8MjGQa":{"uri":"/melonJS/docs/melonjs/Camera2d.html#flipX"},"KAYvSCcHICSEbz_NDyXEj":{"uri":"/melonJS/docs/melonjs/Camera2d.html#flipY"},"iEkzzrQzxgyIl1RwRh8C0":{"uri":"/melonJS/docs/melonjs/Camera2d.html#focusOn"},"PVvdS58YfsNA-lm4aGofm":{"uri":"/melonJS/docs/melonjs/Camera2d.html#follow"},"HO4fH4KFSO2iBaIDfPc9T":{"uri":"/melonJS/docs/melonjs/Camera2d.html#getAbsolutePosition"},"lNVJ2v0yw5nWtP0hitFJX":{"uri":"/melonJS/docs/melonjs/Camera2d.html#getBounds"},"ZbfDl0gzzcJavVAjoOhQo":{"uri":"/melonJS/docs/melonjs/Camera2d.html#getIndices"},"eTVzGIqfP3ZRAxSQ2DF4M":{"uri":"/melonJS/docs/melonjs/Camera2d.html#getOpacity"},"JCbZVzLPss5xqgvvfSRJX":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isConvex"},"rhT9pX2FmkeczZl6vJOg0":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isFinite"},"6PE_QI2Y-E3iRlAQogAdU":{"uri":"/melonJS/docs/melonjs/Camera2d.html#isVisible"},"DYJV_ezaC0BMSfZz9twU1":{"uri":"/melonJS/docs/melonjs/Camera2d.html#localToWorld"},"ywY-8ZPQWXJ0_ZD4l-aXX":{"uri":"/melonJS/docs/melonjs/Camera2d.html#lookAt"},"98n4lZuJ5bxKrLaNxcU7d":{"uri":"/melonJS/docs/melonjs/Camera2d.html#move"},"QoNXrLU2hjQ_nsZdRNdzi":{"uri":"/melonJS/docs/melonjs/Camera2d.html#moveTo"},"q5gsDS0lWAbNCkx8kIwDt":{"uri":"/melonJS/docs/melonjs/Camera2d.html#onCollision"},"Nydlsk4me_mr-MulC2TDl":{"uri":"/melonJS/docs/melonjs/Camera2d.html#onDestroyEvent"},"O2RDS_Iw44M9aQsEYzmZB":{"uri":"/melonJS/docs/melonjs/Camera2d.html#overlaps"},"o663saoa9zArKNSfjScen":{"uri":"/melonJS/docs/melonjs/Camera2d.html#postDraw"},"tUexPGSfJlJb1hA-ESJTH":{"uri":"/melonJS/docs/melonjs/Camera2d.html#preDraw"},"ZnppweHjbiLfg6ln2bd0f":{"uri":"/melonJS/docs/melonjs/Camera2d.html#recalc"},"ZQ0BdipRIX5jFN5Y8sp3j":{"uri":"/melonJS/docs/melonjs/Camera2d.html#reset"},"1TKN4kfOZoSQqkf_PVLR4":{"uri":"/melonJS/docs/melonjs/Camera2d.html#resize"},"49XpZZYRoAJE9byoDVHQw":{"uri":"/melonJS/docs/melonjs/Camera2d.html#rotate"},"EHT7tUwSTh__ZBNIrdTWU":{"uri":"/melonJS/docs/melonjs/Camera2d.html#scale"},"oYcD4RmE2piR4WWbxaTCM":{"uri":"/melonJS/docs/melonjs/Camera2d.html#scaleV"},"90lJvDEwWnXMUhV2fVjlW":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setBounds"},"cF5OymP5LFGRhAUoTJ-bd":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setDeadzone"},"bUeiz1YTU4mszlzExB8Oi":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setOpacity"},"vIiUjAuzbYTx4UqSBNJKj":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setShape"},"za-KBZP4RKQ2eCjuRPhSW":{"uri":"/melonJS/docs/melonjs/Camera2d.html#setVertices"},"goY6azEBUb9J3Et_MMgz4":{"uri":"/melonJS/docs/melonjs/Camera2d.html#shake"},"GajA09rKhGwWTYai3Y_g8":{"uri":"/melonJS/docs/melonjs/Camera2d.html#shift"},"pvnKtOFPB5Ur17oG4jCf8":{"uri":"/melonJS/docs/melonjs/Camera2d.html#to2d"},"JsofuQsSC_MYT9c90MaVf":{"uri":"/melonJS/docs/melonjs/Camera2d.html#toIso"},"-3CbQ_zvtxwMHjE8x0dsQ":{"uri":"/melonJS/docs/melonjs/Camera2d.html#toPolygon"},"AiqnTTrougZ-uSSo-Law7":{"uri":"/melonJS/docs/melonjs/Camera2d.html#transform"},"tpzkv2qtgMlCT-3D-4MGa":{"uri":"/melonJS/docs/melonjs/Camera2d.html#translate"},"fm74hzzgoqTwrclxOcMxO":{"uri":"/melonJS/docs/melonjs/Camera2d.html#unfollow"},"xJHMDP1SqSHyNf7zUw-r7":{"uri":"/melonJS/docs/melonjs/Camera2d.html#union"},"Piq7NqlmU9aAWt56ZtG6t":{"uri":"/melonJS/docs/melonjs/Camera2d.html#update"},"qrSvxuy3NC1N_tlwQygf0":{"uri":"/melonJS/docs/melonjs/Camera2d.html#updateBounds"},"hscBKKfcRFLQTloBLZSX9":{"uri":"/melonJS/docs/melonjs/Camera2d.html#worldToLocal"},"8z5qOLDDV1R2jGpKeGIcO":{"uri":"/melonJS/docs/melonjs/Camera2d.html#onAnchorUpdate"},"WM8pGAzjXz00wwckBanQ7":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html"},"PLJw-MNSW48H-3EzDffeW":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#depthTest"},"Wl-seuiXUdnvD3M7duM42":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#designRatio"},"-JSWIdu86fbfw3T2fH0gn":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#height"},"W6dGvsg9AzIMftuLQsM0Z":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#isContextValid"},"IciswgNJ6rOR_vbVvflyV":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#path2D"},"ANNN6YmFaB8x3kqvI1FuA":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#scaleRatio"},"f5tjqiz0AuBu1iTG1T2B3":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#settings"},"-_ftqqkQE0R4hjqbHmD5I":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#type"},"dEhqLCOGTo0UjiezJR7Mf":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#width"},"nY5RjRLIwCsS0aTgv_SVE":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#beginPath"},"LggRreMeiwlHhZ8_1Et-v":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clear"},"-nt1oIReHwUmaVHXY_FKZ":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clearColor"},"XtsCKmHuRhfiDRQlWEKyc":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clearMask"},"zOqP3_qSxBbAss-RrYuvv":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clearRect"},"DGJXtSMLoQDUKg4GQCdK6":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clearTint"},"O6HOLghXVpPoK4NoCe62Q":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#clipRect"},"fZaQHxlLgRo1g12IcCKeh":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#closePath"},"COxCSrfqLKDIIaXv6zopu":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#constructor"},"vE7TP94AnWZhvizzTSXA9":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#createPattern"},"D_R6j784IBxMo0nY0aZ2p":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#drawImage"},"f2rXERk0r4_aMWX1mOqP4":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#drawPattern"},"gq6mBWVzb17QrB-I9Q88E":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fill"},"GaGXQTvVVxYYoQ2oXoViX":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillArc"},"awsQwH6McplY3dpXk-a3D":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillEllipse"},"yosU-g_UmT4ciN5SKGFn8":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillLine"},"Z9FSW3NN9uYXuL9pYG3Ef":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillPoint"},"lWiv3AUlrPOJHPYmrdo9F":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillPolygon"},"JACpFiC11OH9-0g97kxNx":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillRect"},"TffnhSzGN-hJqlj-vXbuF":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#fillRoundRect"},"VaU_2vKqxfg5PCY01viWS":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#flush"},"cMARf7N9A7_Ejx1bpSWSS":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getBlendMode"},"19GNVFHKS6Qao2rPRvZiA":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getCanvas"},"r-t8Opt_-X4qAf8Z3A7xl":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getColor"},"AWo782NejWt4YfS98w-W8":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getContext"},"R_lp5M22GzHAVPQE03GnM":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getContext2d"},"RJ1ziEb40x2t4I0VDPyxh":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getGlobalAlpha"},"rKZIYlpEkZiNB6zbhCz3H":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getScreenCanvas"},"QZt6U9nr7tTnN-fmPqKc-":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#getScreenContext"},"OjgZUqr9hubKFb8G2YiQ4":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#globalAlpha"},"ys4Ox8VLAVtWp4e3idvIq":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#lineTo"},"Ya4IxrcEEPR02ap7Jl0fu":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#moveTo"},"xqCFbFXsgZ-TeRkZhVgjD":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#overlaps"},"JNML54eeHRreAnYczebnP":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#rect"},"eZ-ct7VA_04DghC4Paxy1":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#reset"},"_axR3_q1u4-YkPQpL14Nk":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#resetTransform"},"w0lLs5O4cdVWQmCKv6kLV":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#resize"},"bIIIIK5BCKrLRY1ZZSFZT":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#restore"},"mPb6osgR3tbIYsnHFgncx":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#rotate"},"fv2-R_tjhvfgtE6pmpLAZ":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#roundRect"},"DbUzZJL-rvhsbH3i4yn-S":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#save"},"Yz1BKsnoJcwVC2x8C5Pen":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#scale"},"xXXzVcdDn9_QDQw8xqhu6":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setAntiAlias"},"OfVJPjOHbSSd_twBBqBPc":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setBlendMode"},"pptNybUI3plFaxXqaAYhy":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setColor"},"6yldXpbKbpXM5qcajqm7w":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setGlobalAlpha"},"UWpDd2_wWZxk1IbEt_K8L":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setLineWidth"},"-XYwhW_1lYUAWi3yLsUcb":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setMask"},"P-yvi_l7E8KLM6B6S4F48":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setProjection"},"35LZ2zHNFRgUex2ThW0RV":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setTint"},"dC7Pdx3V1NGdx9tKP4XrI":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#setTransform"},"1ocNbuJx9qqq2-X53X0XA":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#stroke"},"stqn3tJVO5ckzqP_MNE6Q":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeArc"},"yr-WvGmi_HT2w5BwX_5-3":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeEllipse"},"1Fz0Ng8olp7gmBj32y89W":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeLine"},"8k7gFh-p9RA1WZA8-zU0r":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokePoint"},"MCQTlVOmFFtqJhYVgc4uB":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokePolygon"},"LQ9O5fEPi0G5FmjhJ9vPw":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeRect"},"hHyofKTXovTJzTwmbHrze":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#strokeRoundRect"},"aYa1EDYVOCRGyrynZJwG0":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#tint"},"tTnhQwmUh423zk8U2rnKB":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#toBlob"},"zRhXG_bNkUrZEu_EeIa3-":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#toDataURL"},"iYMBisXxVzTcgVFfcV2Uu":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#toImageBitmap"},"hkylblGkoi2FAqtrCBXJV":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#transform"},"wH-iFx7-3BBrxoK9OwcHH":{"uri":"/melonJS/docs/melonjs/CanvasRenderer.html#translate"},"k1bA0gfBuDKtu9X1XVrwV":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html"},"UK6_SHcZPO1nERKkPy96j":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#canvas"},"V1fAd6nGL0EtH9NQosBTW":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#context"},"2NpUgjAdMmhCdhLSggbjA":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#height"},"pPAUfQDEvDn2ylE2mnr3i":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#width"},"YwBbFR9fdvcXwByr5tpL9":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#clear"},"ecAm1jJeWj94BkqZ5Rc4c":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#constructor"},"oNsvbBjedrOgzJg5nU-D3":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#getImageData"},"jTYLIRlQBZ88ngk4SseSE":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#invalidate"},"v5WM-D2UnHBS9s8GNQByk":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#resize"},"zfwSHpJly4aLRhUNb-QxK":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#setAntiAlias"},"6K6oxuBYMxzzrhcnK7f8L":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#toBlob"},"E_iqrHar8ZgiyjO_8goc6":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#toDataURL"},"P8L6Jzcp5GrQ4RJZO-_mc":{"uri":"/melonJS/docs/melonjs/CanvasTexture.html#toImageBitmap"},"GcSrI1Ly83lO0wqgS5C1p":{"uri":"/melonJS/docs/melonjs/Collectable.html"},"j62RqXPrTn3fnbu7li_DD":{"uri":"/melonJS/docs/melonjs/Collectable.html#alpha"},"5Xthj6X9kCRi-lUF3mayY":{"uri":"/melonJS/docs/melonjs/Collectable.html#alwaysUpdate"},"62Hx3HCF1_Ul2hz5VQekD":{"uri":"/melonJS/docs/melonjs/Collectable.html#ancestor"},"BpEWXCcDXJFsRCMNkBOi9":{"uri":"/melonJS/docs/melonjs/Collectable.html#anchorPoint"},"N69T0W5A4PkrH5Me1DWva":{"uri":"/melonJS/docs/melonjs/Collectable.html#animationpause"},"qU2IKsxwB-tjriNJmz-tz":{"uri":"/melonJS/docs/melonjs/Collectable.html#animationspeed"},"6PT-HOpeUteQRSk7qYhCI":{"uri":"/melonJS/docs/melonjs/Collectable.html#autoTransform"},"gTndRhtjUe_ArDcERGIxF":{"uri":"/melonJS/docs/melonjs/Collectable.html#blendMode"},"FzLLCts6zX7ykihL2PAAq":{"uri":"/melonJS/docs/melonjs/Collectable.html#body"},"GwMhSJuvNj9REnvBWwEIL":{"uri":"/melonJS/docs/melonjs/Collectable.html#bottom"},"GsiMEp3zrcA3cOTmkGTL9":{"uri":"/melonJS/docs/melonjs/Collectable.html#centerX"},"YbJx_4Ga19Ef8pwcjrPT_":{"uri":"/melonJS/docs/melonjs/Collectable.html#centerY"},"FB2dtZijdY7r66ZMdSXD6":{"uri":"/melonJS/docs/melonjs/Collectable.html#currentTransform"},"1zcz8VyQEDC48SQHo6sEJ":{"uri":"/melonJS/docs/melonjs/Collectable.html#depth"},"QwMetYeaFn6_48zpVjIDu":{"uri":"/melonJS/docs/melonjs/Collectable.html#floating"},"ErIOnrrU-ZMJrUthDS8IA":{"uri":"/melonJS/docs/melonjs/Collectable.html#GUID"},"4mH6ZFhyOcJnRNIBIdPgl":{"uri":"/melonJS/docs/melonjs/Collectable.html#height"},"BqneggfX_8JJEbJtw7bGo":{"uri":"/melonJS/docs/melonjs/Collectable.html#inViewport"},"TKyMHxIiodAq6KMfVbGvw":{"uri":"/melonJS/docs/melonjs/Collectable.html#isDirty"},"2iiSTQWe8Wtz2G-GEEGhP":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFlippedX"},"y6vsTOluEAtlcWUHGgGYr":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFlippedY"},"EdzvY3kypn1axiWyuwPor":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFloating"},"PI0Tn7aEaP1KzxItd4bIm":{"uri":"/melonJS/docs/melonjs/Collectable.html#isKinematic"},"np4nM--f7VZz1KfTODejO":{"uri":"/melonJS/docs/melonjs/Collectable.html#isPersistent"},"eKcIObLwIYrsDkP97Ig8a":{"uri":"/melonJS/docs/melonjs/Collectable.html#left"},"gmhRZFRfIt4EGkd0Q3-qR":{"uri":"/melonJS/docs/melonjs/Collectable.html#mask"},"Kf4M-rblHnkjxXJGok4xy":{"uri":"/melonJS/docs/melonjs/Collectable.html#name"},"Ixgq5neG3nUTawstkyS1B":{"uri":"/melonJS/docs/melonjs/Collectable.html#offset"},"FvZhYso_tg7LO25qWwgq5":{"uri":"/melonJS/docs/melonjs/Collectable.html#onVisibilityChange"},"8hFRDBXn7s4hqk9-7voR9":{"uri":"/melonJS/docs/melonjs/Collectable.html#parentApp"},"ZVQ_rCR2w1B4QKjX7-DrB":{"uri":"/melonJS/docs/melonjs/Collectable.html#points"},"xT6PtGPt3T31ZBnxgr1OB":{"uri":"/melonJS/docs/melonjs/Collectable.html#pos"},"5ebYZnlJmbrhnlXlj4gQl":{"uri":"/melonJS/docs/melonjs/Collectable.html#right"},"BeXpBWDsRFatOLqiKnCM2":{"uri":"/melonJS/docs/melonjs/Collectable.html#shader"},"2ijyqvGx819PtUOTImHKG":{"uri":"/melonJS/docs/melonjs/Collectable.html#source"},"x2lWqZ0xR4-zdvcilxzRO":{"uri":"/melonJS/docs/melonjs/Collectable.html#tint"},"tdvu5BAjrJMQ3s8jo_rFj":{"uri":"/melonJS/docs/melonjs/Collectable.html#top"},"BNVN25Z5nCwPJHT3RNpnR":{"uri":"/melonJS/docs/melonjs/Collectable.html#type"},"aQ-RKx8qVVxDTucylDUoz":{"uri":"/melonJS/docs/melonjs/Collectable.html#updateWhenPaused"},"L-9UjZxYBxEsjfe2RApRQ":{"uri":"/melonJS/docs/melonjs/Collectable.html#width"},"5SrsFgJe4rWBquvU8Br0L":{"uri":"/melonJS/docs/melonjs/Collectable.html#addAnimation"},"uFJK9tSLHqeH3AIFwQ_G9":{"uri":"/melonJS/docs/melonjs/Collectable.html#angleTo"},"dHk1w-jCfjGvkGoIMPdy-":{"uri":"/melonJS/docs/melonjs/Collectable.html#centerOn"},"u7JEBgPeP98AgYLKQgrg_":{"uri":"/melonJS/docs/melonjs/Collectable.html#clone"},"VgN9yi4S1VpoJCVjlgzuw":{"uri":"/melonJS/docs/melonjs/Collectable.html#constructor"},"X76Yd_AIyokSbZctm_Y70":{"uri":"/melonJS/docs/melonjs/Collectable.html#contains"},"AhzakUNRQecXdU9nXtmqI":{"uri":"/melonJS/docs/melonjs/Collectable.html#copy"},"9gAx1I-OqAy3ZXIbLCgcw":{"uri":"/melonJS/docs/melonjs/Collectable.html#distanceTo"},"DvYcNDQbsbzKoW0TciOZv":{"uri":"/melonJS/docs/melonjs/Collectable.html#equals"},"h-kH2FL2zwli6C0tdU17-":{"uri":"/melonJS/docs/melonjs/Collectable.html#flicker"},"elaw3trQMYq-gg9m2WG49":{"uri":"/melonJS/docs/melonjs/Collectable.html#flipX"},"1ddEcpsYnHsQRkatjc_Jd":{"uri":"/melonJS/docs/melonjs/Collectable.html#flipY"},"PzYwlOHqq1wY8x8KjEwXl":{"uri":"/melonJS/docs/melonjs/Collectable.html#getAbsolutePosition"},"zOaQCB6e2IUXO3801e62K":{"uri":"/melonJS/docs/melonjs/Collectable.html#getBounds"},"G0tTd1raK9JwbWEnatEiI":{"uri":"/melonJS/docs/melonjs/Collectable.html#getCurrentAnimationFrame"},"lA5v2_Dfl1Q9hsvF77p5O":{"uri":"/melonJS/docs/melonjs/Collectable.html#getIndices"},"OgPlKVjL_sqnOavhjBMeO":{"uri":"/melonJS/docs/melonjs/Collectable.html#getOpacity"},"OGVc6ug47Rg646Q7kIIml":{"uri":"/melonJS/docs/melonjs/Collectable.html#isConvex"},"cPZPYAYLozsOIzJUmp1fR":{"uri":"/melonJS/docs/melonjs/Collectable.html#isCurrentAnimation"},"SWggOjiipMi3_VnTsR49Y":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFinite"},"NrLsQlM_EFvwsiPAnlEpO":{"uri":"/melonJS/docs/melonjs/Collectable.html#isFlickering"},"dlirRikiJ1bIiTjCjL37J":{"uri":"/melonJS/docs/melonjs/Collectable.html#lookAt"},"tfaun1hHZlTyXTa7NWu6p":{"uri":"/melonJS/docs/melonjs/Collectable.html#onCollision"},"TUGO9SsLVP173KFG9AgR5":{"uri":"/melonJS/docs/melonjs/Collectable.html#onDestroyEvent"},"ldGW2UnlhjCWjUs4L6Bsq":{"uri":"/melonJS/docs/melonjs/Collectable.html#overlaps"},"Q2P9ZAVLBsPLLpvmEwNuK":{"uri":"/melonJS/docs/melonjs/Collectable.html#postDraw"},"okI7IgKv9rK9UnbMkAsaB":{"uri":"/melonJS/docs/melonjs/Collectable.html#preDraw"},"tYaTbizyyeD9faxtivuuX":{"uri":"/melonJS/docs/melonjs/Collectable.html#recalc"},"9xQfHUVKFSMGsFfV3a1P3":{"uri":"/melonJS/docs/melonjs/Collectable.html#resize"},"qM9cep5OKo1PdJAXBZ8sg":{"uri":"/melonJS/docs/melonjs/Collectable.html#reverseAnimation"},"LiSl5tVD3wHzRz4Zipy6h":{"uri":"/melonJS/docs/melonjs/Collectable.html#rotate"},"LXNWbdoqfHTxYLKIOMksR":{"uri":"/melonJS/docs/melonjs/Collectable.html#scale"},"b07xKeUsLylLcttD5FjIx":{"uri":"/melonJS/docs/melonjs/Collectable.html#scaleV"},"S5O6rFA5I62B3q-QuMPVI":{"uri":"/melonJS/docs/melonjs/Collectable.html#setAnimationFrame"},"UEPUnGzYUuFJkVi41XsV5":{"uri":"/melonJS/docs/melonjs/Collectable.html#setCurrentAnimation"},"ppGSHiUmxoqevlp3VxPEa":{"uri":"/melonJS/docs/melonjs/Collectable.html#setOpacity"},"hagU_f_oFb9nqItczgsa7":{"uri":"/melonJS/docs/melonjs/Collectable.html#setRegion"},"5bnZcWUAP8LrFTQyLqFGu":{"uri":"/melonJS/docs/melonjs/Collectable.html#setShape"},"DYaTjepqhMgPCct8rjtmk":{"uri":"/melonJS/docs/melonjs/Collectable.html#setVertices"},"INxsrAeqRS4e4qphQe4vt":{"uri":"/melonJS/docs/melonjs/Collectable.html#shift"},"X2jy3V7MdXVW5hxojDNz1":{"uri":"/melonJS/docs/melonjs/Collectable.html#to2d"},"Dmu_uPJVXEZffgsvOhUB-":{"uri":"/melonJS/docs/melonjs/Collectable.html#toIso"},"BOuU3Zn1-MjSmHEA5MQxy":{"uri":"/melonJS/docs/melonjs/Collectable.html#toPolygon"},"nadWzkr4qfA1tod41Cmor":{"uri":"/melonJS/docs/melonjs/Collectable.html#transform"},"2g24Q1NCAwRlrSZiEiyf3":{"uri":"/melonJS/docs/melonjs/Collectable.html#translate"},"YfKFh_ozJVDRiBvjZYWZu":{"uri":"/melonJS/docs/melonjs/Collectable.html#union"},"LYeyhkwfNbkIP1CtYxu5_":{"uri":"/melonJS/docs/melonjs/Collectable.html#updateBounds"},"X2MwOC-7XKOB2i8Z8fFiT":{"uri":"/melonJS/docs/melonjs/Collectable.html#draw"},"nlC-3JZfhxT2RriQBLisi":{"uri":"/melonJS/docs/melonjs/Collectable.html#update"},"Q_sjzuJAaWrs3qRYDc6XY":{"uri":"/melonJS/docs/melonjs/Collectable.html#onAnchorUpdate"},"PGBfczEfnj2l8I6r38Ywn":{"uri":"/melonJS/docs/melonjs/Color.html"},"KeZ1JreqQno-quI6Kbk1D":{"uri":"/melonJS/docs/melonjs/Color.html#alpha"},"Rp4iZOJ-qlkDeuqsXom1X":{"uri":"/melonJS/docs/melonjs/Color.html#b"},"9CEgI-nUl0p4g2nmz-002":{"uri":"/melonJS/docs/melonjs/Color.html#g"},"Ze56bN2LLsTIsYeklESK_":{"uri":"/melonJS/docs/melonjs/Color.html#r"},"PU2mPXq2t8UOdZCRGt6Lm":{"uri":"/melonJS/docs/melonjs/Color.html#add"},"Op_YTgjnn-Zr8KqEZWA8N":{"uri":"/melonJS/docs/melonjs/Color.html#clone"},"xmt4JsElmxaYFDBJcX6-S":{"uri":"/melonJS/docs/melonjs/Color.html#constructor"},"G1h4_OvVeInGIPQ6jjOV4":{"uri":"/melonJS/docs/melonjs/Color.html#copy"},"Al8RnLN7RPGAh1Eaz45eY":{"uri":"/melonJS/docs/melonjs/Color.html#darken"},"CX58nG_f7Sy0Ri60dKjD5":{"uri":"/melonJS/docs/melonjs/Color.html#equals"},"kIHCH6m-pmD8YSp9dNksE":{"uri":"/melonJS/docs/melonjs/Color.html#lerp"},"9b3202-84laMuE4LF-0YU":{"uri":"/melonJS/docs/melonjs/Color.html#lighten"},"ZRJs1caJoAlPxY-2DiRtR":{"uri":"/melonJS/docs/melonjs/Color.html#parseCSS"},"D0hQCSnyI70AgTT_mv98z":{"uri":"/melonJS/docs/melonjs/Color.html#parseHex"},"3YpAUJi2AW_mUWUgaKA5T":{"uri":"/melonJS/docs/melonjs/Color.html#parseRGB"},"d-oyDXUffiTog7-OQr0Ou":{"uri":"/melonJS/docs/melonjs/Color.html#random"},"TciCmDxkO2cV3OUrX9XOM":{"uri":"/melonJS/docs/melonjs/Color.html#setColor"},"rUgL8WuU_8p8mcJKdCtZT":{"uri":"/melonJS/docs/melonjs/Color.html#setFloat"},"NPtO8ICaS6XH-89Nz3y0M":{"uri":"/melonJS/docs/melonjs/Color.html#setHSL"},"2JdDIHpvrUJC2fwzPewd3":{"uri":"/melonJS/docs/melonjs/Color.html#setHSV"},"yp56Opj0huU5-g-ZjLDNF":{"uri":"/melonJS/docs/melonjs/Color.html#toArray"},"3ytwQWV5KYByf8s8BEhyN":{"uri":"/melonJS/docs/melonjs/Color.html#toHex"},"49TCH48DRxIq1JhBjZh13":{"uri":"/melonJS/docs/melonjs/Color.html#toHex8"},"f9OK8R77-ZH6Y0_WXnXCe":{"uri":"/melonJS/docs/melonjs/Color.html#toRGB"},"qV8QL9lqBRhWFvaoKiBLE":{"uri":"/melonJS/docs/melonjs/Color.html#toRGBA"},"s6t3GLAzBeokBDYy5f1Ji":{"uri":"/melonJS/docs/melonjs/Color.html#toUint32"},"ArHbTfoGmEoekTthakW5h":{"uri":"/melonJS/docs/melonjs/ColorLayer.html"},"Gi_2SQ2YcJX_JtiPeAf9I":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#alpha"},"yMbipFSBgslBdOE6DqTrF":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#alwaysUpdate"},"9ov-66SAuDEDvXQkTJXlw":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#ancestor"},"FSFX3UNHQnXS6p8FRJv9A":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#anchorPoint"},"GQ--3Xl7Vrkp_ZhnZyrv0":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#autoTransform"},"zJ_UPPtiAeQ8QF71uS6Oq":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#blendMode"},"kCOxe-2BVS9-Ev_rtZP09":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#body"},"S5ZxWc8NYtZAsukvGiA3e":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#bottom"},"bPI3YqYIatngI9zO7g6pY":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#centerX"},"L4qPsdMVoRtyyUCRWpO4S":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#centerY"},"H_W5ZfIiYuD0NSeicuqLV":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#color"},"SQMWwzvQjSZo8wHR6AfhO":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#currentTransform"},"1JzdKCXvILucRJG4TR6p0":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#depth"},"Ntzz1xEcaNtwGrmOoZxn1":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#floating"},"KxgbbbCt02Fwo1lCnEZ1b":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#GUID"},"PlqzshWt9JyGQSl-e03Fe":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#height"},"pyM9SDaDW7Q4_FuFHDWbQ":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#inViewport"},"iDMNp1xQBLw2ZC6Qp5egw":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isDirty"},"rg10Sni-anKgdSdDANVBD":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isFlippedX"},"B8ATKNeaOhrr8wfQxm0gK":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isFlippedY"},"PzLEXSIYQp7uaLgYzWsJ4":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isFloating"},"4WYY0CAtwJDdMQcYE1Z_c":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isKinematic"},"wUrMfYgRQou6G3VhxdVHv":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isPersistent"},"d8dJkUPlef66szaJPjdqF":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#left"},"onSZ5dEyBN5_AdzrwHLgX":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#mask"},"yqFZG0OkyRTTi3MOkBZTh":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#name"},"9v2OzbuMm6ADfs7FDCi7M":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#onVisibilityChange"},"n5vatG0SWv_lfWG9x8fLq":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#parentApp"},"-W_7MDEjQr_1k8FIu1kaX":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#points"},"-Arm9QwOk-jLEiivvRiiY":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#pos"},"0Sh-1nnPNN2Uvg519-BAx":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#right"},"t0CboPIL0INWCHhvv-0T3":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#shader"},"XOggXCZCvV-ZITr5bXVhq":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#tint"},"im_9E2ZuKFwNcv7dDFIra":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#top"},"4K-kYeLfULiGaJd6VsKpe":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#type"},"pCL4gd0jEAyo-dKUCCwKk":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#updateWhenPaused"},"HX1wJOIh381mLx3fObL6P":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#width"},"uKyPUjhUd5M3jx4Ku2DFC":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#angleTo"},"I3r4nA9XEvlnSJ8hs-yVR":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#centerOn"},"80A8rqP3jwSsB_PsXM8-E":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#clone"},"urcyZSz1L6VQNt0M1-qwp":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#constructor"},"jX4KtxqUMmkC28HKP1hSF":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#contains"},"KqjqZUPP91jjOYkSzjwq0":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#copy"},"d6VDAl8BBP26YPrwZQyob":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#distanceTo"},"eClHYjnkP9suF2Ykbjwxh":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#equals"},"suilf0--Isq05rTSMtaNz":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#flipX"},"9nprndPhG8UCNMpPvHULT":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#flipY"},"e1voVOuleBT44sbwWFEXj":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#getAbsolutePosition"},"LCdRTNldjwm4dWlGoRhp-":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#getBounds"},"5bL-YtUKjQw5h0NBl7HaP":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#getIndices"},"_6rj-FMK0BaNPkCJBz517":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#getOpacity"},"nQhsTKNBT4vv8jVOvKzDv":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isConvex"},"afXRGkOg_m9MV1UxTMVOs":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#isFinite"},"3aH69c0LRGk3xbhXLvMFO":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#lookAt"},"qDQOjHvjLTvF0_2RoVkc8":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#onCollision"},"zrwGHs0cYgiFzRTu_MPJH":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#onDestroyEvent"},"eQm013m2utmQyqg0ZOA9r":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#overlaps"},"IdYbwr07v_tLE_ao1rKgd":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#postDraw"},"yCYATTY-KIcrnPeINGTmp":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#preDraw"},"kE3Nwu_qVKJh-s0PUIQzY":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#recalc"},"q0YDtusTzZTh665NviJwB":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#resize"},"nJyb3LXFLoqXz32-nyK4_":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#rotate"},"PPVGC17GklgVjpf1O9_HK":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#scale"},"h09nOIeTRePIGmbg1yFmJ":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#scaleV"},"X5kzlkbhWvcNAtyXVi1Jm":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#setOpacity"},"2SZ_K_lnWEUVuzV2V1ZGL":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#setShape"},"sf1K9FQg27nmKF72AdUwz":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#setVertices"},"V8MOJDPLoUsB4_4NixzEs":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#shift"},"CfNWj-46eaXjtcUiIcgSP":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#to2d"},"gL_Jk93wWm00FcnYeMIIC":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#toIso"},"DsLRNlv4-fV-3hW1d5b9x":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#toPolygon"},"7oETU8_zGDaQBtjPbratB":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#transform"},"IJ_TEPA9xKB9JgyFxLfqI":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#translate"},"aDNLfxiPrEC9wZVBPii8_":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#union"},"KHon38pmidPLtNCNRYRAV":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#update"},"YAbp7AYyOTJEs-2uZLOjf":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#updateBounds"},"exq9z1pno6CFsGmurKLId":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#draw"},"s8o99CNVFxOU9G2sjn2sV":{"uri":"/melonJS/docs/melonjs/ColorLayer.html#onAnchorUpdate"},"3fXrOO7EowxkAYNVRFcYB":{"uri":"/melonJS/docs/melonjs/Compositor.html"},"qUDFHdxSJYgnRUyCNSbep":{"uri":"/melonJS/docs/melonjs/Compositor.html#attributes"},"2KJPj3Y-dOfGnOtQlYy-S":{"uri":"/melonJS/docs/melonjs/Compositor.html#currentShader"},"09lF4XDsJCzsYK96jsUYI":{"uri":"/melonJS/docs/melonjs/Compositor.html#defaultShader"},"DXQuhWsJrfhJWR_rKwErD":{"uri":"/melonJS/docs/melonjs/Compositor.html#mode"},"yuWqDzGmT9ycBJqF7C-Tg":{"uri":"/melonJS/docs/melonjs/Compositor.html#vertexByteSize"},"eyh6Uf9mU6rmGnbx_Fgls":{"uri":"/melonJS/docs/melonjs/Compositor.html#vertexData"},"PU2YuCTPEpAiR-pjArn4O":{"uri":"/melonJS/docs/melonjs/Compositor.html#vertexSize"},"cFKZts5FwTRKD4mEJ5YJV":{"uri":"/melonJS/docs/melonjs/Compositor.html#addAttribute"},"mb8-i0ZT6Zg6VAYhYtZOP":{"uri":"/melonJS/docs/melonjs/Compositor.html#bind"},"bA7tGMscERW9ZLo7Suwqn":{"uri":"/melonJS/docs/melonjs/Compositor.html#constructor"},"JlopqDZfOcQ3-6ermxlD_":{"uri":"/melonJS/docs/melonjs/Compositor.html#flush"},"OAQvFaN4G7wf24mU71vpR":{"uri":"/melonJS/docs/melonjs/Compositor.html#setProjection"},"laLW_wmriacyE3v76xylR":{"uri":"/melonJS/docs/melonjs/Compositor.html#useShader"},"-RrbIiS6mK3YwEmfwTYaA":{"uri":"/melonJS/docs/melonjs/Container.html"},"SEUQIpi_nAuVy_y1eMjDF":{"uri":"/melonJS/docs/melonjs/Container.html#alpha"},"dcha_XS_7FgM7GG_4-a-A":{"uri":"/melonJS/docs/melonjs/Container.html#alwaysUpdate"},"5EFTKdMDzscUzj-NJdTVH":{"uri":"/melonJS/docs/melonjs/Container.html#ancestor"},"x4WmU56GdDe2Dyi-ypliO":{"uri":"/melonJS/docs/melonjs/Container.html#anchorPoint"},"YhkR1gyEcg2GcVur67yhQ":{"uri":"/melonJS/docs/melonjs/Container.html#autoDepth"},"4Dmyt1hyM98xneaQXxZvw":{"uri":"/melonJS/docs/melonjs/Container.html#autoSort"},"y4SWS6miuVLJ7MZEfA8Xg":{"uri":"/melonJS/docs/melonjs/Container.html#autoTransform"},"n8bsevcQeaZ6GxD2DGprg":{"uri":"/melonJS/docs/melonjs/Container.html#backgroundColor"},"t7iaYujVZb9xq8kNiu8jR":{"uri":"/melonJS/docs/melonjs/Container.html#blendMode"},"zM3_kwYn-dDo1dg0Rapz8":{"uri":"/melonJS/docs/melonjs/Container.html#body"},"_Mljgkh0pdxhfjQ5r_qZo":{"uri":"/melonJS/docs/melonjs/Container.html#bottom"},"ILuVRzapSH3kKSeGurYDe":{"uri":"/melonJS/docs/melonjs/Container.html#centerX"},"K68aHPx-SAoCg3Dhie68e":{"uri":"/melonJS/docs/melonjs/Container.html#centerY"},"CXYGEBf_Rl7AeavA7R6FT":{"uri":"/melonJS/docs/melonjs/Container.html#clipping"},"qEtxaaF3GEtH0Qy92J5nE":{"uri":"/melonJS/docs/melonjs/Container.html#currentTransform"},"_s9A752_00urXIegCs8jv":{"uri":"/melonJS/docs/melonjs/Container.html#depth"},"VzobCH7QSR3afOdzuHFlV":{"uri":"/melonJS/docs/melonjs/Container.html#enableChildBoundsUpdate"},"sqmBObNQvN0oW4rALwDmG":{"uri":"/melonJS/docs/melonjs/Container.html#floating"},"Pc9VQ6kNUCaJjJKIabonb":{"uri":"/melonJS/docs/melonjs/Container.html#GUID"},"nG7-Oww_pge8wACFfIUvl":{"uri":"/melonJS/docs/melonjs/Container.html#height"},"mKa1J_8bheHwQy4GOu6p2":{"uri":"/melonJS/docs/melonjs/Container.html#inViewport"},"R3LyncEmMQwFCBPgAIKV8":{"uri":"/melonJS/docs/melonjs/Container.html#isDirty"},"Bw0txh6BRGgw_gty2M2CU":{"uri":"/melonJS/docs/melonjs/Container.html#isFlippedX"},"Po9ah43kUVvtceK-IS10h":{"uri":"/melonJS/docs/melonjs/Container.html#isFlippedY"},"bhHQPZ6W9xmTV09jB7TeU":{"uri":"/melonJS/docs/melonjs/Container.html#isFloating"},"-QRuGi1SSJVij7WazBppJ":{"uri":"/melonJS/docs/melonjs/Container.html#isKinematic"},"JmvWZ4zQfExpPazX8uEqS":{"uri":"/melonJS/docs/melonjs/Container.html#isPersistent"},"Yl4wlGZVMfCRRjV_Z-gvx":{"uri":"/melonJS/docs/melonjs/Container.html#left"},"R_8oDdZYxRD86k3ndXyWY":{"uri":"/melonJS/docs/melonjs/Container.html#mask"},"6lGBJ9uuaivNukpX9Y7og":{"uri":"/melonJS/docs/melonjs/Container.html#name"},"_MRcCHgBSbaORyVmyGR3h":{"uri":"/melonJS/docs/melonjs/Container.html#onVisibilityChange"},"toIvFIwB8YLHPYREIyoUq":{"uri":"/melonJS/docs/melonjs/Container.html#parentApp"},"190b_FJQ-W80ZNDrveWoW":{"uri":"/melonJS/docs/melonjs/Container.html#points"},"mHwR45zY88F8PbUrhsl4F":{"uri":"/melonJS/docs/melonjs/Container.html#pos"},"9x0iY5HhoK3rgSb66WxNt":{"uri":"/melonJS/docs/melonjs/Container.html#right"},"Kw0X8qtQEFlqduNi_IgdN":{"uri":"/melonJS/docs/melonjs/Container.html#root"},"arFOJffK5yElg0APM3ijn":{"uri":"/melonJS/docs/melonjs/Container.html#shader"},"b-IcaXLiF2EtJP8BsXmiU":{"uri":"/melonJS/docs/melonjs/Container.html#sortOn"},"KPgFg5mqcp0tCZBLNiqtr":{"uri":"/melonJS/docs/melonjs/Container.html#tint"},"lRIRiyZei2lwgZeVnCTJd":{"uri":"/melonJS/docs/melonjs/Container.html#top"},"4wS_kdDjh5a5_KpkEDhCG":{"uri":"/melonJS/docs/melonjs/Container.html#type"},"lF2XnsByeq2EZ_HIToNoG":{"uri":"/melonJS/docs/melonjs/Container.html#updateWhenPaused"},"lvDfYhMGTz-1Fzx5zvJmq":{"uri":"/melonJS/docs/melonjs/Container.html#width"},"i34OTBb0UyYi9ltg2RSFf":{"uri":"/melonJS/docs/melonjs/Container.html#addChild"},"zwuygVXikuX8bWQY3TzFh":{"uri":"/melonJS/docs/melonjs/Container.html#addChildAt"},"XV3GBUg0mnoYBEJROkXnX":{"uri":"/melonJS/docs/melonjs/Container.html#angleTo"},"opPmw9mczHrueC01DCWJ5":{"uri":"/melonJS/docs/melonjs/Container.html#centerOn"},"ZLQ-WqxLI7fXbpStUDobt":{"uri":"/melonJS/docs/melonjs/Container.html#clone"},"sZdgdgpiaNF2m0SoYIQlh":{"uri":"/melonJS/docs/melonjs/Container.html#constructor"},"B0wbOKorn4RQV5Hg75aHx":{"uri":"/melonJS/docs/melonjs/Container.html#contains"},"Jk8ZpSVLwUmX1Oe-oO_dS":{"uri":"/melonJS/docs/melonjs/Container.html#copy"},"qTEx88S-jpwY0IqBMgH7Z":{"uri":"/melonJS/docs/melonjs/Container.html#distanceTo"},"L21G-VaO_CJDPP-y5pkhH":{"uri":"/melonJS/docs/melonjs/Container.html#equals"},"g2FwlVA_VUMZMMIetPfIk":{"uri":"/melonJS/docs/melonjs/Container.html#flipX"},"Rv4uKqM_opMI-t1iXLEBl":{"uri":"/melonJS/docs/melonjs/Container.html#flipY"},"-mpHOLQ0z9LP0kdKU-MBI":{"uri":"/melonJS/docs/melonjs/Container.html#forEach"},"AbGGhufzMc5TZunq_KB-2":{"uri":"/melonJS/docs/melonjs/Container.html#getAbsolutePosition"},"iXj1wl8F4IjMRmTmxYAGc":{"uri":"/melonJS/docs/melonjs/Container.html#getBounds"},"9teUMgQck49Lm314UZvV3":{"uri":"/melonJS/docs/melonjs/Container.html#getChildAt"},"Idnj_F58iVb8LtIdvmmQ1":{"uri":"/melonJS/docs/melonjs/Container.html#getChildByGUID"},"c0FGim8J2Y46KOiAIvGnv":{"uri":"/melonJS/docs/melonjs/Container.html#getChildByName"},"dNLGQxSvEKomCR4TGvrmT":{"uri":"/melonJS/docs/melonjs/Container.html#getChildByProp"},"F3s43v1Ef84Lch6kk6f6J":{"uri":"/melonJS/docs/melonjs/Container.html#getChildByType"},"atFJX91LYzsGaVRFJwRAU":{"uri":"/melonJS/docs/melonjs/Container.html#getChildIndex"},"Idv6Ft7t64Yl_H93JIMcM":{"uri":"/melonJS/docs/melonjs/Container.html#getChildren"},"LD_Pg3lXwyct54M7U5aH6":{"uri":"/melonJS/docs/melonjs/Container.html#getIndices"},"6Ti6VfEnhqFKImN2qd3oJ":{"uri":"/melonJS/docs/melonjs/Container.html#getNextChild"},"Kbb3yqjcLXt1Jyygj93Hu":{"uri":"/melonJS/docs/melonjs/Container.html#getOpacity"},"IjEuOCMBb-Bk14DMRxsnn":{"uri":"/melonJS/docs/melonjs/Container.html#getRootAncestor"},"3N7SzoznhUkhkCX8fAabf":{"uri":"/melonJS/docs/melonjs/Container.html#hasChild"},"DIaeJXWbCzB4cwoBfgqw4":{"uri":"/melonJS/docs/melonjs/Container.html#isAttachedToRoot"},"y5cWD_SEHc_mhGMTYSFZ1":{"uri":"/melonJS/docs/melonjs/Container.html#isConvex"},"kJrijLi8c5YmuvaOJrpDR":{"uri":"/melonJS/docs/melonjs/Container.html#isFinite"},"TtRu7f8UY6py3_YXJKsie":{"uri":"/melonJS/docs/melonjs/Container.html#lookAt"},"0RmEstlxgQAW2dk37zzBj":{"uri":"/melonJS/docs/melonjs/Container.html#moveDown"},"J-q9y7ZNMXgMX656dmWEX":{"uri":"/melonJS/docs/melonjs/Container.html#moveToBottom"},"YWS7bAg24duHSaB9PQaxj":{"uri":"/melonJS/docs/melonjs/Container.html#moveToTop"},"7lXMOaKeu9yw0qGksmXGt":{"uri":"/melonJS/docs/melonjs/Container.html#moveUp"},"5f4A0ppcjOL1Df_i7sDKg":{"uri":"/melonJS/docs/melonjs/Container.html#onChildChange"},"JbHjUSB9ZM4FhCwJkFN6U":{"uri":"/melonJS/docs/melonjs/Container.html#onCollision"},"NPBFlhSoZQ5qFZCg_J-M-":{"uri":"/melonJS/docs/melonjs/Container.html#onDestroyEvent"},"JLJITQmxrFYmAjpICw_1H":{"uri":"/melonJS/docs/melonjs/Container.html#overlaps"},"BPn2wGBXzQZIJ5NVTPbeW":{"uri":"/melonJS/docs/melonjs/Container.html#postDraw"},"PMVgGCzvyQ_3-13_EGX1P":{"uri":"/melonJS/docs/melonjs/Container.html#preDraw"},"RVRmMtDxfBeCzC3Myytuc":{"uri":"/melonJS/docs/melonjs/Container.html#recalc"},"L09QL8r9ewxxSyI_xto56":{"uri":"/melonJS/docs/melonjs/Container.html#removeChild"},"RkQUXx97FgmUoPa6pjsu9":{"uri":"/melonJS/docs/melonjs/Container.html#removeChildNow"},"TFpAEMictmzfL0O6d6x0o":{"uri":"/melonJS/docs/melonjs/Container.html#reset"},"biBefPzN4L4p39RSHZhZJ":{"uri":"/melonJS/docs/melonjs/Container.html#resize"},"lK8acGSy0fhuCeNGi3SV4":{"uri":"/melonJS/docs/melonjs/Container.html#rotate"},"Y-tM0w03Ad49Hy4eu2BUe":{"uri":"/melonJS/docs/melonjs/Container.html#scale"},"fXNPSxbqpZepc8NtmIbYX":{"uri":"/melonJS/docs/melonjs/Container.html#scaleV"},"Aow6k-3id78j2j2XLIkyC":{"uri":"/melonJS/docs/melonjs/Container.html#setChildsProperty"},"RzOywU22-t0v7VQ22HrGo":{"uri":"/melonJS/docs/melonjs/Container.html#setOpacity"},"3wEI8ZeHS8wWdeFi5h4HT":{"uri":"/melonJS/docs/melonjs/Container.html#setShape"},"ZDAWLwdIcQzjI33ECZyr1":{"uri":"/melonJS/docs/melonjs/Container.html#setVertices"},"qEil-byYGjnEqhdC3rpr4":{"uri":"/melonJS/docs/melonjs/Container.html#shift"},"jwCUVaiUNDrvwY7WqT4wP":{"uri":"/melonJS/docs/melonjs/Container.html#sort"},"HJ5LjAoCi9dNt6Y41rB94":{"uri":"/melonJS/docs/melonjs/Container.html#swapChildren"},"O8HACwyBsa7JV0iKgqYPb":{"uri":"/melonJS/docs/melonjs/Container.html#to2d"},"qIOYItUSbJ_e_4ECa7z3g":{"uri":"/melonJS/docs/melonjs/Container.html#toIso"},"57TtO6w-pqjS8VWBd0duV":{"uri":"/melonJS/docs/melonjs/Container.html#toPolygon"},"cUdtXHbY6XRdFOKj9QZxl":{"uri":"/melonJS/docs/melonjs/Container.html#transform"},"mY31_H_1UK9UvgqhwsZKi":{"uri":"/melonJS/docs/melonjs/Container.html#translate"},"N1aF2xYTcmVy30C12nSNy":{"uri":"/melonJS/docs/melonjs/Container.html#union"},"WLeXDc6sJhSI3NsfL4BXL":{"uri":"/melonJS/docs/melonjs/Container.html#updateBounds"},"7FBSrGPH9XBeP67jZungr":{"uri":"/melonJS/docs/melonjs/Container.html#draw"},"e2HMwgKNRas1Z2B47V2RA":{"uri":"/melonJS/docs/melonjs/Container.html#update"},"4JbQjsItRRt786bKyTCrn":{"uri":"/melonJS/docs/melonjs/Container.html#onAnchorUpdate"},"E5EsfMDX8vi4sAPzmR-W6":{"uri":"/melonJS/docs/melonjs/Detector.html"},"nNVe1-GlU_PwJW8x6telK":{"uri":"/melonJS/docs/melonjs/Detector.html#response"},"hdWZqui2CMMEmD-lH4lH3":{"uri":"/melonJS/docs/melonjs/Detector.html#collides"},"0KaoYJ2NDHBVqqynyRNOM":{"uri":"/melonJS/docs/melonjs/Detector.html#constructor"},"coGfqBFiAdHsSLPRe8sTt":{"uri":"/melonJS/docs/melonjs/Detector.html#shouldCollide"},"Wgn3Iijtf7mucxMklzPWs":{"uri":"/melonJS/docs/melonjs/Draggable.html"},"CsUvKVVVkX5N0bJElazZU":{"uri":"/melonJS/docs/melonjs/Draggable.html#alpha"},"03w9SCZvlMy_LBzR8rMdo":{"uri":"/melonJS/docs/melonjs/Draggable.html#alwaysUpdate"},"pBSQg-8PDE6miDTvGzr46":{"uri":"/melonJS/docs/melonjs/Draggable.html#ancestor"},"G8m4oKsG_sN-exRA-VBJu":{"uri":"/melonJS/docs/melonjs/Draggable.html#anchorPoint"},"cpMiN46XXyNxlZ4dN_E4A":{"uri":"/melonJS/docs/melonjs/Draggable.html#autoTransform"},"_XcfBNsZs0m3B1UcCOG2G":{"uri":"/melonJS/docs/melonjs/Draggable.html#blendMode"},"FQMvMnYeBXCfcweElA9M5":{"uri":"/melonJS/docs/melonjs/Draggable.html#body"},"_1AjGsPRAW2nZqatF_LHb":{"uri":"/melonJS/docs/melonjs/Draggable.html#bottom"},"Svn5G5iJHBZGxAo6ypBk9":{"uri":"/melonJS/docs/melonjs/Draggable.html#centerX"},"CZ9EqcfPkHh5s6HavXM4z":{"uri":"/melonJS/docs/melonjs/Draggable.html#centerY"},"yjV778gNZ24hQak8XwIcc":{"uri":"/melonJS/docs/melonjs/Draggable.html#currentTransform"},"s2MFxjwd7X8AoJ0cOzWJn":{"uri":"/melonJS/docs/melonjs/Draggable.html#depth"},"roUcVgBr5ZfRYi5DrQwyB":{"uri":"/melonJS/docs/melonjs/Draggable.html#floating"},"iRNOnzcRujDla_p3GUG9M":{"uri":"/melonJS/docs/melonjs/Draggable.html#GUID"},"hV69CklAWr90eQm78oko0":{"uri":"/melonJS/docs/melonjs/Draggable.html#height"},"pDzaCPtT6CI6NiLh-V48l":{"uri":"/melonJS/docs/melonjs/Draggable.html#inViewport"},"fBrgePNC3BzQxmvDelLtJ":{"uri":"/melonJS/docs/melonjs/Draggable.html#isDirty"},"1Snbc6bLEwRIUcEKO-EmR":{"uri":"/melonJS/docs/melonjs/Draggable.html#isFlippedX"},"fXXVti90PIYMAOeguxSGj":{"uri":"/melonJS/docs/melonjs/Draggable.html#isFlippedY"},"RLVzDiBqwIjzUE3GNJoNR":{"uri":"/melonJS/docs/melonjs/Draggable.html#isFloating"},"X2srJ1Me1sKD6Bs5tL17S":{"uri":"/melonJS/docs/melonjs/Draggable.html#isKinematic"},"S92rxHTkUo1Q12lYbyman":{"uri":"/melonJS/docs/melonjs/Draggable.html#isPersistent"},"yL6jWqfpqhe9tM2F6qM05":{"uri":"/melonJS/docs/melonjs/Draggable.html#left"},"wu5v-tjaEyUtolaKKZixv":{"uri":"/melonJS/docs/melonjs/Draggable.html#mask"},"E4QbbpH154A7fEXg-77rk":{"uri":"/melonJS/docs/melonjs/Draggable.html#name"},"Wdx4G5yQinDrTp9THOXW9":{"uri":"/melonJS/docs/melonjs/Draggable.html#onVisibilityChange"},"YLgaH_VGYkq7zzUUww5de":{"uri":"/melonJS/docs/melonjs/Draggable.html#parentApp"},"-KlCwfbzWpMTidVgBAobh":{"uri":"/melonJS/docs/melonjs/Draggable.html#points"},"9F9Y7OnUYcTwumnL63Wis":{"uri":"/melonJS/docs/melonjs/Draggable.html#pos"},"HV3KzUpq2EmYGvwdwWE6w":{"uri":"/melonJS/docs/melonjs/Draggable.html#right"},"4CxH1C8xAekP6OZWVY4kA":{"uri":"/melonJS/docs/melonjs/Draggable.html#shader"},"kPCaqEfjH6YGivUyL1Lov":{"uri":"/melonJS/docs/melonjs/Draggable.html#tint"},"cJ9aXj_Rk03Htswvi7qyM":{"uri":"/melonJS/docs/melonjs/Draggable.html#top"},"RPYmzJLGW3fteLS0Cv8yh":{"uri":"/melonJS/docs/melonjs/Draggable.html#type"},"P7Se-RlBJRHhj5A9jlQP7":{"uri":"/melonJS/docs/melonjs/Draggable.html#updateWhenPaused"},"_6ME16RTDe6qZjxEbAn_4":{"uri":"/melonJS/docs/melonjs/Draggable.html#width"},"By80-Fq0d8Ey9AJ5r416s":{"uri":"/melonJS/docs/melonjs/Draggable.html#angleTo"},"0Q0X97mIQOZ1ITjIKT-fv":{"uri":"/melonJS/docs/melonjs/Draggable.html#centerOn"},"c1c9mMm06dppaz0VdhZCm":{"uri":"/melonJS/docs/melonjs/Draggable.html#clone"},"vQpMZ2OG94788hlwxDAQi":{"uri":"/melonJS/docs/melonjs/Draggable.html#constructor"},"wiukxIn3p5vPvVeT2TseF":{"uri":"/melonJS/docs/melonjs/Draggable.html#contains"},"5PIpSnqExM3CnVr7mP5Re":{"uri":"/melonJS/docs/melonjs/Draggable.html#copy"},"CtPnBjVW5sbOpYo5333t1":{"uri":"/melonJS/docs/melonjs/Draggable.html#distanceTo"},"nu9t-HzAwZW892KQddo2r":{"uri":"/melonJS/docs/melonjs/Draggable.html#dragEnd"},"CBhUWOQxjpH05KBEfVcso":{"uri":"/melonJS/docs/melonjs/Draggable.html#dragMove"},"NAbAYvvdB9W7Th75K0Byw":{"uri":"/melonJS/docs/melonjs/Draggable.html#dragStart"},"C20gCwaUdAC7fLjIzd0gr":{"uri":"/melonJS/docs/melonjs/Draggable.html#draw"},"QjBFbOPH4tICWSRfOsotW":{"uri":"/melonJS/docs/melonjs/Draggable.html#equals"},"3wknWoc39DqQRXHw5lk0f":{"uri":"/melonJS/docs/melonjs/Draggable.html#flipX"},"rAnHfyig1ftbE8NAZbMJZ":{"uri":"/melonJS/docs/melonjs/Draggable.html#flipY"},"JlBEQXG25SGFspMQcnAJt":{"uri":"/melonJS/docs/melonjs/Draggable.html#getAbsolutePosition"},"RRpry7HFe6jP69itOvoSy":{"uri":"/melonJS/docs/melonjs/Draggable.html#getBounds"},"gc3C3hTzkycZz8e7D3Qc2":{"uri":"/melonJS/docs/melonjs/Draggable.html#getIndices"},"ImzC8TflUBeSpxeSRk2EG":{"uri":"/melonJS/docs/melonjs/Draggable.html#getOpacity"},"OKEVEkMkxg5T1HHMmm6cs":{"uri":"/melonJS/docs/melonjs/Draggable.html#isConvex"},"63UYhpk9kJCV2qP7sLdSi":{"uri":"/melonJS/docs/melonjs/Draggable.html#isFinite"},"tAsKRDuzD9m2z7dPlj1vh":{"uri":"/melonJS/docs/melonjs/Draggable.html#lookAt"},"29vE0lG9QC3GvjzwKlsaA":{"uri":"/melonJS/docs/melonjs/Draggable.html#onCollision"},"oQIn-T5Pwtfqmh6Z1wRkC":{"uri":"/melonJS/docs/melonjs/Draggable.html#onDestroyEvent"},"5Br8b4e_RrArypFKYQ5DT":{"uri":"/melonJS/docs/melonjs/Draggable.html#overlaps"},"EL3gKE09qlV68WVDBdJDU":{"uri":"/melonJS/docs/melonjs/Draggable.html#postDraw"},"FldLM53E4SFf6boC_0Bd_":{"uri":"/melonJS/docs/melonjs/Draggable.html#preDraw"},"raCNJMPOOZ6X10GE9igYz":{"uri":"/melonJS/docs/melonjs/Draggable.html#recalc"},"jU67ukmB8TqDUhJu6QJRd":{"uri":"/melonJS/docs/melonjs/Draggable.html#resize"},"U4Lyxt3ehei853LK0Z7ae":{"uri":"/melonJS/docs/melonjs/Draggable.html#rotate"},"JBb4t6XtIR6SAhteoRNbj":{"uri":"/melonJS/docs/melonjs/Draggable.html#scale"},"TfDXc3qMmoLwiuL23RQkY":{"uri":"/melonJS/docs/melonjs/Draggable.html#scaleV"},"kC9OQAI2ogIlZQZtoH7iJ":{"uri":"/melonJS/docs/melonjs/Draggable.html#setOpacity"},"tuODo3aTiY93u7JqS11T1":{"uri":"/melonJS/docs/melonjs/Draggable.html#setShape"},"Ll7ggvCnT-TzTFXhi2yTl":{"uri":"/melonJS/docs/melonjs/Draggable.html#setVertices"},"ENy6Nlpt1Fwpbj2X3tvcf":{"uri":"/melonJS/docs/melonjs/Draggable.html#shift"},"Cdcu6nQ16qEOeYMrLoSma":{"uri":"/melonJS/docs/melonjs/Draggable.html#to2d"},"Bqpc3eiePbEfj9UM3EyV1":{"uri":"/melonJS/docs/melonjs/Draggable.html#toIso"},"2jCEm2dmr19vGtRRzEpzl":{"uri":"/melonJS/docs/melonjs/Draggable.html#toPolygon"},"oAnGXDVnQYWZ3OiXd3D-_":{"uri":"/melonJS/docs/melonjs/Draggable.html#transform"},"ENVnGFb_K0E1YfYVuV5-L":{"uri":"/melonJS/docs/melonjs/Draggable.html#translate"},"Tai6vHuM45v8_ovZsbs1Y":{"uri":"/melonJS/docs/melonjs/Draggable.html#union"},"3rVLkpxkMm_KBWXEInkqc":{"uri":"/melonJS/docs/melonjs/Draggable.html#update"},"Yb9c6AsUAR0B3MSG5-ELf":{"uri":"/melonJS/docs/melonjs/Draggable.html#updateBounds"},"MRUw4es8uQ5CDbTBb8IBR":{"uri":"/melonJS/docs/melonjs/Draggable.html#initEvents"},"eI3p2LMJl7PmYNAZGa4pd":{"uri":"/melonJS/docs/melonjs/Draggable.html#onAnchorUpdate"},"Zyu9Qn2AMjpM0emTmBC6D":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html"},"5IjqaguzOgZ_SFYuVmrwt":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#alive"},"hES6i7i3gb8YEyIE3EXJa":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#alpha"},"giwY8qAbWShPG4Ow9UKFy":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#alwaysUpdate"},"rKzoHntv4fpXPod8_8j5K":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#ancestor"},"BQQEpkkbMzkvRm4NUA3-t":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#anchorPoint"},"ADcoDwLL8JQvf7Nm0NPkS":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#autoTransform"},"jngGMWp5s1CJLnIF4MosF":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#blendMode"},"b0AjqXLhaUp1IPfcJJguR":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#body"},"8i-iHIaUR-HStktlkNddU":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#bottom"},"axXH7NQp0iXrr1FhS1WdU":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#centerX"},"BWNIb31bXiwHdXTdA5RMj":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#centerY"},"uc-JfSihq9BJEj68s3sGL":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#currentTransform"},"7Byw6ytrESj3GVlPL2B2A":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#depth"},"Ysi_Fy0eFZuCXXe1jRxRs":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#floating"},"xr_3QIFRf6jCzbn1bue62":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#GUID"},"7yMDtNRqJM3CK5YQUDKUK":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#height"},"CdSvf9pY5enr-h5aQzqtW":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#id"},"WbnkagCrmD-lo5bE1pE7L":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#inViewport"},"8REEwluwy9q-ItRgtniqH":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isDirty"},"pwNgWphoy4-wLDgOUFuoD":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isFlippedX"},"1-ItNnMiy239imcxi5HHq":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isFlippedY"},"IfEeUcWMSZqK7qv2mIMPy":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isFloating"},"XdHLAIv5MfBRp0gN-K-Hr":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isKinematic"},"hqHWQLm7j70zlfGLo6sb4":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isPersistent"},"EjV5Uv9IyQNfv0acbZn4F":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#left"},"knnXWWga0Wk5FrmvOFOLQ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#mask"},"inIsqqMSu0DGhhzdr0HGI":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#name"},"ayY7L5Oyuko-QKEtTdKhZ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onVisibilityChange"},"0z-9fK12D9k9bm2HGkQRj":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#parentApp"},"IFuIKMf4AqJYTpGgV7snl":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#points"},"N7v2XvJ2jAa5ELRc0K3OQ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#pos"},"ZbG31HlqSA7PjwOkIH8wo":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#renderable"},"rInO6CBxhsGJbZHqpOnOg":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#right"},"nZhAcnLfqwfsYb6fff4xP":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#shader"},"SvfhvMlT9Bk0QR4jffC6a":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#tint"},"1YeyuzZdm8evBwN3-m4V4":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#top"},"SodnROx2ZYGBNgekyek-6":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#type"},"-fAQIMJ5e12ZCdpN1FT38":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#updateWhenPaused"},"PGFmxnT8CQDKDpAVUrMSK":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#width"},"y4uTZzaLW_NqKKXu7nihr":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#angleTo"},"zrCCSebPsk5SlWeBh66BG":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#centerOn"},"FCKxo84m58uhnVWJ48Zuw":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#clone"},"RVpNx3Zo_sBBUoTAb77rL":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#constructor"},"T56WLtN1GQxfH5Cf1H7DZ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#contains"},"1GbHG55KY6VQ53wa2i2_B":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#copy"},"tdIWPoz8csjY8aqTiAaVt":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#distanceTo"},"c3Ctu-S0o_egBcZ_Hb4Yy":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#equals"},"oipxJ5aWgmVY5AfmR7uWQ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#flipX"},"Dqgz3AThyJCJFnP04QskL":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#flipY"},"rcN9dlwPprAB-5lkObEPR":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#getAbsolutePosition"},"6nIg58M4xQW4lcGcLLD5L":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#getBounds"},"FDYVCbDslh4n9_eAxEyW_":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#getIndices"},"oV0P48yRRo82bEUW9c15U":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#getOpacity"},"vsq3o5lZGF63TmSxVxPU7":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isConvex"},"c3Tem7a8Sfpi6rPypL0YT":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#isFinite"},"A99BuJ8ecig9X55MgD-px":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#lookAt"},"dwpYMW5yEjpDYDhntuDIF":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onBodyUpdate"},"7fXJ6di8X3lFD_K2NKDHX":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onCollision"},"d0J-lls35KJQxRYneUp2n":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onDeactivateEvent"},"bqEGfyde80hn8mP1CDWl3":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onDestroyEvent"},"svgpRIkg0R3qZILQSgbIs":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#overlaps"},"aDei7gFUHdIT34apDEwUN":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#postDraw"},"bze4A9laDOFbGDEuIYo1n":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#preDraw"},"4F-kRItmVDURsQWdXjKU6":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#recalc"},"Ust5PW_Abc1Bp5t0vu3eM":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#resize"},"ZaQYlSsYIbIz5zZxCJDJA":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#rotate"},"o6xaYNYOF8KjBsFBa5jhd":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#scale"},"upZwcrSgLbwvZKgjWQXyJ":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#scaleV"},"OyqYvZ3bthkEL-X1b4e5q":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#setOpacity"},"ZwDvZS4L5pVD6pGcLXMTt":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#setShape"},"oBHBBeogMsW3inckkXOkY":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#setVertices"},"EFOjYEZeHRVf614vzksXI":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#shift"},"pN6PheJu3n3sMkL61PIYp":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#to2d"},"tl-lpoGO9KnhEosoZc09E":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#toIso"},"Ex5SaAqBnsD2zsm26_Yy0":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#toPolygon"},"qwQwAuOT1ZQUBQXUPtGAG":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#transform"},"W11WdbITWm7pMnoAXp86L":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#translate"},"rGurKcjfvClfnhjnFOBmC":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#union"},"BG255AhZm-oezxNfGY_Nd":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#update"},"VtNkCTsUZKIBIipQmpI3s":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#updateBounds"},"4v4q5R7EjGedEohOBM7an":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#draw"},"unn48ZuelJOb8WMuF1CkO":{"uri":"/melonJS/docs/melonjs/DraggableEntity.html#onAnchorUpdate"},"U_IyKGbqIWK15abJxEqzo":{"uri":"/melonJS/docs/melonjs/DropTarget.html"},"HVFXqydKfWn_TYbsj5QHO":{"uri":"/melonJS/docs/melonjs/DropTarget.html#alpha"},"JBEntwDgMCGyJxoj4k4q4":{"uri":"/melonJS/docs/melonjs/DropTarget.html#alwaysUpdate"},"yCxxFO_nPNHuLGTT3ukDd":{"uri":"/melonJS/docs/melonjs/DropTarget.html#ancestor"},"U6ZhFgNbap1-gDpt3_5-R":{"uri":"/melonJS/docs/melonjs/DropTarget.html#anchorPoint"},"YhKpdDlu4eKbqTevPyfBf":{"uri":"/melonJS/docs/melonjs/DropTarget.html#autoTransform"},"J7PIZG5tr6yXzaTHSNzvu":{"uri":"/melonJS/docs/melonjs/DropTarget.html#blendMode"},"N3fIuo5MKGeijGFkz0Qqs":{"uri":"/melonJS/docs/melonjs/DropTarget.html#body"},"HKL_u0D9LHZCrbLPVbAed":{"uri":"/melonJS/docs/melonjs/DropTarget.html#bottom"},"1P70DhTW2vPlWehQgbO-2":{"uri":"/melonJS/docs/melonjs/DropTarget.html#centerX"},"uoOwRcn3_Wo68iRmgJeLE":{"uri":"/melonJS/docs/melonjs/DropTarget.html#centerY"},"Qu_POKGWQZTXj2zvNUavP":{"uri":"/melonJS/docs/melonjs/DropTarget.html#checkMethod"},"-npRCCBwQz1-zVqqfAK7t":{"uri":"/melonJS/docs/melonjs/DropTarget.html#CHECKMETHOD_CONTAINS"},"plQPalgVMH2SaCxQJf8jD":{"uri":"/melonJS/docs/melonjs/DropTarget.html#CHECKMETHOD_OVERLAP"},"d4cblYNI34ut4L8-XOBNl":{"uri":"/melonJS/docs/melonjs/DropTarget.html#currentTransform"},"1GBP-hGea19lItuPkQ-fL":{"uri":"/melonJS/docs/melonjs/DropTarget.html#depth"},"mw2K-lmB39msRXnGB26ft":{"uri":"/melonJS/docs/melonjs/DropTarget.html#floating"},"OJdr0MAcz_8pUyNJi2YzM":{"uri":"/melonJS/docs/melonjs/DropTarget.html#GUID"},"o_zbOmXMnaMAMSV_N7Txc":{"uri":"/melonJS/docs/melonjs/DropTarget.html#height"},"rMotDaNvBN-R1v2SWUc2I":{"uri":"/melonJS/docs/melonjs/DropTarget.html#inViewport"},"hKNCkEVbPFtJvxcao96ks":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isDirty"},"jWGdo5IXHLwM9kHlryMrV":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isFlippedX"},"CwZ7vif7srTJtSAEJEcMT":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isFlippedY"},"DeYvuqJ13dZiae7BYLTe_":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isFloating"},"KJUHjTBani-O26q-tC17-":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isKinematic"},"t7LrUpL223DqmFeTmhqwx":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isPersistent"},"Mlwmw5UsZ2_GcurFQd3ap":{"uri":"/melonJS/docs/melonjs/DropTarget.html#left"},"F3M9rYVJOQ3ExM4tehPo1":{"uri":"/melonJS/docs/melonjs/DropTarget.html#mask"},"y3navT9SHLLuXnLOD50qP":{"uri":"/melonJS/docs/melonjs/DropTarget.html#name"},"90YWLSatpnx3Y3ls9jkT-":{"uri":"/melonJS/docs/melonjs/DropTarget.html#onVisibilityChange"},"8yfWWhiJLGi1aGksUZImk":{"uri":"/melonJS/docs/melonjs/DropTarget.html#parentApp"},"Cj1qj2GIq_1B_14qgLi6A":{"uri":"/melonJS/docs/melonjs/DropTarget.html#points"},"mcOliXn6WgIforZ8jePFs":{"uri":"/melonJS/docs/melonjs/DropTarget.html#pos"},"69olvjXPIxOhvENkUpHgH":{"uri":"/melonJS/docs/melonjs/DropTarget.html#right"},"C-Utu5YsTT2LCGpOE56Zv":{"uri":"/melonJS/docs/melonjs/DropTarget.html#shader"},"I_eBNNshBlAnzJutFNI7V":{"uri":"/melonJS/docs/melonjs/DropTarget.html#tint"},"cYQi68kI7W5_xIXj3kvad":{"uri":"/melonJS/docs/melonjs/DropTarget.html#top"},"d5q1sgkJ4pwuqECcosumW":{"uri":"/melonJS/docs/melonjs/DropTarget.html#type"},"nMEhZpAvLVvnWocC7KKfq":{"uri":"/melonJS/docs/melonjs/DropTarget.html#updateWhenPaused"},"XyuLPrAFT1xPEDxx9_Obz":{"uri":"/melonJS/docs/melonjs/DropTarget.html#width"},"RRjFuT0iBKEnW9otEVPpk":{"uri":"/melonJS/docs/melonjs/DropTarget.html#angleTo"},"d7jJx4dR5Q3LTNyyJfMHb":{"uri":"/melonJS/docs/melonjs/DropTarget.html#centerOn"},"bY4qwt_WtUxpKwS9X8uxh":{"uri":"/melonJS/docs/melonjs/DropTarget.html#checkOnMe"},"D5SFHo1dF4tu6FgOeCe56":{"uri":"/melonJS/docs/melonjs/DropTarget.html#clone"},"KzlmYdIPsGk12NU2h0iiN":{"uri":"/melonJS/docs/melonjs/DropTarget.html#constructor"},"jzEhxokdJJ05wiGWgoSYW":{"uri":"/melonJS/docs/melonjs/DropTarget.html#contains"},"JlX47yO5mqNcJyE9um0RE":{"uri":"/melonJS/docs/melonjs/DropTarget.html#copy"},"a47WDOy9kzPrHdPKzTn-l":{"uri":"/melonJS/docs/melonjs/DropTarget.html#distanceTo"},"oTm5G5jEjQ_pPDcRJ0OaK":{"uri":"/melonJS/docs/melonjs/DropTarget.html#draw"},"sZbmADmWP44zMoZxd0NzT":{"uri":"/melonJS/docs/melonjs/DropTarget.html#drop"},"hHtgaUcN8GDNW32FPNMrn":{"uri":"/melonJS/docs/melonjs/DropTarget.html#equals"},"7ssmJPNtTIoQkzspvGda_":{"uri":"/melonJS/docs/melonjs/DropTarget.html#flipX"},"ENMpSlLUWugq60Hi45VVD":{"uri":"/melonJS/docs/melonjs/DropTarget.html#flipY"},"MZZoOuUcYYaQViAZ0yoGE":{"uri":"/melonJS/docs/melonjs/DropTarget.html#getAbsolutePosition"},"QexrrjKpkOoH5WkTXgdq2":{"uri":"/melonJS/docs/melonjs/DropTarget.html#getBounds"},"imA3fmpIRY7Dms-BrNpeV":{"uri":"/melonJS/docs/melonjs/DropTarget.html#getIndices"},"JxVvrG44ivKBtvOgeKHoy":{"uri":"/melonJS/docs/melonjs/DropTarget.html#getOpacity"},"w8wGyl4gBbFeL1u91P1mI":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isConvex"},"1F8SBAjlUwW9lQEoUSs3f":{"uri":"/melonJS/docs/melonjs/DropTarget.html#isFinite"},"5py7PVIjMIT5THh5GzdWS":{"uri":"/melonJS/docs/melonjs/DropTarget.html#lookAt"},"YEX_qNs2XXBTYWBN-TN_I":{"uri":"/melonJS/docs/melonjs/DropTarget.html#onCollision"},"KC2p7t2KmGL3KYV2mqpRw":{"uri":"/melonJS/docs/melonjs/DropTarget.html#onDestroyEvent"},"AA33X88SrQQGFYVTpa5WM":{"uri":"/melonJS/docs/melonjs/DropTarget.html#overlaps"},"1u4ZtR92K9e-fd4dua38d":{"uri":"/melonJS/docs/melonjs/DropTarget.html#postDraw"},"b61uEBfDaIC9VMQnsuahH":{"uri":"/melonJS/docs/melonjs/DropTarget.html#preDraw"},"ZXr21JTDaoR9dBG1sZv2t":{"uri":"/melonJS/docs/melonjs/DropTarget.html#recalc"},"5qHyjQCy_2LvUbKevvbjC":{"uri":"/melonJS/docs/melonjs/DropTarget.html#resize"},"42f3ZOW1UO9rGyV1E9glc":{"uri":"/melonJS/docs/melonjs/DropTarget.html#rotate"},"CuDj20t1ArKmaXecTmEbd":{"uri":"/melonJS/docs/melonjs/DropTarget.html#scale"},"DsjW50EAUa6NiAPOWc2p2":{"uri":"/melonJS/docs/melonjs/DropTarget.html#scaleV"},"kbrl4Y3K8K97m5TeKgr9B":{"uri":"/melonJS/docs/melonjs/DropTarget.html#setCheckMethod"},"TAcICwN9wRXKFy1xMDhis":{"uri":"/melonJS/docs/melonjs/DropTarget.html#setOpacity"},"stQvFtN8pan5c0oesPwk5":{"uri":"/melonJS/docs/melonjs/DropTarget.html#setShape"},"bZQUxuRT3dBPMOex872St":{"uri":"/melonJS/docs/melonjs/DropTarget.html#setVertices"},"Q8MjpuzkrcSKOOf02IKyk":{"uri":"/melonJS/docs/melonjs/DropTarget.html#shift"},"WPioc8ZT-yeoaXEoBwSxE":{"uri":"/melonJS/docs/melonjs/DropTarget.html#to2d"},"pzzinE6qUUVxh4QmmjSoM":{"uri":"/melonJS/docs/melonjs/DropTarget.html#toIso"},"f6ysMN-670dmaXVhea6zN":{"uri":"/melonJS/docs/melonjs/DropTarget.html#toPolygon"},"7ce6sRdh474sSlMDxT56n":{"uri":"/melonJS/docs/melonjs/DropTarget.html#transform"},"u3Np8nh7AKFCgaxWFMBtV":{"uri":"/melonJS/docs/melonjs/DropTarget.html#translate"},"vfK4usLkq4OUau4fOadnM":{"uri":"/melonJS/docs/melonjs/DropTarget.html#union"},"nZcxRutIcuUUWPTiyH9s7":{"uri":"/melonJS/docs/melonjs/DropTarget.html#update"},"qH4HK0MlcLSYcttzDEpPY":{"uri":"/melonJS/docs/melonjs/DropTarget.html#updateBounds"},"gj_WuLrjLzUkbRnhjYW38":{"uri":"/melonJS/docs/melonjs/DropTarget.html#onAnchorUpdate"},"98VTd3397PthgOUIrw7gl":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html"},"8rO31_IA-z0k5a0vt26y2":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#alive"},"CpKboWDCa23sgXSwBGyJ3":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#alpha"},"BH-R_rqhsYX4CfSghcjhS":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#alwaysUpdate"},"X2QstQWZINXD8Md6TKFet":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#ancestor"},"xUkWWetnuINx6gqf1QSaH":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#anchorPoint"},"hFJyTo0uS4bCgbmKhIpof":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#autoTransform"},"cbb4yzO0FVIPQTFIhsTUO":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#blendMode"},"O_b6BBHizNtkZaMDVQno2":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#body"},"XVt6WWQYWagTEi4Jjp6kx":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#bottom"},"N3r1bWWz6ukqzdW08z-2h":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#centerX"},"QfqwsztKQVs9ODoVt9isT":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#centerY"},"7aLCBa6PkuPZrBg3QitB7":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#currentTransform"},"pJ_03mJQTxWUQwF7fTVLT":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#depth"},"v3_g9V0oy4awcKXbYk-Xh":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#floating"},"XTAD8GGR1_R4ldx-F0V5u":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#GUID"},"4lRAzogRy-fFEXhIjikvJ":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#height"},"aAfwKZmeIQykEhG_g4fQS":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#id"},"H3kAngLR2qv7vIk0YM7gH":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#inViewport"},"o7s7vbNpiHMSo3ebz89Mt":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isDirty"},"9uQ3YM3ZF2uxCjb7DHl2X":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isFlippedX"},"oJGclDL5h4_3xkIFcgg1t":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isFlippedY"},"OD5g5oBcfC5HG5ts14kwT":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isFloating"},"c41OXia4iS8OIC6MyoxyP":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isKinematic"},"ScX1DNzzFf2P0bZpBMGZD":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isPersistent"},"Tg0m83x2sK9Iovq2q3fpS":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#left"},"dI7tv_P9wMyl7mLHYOmJ1":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#mask"},"NKk8ojD1BlufHJMBRpYq1":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#name"},"fICn0eK0-4HPWfU6WOKRY":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onVisibilityChange"},"5DGo2ftfc7vyAQGHkYGLF":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#parentApp"},"fJU5ZnzFWfwd9X7BoKw-Q":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#points"},"mDOPnISw9k2stL0V43SA4":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#pos"},"c5VyergT8gBcoZjTSV3mo":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#renderable"},"9_SyoscHTEFmRl56davOl":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#right"},"DtzAN0_63PhCp-OkFM-pL":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#shader"},"wByp9-XE8il-lop8DPxLl":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#tint"},"fFFgADijMpOL2CDnpsemt":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#top"},"FlORgEML2hNTPQHsOdH-2":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#type"},"0lhHt46XDmg3XoJIG0dEm":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#updateWhenPaused"},"NU2mQFODC4FVHbjtX5MT-":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#width"},"f7TTAddJxcF5ZYBCCG0cd":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#angleTo"},"3D64QosI7AG0Vx3jeZu80":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#centerOn"},"T2mQsDUpKWg3GtBBoU21B":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#clone"},"CKoZdKqLzDcYjUn_qCB6i":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#constructor"},"S1MMusXLrH1m2L8g-efUu":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#contains"},"Vx2PXs1cn2IA5z6C-IW2T":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#copy"},"-tEXjQIMS3838YqF9Fntl":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#distanceTo"},"yO21nLnu05gCK7rXJqsbP":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#equals"},"OhFJ6BVMorWIzrqY30saZ":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#flipX"},"hAA1Y7he9M7j2d36UocAB":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#flipY"},"M1n2UxatwfkszLy2g0ZGU":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#getAbsolutePosition"},"c1nKX11OZn39YMktC669y":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#getBounds"},"XeDk1RyXnJ5PqydXAZAMA":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#getIndices"},"VvwCBRaP5v3aGm2I9O-oK":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#getOpacity"},"q-KF_TSgcwvjAT_cEe_eF":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isConvex"},"lRkaMXzMHcY25WsQEC26c":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#isFinite"},"oIiAzCBLKDbsuqN2Tykzb":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#lookAt"},"icLkC9KT76fzzL9lZC6QD":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onBodyUpdate"},"JJ50strMd4KS3JqDYbLSp":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onCollision"},"ZNjKMpqQJUuAzVseHfOOK":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onDeactivateEvent"},"piyzVHauXC62E574GMDQA":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onDestroyEvent"},"9AvUjPPivBmaBwXw7eEIV":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#overlaps"},"0rNZvZVB1rseFocxHS8Wz":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#postDraw"},"6aoDb2BpWAX8MI0b6YHVu":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#preDraw"},"fsnah2VK1Ht_2SsginFKq":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#recalc"},"Z6fxQ8pZZL8suAxrU_E6r":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#resize"},"j5y2q11HaGsOk0eXBrKbB":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#rotate"},"L7USQHyBXTu7gj3L7WgAU":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#scale"},"6vlkpR5yr5So-J64cT8fE":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#scaleV"},"RVIGjnkQDspndbWMBgn0x":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#setOpacity"},"_l38548GiYpYorWeN8YbF":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#setShape"},"uv8gRZeqU-DzGnhloD6GI":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#setVertices"},"4X3aEeZs6sT4jV5q3t46B":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#shift"},"9X-Tb4SqDey39yr6MehmK":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#to2d"},"cGCtUmeLn_9A3xeo_ObZV":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#toIso"},"abmvOvAzTxmcp-tL1-SD-":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#toPolygon"},"o8i5eniDyxSHOD-xEth3Y":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#transform"},"-nBwaA4JYfSPZiUkXxHYD":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#translate"},"NunZmcig7FGh5K_kouMTY":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#union"},"6nVmbWpCUz0vCS8eujFbu":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#update"},"z5n8IGN0-nXmwblxVjNwD":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#updateBounds"},"a9RDNEt4UIP86NxLwJODg":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#draw"},"Is-BFJSQ9igEGgFuLicYM":{"uri":"/melonJS/docs/melonjs/DroptargetEntity.html#onAnchorUpdate"},"uNFiJ8iOdNaKgCa5NJx_P":{"uri":"/melonJS/docs/melonjs/Ellipse.html"},"QtFa05PGDBlA6gDSwAaKN":{"uri":"/melonJS/docs/melonjs/Ellipse.html#pos"},"8Uj29OASyZPVXXdf1VIaN":{"uri":"/melonJS/docs/melonjs/Ellipse.html#radius"},"icWm6lNpRw30saSwLMXis":{"uri":"/melonJS/docs/melonjs/Ellipse.html#radiusSq"},"Wp0AJHPbhG1Hai7Z9MKAR":{"uri":"/melonJS/docs/melonjs/Ellipse.html#radiusV"},"8m3VP1D3yxlMdFAY8ZxEY":{"uri":"/melonJS/docs/melonjs/Ellipse.html#ratio"},"xvUb7acfTD_opskk4aju1":{"uri":"/melonJS/docs/melonjs/Ellipse.html#type"},"Wcf7yqeBvGqaeAn2W7ENu":{"uri":"/melonJS/docs/melonjs/Ellipse.html#_bounds"},"WzCXCL7NaD7l3h-FM6b3e":{"uri":"/melonJS/docs/melonjs/Ellipse.html#clone"},"5l8bH_YhJpYYlJ8kRU2XE":{"uri":"/melonJS/docs/melonjs/Ellipse.html#constructor"},"aiPMSa7JhWgy8zCeIXVi_":{"uri":"/melonJS/docs/melonjs/Ellipse.html#contains"},"BoX9xypNn0_l4CWVjiNXY":{"uri":"/melonJS/docs/melonjs/Ellipse.html#getBounds"},"kWvrO_7Guw9LihVol_1Fj":{"uri":"/melonJS/docs/melonjs/Ellipse.html#rotate"},"DV1BIxv3Dk3FvA4nzMggF":{"uri":"/melonJS/docs/melonjs/Ellipse.html#scale"},"6A746PeYLqn7YDHbCOSYa":{"uri":"/melonJS/docs/melonjs/Ellipse.html#scaleV"},"Uxfn-Z8_PsiEh0QHqHRMf":{"uri":"/melonJS/docs/melonjs/Ellipse.html#setShape"},"_xlmRKb_geowqgCb5ggrK":{"uri":"/melonJS/docs/melonjs/Ellipse.html#transform"},"LsEZGkZGeg1kcmEknZzHJ":{"uri":"/melonJS/docs/melonjs/Ellipse.html#translate"},"nWjhcM0bP3m9DMtrzBSyV":{"uri":"/melonJS/docs/melonjs/Entity.html"},"NPnZWijLbJnWVHcqrv3bh":{"uri":"/melonJS/docs/melonjs/Entity.html#alive"},"7CbFjgaTVmkdL2CgB3HMv":{"uri":"/melonJS/docs/melonjs/Entity.html#alpha"},"u0BOQpb96rQLP3GwP5yUA":{"uri":"/melonJS/docs/melonjs/Entity.html#alwaysUpdate"},"uSG7P7K__iG6rRJhGeKLG":{"uri":"/melonJS/docs/melonjs/Entity.html#ancestor"},"MdZExMK5HCEBZ6ItYHJL9":{"uri":"/melonJS/docs/melonjs/Entity.html#anchorPoint"},"v1NmBxjQ0VqhDpDxJDdG-":{"uri":"/melonJS/docs/melonjs/Entity.html#autoTransform"},"EpG7ksCYzdGp35Ky9IfJx":{"uri":"/melonJS/docs/melonjs/Entity.html#blendMode"},"NKqz98De6eoIDk9LRW05o":{"uri":"/melonJS/docs/melonjs/Entity.html#body"},"Kvs_pqDvpKi2BoGMVzfJK":{"uri":"/melonJS/docs/melonjs/Entity.html#bottom"},"oiT3aRyU2q3oUUTLQQVlx":{"uri":"/melonJS/docs/melonjs/Entity.html#centerX"},"RCZ_7xQOWFyc1ZlZVMdUt":{"uri":"/melonJS/docs/melonjs/Entity.html#centerY"},"0Wi7ZbtgVz_lnWH_lpsV4":{"uri":"/melonJS/docs/melonjs/Entity.html#currentTransform"},"eKC-YTSk8-hOpT57Gs-Fb":{"uri":"/melonJS/docs/melonjs/Entity.html#depth"},"LxyAWNurQBDniR-lFa-as":{"uri":"/melonJS/docs/melonjs/Entity.html#floating"},"fd9bAtgB1UNtYl2w8wC4W":{"uri":"/melonJS/docs/melonjs/Entity.html#GUID"},"C0HUwWcPwU9QXGq4LJdbl":{"uri":"/melonJS/docs/melonjs/Entity.html#height"},"w75SXgbuLEkf34SKCFX9n":{"uri":"/melonJS/docs/melonjs/Entity.html#id"},"pvoRjrH3QCWds_xZH7ZYk":{"uri":"/melonJS/docs/melonjs/Entity.html#inViewport"},"GHcjgYSseIbLEvs6h-2AY":{"uri":"/melonJS/docs/melonjs/Entity.html#isDirty"},"b4tDL55bdlg9sJASb0icy":{"uri":"/melonJS/docs/melonjs/Entity.html#isFlippedX"},"mW8mnIOhjqLD6LA7PstqN":{"uri":"/melonJS/docs/melonjs/Entity.html#isFlippedY"},"bTIZg77u2MUY-pb6bBdzE":{"uri":"/melonJS/docs/melonjs/Entity.html#isFloating"},"SazWyDQOa1jfjSXBGcyjL":{"uri":"/melonJS/docs/melonjs/Entity.html#isKinematic"},"HGNa1uoVEOCirSFw2kGtW":{"uri":"/melonJS/docs/melonjs/Entity.html#isPersistent"},"W6Tw3J751C-Av3STklqsN":{"uri":"/melonJS/docs/melonjs/Entity.html#left"},"MghgTfD9NNr52qQ9YiW7t":{"uri":"/melonJS/docs/melonjs/Entity.html#mask"},"9witBYcNkOTB88kIAy5Ni":{"uri":"/melonJS/docs/melonjs/Entity.html#name"},"msaVpSE0sWPh8Ttp8-QEO":{"uri":"/melonJS/docs/melonjs/Entity.html#onVisibilityChange"},"9n3NgZkuxSTl5AqJ-41HU":{"uri":"/melonJS/docs/melonjs/Entity.html#parentApp"},"gQJ0ke1LjVRNdxsC2SG0s":{"uri":"/melonJS/docs/melonjs/Entity.html#points"},"sOWcriRf3f3ih5uF77Buz":{"uri":"/melonJS/docs/melonjs/Entity.html#pos"},"hLaGZQ-twAj4ktd7O2ZjJ":{"uri":"/melonJS/docs/melonjs/Entity.html#renderable"},"8xD3iQsoHRRqsXOyZcRBa":{"uri":"/melonJS/docs/melonjs/Entity.html#right"},"KxHhNzXO9P_ZgWOvM0VBH":{"uri":"/melonJS/docs/melonjs/Entity.html#shader"},"mZsFGCzgjsTtZvDoGEBjD":{"uri":"/melonJS/docs/melonjs/Entity.html#tint"},"6CpKMqyfKP5xz8cVyCAc4":{"uri":"/melonJS/docs/melonjs/Entity.html#top"},"79ubOJHofhZxIDEsbshHI":{"uri":"/melonJS/docs/melonjs/Entity.html#type"},"-ll8kVnFRkDV8LkktRKb1":{"uri":"/melonJS/docs/melonjs/Entity.html#updateWhenPaused"},"AncGrjEDnr3sbtdM1MmRg":{"uri":"/melonJS/docs/melonjs/Entity.html#width"},"HYeU0ga9r1rd1fEAEk8O_":{"uri":"/melonJS/docs/melonjs/Entity.html#angleTo"},"hySD04O4ovJbN2a93pP6q":{"uri":"/melonJS/docs/melonjs/Entity.html#centerOn"},"fwueQb-iKe_o_GKmQm5y0":{"uri":"/melonJS/docs/melonjs/Entity.html#clone"},"3jQv-q2fyc-Y0R1LsfIZd":{"uri":"/melonJS/docs/melonjs/Entity.html#constructor"},"g-4839VeV_azbTx6w7Dhc":{"uri":"/melonJS/docs/melonjs/Entity.html#contains"},"D4ds8zF39MAldk_8QuTfo":{"uri":"/melonJS/docs/melonjs/Entity.html#copy"},"A_vFO4evKw1IfVgjuZ9JA":{"uri":"/melonJS/docs/melonjs/Entity.html#distanceTo"},"2wWclRxP5gyacY6qYo7Jj":{"uri":"/melonJS/docs/melonjs/Entity.html#equals"},"n27_aQ6GCAQQGCGP-CozO":{"uri":"/melonJS/docs/melonjs/Entity.html#flipX"},"oZTWXXOXq6eyhd6_LZjKq":{"uri":"/melonJS/docs/melonjs/Entity.html#flipY"},"n6fasLhOxf2L9fkYfKTX1":{"uri":"/melonJS/docs/melonjs/Entity.html#getAbsolutePosition"},"GaSKGedqVuyzdVgQ--rXy":{"uri":"/melonJS/docs/melonjs/Entity.html#getBounds"},"VZDbrbAtaT_1OQVKlJzm6":{"uri":"/melonJS/docs/melonjs/Entity.html#getIndices"},"5lsRV-uqNfIAbk8ScHYVP":{"uri":"/melonJS/docs/melonjs/Entity.html#getOpacity"},"tsBvZsUnMXCNbBlp2HlXU":{"uri":"/melonJS/docs/melonjs/Entity.html#isConvex"},"IWWgev9RAkvZKecDzP365":{"uri":"/melonJS/docs/melonjs/Entity.html#isFinite"},"oWrmckZd7GWg1aJ7AeQSI":{"uri":"/melonJS/docs/melonjs/Entity.html#lookAt"},"upT4pl_kBCXmR8jnIm5PG":{"uri":"/melonJS/docs/melonjs/Entity.html#onBodyUpdate"},"L7Ui4mU8YvonXJ4BNrBP5":{"uri":"/melonJS/docs/melonjs/Entity.html#onCollision"},"okJXIo71HKUIQZACMXIyB":{"uri":"/melonJS/docs/melonjs/Entity.html#onDeactivateEvent"},"FKrwQWCq5gisJOMkuOEiD":{"uri":"/melonJS/docs/melonjs/Entity.html#onDestroyEvent"},"KioLxuhsZMaxIKWf4Ab0A":{"uri":"/melonJS/docs/melonjs/Entity.html#overlaps"},"NUpCKEexkdbA_dNfKQhdz":{"uri":"/melonJS/docs/melonjs/Entity.html#postDraw"},"TOMU0dwStBOp0m3VuONAC":{"uri":"/melonJS/docs/melonjs/Entity.html#preDraw"},"YfiTVsB9NLfWEBRIEs6rJ":{"uri":"/melonJS/docs/melonjs/Entity.html#recalc"},"pS4vp0CUhOCNdgDKXZIpm":{"uri":"/melonJS/docs/melonjs/Entity.html#resize"},"JuX37CAfX1rgIRJHgIaQU":{"uri":"/melonJS/docs/melonjs/Entity.html#rotate"},"7gJ39sRLib6-ocyHKyS53":{"uri":"/melonJS/docs/melonjs/Entity.html#scale"},"zw5_mj7u69gw0XLyc0Dis":{"uri":"/melonJS/docs/melonjs/Entity.html#scaleV"},"qMY9Ce-W6naVhMQ2PEHNf":{"uri":"/melonJS/docs/melonjs/Entity.html#setOpacity"},"mlQI5u30PWdK-3Rd4vrUk":{"uri":"/melonJS/docs/melonjs/Entity.html#setShape"},"eTzadPH5NKz6G515Rcy5X":{"uri":"/melonJS/docs/melonjs/Entity.html#setVertices"},"0kRO61wN9XrV_85GbqiWQ":{"uri":"/melonJS/docs/melonjs/Entity.html#shift"},"AG6j7cw8wWZ-atVWpSLly":{"uri":"/melonJS/docs/melonjs/Entity.html#to2d"},"bv1p52DzXs6wEjEfevWgN":{"uri":"/melonJS/docs/melonjs/Entity.html#toIso"},"BmpkAecodGT6lPnNIEb8u":{"uri":"/melonJS/docs/melonjs/Entity.html#toPolygon"},"zQLlfP7hVVzEx_WydzzU9":{"uri":"/melonJS/docs/melonjs/Entity.html#transform"},"FCdosm9fkokS7w3zdWsrv":{"uri":"/melonJS/docs/melonjs/Entity.html#translate"},"7V5u7HwqBXKqfHyOuAv2t":{"uri":"/melonJS/docs/melonjs/Entity.html#union"},"z2yPbzDi0ns6c5l-eWSDF":{"uri":"/melonJS/docs/melonjs/Entity.html#update"},"nYrXn3Lm62sPu85XxDBTX":{"uri":"/melonJS/docs/melonjs/Entity.html#updateBounds"},"ZqQrxKZBWaWBoD3RGSGbm":{"uri":"/melonJS/docs/melonjs/Entity.html#draw"},"Jz_pPgwMneC0ZqEdckvIw":{"uri":"/melonJS/docs/melonjs/Entity.html#onAnchorUpdate"},"XHquXAzbh2RrS7-W8QcKJ":{"uri":"/melonJS/docs/melonjs/GLShader.html"},"l_z2eK7bnqs53I6l1HrdZ":{"uri":"/melonJS/docs/melonjs/GLShader.html#attributes"},"KlKzdr4OhMUyLQnTl5ZIz":{"uri":"/melonJS/docs/melonjs/GLShader.html#fragment"},"klmXkLB9l9adoOHtMxOZN":{"uri":"/melonJS/docs/melonjs/GLShader.html#gl"},"JxkT8_UTno29YR0EVC-LN":{"uri":"/melonJS/docs/melonjs/GLShader.html#program"},"HYbmSKpkbDR3s0McCjm14":{"uri":"/melonJS/docs/melonjs/GLShader.html#uniforms"},"XGSIg3PQSCT_joMYqWUAC":{"uri":"/melonJS/docs/melonjs/GLShader.html#vertex"},"_obrKKRhHw-awQ7vyGXd3":{"uri":"/melonJS/docs/melonjs/GLShader.html#bind"},"nDBopj22pPNlboiQThIg1":{"uri":"/melonJS/docs/melonjs/GLShader.html#constructor"},"U2yoMFRsjyOqOdMet7ymG":{"uri":"/melonJS/docs/melonjs/GLShader.html#destroy"},"ErOr71d-7asNB75RiK5DN":{"uri":"/melonJS/docs/melonjs/GLShader.html#getAttribLocation"},"QFD2mnttuCmVZzzvh015o":{"uri":"/melonJS/docs/melonjs/GLShader.html#setUniform"},"Ae0HfsNdiRrDIZxH6bViB":{"uri":"/melonJS/docs/melonjs/GLShader.html#setVertexAttributes"},"Y9UwEN6N-WA8IRRP6Qps0":{"uri":"/melonJS/docs/melonjs/GUI_Object.html"},"W5w0lTM2EqxgdyVUpj080":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#alpha"},"KoZ172u424VzdlXkXBGG3":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#alwaysUpdate"},"lEjc28g-bdUXyxxrXISVV":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#ancestor"},"-ZgDsaQDCY-TxSJF5DQI8":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#anchorPoint"},"DpSNe88R9xFoIqaIFZ6yN":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#animationpause"},"-pMUm6PivwP92Nnwu-qpd":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#animationspeed"},"1IkhEFPHYaoV53Uz17F57":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#autoTransform"},"U6OituRpFJttrhrRNtExj":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#blendMode"},"myEfzxXzKouvdoDm96uVA":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#body"},"Xl24k9h6JK2Bk58WB3NIw":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#bottom"},"s0UNW1xpF0qS2qar5llBy":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#centerX"},"XbsQ7jPGXmMD1i2yWfcDO":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#centerY"},"y0W63WmE8Dg2IpDGGbMXe":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#currentTransform"},"yTZtI2rOoee_Iioxbg3yd":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#depth"},"ezlvDeZWqQrj-Zb3Kd-iS":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#floating"},"H2POjmt_thbJ7n3vSHgDI":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#GUID"},"5NE7B7Fp5WvH8btTKjebO":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#height"},"ki-fp3sSwbJKkH8aov7De":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#inViewport"},"ZuJPXqN0vwX06g29H3qwC":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isDirty"},"sQrPrjG-zopUNuXc8djrE":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFlippedX"},"IVhZe8eQOorQY4ALpSqwr":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFlippedY"},"WZwOAXkGHiKjH1Aigx4dQ":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFloating"},"pUNbH-65POy_3f_dhwWiJ":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isKinematic"},"zYkyOEvz4KWa-4qcTsrzE":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isPersistent"},"MXX9NWs67aQDUz1eBxEV6":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#left"},"rurkUrpiiL3m04mg0KrjB":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#mask"},"YcdOEEt9__X-VlqqV6_V0":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#name"},"yOnLD9fbZOOxEWFMP664W":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#offset"},"QTPkLLphCO-zwksv8cmPX":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#onVisibilityChange"},"Nmv_T0IxTHoqrhuPfbaqE":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#parentApp"},"UMkISwyBbK4T-45Epcktu":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#points"},"iql1J9hUzdpiG1Xt7PCUR":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#pos"},"H--ULZaaoIvGENnKreC2g":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#right"},"IH--1r6WS7mXouGkOWP8M":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#shader"},"9JnEds7IYNFM1I8jrYly_":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#source"},"IupdboLDNe9ei-USdNCkc":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#tint"},"u9IGCzRON7Ug5G23dFTDf":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#top"},"R8id47AuMAxhsMdmg1ZdI":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#type"},"OpydECO7UuGbDPH7G6J3q":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#updateWhenPaused"},"RfkCjemBZAhYibWK1rLbd":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#width"},"qC_N9kTtVOYwPFdhxCXaz":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#addAnimation"},"ePrpnZ3UD88v3YZUpHULc":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#angleTo"},"s43jLodj5fxA7pO8pCvOs":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#centerOn"},"_K-tC1TE3ZlaoKp6-VGZg":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#clone"},"Tk4zTmN0MzwPOx-Am8TiP":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#constructor"},"9zowcpxQZEPSMyeIwxGqu":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#contains"},"iij3Qqgd1HUh4vHnbPYuq":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#copy"},"VWWWkVnpYnK2LWqvIHfvW":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#distanceTo"},"TYotWYZK8q7TrYEHzESOW":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#equals"},"PjxkRa_shHVThcEA2DP8z":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#flicker"},"6wpD_mtgIEx1lpek3aFTS":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#flipX"},"axSuntBIh8SsxeREMHBgx":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#flipY"},"LaH9ImJ_U21k1K--9bffV":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getAbsolutePosition"},"ueHzNarVrYjPklGIN5ely":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getBounds"},"KRMzV6xAwxPVUb0kKJNDF":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getCurrentAnimationFrame"},"4kXTAItYqxpTFj39cEcUh":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getIndices"},"hQ8T1OoV8v58PtqKGRa-b":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#getOpacity"},"vTmQBuLzXZ0KQrQGRBXDR":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isConvex"},"upr6GjpJvR7HDQ_pr6A4u":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isCurrentAnimation"},"Ky0IoC-erQfUd6cNyxgAc":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFinite"},"A3EKyRmjrBCoCvoff16d-":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#isFlickering"},"Cm876J8mUq6lyfP0DJM1T":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#lookAt"},"9e8aUQQW0AqL0wz8khiVJ":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#onCollision"},"nsw4Z5iu9_JW83ZhQwhdo":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#onDestroyEvent"},"TVUqwzKJWOvvLbZEXkcAp":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#overlaps"},"rtd3qSwD_okVMg9pwqQ8t":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#postDraw"},"JlC4nI0gkKEhHtljX_bVD":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#preDraw"},"zFRwO5zGDS-nihXb7Kj94":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#recalc"},"wpxQ1ES4h7wnkXFrDODTe":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#resize"},"zuOxJao1PP0siBrV_hJ5B":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#reverseAnimation"},"7o5IlfGteF_fH_ThOEptp":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#rotate"},"IvfqnBqJPIcnUi2MyqjEs":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#scale"},"Q9Tc5kwPCmd4ezGO1Y208":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#scaleV"},"DUNLlgTNanNUFF1l79Oy0":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setAnimationFrame"},"Bp-yoazv8MP4-HvlSvAAN":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setCurrentAnimation"},"0GSQTjZvUm4teT0vZTaWt":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setOpacity"},"xqeN6jJGmi5aSqBSIeia-":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setRegion"},"0_WqM4pmEzkmsFV7o0ZZ0":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setShape"},"O6Nc1tPjgMPHWjiShyMCb":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#setVertices"},"PKib6mYv0i-8gpCjBzPoS":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#shift"},"mvK3hnVlm_LnoYlP7w5vM":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#to2d"},"BvTpif1Ke40NUeCc92w0X":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#toIso"},"yC5_EFFEHZMLqQxsB5By7":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#toPolygon"},"l2rLDc41fIE5O99nnTy1g":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#transform"},"G0U2i6qDsJU51E9VQJk3H":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#translate"},"dgkqCcUiADWyVkOPVxC1v":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#union"},"7SAN2i0fqrSOCBy9ToUkH":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#updateBounds"},"Q1mjRGY58DtAXKkqODjr8":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#draw"},"foBO3E6Br2I9kMzO835Au":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#update"},"P-XV68aOkLNkeF1PMDvUh":{"uri":"/melonJS/docs/melonjs/GUI_Object.html#onAnchorUpdate"},"ktF88S1gRPmraL2ktTmQG":{"uri":"/melonJS/docs/melonjs/ImageLayer.html"},"mYRiQpGpU9jbWMO9-9xvG":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#alpha"},"jNvnBFx3V-ZOPL6VhCmGw":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#alwaysUpdate"},"ptAC5jSIng29AWLu76v8r":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#ancestor"},"0mMyWWjx3xuhFdOPCT2z-":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#anchorPoint"},"-VGC-OihF0xiJ_2_PKLX5":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#animationpause"},"ljE9JfMMa9kigv6e4cCxW":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#animationspeed"},"JRVC_q8skpJLx9b80KzBG":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#autoTransform"},"BTnCPoJC9SMNoH229z08o":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#blendMode"},"16Yzx8pgpXvJSk3x7MeSj":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#body"},"p4bljuqBLywUH0bIpo_2o":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#bottom"},"H3nV5m09oP9-Q782SrUBO":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#centerX"},"hKMH-AJWw6OrmDJO4HdS2":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#centerY"},"PNu0PSqyenxs6YK73Caff":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#currentTransform"},"MyuRwHnkzRCITfzNn00e8":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#depth"},"hMfWnGDajl7Z9rr1cnAc-":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#floating"},"2cAoMa9DRn4SgBvss1tHX":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#GUID"},"XZmPF7Spf78U_YRz7_LOo":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#height"},"e2vzBvwZec3caH4PUzEVK":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#inViewport"},"TUxA2w2MklpHsVwj_L5CI":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isDirty"},"MIDsWz3QfSo9syTBeSULO":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFlippedX"},"wOcooXLyqxIcLcpfqRh7h":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFlippedY"},"hUiTvodmMxlWhWlcmCasA":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFloating"},"vwLAvB78hjojbmxdTJQ8B":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isKinematic"},"MD_1up-_j7donA_XSHxak":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isPersistent"},"IYJBQxJ5eku1MSsI1PUnQ":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#left"},"9TnxlW59XolVSm7K1jYr_":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#mask"},"v2aMOihtrxVOOWQlN5jzH":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#name"},"WpnzPjVxlkPp-3ceiJ1zY":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#offset"},"DbkPazMHhd0ZhXyAGurf9":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#onVisibilityChange"},"qtdN1ZFznRa-rJCyGfyy7":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#parentApp"},"68uR1F1Bn6X2Gu_MMioBH":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#points"},"Pzx6FzZQAbupswe7q2_eb":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#pos"},"r3KdkRQFrYeDCOWn9j2Uw":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#ratio"},"KT3jAF18M0jCDr1T0ocge":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#repeat"},"sbba5WI7qVTXQuR4oD09Z":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#right"},"VfaSQ-S4wBS78cVy-nkHU":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#shader"},"R3KBJU9oADvXbEfv2CbME":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#source"},"yPDuMHd4mDGOXse-80eWn":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#tint"},"Ocx4GTemTT8LUBLUJcOTc":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#top"},"6qDJzj-yKKOiXpcdp5Q3D":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#type"},"tvjfGMMZcRBXHrK0_7Jtv":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#updateWhenPaused"},"NiR51SuyYCwY96igBbj-_":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#width"},"DyGXXfJy0nvD7KWrAld8n":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#addAnimation"},"f6eWQsOpIq-zyKlBObcMS":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#angleTo"},"cIc-ioX7KBiq3VK_Ex9tr":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#centerOn"},"icoC0zW-q6kRdwY5wTV_r":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#clone"},"H1eGbmJwC6uBU-WxPdYMZ":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#constructor"},"ANQ_fLz3FqgE6V-5Mv2DE":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#contains"},"fXGJ-HA8TQua_OwVSLK4-":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#copy"},"j8js3K44tPNU3bHtV8RQ9":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#distanceTo"},"AS1bli31_6mmtDFqvVwsl":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#equals"},"EDuuve8wxLxs2t-uKt8hz":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#flicker"},"gK1AJQ261gmbxJfkn2O2X":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#flipX"},"u_lYWM4pTwE3YkcRWYf0E":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#flipY"},"lA_b-aSxi5GIFMmagnC3w":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getAbsolutePosition"},"HHN_ZBvC8GJjannqe-ryj":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getBounds"},"7UZENI8z6ldBq7BLvXEzE":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getCurrentAnimationFrame"},"myJWdi1FtgNBcTga-yohU":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getIndices"},"IjV6V29j0hE9m3UPErJKj":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#getOpacity"},"vQ69L19Eu463lqRuWj1wX":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isConvex"},"5R2I6HhSmRfn5WGELZmV6":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isCurrentAnimation"},"BkB3xKbPnA-UwGk8hq_zm":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFinite"},"Okq5ZyeZoy7opRtSpeNBh":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#isFlickering"},"ay8tGOh0dkijM3_aIMAbf":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#lookAt"},"1aLNdvKxWRZmo0KanbrcW":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#onCollision"},"S3HwdIA0rFoRSrELIUwca":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#onDestroyEvent"},"KDL8xDxqVK3hMDBLym1eG":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#overlaps"},"w3xrbpXVf6Ussp2DuU59f":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#postDraw"},"P0qzst0VbbRqjp-1-1Bed":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#preDraw"},"HOat_youN6Cjhjm9rqzZp":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#recalc"},"6Q_t8y6qwdyqOfyb210jS":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#resize"},"8YzMvQv8rLSKN9Gz7TFs0":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#reverseAnimation"},"3BdRB7qKFSqKU-OnkLpgg":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#rotate"},"ylNOs_4zUp6x91gnao3zb":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#scale"},"g9lkTuQZ4OBCFis3uzF8v":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#scaleV"},"rdih_PRgVlQRoer0cPEhA":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setAnimationFrame"},"hSaQd58fg7uxp8F5wyuI1":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setCurrentAnimation"},"AwM7oFtourbsuehTQmhKS":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setOpacity"},"_CfD4XdrZXqXozphuTqgy":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setRegion"},"lRcwpylvRulMWtKtap5J8":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setShape"},"fxqITKV_R9bA1e2o8BrOl":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#setVertices"},"V9OgaoIpiNp14RgkzxYOP":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#shift"},"CVFNdU2x3TGoGcnn6l5pV":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#to2d"},"jD4aVyAJ2S11NbVd4GFXz":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#toIso"},"eAyzJrBsI8dBTgk6uw4TQ":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#toPolygon"},"I1-vtss5Q0QTp2uSkf_rW":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#transform"},"NRc_8t9reckbQMeL1tjDB":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#translate"},"lVDIIezck3qZki_oYMOE-":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#union"},"3N3qhm1U-ml1zM8cSRG1P":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#updateBounds"},"MFwrc5d3NtIM5C-GPtpP7":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#draw"},"N7idRgEKs8J4gGCjfYlX9":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#update"},"W5821YBUK16VgM6-cSO8j":{"uri":"/melonJS/docs/melonjs/ImageLayer.html#onAnchorUpdate"},"YeYxPTTZSzVtDvPnk0ZTG":{"uri":"/melonJS/docs/melonjs/Light2d.html"},"_XzQNUiCZg-K6yb5RbKIp":{"uri":"/melonJS/docs/melonjs/Light2d.html#alpha"},"5TMYYMeZorbBAVueW5nXP":{"uri":"/melonJS/docs/melonjs/Light2d.html#alwaysUpdate"},"ybznZtuU5PPTE5AWec6YM":{"uri":"/melonJS/docs/melonjs/Light2d.html#ancestor"},"52li8W_ngzyM3VsMpUx45":{"uri":"/melonJS/docs/melonjs/Light2d.html#anchorPoint"},"U48kPCXRk7LVpDGVDVGOR":{"uri":"/melonJS/docs/melonjs/Light2d.html#autoTransform"},"vnMpfUIcp9Qi8j0xZtErX":{"uri":"/melonJS/docs/melonjs/Light2d.html#blendMode"},"XeiO8QlVwPUHQbjxXTdoq":{"uri":"/melonJS/docs/melonjs/Light2d.html#body"},"Pv3hHNoT0FjN2crLrR-gK":{"uri":"/melonJS/docs/melonjs/Light2d.html#bottom"},"L4gdpqqTu8PSfLzI-N_bW":{"uri":"/melonJS/docs/melonjs/Light2d.html#centerX"},"GNnAbbZ-H0wS5wF2A1TWB":{"uri":"/melonJS/docs/melonjs/Light2d.html#centerY"},"1W9o_XAmi5zyJyLfnHc51":{"uri":"/melonJS/docs/melonjs/Light2d.html#color"},"6QhLiqi8rFk62FU4bwR8E":{"uri":"/melonJS/docs/melonjs/Light2d.html#currentTransform"},"jFeaoKEwY9jZ0zVe73o3Y":{"uri":"/melonJS/docs/melonjs/Light2d.html#depth"},"iYjKQ724B-i5Bq7gowr2R":{"uri":"/melonJS/docs/melonjs/Light2d.html#floating"},"TPazRQehp7E9O1kw_Aaf-":{"uri":"/melonJS/docs/melonjs/Light2d.html#GUID"},"FxIMIopoUmoozkQEGCBT3":{"uri":"/melonJS/docs/melonjs/Light2d.html#height"},"OATRouUX3gg5Cu429N5VW":{"uri":"/melonJS/docs/melonjs/Light2d.html#intensity"},"KkNZ1vrRaLdsAwe85WPgy":{"uri":"/melonJS/docs/melonjs/Light2d.html#inViewport"},"pxNpCFTgDV_QxZacZtFFH":{"uri":"/melonJS/docs/melonjs/Light2d.html#isDirty"},"x-IoB-p9ukD6t4mkU9Kw4":{"uri":"/melonJS/docs/melonjs/Light2d.html#isFlippedX"},"l4yQJAH0lesLVaj1Pe4ES":{"uri":"/melonJS/docs/melonjs/Light2d.html#isFlippedY"},"YAi1vV6XNWy2YfCAcN2kZ":{"uri":"/melonJS/docs/melonjs/Light2d.html#isFloating"},"ccuDSErbUQ8iUswkKNUe8":{"uri":"/melonJS/docs/melonjs/Light2d.html#isKinematic"},"lWDS6vLbJLpHALAS8jn4w":{"uri":"/melonJS/docs/melonjs/Light2d.html#isPersistent"},"kHRElJGJG4HT5f5R7F3QQ":{"uri":"/melonJS/docs/melonjs/Light2d.html#left"},"YNK2v75U9ChPPJ_YuSGJ1":{"uri":"/melonJS/docs/melonjs/Light2d.html#mask"},"3O-Lo83SFL1Qinmd9z9oI":{"uri":"/melonJS/docs/melonjs/Light2d.html#name"},"i4320P0Yx35dBU702ZC4k":{"uri":"/melonJS/docs/melonjs/Light2d.html#onVisibilityChange"},"k6pSoYSOrbRms2DmoldXD":{"uri":"/melonJS/docs/melonjs/Light2d.html#parentApp"},"dEIuSDDA7WnNuzyYZABUB":{"uri":"/melonJS/docs/melonjs/Light2d.html#points"},"7d0q09PTHcoFgzW1VqFil":{"uri":"/melonJS/docs/melonjs/Light2d.html#pos"},"qd7nAUaTgxf0ekkmUahmM":{"uri":"/melonJS/docs/melonjs/Light2d.html#radiusX"},"HrTIcGT0qwrZHI2hZcFBO":{"uri":"/melonJS/docs/melonjs/Light2d.html#radiusY"},"y0uh54RJLzGnFQfXBhDW6":{"uri":"/melonJS/docs/melonjs/Light2d.html#right"},"19S2yAE77SBoAmxaqUxl_":{"uri":"/melonJS/docs/melonjs/Light2d.html#shader"},"AeakzUMkjmhiLu7dQtssK":{"uri":"/melonJS/docs/melonjs/Light2d.html#tint"},"Tkvoan7S6LHIK41X7BRgL":{"uri":"/melonJS/docs/melonjs/Light2d.html#top"},"g7UJAKZNW71V3GQMHqxZD":{"uri":"/melonJS/docs/melonjs/Light2d.html#type"},"lBV0-4X9ZbysFJCoG8sS5":{"uri":"/melonJS/docs/melonjs/Light2d.html#updateWhenPaused"},"YCW2T3Uy845HIvoUadMsy":{"uri":"/melonJS/docs/melonjs/Light2d.html#width"},"_RwWUqpanhMTPkVm_Q2gP":{"uri":"/melonJS/docs/melonjs/Light2d.html#angleTo"},"ILucPEEV-FhRiMP20JxF1":{"uri":"/melonJS/docs/melonjs/Light2d.html#centerOn"},"xNcBnBH3ij2IuCPGmZfji":{"uri":"/melonJS/docs/melonjs/Light2d.html#clone"},"za9xqLJHdWFp5wJpKhvt6":{"uri":"/melonJS/docs/melonjs/Light2d.html#constructor"},"fBmevRZUYlm0P7LhPr3F2":{"uri":"/melonJS/docs/melonjs/Light2d.html#contains"},"7RIQJ6IXLovWz0MRJz_pj":{"uri":"/melonJS/docs/melonjs/Light2d.html#copy"},"GHQ06GppxEEfZ_r78mfdP":{"uri":"/melonJS/docs/melonjs/Light2d.html#distanceTo"},"aFilzNAYMy5IqvxnA9IHf":{"uri":"/melonJS/docs/melonjs/Light2d.html#equals"},"v2fJgPdlyjwCUwXzOVnIy":{"uri":"/melonJS/docs/melonjs/Light2d.html#flipX"},"a-O6xiuUetDNADaXFDJ3S":{"uri":"/melonJS/docs/melonjs/Light2d.html#flipY"},"oldrXS6UNj7LlbEuC8ZgG":{"uri":"/melonJS/docs/melonjs/Light2d.html#getAbsolutePosition"},"Wut38i1Kaplzum80qDc5V":{"uri":"/melonJS/docs/melonjs/Light2d.html#getBounds"},"OCMznglAh04-xSe3dLQe1":{"uri":"/melonJS/docs/melonjs/Light2d.html#getIndices"},"4Cc8IE6lcSJgw6Y4uIT0K":{"uri":"/melonJS/docs/melonjs/Light2d.html#getOpacity"},"bZGXF2V6Y3EKXjuwIZ207":{"uri":"/melonJS/docs/melonjs/Light2d.html#getVisibleArea"},"pZ_zcP9I4GY5Z3AOjtZZa":{"uri":"/melonJS/docs/melonjs/Light2d.html#isConvex"},"3E7Bcc6griSAk1znOkcj7":{"uri":"/melonJS/docs/melonjs/Light2d.html#isFinite"},"gf3QieL9CG-tKHw34fA0h":{"uri":"/melonJS/docs/melonjs/Light2d.html#lookAt"},"oJECVht0Ys3grDarxaZz2":{"uri":"/melonJS/docs/melonjs/Light2d.html#onCollision"},"IjcbnWT7jjLV7H02zVG8S":{"uri":"/melonJS/docs/melonjs/Light2d.html#onDestroyEvent"},"4sPGx376VE7xULRkMxyx4":{"uri":"/melonJS/docs/melonjs/Light2d.html#overlaps"},"UpwGCvu4QeiBM4JgO6I8J":{"uri":"/melonJS/docs/melonjs/Light2d.html#postDraw"},"2256-UYJCAg8Cy1XP9mr5":{"uri":"/melonJS/docs/melonjs/Light2d.html#preDraw"},"Rfer4x2HSavvPNyz1szT2":{"uri":"/melonJS/docs/melonjs/Light2d.html#recalc"},"usLOKpJDgvBjVjXCGLzNt":{"uri":"/melonJS/docs/melonjs/Light2d.html#resize"},"6rc6gkzUIPxVAgFOFOWxY":{"uri":"/melonJS/docs/melonjs/Light2d.html#rotate"},"ytt1gNUt-0WhOkYy8WGmf":{"uri":"/melonJS/docs/melonjs/Light2d.html#scale"},"zzvYjLcCz0VkevJ6ZElL6":{"uri":"/melonJS/docs/melonjs/Light2d.html#scaleV"},"nyyHCkpU1WygJiaS5CH1d":{"uri":"/melonJS/docs/melonjs/Light2d.html#setOpacity"},"NM8WojgDO_0e-XefJmyp7":{"uri":"/melonJS/docs/melonjs/Light2d.html#setShape"},"tq1SIjUmWebD3N05QcrE8":{"uri":"/melonJS/docs/melonjs/Light2d.html#setVertices"},"wWicTXI4BOcB6yToA6K7x":{"uri":"/melonJS/docs/melonjs/Light2d.html#shift"},"3EYHKwaENzOT7aJsUcSy-":{"uri":"/melonJS/docs/melonjs/Light2d.html#to2d"},"lKWefuVfKDSJV1TN_JcwV":{"uri":"/melonJS/docs/melonjs/Light2d.html#toIso"},"8KEWmOvWR2jPPstGRt6-2":{"uri":"/melonJS/docs/melonjs/Light2d.html#toPolygon"},"NQlbq-XboqbAzYq8bLWT_":{"uri":"/melonJS/docs/melonjs/Light2d.html#transform"},"FyUvCyWS-p__LaMDV5n6_":{"uri":"/melonJS/docs/melonjs/Light2d.html#translate"},"QVaDyhUEOi5dPOp9Xit3t":{"uri":"/melonJS/docs/melonjs/Light2d.html#union"},"03sOXmAjb_eXoFe-3hjg5":{"uri":"/melonJS/docs/melonjs/Light2d.html#update"},"p9kal_ZQ10sHJzRYlNLNh":{"uri":"/melonJS/docs/melonjs/Light2d.html#updateBounds"},"NfCxK6pSRBDIuq8gNxgrP":{"uri":"/melonJS/docs/melonjs/Light2d.html#draw"},"970NCEhy4OaSN-ls98wlQ":{"uri":"/melonJS/docs/melonjs/Light2d.html#onAnchorUpdate"},"kj3-aSz56mR77pfz4PA53":{"uri":"/melonJS/docs/melonjs/Line.html"},"Sj0py0jDb6o7m8o0wKWsb":{"uri":"/melonJS/docs/melonjs/Line.html#points"},"a0bVCH174rUPZF91Q6cXs":{"uri":"/melonJS/docs/melonjs/Line.html#pos"},"eTsBzn07mtvQtjHp25Quq":{"uri":"/melonJS/docs/melonjs/Line.html#type"},"9eOIheKnABV6BK4fGIgY2":{"uri":"/melonJS/docs/melonjs/Line.html#clone"},"U3kq8hLAeSI-sN0eYx6ya":{"uri":"/melonJS/docs/melonjs/Line.html#constructor"},"ZTnhubN5ouzjt-K-86ZfP":{"uri":"/melonJS/docs/melonjs/Line.html#contains"},"iqCum8ZVvG6sbz-f8k9ML":{"uri":"/melonJS/docs/melonjs/Line.html#getBounds"},"VFwALUXmToz3spHScN8yg":{"uri":"/melonJS/docs/melonjs/Line.html#getIndices"},"q3ER_HkS9FMb8RQ_gyWgF":{"uri":"/melonJS/docs/melonjs/Line.html#isConvex"},"mcJVptkaviK8e9gAQIczu":{"uri":"/melonJS/docs/melonjs/Line.html#recalc"},"ruVrWVICC-__AP_9L_gIz":{"uri":"/melonJS/docs/melonjs/Line.html#rotate"},"qkbhUMv1tMICbkZ4hEjKL":{"uri":"/melonJS/docs/melonjs/Line.html#scale"},"j3hE_UmRhAcqUAELRJUcs":{"uri":"/melonJS/docs/melonjs/Line.html#scaleV"},"QeQ3GilbHha43SJJo3Wnm":{"uri":"/melonJS/docs/melonjs/Line.html#setShape"},"IJsE_Z1tnbUg7uQk6c8tB":{"uri":"/melonJS/docs/melonjs/Line.html#setVertices"},"Nr93F3OH0oO1BDHh__4T7":{"uri":"/melonJS/docs/melonjs/Line.html#shift"},"MLusDnAsVVX2TwXAWiJi5":{"uri":"/melonJS/docs/melonjs/Line.html#to2d"},"Tnor4K37DFaaDkaPlxwgP":{"uri":"/melonJS/docs/melonjs/Line.html#toIso"},"zI3RytLRb3unzKqjouVUJ":{"uri":"/melonJS/docs/melonjs/Line.html#transform"},"G9ulQuqgQyhp9SiHnJfwU":{"uri":"/melonJS/docs/melonjs/Line.html#translate"},"vtCZ64qUuCj9XVq5iAMI2":{"uri":"/melonJS/docs/melonjs/Line.html#updateBounds"},"Y7IWI489tcaaIS89yFNfO":{"uri":"/melonJS/docs/melonjs/Matrix2d.html"},"TbzcyZ9gEx8_gNA58EiPZ":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#tx"},"UPefECzIKkLDHiKx6gCfo":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#ty"},"Y2zYwRh8ZocMsvrOlUgwe":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#apply"},"MKj8wkKV1NaHAnuwE_UdO":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#applyInverse"},"tExImhnTsrik2h6kzCMy8":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#clone"},"1C5py1pIaneWu5fToy_nj":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#constructor"},"BJ1is6miODF_yQHxsdy-O":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#copy"},"B5MiF5lExiXL83IxcyVte":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#equals"},"nBnPOLDtfzCVHLOYjOc2k":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#fromMat3d"},"MVFLwgEZ0p0XlG9xf8GaP":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#identity"},"W7d_6e815V_POYTCENtgx":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#invert"},"-hoGS3DOv6YTDFvqNyCUn":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#isIdentity"},"xGKuC5gNcAs8WRuFIXZmq":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#multiply"},"tkIsd85rzv2A2Fnl7TzLd":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#rotate"},"6MHM3sDI3-i2OggFe75j6":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#scale"},"DF4psaRrKyCnkPScGzB1U":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#scaleV"},"xkDN3Yw6GmZNxWxK9Qv1L":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#scaleX"},"mYee-IFsiMbSyATmb4jlE":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#scaleY"},"pTp2G8Zw4B7Ot75mATTV5":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#setTransform"},"C7Jn-2QAYRHOeQ59Fvt9X":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#toArray"},"cXdAp6TYK_uc9xb8c9JJu":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#toString"},"1VSsPzJX77IcbxtABW2Tn":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#transform"},"DIMHWqYAfmVdgqxSjMAp5":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#translate"},"wKi4KZ6e6LGyCvkSruC8X":{"uri":"/melonJS/docs/melonjs/Matrix2d.html#transpose"},"a43WYHMoW4sxGDffDFFCi":{"uri":"/melonJS/docs/melonjs/Matrix3d.html"},"w7reGkiuMSXPyzWaxO7wX":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#tx"},"7z_dfywdeTsYNU99yw0Rn":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#ty"},"u2EZYXHnxKN6FlNVwHwK3":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#tz"},"CmipUQcsdgkKH6mSZ4zL4":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#apply"},"6Ddn7uH-CQAjkcir3VheL":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#applyInverse"},"nKAXivVnkpuYRovpPbGPV":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#clone"},"z8BeAkNoiEZHOZ8XjW8sg":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#constructor"},"RHaCDs47Eg9whXUsdl2Lo":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#copy"},"r6yM6oF5b1btiwCI3GEcZ":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#equals"},"gR0ZJsiNlbyes-1VpnGcd":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#fromMat2d"},"ye_efZ3QUOcr3mWA5cNL2":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#identity"},"aXClA4srv2PQW_ORjByK-":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#invert"},"rPK-3aN5J-BHffHuyz8Zd":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#isIdentity"},"j8itINvnOyC6ywf0mpBT7":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#multiply"},"XnXUxCXTGBV1gPVeVca1a":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#ortho"},"jitdNhRATi9V55gQYMSH-":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#rotate"},"Gz24wiir_vVXAFbiK068I":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#scale"},"j8wUA3mNDJtv81EhINr2f":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#scaleV"},"idTpbujDKr7BensNlimFU":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#scaleX"},"EZXjrsVtcM19p_wXQvJRO":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#scaleY"},"T3AKflCidlzNOxwyrzpvo":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#setTransform"},"rF_Nm_QpX_5rTpmAO6xvM":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#toArray"},"ciEcjycJaT9Gij17oFyto":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#toString"},"uAQbI-aNorVn6Kupm2ZWd":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#translate"},"EN4hbvYXmZlaWOxlfz_cJ":{"uri":"/melonJS/docs/melonjs/Matrix3d.html#transpose"},"19MWawxXxzyFrfbK2F9G4":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html"},"i8YIWlNS-K24myEH_7O1V":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#alpha"},"uuwG7agdnWD-qLSB82KeE":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#alwaysUpdate"},"sozwz8n-hfCOd7u93eQMJ":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#ancestor"},"q2rjizHClpv5LYis779Nd":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#anchorPoint"},"0mI8d7m4yFgbs3dT2McrB":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#animationpause"},"LJO0EP7k3OfMR00a4JtcC":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#animationspeed"},"N7RaVAkFmQdx_zAOP08H7":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#autoTransform"},"CdXPBl0AANY_O8wsOTVp3":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#blendMode"},"R8eogvaFI4MgoluN2aIC8":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#body"},"hU5uubTLzLCNAPlodDgzZ":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#bottom"},"FBwjeqKP6GV1Ha0BQoLAo":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#centerX"},"UBhGgSYAZrUSWoZ9nCGBM":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#centerY"},"Y33-tUhwerHABn1SP_vVs":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#currentTransform"},"MNdwPKYf93ByfbXFy_PRl":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#depth"},"I0Y_-HkL1qd6S3kg7CWdi":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#floating"},"Ma7VZg9GzNXoZ_6ovvXoA":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#GUID"},"HLy0hxGPyeXsUjbFus29x":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#height"},"OBAxj1Wgp2y9cZBQRqF3y":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#inViewport"},"fwmj-GbkCxOB8SoaQiLRt":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isDirty"},"j0WymdOTj9Lz1CoCg_RBk":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFlippedX"},"9-w7IpbfVS0s_BSwox1KF":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFlippedY"},"nURqMMKsNIF78bMTThOg8":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFloating"},"akDkW1jQJ6r7IBqxPWtJn":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isKinematic"},"ls-RHwDw6w-elAWhKgRB9":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isPersistent"},"rp1BUalI-yN2a1gA13fe3":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#left"},"1ANCWsX57oNAPQB-xvKlk":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#mask"},"5szLUW6BZ-AFlfTkhEjbm":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#name"},"I-nsK-rjRpZBzmqHiFL_U":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#offset"},"ZNXzuFiTgCorOatAm7J1g":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#onVisibilityChange"},"6ZunCFPekQ06aujmdl2qB":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#parentApp"},"SP6BSI9tkq8aj0uEI_eF2":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#points"},"nSNEO1ToCHZ_HsbRM49a3":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#pos"},"Szmt_lz3Sa02286x1KatS":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#right"},"RRvCV8-_muZL6-1p7Wd4z":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#shader"},"QT_tbepiI-iL_TTTTPwNn":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#source"},"e-X6RLzzfm6chiU9jxIQp":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#tint"},"_bfE2iEM7gOaotSCkucwn":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#top"},"IdacQvbdyvjI2iAbt9lYK":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#type"},"cK0ebmjLSRveKB3AbgqWV":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#updateWhenPaused"},"1sdeqir0c4dJq5mX0SCAy":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#width"},"XGUU8320SaSwo2_9HWGYv":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#addAnimation"},"UJ9HS85BcuQ2Ub1qn99p-":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#angleTo"},"GX5NxvO_Rw2EUyCv15mDG":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#centerOn"},"iqeRoyBQ_9dNr6-y41wE6":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#clone"},"BW5zxoX3SVeac96_7JUYb":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#constructor"},"aZVD6om5VwEjeGGfQINxC":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#contains"},"yZwAYrXMSpYKuPqgp9us7":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#copy"},"f0b_ii9U76xqIcT0YAvwL":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#distanceTo"},"zbqKuIROs4d49s5YVN5WA":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#equals"},"E6Wiiv2CO-jecj-y7A4tH":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#flicker"},"k623tYXGHbt6ngRePXOA5":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#flipX"},"b-YSz5Maf60q_F350YIh5":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#flipY"},"hzYH9NgYQlSijFFPpcOg0":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getAbsolutePosition"},"o3mbY4SN4lRYdtNErUOaQ":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getBounds"},"PO7VhJCY3Psv5MyZnjvGR":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getCurrentAnimationFrame"},"-nvnKzGvyb97AUMxxyO5h":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getIndices"},"OLz1bGdHgjPmHi6vfQAv2":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#getOpacity"},"CIFYKmP5FGNaZUsdsQZr4":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isConvex"},"Hn2ir5DDAkFDg76kysMnU":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isCurrentAnimation"},"TDEjsBPY-aYS6z1qoiwbv":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFinite"},"YWtnWnOo7TrGKlrH9WWJz":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#isFlickering"},"2lnL4Bcrc9YyynaxbWgSh":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#lookAt"},"OV4UAwlW97Fem6X5UxsH2":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#onCollision"},"6eWACdAUua68jBIfAJT-k":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#onDestroyEvent"},"hsxXgvatFDxqM3Ly_2Uc8":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#overlaps"},"qVo1MZmlZBzLIhHhjUZqq":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#postDraw"},"cEyTeLDqCmLemnNirho5P":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#preDraw"},"ESGrBZr_e5tOWC3HiriMM":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#recalc"},"T_1jdzniLu0fJ9lX4W-v8":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#resize"},"zdAqUK4uhpkg0mzRhIlvO":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#reverseAnimation"},"hDrVz5XAvOmKN3yRnBRzr":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#rotate"},"jtK510ndEeacDDwCPYGat":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#scale"},"SleKb8otwXggOQJTZ-TN6":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#scaleV"},"WH9vbjheMdFWQcq9dWpIC":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setAnimationFrame"},"_E2RpF-IqC1s_TbtHheiU":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setCurrentAnimation"},"YdmKA5gz0HBz-za8ZT5W7":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setOpacity"},"iWJPVHRpbUxLBv7auOaXI":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setRegion"},"I8ZJdvPkIh7-GOOLvna4v":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setShape"},"WuD8Ena2bQWjTCLfj4h_e":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#setVertices"},"yRXerdZd3h6iiivfW1-2y":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#shift"},"OsLBPEiQfpDUxYXlz4X-W":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#to2d"},"eHvSxoRplItXYwh0CAMz6":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#toIso"},"HJlJDZpIzwvzXR1bT0LL2":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#toPolygon"},"-Rjxu9esVXPyzAbg_Tzb7":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#transform"},"TgNGmjs7TMY0ChCNvg3WG":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#translate"},"f1WPs_5VKOFEfX72zd7cE":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#union"},"_wERuSmNBN-RYkGLHfm4v":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#updateBounds"},"1LTyT_9J1_fsoFdH8WH3S":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#draw"},"jpalia0qDD1yUunHwSuEV":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#update"},"8uTP_Vm-lVOkpxY2EoJhx":{"uri":"/melonJS/docs/melonjs/NineSliceSprite.html#onAnchorUpdate"},"gyFcjdMQxdP2kSYYd1dHQ":{"uri":"/melonJS/docs/melonjs/ObjectPool.html"},"M6T9v_wkpIKjSLhncb8i_":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#exists"},"ox4XcegZ5HDwzDEuAhjLV":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#getInstanceCount"},"JQO5si0lbBJL8_Z0ISvkf":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#poolable"},"EkP5ZbceAe-H2W-ZvTWFh":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#pull"},"LsyOx2khH_yX2FrlwvM3j":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#purge"},"veg865VZ_a-Dw7RuyRoOG":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#push"},"njQSlfHBBycZA1P4T0b1I":{"uri":"/melonJS/docs/melonjs/ObjectPool.html#register"},"JbcaAFO8Nk3tOKDouaEkt":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html"},"v50Nq4S00kggX2-y40pxU":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#x"},"oD1v9_Un8fgci04jRxYKN":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#y"},"nw3_TdHrFeYQmisp_2E32":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#abs"},"v35qCPGrbOVRWJSFsUHCl":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#add"},"65miacNBFfKQQYNKX4su3":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#angle"},"3bTQ1wn6V04Qcyky_qK2X":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#ceil"},"ImiBLdT3rZDzT9ZlKW0Bv":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#ceilSelf"},"6O6C59Rf-AleTF_FWyofu":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#clamp"},"912QQBJ7I1cllDyw7XmZh":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#clampSelf"},"xxSvdETnqRfDyiDwSr_TY":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#clone"},"TK-L0khXjfHBJXpBuKr4x":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#constructor"},"Fc4PYNujT9qmlgu4ut02b":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#copy"},"8oAOIAC6e6ZBJmQeZ4YxB":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#cross"},"pIsGoC1nPbwPPo4wzlPTn":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#distance"},"1JWcKN2SRDssg2r9CcuI5":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#div"},"RzAnoxy0PYbVhx-e7puNL":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#dot"},"by1a2aSnHLMiLiw8zUi9H":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#equals"},"k6iyL5PANNQI9o8i6ikwE":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#floor"},"lJiSLIv1JMs836sovHIpy":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#floorSelf"},"d1zc295ZL_c7ZWMglmanx":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#length"},"ZZq4aACi3qQaUJ9kiZsTE":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#length2"},"FQxwW6LbwHttZd8ddj3dZ":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#lerp"},"1N_-lRX7HMpuYprs6dI5v":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#maxV"},"eqisOWllUT1guF3lYnU1t":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#minV"},"DtiLuEeIubX41RGzhS6ns":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#moveTowards"},"TxRVRdDir2KIk3NaZKCel":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#negate"},"oI9Leja4ArD5PtLbj7zn9":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#negateSelf"},"GneOYpYww3qQPa0IbOM0i":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#normalize"},"6XB25JMSpn11KEdo6Rs9O":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#perp"},"03fLkd7_cl576iukonVGK":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#project"},"H5QTo2Ns8Im3JKPGQVsrb":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#projectN"},"-1ZltsLLPQwX5_5s_Kuqn":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#rotate"},"F_WNp6Z-Fwpgjdhj4K3Ky":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#scale"},"5BbTKpIH_yagoDBH4FGIB":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#scaleV"},"inlQpYYVz__dGO6oerJ18":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#set"},"ICANhkL2m2JtSCqaPWoJF":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#setCallback"},"afmeMMFzTCMOPh6RSyYNY":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#setMuted"},"4JRHQjFQoaS4k_eAsecYq":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#setV"},"SgCMnG4-YCHh-RTIwykmZ":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#setZero"},"TBuLeEUlNEpIRjVW5BpOD":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#sub"},"6kRW8IYc_e6xeVyFc96z8":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#to2d"},"FjO6qzieiAYUJumbia0U8":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#toIso"},"AawTu8Pj59ckH50UcxVi5":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#toString"},"xxhK3waLZqyfi01TxmKov":{"uri":"/melonJS/docs/melonjs/ObservableVector2d.html#toVector2d"},"xVXOaF0BmaDbLy89SxXMu":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html"},"A-4wppYf-T-OdDvCCiXxX":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#x"},"d0Kgi6ZJ2L06tPHokpOyJ":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#y"},"U2-HnvIdcuMEkAnDV3U0o":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#z"},"FGRke4EF10uMbqkwrB5u1":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#abs"},"KTaYFeekCx3z7tB8FPKuJ":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#add"},"422Z08Rq_3FX55itgsWBr":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#angle"},"_y_u0Go2V0HmCQwsqh4WW":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#ceil"},"fYMfRuU_2iR5rsp1q4qLn":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#ceilSelf"},"Qzt4V-SzjCuGzvkDK0oym":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#clamp"},"Z36EisHcfWs3Fl7iHcL3x":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#clampSelf"},"HlAkeifx3YcXJ645TvKqo":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#clone"},"3RDekUjAn5tJKS32VHw0i":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#constructor"},"rbnDuHHIIaY6G7Qgo0pUC":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#copy"},"-aQgTLsi1iQuXMokhg4GL":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#cross"},"6WPMp6O4OcN2gJI8o2po4":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#distance"},"ALgThm42Qt3DKCdZESZ53":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#div"},"6dcyzcbhFVIhvrJ3ffvrt":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#dot"},"RM9UZfEtqlnZ3r5KEaHHy":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#equals"},"jRkqpDtsu-LfXynvF099G":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#floor"},"G7C6FiOMh9gLBvGGeAowH":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#floorSelf"},"a2SEtpYmntzU0i0uw7odr":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#length"},"HJ-meGT-V3ML-4eSQh9au":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#length2"},"fo0HtspMR8LQE4J8t921h":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#lerp"},"WWCZ5VpoPzK6sZt3shBvd":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#maxV"},"tuRdre4abUEvGCPUXEaXE":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#minV"},"QJyOO2yT1FQVHgb6UfKcE":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#moveTowards"},"FDXja8yZs_RuLzrIvVaAA":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#negate"},"WiJnMSH6NchXxlS2UyMGD":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#negateSelf"},"Z47fsgvFh6PczRsnXUZM6":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#normalize"},"Wp5hrwEAu2Z9XDrA6HlXe":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#perp"},"xvfK4nUdqrBnOv5RuAdNg":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#project"},"zaryJGbC2fqnBd2-wimY4":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#projectN"},"DS8piYFDF3QVseGaPvXmT":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#rotate"},"AwwfkvwpAY5bBaYzTDSog":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#scale"},"lApyP_X-9qJQOd4Qi5ChR":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#scaleV"},"x20-xduwyjnf7owPdcpU8":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#set"},"Y8BRt4lRrEs5N0I59OKO1":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#setCallback"},"oILMxozxKbg6dznlY363B":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#setMuted"},"XJIPKWcwK0KQ02RV1Xjo9":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#setV"},"nYUjrlf9NxYa5Un9FmUR2":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#setZero"},"CIKU2HpQcQd4c7DcA5WGU":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#sub"},"KYdAy9CMXBBqZCI40m-xV":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#to2d"},"LaqXXteVVpnloEBLiwhup":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#toIso"},"I_N2O9dd-pF6weudO0tLo":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#toString"},"n3NqKi32rrO3KigmSCqia":{"uri":"/melonJS/docs/melonjs/ObservableVector3d.html#toVector3d"},"UgfGX-amxi7KPhpoRNCoZ":{"uri":"/melonJS/docs/melonjs/Particle.html"},"nvdweqYnlpG0npuHrMjoS":{"uri":"/melonJS/docs/melonjs/Particle.html#alpha"},"BnVBwS2Rn6xc4du29_MV9":{"uri":"/melonJS/docs/melonjs/Particle.html#alwaysUpdate"},"WZ7TcZXlX3LdorxmFgeVX":{"uri":"/melonJS/docs/melonjs/Particle.html#ancestor"},"Q_BuRk44u90W3HPsxGm88":{"uri":"/melonJS/docs/melonjs/Particle.html#anchorPoint"},"i_fXrUNriJAO6rKDdbCJG":{"uri":"/melonJS/docs/melonjs/Particle.html#autoTransform"},"Hp92VGtHECcb1tdvYO1uS":{"uri":"/melonJS/docs/melonjs/Particle.html#blendMode"},"WUwS0lprST-rXN-WxmIUh":{"uri":"/melonJS/docs/melonjs/Particle.html#body"},"SmLnC2EhZLTFe5Tn3yr7t":{"uri":"/melonJS/docs/melonjs/Particle.html#bottom"},"EjaOYqlU2Di1sXzdqBTzM":{"uri":"/melonJS/docs/melonjs/Particle.html#centerX"},"B_Wg_t3DedWWjboRtRA5C":{"uri":"/melonJS/docs/melonjs/Particle.html#centerY"},"zeaH3lHB9kJp7uIjbyFDt":{"uri":"/melonJS/docs/melonjs/Particle.html#currentTransform"},"Gs3cdBmyQJYjGXcr6VGXD":{"uri":"/melonJS/docs/melonjs/Particle.html#depth"},"TQ-N7z6XCgEx8Pq17ky_T":{"uri":"/melonJS/docs/melonjs/Particle.html#floating"},"TAbvclZ4vndLKaWrtFvDi":{"uri":"/melonJS/docs/melonjs/Particle.html#GUID"},"AuZA7Edl94iYFguH3fZWn":{"uri":"/melonJS/docs/melonjs/Particle.html#height"},"BXNJmJA4x0fc9XnT222mS":{"uri":"/melonJS/docs/melonjs/Particle.html#inViewport"},"Fail2UTFNFeZS2511gj18":{"uri":"/melonJS/docs/melonjs/Particle.html#isDirty"},"Am2A7lCbSRMQf3s2P-Pen":{"uri":"/melonJS/docs/melonjs/Particle.html#isFlippedX"},"mCLbe9D4pe_I507-jgFBa":{"uri":"/melonJS/docs/melonjs/Particle.html#isFlippedY"},"fQHtoHJtB5giyBTGXbJjb":{"uri":"/melonJS/docs/melonjs/Particle.html#isFloating"},"dAMjAOcz1hs6RMNUuMidQ":{"uri":"/melonJS/docs/melonjs/Particle.html#isKinematic"},"R551RmBM4vQ-JV-qNh22B":{"uri":"/melonJS/docs/melonjs/Particle.html#isPersistent"},"nFeLSRN366hEMhcIocQ9L":{"uri":"/melonJS/docs/melonjs/Particle.html#left"},"JV4RCPeiRiN5XX6iuU8gv":{"uri":"/melonJS/docs/melonjs/Particle.html#mask"},"rh9Wors-vlKao4bSm0ggv":{"uri":"/melonJS/docs/melonjs/Particle.html#name"},"D6P-bUt7MdHmUqMovSfmC":{"uri":"/melonJS/docs/melonjs/Particle.html#onVisibilityChange"},"3UMkF7M7aCNG1MwkGe4EZ":{"uri":"/melonJS/docs/melonjs/Particle.html#parentApp"},"-RVfVUhFwb82AgHZWIMbA":{"uri":"/melonJS/docs/melonjs/Particle.html#points"},"IZUmklHqRKT8eZUJeqMoc":{"uri":"/melonJS/docs/melonjs/Particle.html#pos"},"fgbImj17gQ9cCOOaW6riX":{"uri":"/melonJS/docs/melonjs/Particle.html#right"},"xXemnYQZQ48IWSS5m0uwz":{"uri":"/melonJS/docs/melonjs/Particle.html#shader"},"41T11V1gNuccxk2d17yxI":{"uri":"/melonJS/docs/melonjs/Particle.html#tint"},"wpT-oBZojTZ7Cvw_W1Sak":{"uri":"/melonJS/docs/melonjs/Particle.html#top"},"wIdH0JYC-gaV6KTZLSuwI":{"uri":"/melonJS/docs/melonjs/Particle.html#type"},"wiUY52D-8ikD7DC7qDPby":{"uri":"/melonJS/docs/melonjs/Particle.html#updateWhenPaused"},"iUIX4B55hrKC4WrJSVmMX":{"uri":"/melonJS/docs/melonjs/Particle.html#width"},"C_yFRgstZESRXqRVDja_w":{"uri":"/melonJS/docs/melonjs/Particle.html#angleTo"},"Mmx2-U9lj_n8RzOr35KV-":{"uri":"/melonJS/docs/melonjs/Particle.html#centerOn"},"4lCCsthCpKHjK8-YuHQbF":{"uri":"/melonJS/docs/melonjs/Particle.html#clone"},"uC-ggebuXgMF19vYnl0CP":{"uri":"/melonJS/docs/melonjs/Particle.html#constructor"},"q032n5ivQGlMjpEvZrbdV":{"uri":"/melonJS/docs/melonjs/Particle.html#contains"},"FmEqk17rJ13biu3Mkr9u8":{"uri":"/melonJS/docs/melonjs/Particle.html#copy"},"dZH452oRIXL-4tmzgYxL6":{"uri":"/melonJS/docs/melonjs/Particle.html#distanceTo"},"r7fV-H7RkAJ_q1VkGEvA0":{"uri":"/melonJS/docs/melonjs/Particle.html#draw"},"K-LVVtpRdR3DhoYzsqwGF":{"uri":"/melonJS/docs/melonjs/Particle.html#equals"},"oiBSs3Q9oq7csbsWU9BJg":{"uri":"/melonJS/docs/melonjs/Particle.html#flipX"},"-6mQZXt-ZTcSJ11RNuUm_":{"uri":"/melonJS/docs/melonjs/Particle.html#flipY"},"1hRTrP9oLW2u9A7OGUwGZ":{"uri":"/melonJS/docs/melonjs/Particle.html#getAbsolutePosition"},"bOW8_kv1m34IWqosaNR6t":{"uri":"/melonJS/docs/melonjs/Particle.html#getBounds"},"7PTg82np9hx82q0UL-tJs":{"uri":"/melonJS/docs/melonjs/Particle.html#getIndices"},"rUzd6a6h20fXmgEZBP899":{"uri":"/melonJS/docs/melonjs/Particle.html#getOpacity"},"0RDcgC7K_CMJd4WmM08IE":{"uri":"/melonJS/docs/melonjs/Particle.html#isConvex"},"XlnxNPjZZTXbR65cgXZrT":{"uri":"/melonJS/docs/melonjs/Particle.html#isFinite"},"5s4pDjT9nUOE5-gVBbAy2":{"uri":"/melonJS/docs/melonjs/Particle.html#lookAt"},"eQu7aBY-4qLllS-Qb-ARU":{"uri":"/melonJS/docs/melonjs/Particle.html#onCollision"},"ydZmB1mjye58rkz-2S26C":{"uri":"/melonJS/docs/melonjs/Particle.html#onDestroyEvent"},"fakm73Wx_EHV-vRlxxZ97":{"uri":"/melonJS/docs/melonjs/Particle.html#overlaps"},"0Da41fEFF7mXYYUFgdyVc":{"uri":"/melonJS/docs/melonjs/Particle.html#postDraw"},"eVsANtrfJVs8nSIsM09LT":{"uri":"/melonJS/docs/melonjs/Particle.html#preDraw"},"ISbIAnayiZI-9lRLCHBbO":{"uri":"/melonJS/docs/melonjs/Particle.html#recalc"},"dui_vMp0LYLNqgiXeV7Mt":{"uri":"/melonJS/docs/melonjs/Particle.html#resize"},"KbepnZ-S9naAQKlyUtCEy":{"uri":"/melonJS/docs/melonjs/Particle.html#rotate"},"5URaMycFcW2TkRWtNk6Au":{"uri":"/melonJS/docs/melonjs/Particle.html#scale"},"KxLAJ57sqSv4RbTRKODNH":{"uri":"/melonJS/docs/melonjs/Particle.html#scaleV"},"6W9qAU_ELtIhVcOCZwZj8":{"uri":"/melonJS/docs/melonjs/Particle.html#setOpacity"},"_bZCRgUWSx-4SZzM05X11":{"uri":"/melonJS/docs/melonjs/Particle.html#setShape"},"R67R1DYbzVJTir44DklNX":{"uri":"/melonJS/docs/melonjs/Particle.html#setVertices"},"gfFMnV_UNcYCdagZe2PcH":{"uri":"/melonJS/docs/melonjs/Particle.html#shift"},"eyuzodP5DWX0lruqFtSt1":{"uri":"/melonJS/docs/melonjs/Particle.html#to2d"},"25d4go67lHLMVJnI-UhO1":{"uri":"/melonJS/docs/melonjs/Particle.html#toIso"},"EzaeKXeNDiLmdXVjzzLAj":{"uri":"/melonJS/docs/melonjs/Particle.html#toPolygon"},"H_k5y-KJL7-tGJablbCwD":{"uri":"/melonJS/docs/melonjs/Particle.html#transform"},"VRKTBUnX4d-XuDi8mcf4O":{"uri":"/melonJS/docs/melonjs/Particle.html#translate"},"jDBiFnhHdSgt0-7SehzAY":{"uri":"/melonJS/docs/melonjs/Particle.html#union"},"0lzyVCRN_3RP8IuSDLtSP":{"uri":"/melonJS/docs/melonjs/Particle.html#update"},"Kf8MB9kVyRJtlMChPUF3n":{"uri":"/melonJS/docs/melonjs/Particle.html#updateBounds"},"E8WgasZ-Mt2TznvqRi1i-":{"uri":"/melonJS/docs/melonjs/Particle.html#onAnchorUpdate"},"Met9MoIXWVv29VyooWdYg":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html"},"yItbeBctihXORKywhebRD":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#alpha"},"FzMwI8nR9g9gXk--FOVl8":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#alwaysUpdate"},"2S33d8QglVu3uSdeotKei":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#ancestor"},"tso2h8eVgBHdU4WAsXGh7":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#anchorPoint"},"-5DBufDxJeiXK8iD4_kBf":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#autoDepth"},"QSDdBfJBoP6xsWcl3zf9C":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#autoSort"},"emwsSFuCK_Oar8G6ii9xi":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#autoTransform"},"cqGlFDn8cMl7Pd20x69e9":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#backgroundColor"},"BpNfLIYL2elGsLZHyaqp2":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#blendMode"},"om6PvKOFZGJbvhyET20jR":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#body"},"f08j0_ETrXybQwVS0v8WK":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#bottom"},"Mxl0IcdLm-X0MmdvdBdoL":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#centerX"},"P0vhgCL294DfjfFD7uBXK":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#centerY"},"RmEGKF-iF7iE7dx2UUHvO":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#clipping"},"7BkmBQfki2PXXUSoaRl9I":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#currentTransform"},"mS8hfhFHdKlVBOu4jM4DA":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#depth"},"O-6r1LmCad9rhFY1q5aX2":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#enableChildBoundsUpdate"},"H1rBv7x6C4TwOSG-FsyNO":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#floating"},"cOf_b1BTVCSG5VzgcbEcx":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#GUID"},"dkJEAW_K_TkSrw5iUXxiz":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#height"},"kXg5EHYIDKil7DBW02ofN":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#inViewport"},"zSFKJzP88HlP8VKezcRSC":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isDirty"},"0YadfnF6ifcikw7NraxC_":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isFlippedX"},"Azi1xilyeFfk3uZgiV6Uc":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isFlippedY"},"lszQQI4bv8mrshnSVZR3F":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isFloating"},"tRpwDW-po20lil-Ii8xM4":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isKinematic"},"nYrJ6wKx8Nfu1rv_iDTzL":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isPersistent"},"S-5HnKi-nz-fU7M1iWWpS":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#left"},"uORbNnc9390yisA9d4uJI":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#mask"},"iPHeLbANdiOJxGsjHSBEm":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#name"},"sa3KU0ChiRAbRHKSs6MmR":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onVisibilityChange"},"EVoeKsj-_wCa2Zp9wZSxI":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#parentApp"},"qvBO30G3V-qxOQ1rjGkMS":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#points"},"9GvcqVJK5AdCDZvVYOC5g":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#pos"},"rOMD0qP-_hfs-9N1dGNAT":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#right"},"fNBYimeYL7ex7T8OG7u-_":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#root"},"5KfVzb_Y8h2yeZ-51Lga0":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#settings"},"XrjFVxKomUqvrZ2SCjVbW":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#shader"},"piobfGLbtcSQqx8vtAdwu":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#sortOn"},"lj51xkph-oKwxsBr-qD_G":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#tint"},"scRei8WWNVDHgcpKfq02z":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#top"},"8jlu03YQFe-U2WPB5LJNb":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#type"},"TylydBwbVoD-AfJdGAvAJ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#updateWhenPaused"},"I_xXCNvWfpkv11QP26HzF":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#width"},"1OyErq364rIa4b5mIvHRj":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#addChild"},"fRRdgjNZ9nH9F1Onn-_0a":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#addChildAt"},"AQKnN80g5LjpiBJcLJW1M":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#angleTo"},"S_aFx9nfd3vVv6-GhOgPs":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#burstParticles"},"VunQPtuZA2MYLiksgMnLA":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#centerOn"},"ZXvqxISJwo1oa1uS6AkBa":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#clone"},"AjBasPHBOgmhoIOYZumVV":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#constructor"},"-bLgf0I33WX1utLLTHXsi":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#contains"},"rrx0UtRqrymqSiBe-dDJS":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#copy"},"kCHlWu-njxUgUWjQvS40T":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#distanceTo"},"zb1z89L9lu6O9CfpE2vAj":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#equals"},"6U0rW51EVnpq24PBg93bq":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#flipX"},"b4_QK4CUwh9LO7bkuZ9OD":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#flipY"},"YquYVUvShFaL6NbMzRbzT":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#forEach"},"depg2__X6SpzCJSHcLbTD":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getAbsolutePosition"},"rIB_3JTaRGtC5SVq27SXD":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getBounds"},"wfbg9QpPDBZP_96Yi0rtd":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildAt"},"_P-Je0D4_7hH585ZOqvyC":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildByGUID"},"xYmGmAPY9qkJ_Ea4rd4KZ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildByName"},"9QQ5wg_IeOHMFzH0dMMW1":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildByProp"},"-HxpnRjJ8BjySIaCnRdnE":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildByType"},"X-3JT9lb-1XtFfvJhitGP":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildIndex"},"CFEDuQqf__gc1lGPX5VzK":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getChildren"},"QgIG-q_sr_aSXwih0Xv-x":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getIndices"},"UH-v_4tiwiUbdOFmxSNXs":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getNextChild"},"ZCUo3JsYJmqlS0TRHiZmG":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getOpacity"},"NeloJa2L89ZoNEhaRygy6":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getRandomPointX"},"6LArkGRece3Z33DDrfsAK":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getRandomPointY"},"AFYr3NnR71Njjzp7v704H":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#getRootAncestor"},"KbrN5HaW1CUmhiB2zLqmp":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#hasChild"},"DDTPft4FrApBGwvJ34QHZ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isAttachedToRoot"},"u6I5Na_KvQof7VuFdw5Ny":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isConvex"},"WslM-lSi_o1uDzFGfOYVM":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isFinite"},"AO5MiRgQBpdHbr9JFyiSM":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#isRunning"},"mzII2GaOiugECmWAgt5r7":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#lookAt"},"D4aAV9-BKS6YLm1_-y5a0":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#moveDown"},"nTMF3hsFh40dTtvKGX1zU":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#moveToBottom"},"mxoPpv-HnaihT2aueWFpJ":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#moveToTop"},"r5qr4SmvUe6wswbRHaxpd":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#moveUp"},"oe4tTpg8CDygkickgwbVb":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onChildChange"},"VJYLh5Udtl5AsmlypwyWs":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onCollision"},"u5L4UIUx9DapF_I-UQndv":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onDestroyEvent"},"tukkpl3J_EnusZ4EFzrZ4":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#overlaps"},"451NWEV3osp_3VS3yOUXb":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#postDraw"},"VhplsyZvJHeDVdt6e_BGp":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#preDraw"},"eTZFXeTI0trrcxmL7DgS-":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#recalc"},"lB_kwro4S5UUk1eL5EyKS":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#removeChild"},"bqX9RdBXD1BAuercU0b7z":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#removeChildNow"},"JaccqplwNfW_VSZe6vt7V":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#reset"},"FRRzE7NztG5rovSqUACBK":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#resize"},"BbgfuyKEaeJweHgp8-QVv":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#rotate"},"5CF_NDYKQWnD3MD8wCU8K":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#scale"},"624bMloUXaA9q3eTpSu6G":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#scaleV"},"P7twsfjx1ND0O9HmP97HX":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#setChildsProperty"},"aTYzxJxGqC2ZHdkkrfzLK":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#setOpacity"},"NMqZ8R8Cu_zYoNKTEU148":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#setShape"},"Wimj1otDt4uF9XQZ-SGn6":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#setVertices"},"p7XSaoSbu8KriVH_nRAnY":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#shift"},"vYtyy2yVGSuo2398FC197":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#sort"},"-Swfj4kt9q2OnX-hmFeod":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#stopStream"},"QaCHxUKpouDRBc4QRNYs_":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#streamParticles"},"HWpUziwhfFoDxMupENDUK":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#swapChildren"},"oNA5i1k_CYfQf3DFgUBw1":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#to2d"},"nH_uipiBrTJos3PxxlmGa":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#toIso"},"z_wod-vGfZ1caLVZfutpv":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#toPolygon"},"5aPTbC0sqUBR6USRJFltO":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#transform"},"MFCkHOstMvkf8c6Y1-HCe":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#translate"},"TLAr5jB_0m8I4tJ43Q7ZP":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#union"},"Hkr7OdOf0pY8gTbuLXvYi":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#updateBounds"},"3xXj3DXpWg8LE7jyTpJMN":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#draw"},"Sa98RnSD6vZj8mDnC5Ggs":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#update"},"ov1Dvff2abzLmD41WMPwX":{"uri":"/melonJS/docs/melonjs/ParticleEmitter.html#onAnchorUpdate"},"nAPYsntAez4U6kTaZ8Zl3":{"uri":"/melonJS/docs/melonjs/Path2D.html"},"v5AiX1uW0wAOdsYkeLwvK":{"uri":"/melonJS/docs/melonjs/Path2D.html#arcResolution"},"HY3VWClEj3s757NBGVVHy":{"uri":"/melonJS/docs/melonjs/Path2D.html#points"},"e41BK7wPBNwOqaLNYX1Q8":{"uri":"/melonJS/docs/melonjs/Path2D.html#arc"},"DFF_HhPaW_oIX4vSyz5dG":{"uri":"/melonJS/docs/melonjs/Path2D.html#arcTo"},"PDILFjf-0Z-bj9z7q2xl4":{"uri":"/melonJS/docs/melonjs/Path2D.html#beginPath"},"EpJ0nGwXj44FuFzatqqHr":{"uri":"/melonJS/docs/melonjs/Path2D.html#closePath"},"Zmwb0reXx-3dQ6m8UUGYE":{"uri":"/melonJS/docs/melonjs/Path2D.html#ellipse"},"1i5murdHosrWbYdm1BbaE":{"uri":"/melonJS/docs/melonjs/Path2D.html#lineTo"},"fNr6ErQWYtMGYlvDDfyB7":{"uri":"/melonJS/docs/melonjs/Path2D.html#moveTo"},"OoNSgssmdvU6H5D8c-QLz":{"uri":"/melonJS/docs/melonjs/Path2D.html#rect"},"KfdSBap-CMW33ybvOKcs9":{"uri":"/melonJS/docs/melonjs/Path2D.html#roundRect"},"oV5YovCKkdgFipFmh2Onb":{"uri":"/melonJS/docs/melonjs/Path2D.html#triangulatePath"},"icUgUdMN7uX5J-Q8WoJUp":{"uri":"/melonJS/docs/melonjs/Point.html"},"QUqA3M40dd5j2u5ecTnoK":{"uri":"/melonJS/docs/melonjs/Point.html#type"},"jc36C8iLC2EXa2TkbWGfS":{"uri":"/melonJS/docs/melonjs/Point.html#x"},"OHYCbET2UaLpVRDGuEr2K":{"uri":"/melonJS/docs/melonjs/Point.html#y"},"6W5Kd8hqaRPeZwGZPRZ4A":{"uri":"/melonJS/docs/melonjs/Point.html#clone"},"bI3MLz_krtqALMWYtY3RQ":{"uri":"/melonJS/docs/melonjs/Point.html#equals"},"Ovs6zsKc8Bn1BW2Ql4VXw":{"uri":"/melonJS/docs/melonjs/Point.html#set"},"OAtiZfKZ3Xs0WmcVh6OV1":{"uri":"/melonJS/docs/melonjs/Pointer.html"},"6VbPWykJ34gft3EbqNJID":{"uri":"/melonJS/docs/melonjs/Pointer.html#bottom"},"EnIoBSZslEGTJzooZ81Or":{"uri":"/melonJS/docs/melonjs/Pointer.html#button"},"ad1f0NtDWuKuhcZNwndcu":{"uri":"/melonJS/docs/melonjs/Pointer.html#center"},"7oiQTEDLsq2M6Y03NnFcO":{"uri":"/melonJS/docs/melonjs/Pointer.html#centerX"},"MKmRXEq9_HpnHBbp9L3YT":{"uri":"/melonJS/docs/melonjs/Pointer.html#centerY"},"lzOvrUQ9egYxv_x5kfD16":{"uri":"/melonJS/docs/melonjs/Pointer.html#clientX"},"txv4grrGcyJC2f-O4RAn_":{"uri":"/melonJS/docs/melonjs/Pointer.html#clientY"},"Y0Td4ZyE3_OxU8tJJc0Go":{"uri":"/melonJS/docs/melonjs/Pointer.html#deltaMode"},"8trGoQGbPTI978bYRvgfz":{"uri":"/melonJS/docs/melonjs/Pointer.html#deltaX"},"CNW6vovFyZqL-6lnMhiFW":{"uri":"/melonJS/docs/melonjs/Pointer.html#deltaY"},"fpSsG1GDgIZwdTQUgcmHd":{"uri":"/melonJS/docs/melonjs/Pointer.html#deltaZ"},"IiucGCWkjhfp360GwbgTd":{"uri":"/melonJS/docs/melonjs/Pointer.html#event"},"7up_3RGrjft5S-72A-v5B":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameLocalX"},"HSXQofKLhoUZ26Ul3zeJy":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameLocalY"},"11f-gCb-2AKaATKfyF825":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameScreenX"},"atTDX-JCJqynX7WS5e58C":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameScreenY"},"q_9e8MImVPdI2qqbdUjVN":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameWorldX"},"uJ4Q0aHoOgBp6DqilZIyP":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameWorldY"},"_7I4SiONHNcG_BE-0NhtP":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameX"},"fzDOtZ0AJqaoaxECogGgE":{"uri":"/melonJS/docs/melonjs/Pointer.html#gameY"},"yK7M0FNSnf2RcjTxvPss_":{"uri":"/melonJS/docs/melonjs/Pointer.html#height"},"9BoKB93hrxxVgsRrkbVSU":{"uri":"/melonJS/docs/melonjs/Pointer.html#isNormalized"},"Ckeuxj4XfCqnPpfJSu0db":{"uri":"/melonJS/docs/melonjs/Pointer.html#isPrimary"},"3nARrQujPaYSKrdS0XNeB":{"uri":"/melonJS/docs/melonjs/Pointer.html#left"},"oc02d1lY4D0L26z5bSd6c":{"uri":"/melonJS/docs/melonjs/Pointer.html#LEFT_"},"QW7_Uss4GT9JEkzUdQP0N":{"uri":"/melonJS/docs/melonjs/Pointer.html#locked"},"SuksUoTXS3toN8aWHNr25":{"uri":"/melonJS/docs/melonjs/Pointer.html#MIDDLE"},"KsVXI-tn1FRmy6jRa4nQg":{"uri":"/melonJS/docs/melonjs/Pointer.html#movementX"},"0DXVlm0AuKA45up2zoCWI":{"uri":"/melonJS/docs/melonjs/Pointer.html#movementY"},"ny1PThc16ftqWt8GDr2Jx":{"uri":"/melonJS/docs/melonjs/Pointer.html#pageX"},"CasWvns3_c4nycBDf4czr":{"uri":"/melonJS/docs/melonjs/Pointer.html#pageY"},"2Atlk2jV2-lKdyqXMFmL8":{"uri":"/melonJS/docs/melonjs/Pointer.html#pointerId"},"OLi9XQOmLQSYKexMZ7LQT":{"uri":"/melonJS/docs/melonjs/Pointer.html#right"},"TpmPuTOtCJ146BeuKUKsr":{"uri":"/melonJS/docs/melonjs/Pointer.html#RIGHT_"},"3jAowhFFBxMvIFXSPrc73":{"uri":"/melonJS/docs/melonjs/Pointer.html#top"},"a6yQPCD3V42wGOfVj_Jqe":{"uri":"/melonJS/docs/melonjs/Pointer.html#type"},"ir3DYZNGrGyzIZPamC9uc":{"uri":"/melonJS/docs/melonjs/Pointer.html#width"},"BvxQA6Zu4fxJaqQWjpENc":{"uri":"/melonJS/docs/melonjs/Pointer.html#x"},"1nxCfFTbt-jj9VtQka_EB":{"uri":"/melonJS/docs/melonjs/Pointer.html#y"},"2QQbqaT8KKzNrBMH-Z6U8":{"uri":"/melonJS/docs/melonjs/Pointer.html#add"},"45nqmO598zbRfQPBJkviP":{"uri":"/melonJS/docs/melonjs/Pointer.html#addBounds"},"4tmrGjO8GQ4SmLdXBnkhN":{"uri":"/melonJS/docs/melonjs/Pointer.html#addFrame"},"qP_sa0lFOksoVc6iIctVf":{"uri":"/melonJS/docs/melonjs/Pointer.html#addPoint"},"dgkitUHX0WBsgupCHwMyY":{"uri":"/melonJS/docs/melonjs/Pointer.html#centerOn"},"_4tVtmCtrZWC3iQfG8RYw":{"uri":"/melonJS/docs/melonjs/Pointer.html#clear"},"DmpEPoqYfTVPROitc5ilH":{"uri":"/melonJS/docs/melonjs/Pointer.html#clone"},"zdaTNwnsNUfP6BkKkUNjF":{"uri":"/melonJS/docs/melonjs/Pointer.html#contains"},"qkPWpOvrfKNsw3wvkbJnh":{"uri":"/melonJS/docs/melonjs/Pointer.html#isFinite"},"T5CVKx1lq-bVHIwRjgMnZ":{"uri":"/melonJS/docs/melonjs/Pointer.html#overlaps"},"a9WIjdvXc4ILe7iDCe8A_":{"uri":"/melonJS/docs/melonjs/Pointer.html#setMinMax"},"1dvfm0TJ18vCjbqpB_uoj":{"uri":"/melonJS/docs/melonjs/Pointer.html#shift"},"OJeOix2FFip6YnD8Y1Uvt":{"uri":"/melonJS/docs/melonjs/Pointer.html#toPolygon"},"bk_3wqlfOYOAKQHX5MVCw":{"uri":"/melonJS/docs/melonjs/Pointer.html#translate"},"OuQX1KkGQsssPJhshQIeS":{"uri":"/melonJS/docs/melonjs/Pointer.html#update"},"F0U1RW6dbHRWsmA1XT-A6":{"uri":"/melonJS/docs/melonjs/Pointer.html#set"},"jC-R7vWOSwP95nTPVYjKo":{"uri":"/melonJS/docs/melonjs/Polygon.html"},"YH04p5wePuHFg2O5OUbqM":{"uri":"/melonJS/docs/melonjs/Polygon.html#points"},"5v864OYDXhcUlkefqwKBf":{"uri":"/melonJS/docs/melonjs/Polygon.html#pos"},"xkXpJeXlYtHLW-qtjDKQ4":{"uri":"/melonJS/docs/melonjs/Polygon.html#type"},"eNfe1NFO9UHSJfhuBjO36":{"uri":"/melonJS/docs/melonjs/Polygon.html#clone"},"a5YZXd0LCeHZumac7N3eG":{"uri":"/melonJS/docs/melonjs/Polygon.html#constructor"},"ERtqZKOvuz0Z4xBTW4Sly":{"uri":"/melonJS/docs/melonjs/Polygon.html#contains"},"bSdZo0iqPvZi7YF2YCVR7":{"uri":"/melonJS/docs/melonjs/Polygon.html#getBounds"},"9Wr_BAXuvFtz0IYZLF9lQ":{"uri":"/melonJS/docs/melonjs/Polygon.html#getIndices"},"przVMP4dm6So4GUt3WiTz":{"uri":"/melonJS/docs/melonjs/Polygon.html#isConvex"},"hL2t1wMopCy_TLJrMT73m":{"uri":"/melonJS/docs/melonjs/Polygon.html#recalc"},"IaFENEpLBIAOq6kunneoR":{"uri":"/melonJS/docs/melonjs/Polygon.html#rotate"},"ZhCOHul8WaIJNLvkIyUOU":{"uri":"/melonJS/docs/melonjs/Polygon.html#scale"},"qVZR-QHMQjOEwsJtHtK6Q":{"uri":"/melonJS/docs/melonjs/Polygon.html#scaleV"},"m-67F7FjPkmIqYSko1NCq":{"uri":"/melonJS/docs/melonjs/Polygon.html#setShape"},"i9vv6Ek3pKFK3bvnjEWdz":{"uri":"/melonJS/docs/melonjs/Polygon.html#setVertices"},"HiA8AoyoE91Awppsn7ePJ":{"uri":"/melonJS/docs/melonjs/Polygon.html#shift"},"7uUEZmUb9VGyI0vGMkUJ6":{"uri":"/melonJS/docs/melonjs/Polygon.html#to2d"},"7NxJa53N9voEd-qjak9Jt":{"uri":"/melonJS/docs/melonjs/Polygon.html#toIso"},"Inwb3zmP1I2r3VAQKLE2m":{"uri":"/melonJS/docs/melonjs/Polygon.html#transform"},"JvnHpSiNjAKSSOXxiBQGp":{"uri":"/melonJS/docs/melonjs/Polygon.html#translate"},"KVO0idRPF_PUAzzIVY-X-":{"uri":"/melonJS/docs/melonjs/Polygon.html#updateBounds"},"LjdnQZVNyF12Pc1NgzW_i":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html"},"dXbuY7s7xIeSUsi_kGaw9":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#attributes"},"CMjkFiEcEZkO3Xrch3zf4":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#currentShader"},"bYPrJtxw_jQ3eU1iuNvcD":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#defaultShader"},"dyI0j5RzdaFnbF1KBLbi4":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#mode"},"tNeg6ssfbQdYwDm5kIY37":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#vertexByteSize"},"21ytevYHz__F5Lkj8T1V0":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#vertexData"},"RQtyTcAW2sWNloLsg17Hg":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#vertexSize"},"fviEKjtL_a8NKKTj7KY8C":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#addAttribute"},"BC4-N1s1OWY6oPqPnWhvc":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#bind"},"1oLLJsPAKbEla54u6DMWG":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#constructor"},"b8YXb6TGJ0h4mWyi5zy8k":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#drawVertices"},"rd0nOBGhy-7MlpFhcTN8Q":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#flush"},"ME9eKC4dPYHm3dB564ckf":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#setProjection"},"XdyfZoRKn8sm-11r5Rode":{"uri":"/melonJS/docs/melonjs/PrimitiveCompositor.html#useShader"},"hZjSlMRB7aaRakn-92vp_":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html"},"gi4tG-LdzVOhmdwoLP5q4":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#attributes"},"G3nYC_jl1tt5mBcv1GvR7":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#currentShader"},"wTDCfdjUy6to0B-NZ7JRN":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#defaultShader"},"5hq1U0H2awvM51SwjgMp5":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#mode"},"nzXOkgJEg5_QVzh-137kM":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#vertexByteSize"},"jWtWibBSnW9NlnslhZupo":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#vertexData"},"lP-uCSiXHG5ajIXsHUzuw":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#vertexSize"},"wmxBaCyBXyHdjf56dAPAg":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#addAttribute"},"TI1PSNOnnf1x1a_u7WMzz":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#addQuad"},"dgpV_c55KIFb26RLsT5Dl":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#bind"},"uT4cBKkPUgJKcAUxIEfNb":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#bindTexture2D"},"uf9jFKWC5JuECsTqag738":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#constructor"},"2rTfHfLYtX2otSXtYhel4":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#createTexture2D"},"KvYWPIGM9sfN3bDpaoihd":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#deleteTexture2D"},"MTA3dc3HXLp9thoOiQFgK":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#flush"},"viLrc1KzatlvErqwHui29":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#getTexture2D"},"rpCCssYo6Vy2dmnO408Tj":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#setProjection"},"-dbnNN6hHOG0Wee8DJdw9":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#unbindTexture2D"},"KmDufCzA4Ywkil8KOZjS1":{"uri":"/melonJS/docs/melonjs/QuadCompositor.html#useShader"},"az0KeICzAcg6eTwipZi4V":{"uri":"/melonJS/docs/melonjs/QuadTree.html"},"J3kARB_BQxfGyICPOh3n5":{"uri":"/melonJS/docs/melonjs/QuadTree.html#clear"},"RIbYTb-w_bM4NO-Vk7vVw":{"uri":"/melonJS/docs/melonjs/QuadTree.html#constructor"},"xf5__nZ3TW5C6OyCVVLTN":{"uri":"/melonJS/docs/melonjs/QuadTree.html#hasChildren"},"qXK24ClEzoO5Qm_6P1q4T":{"uri":"/melonJS/docs/melonjs/QuadTree.html#insert"},"b53mC_rg1s1c7Mn_pyA7J":{"uri":"/melonJS/docs/melonjs/QuadTree.html#insertContainer"},"gw9X50awpEeDp9gK7hNKe":{"uri":"/melonJS/docs/melonjs/QuadTree.html#isPrunable"},"VK6XPcsJa9tZkFHTMLNiH":{"uri":"/melonJS/docs/melonjs/QuadTree.html#remove"},"rkFSSSBayURpiSTTXKl_P":{"uri":"/melonJS/docs/melonjs/QuadTree.html#retrieve"},"ctpgL_BsLafLHlMRx49BK":{"uri":"/melonJS/docs/melonjs/Rect.html"},"rF7AtytZp9fmutjYc0tK0":{"uri":"/melonJS/docs/melonjs/Rect.html#bottom"},"JqdrZnoeiyiaRB-77TwZM":{"uri":"/melonJS/docs/melonjs/Rect.html#centerX"},"iltY53Tgn-RG8sduZoWPx":{"uri":"/melonJS/docs/melonjs/Rect.html#centerY"},"5tJj92Bi1EuAEqgUXk8YZ":{"uri":"/melonJS/docs/melonjs/Rect.html#height"},"jTmacRAGd51h0MLfbATr4":{"uri":"/melonJS/docs/melonjs/Rect.html#left"},"q2ysSSBg46NYWMWgjbSgB":{"uri":"/melonJS/docs/melonjs/Rect.html#points"},"kLdY24h0FTY6dVaaKx1kR":{"uri":"/melonJS/docs/melonjs/Rect.html#pos"},"LddwOpWOhVZVQBxFBsAWN":{"uri":"/melonJS/docs/melonjs/Rect.html#right"},"51BD40X3pu7zbFeTIkF7O":{"uri":"/melonJS/docs/melonjs/Rect.html#top"},"u947dHUTQC0D1F3tN4xdc":{"uri":"/melonJS/docs/melonjs/Rect.html#type"},"k7PxVg_QvUlOaKYu7Yz5o":{"uri":"/melonJS/docs/melonjs/Rect.html#width"},"SFcAmo1so04JeSbPOwwi5":{"uri":"/melonJS/docs/melonjs/Rect.html#centerOn"},"oJ-mJtXGdaXMVIFpbeQ54":{"uri":"/melonJS/docs/melonjs/Rect.html#clone"},"L7PQwbwoqlJvA2Qd-2xSU":{"uri":"/melonJS/docs/melonjs/Rect.html#constructor"},"6o0Yo83p_nO3F5_i8wzoV":{"uri":"/melonJS/docs/melonjs/Rect.html#contains"},"a3B940vWE17Ys4ZGP2SZl":{"uri":"/melonJS/docs/melonjs/Rect.html#copy"},"hdNfmOJhCPVSgXhRJGtP_":{"uri":"/melonJS/docs/melonjs/Rect.html#equals"},"bKhjSFWT1aygKNrJq7YgP":{"uri":"/melonJS/docs/melonjs/Rect.html#getBounds"},"he6IDf18F_wzdNKUQZpBt":{"uri":"/melonJS/docs/melonjs/Rect.html#getIndices"},"IVJAHkb0CpvsYXEfaY_uB":{"uri":"/melonJS/docs/melonjs/Rect.html#isConvex"},"dkIh4oL0oG_aVhC3hN6qX":{"uri":"/melonJS/docs/melonjs/Rect.html#isFinite"},"PgEGVUvzRMG-ZEYQ8tXFK":{"uri":"/melonJS/docs/melonjs/Rect.html#overlaps"},"segokgFv1NFxHGIh9tH4I":{"uri":"/melonJS/docs/melonjs/Rect.html#recalc"},"HihS_IBiSJT_6O-_5kuG5":{"uri":"/melonJS/docs/melonjs/Rect.html#resize"},"-xYKuLNqT9EpneoGWDO96":{"uri":"/melonJS/docs/melonjs/Rect.html#rotate"},"i8jeMMiVLRLlSPJm-cONP":{"uri":"/melonJS/docs/melonjs/Rect.html#scale"},"x34vbDUSu3eq-BnV-eSnL":{"uri":"/melonJS/docs/melonjs/Rect.html#scaleV"},"lP-X_ERnKFaXlhpOUH9Lq":{"uri":"/melonJS/docs/melonjs/Rect.html#setShape"},"qMjvXW1tyvXae1cqGTDi4":{"uri":"/melonJS/docs/melonjs/Rect.html#setVertices"},"J0KoSNvMZOo_T8T5H8HMi":{"uri":"/melonJS/docs/melonjs/Rect.html#shift"},"0XZ-6D84lKYjZjz_9V_l3":{"uri":"/melonJS/docs/melonjs/Rect.html#to2d"},"m3tZc8h5Axo0SicXHmssN":{"uri":"/melonJS/docs/melonjs/Rect.html#toIso"},"T2IcCKTQ57GuMgM8fIPP5":{"uri":"/melonJS/docs/melonjs/Rect.html#toPolygon"},"ZeGoSVr6ha5Zv4567wRj2":{"uri":"/melonJS/docs/melonjs/Rect.html#transform"},"zqKwfWKd7EjnOAcSWobl-":{"uri":"/melonJS/docs/melonjs/Rect.html#translate"},"gaBYe3bd79fj_3zFWeAnK":{"uri":"/melonJS/docs/melonjs/Rect.html#union"},"rA605A91QiX2mCVvKID8_":{"uri":"/melonJS/docs/melonjs/Rect.html#updateBounds"},"jHrjH8xdkQmjReMcUXD_I":{"uri":"/melonJS/docs/melonjs/Renderable.html"},"PxMzQv0a5LXY1engmY9vK":{"uri":"/melonJS/docs/melonjs/Renderable.html#alpha"},"3j4euNFIWVR8TJ7BunSD0":{"uri":"/melonJS/docs/melonjs/Renderable.html#alwaysUpdate"},"i188f4OXD7qxuea7f-tKY":{"uri":"/melonJS/docs/melonjs/Renderable.html#ancestor"},"9JquNwu-vo2tqMvCQ1iBX":{"uri":"/melonJS/docs/melonjs/Renderable.html#anchorPoint"},"1TpXLTsjqAUQrbRMTfI8K":{"uri":"/melonJS/docs/melonjs/Renderable.html#autoTransform"},"4Kl-OjfhEqltq7OorQxGB":{"uri":"/melonJS/docs/melonjs/Renderable.html#blendMode"},"gydxplxO-jncmf3MLvDtR":{"uri":"/melonJS/docs/melonjs/Renderable.html#body"},"qtr1IoVqG42wN9GkR6svQ":{"uri":"/melonJS/docs/melonjs/Renderable.html#bottom"},"Zv5JYo5USqu0Yh_OB_pcq":{"uri":"/melonJS/docs/melonjs/Renderable.html#centerX"},"wS5l4EuOomYEW54mdKseI":{"uri":"/melonJS/docs/melonjs/Renderable.html#centerY"},"uY0GbxuV9pnsIfIjWuReZ":{"uri":"/melonJS/docs/melonjs/Renderable.html#currentTransform"},"Lvf2lWrjuLd31PlDUwhYH":{"uri":"/melonJS/docs/melonjs/Renderable.html#depth"},"i0_QGIcS9Yp7MpSIRB0DM":{"uri":"/melonJS/docs/melonjs/Renderable.html#floating"},"ynNn3zFbG2-RhccwLnMCo":{"uri":"/melonJS/docs/melonjs/Renderable.html#GUID"},"RpJzQk2iwHKFOW_15kHFt":{"uri":"/melonJS/docs/melonjs/Renderable.html#height"},"FmB_1q3Wbh2wKQzY7WGd1":{"uri":"/melonJS/docs/melonjs/Renderable.html#inViewport"},"oWf8aoShmnP-Asy-EKN-b":{"uri":"/melonJS/docs/melonjs/Renderable.html#isDirty"},"iQsVo-BsNYIKuXLIG3RmJ":{"uri":"/melonJS/docs/melonjs/Renderable.html#isFlippedX"},"A0OuLz6U3wa2Pceky9l0-":{"uri":"/melonJS/docs/melonjs/Renderable.html#isFlippedY"},"q3S8CFTOaLATTz8DFqHYn":{"uri":"/melonJS/docs/melonjs/Renderable.html#isFloating"},"c7tr7MoHWR1l55ROdcSUS":{"uri":"/melonJS/docs/melonjs/Renderable.html#isKinematic"},"Ga_l0-bBVLsVErv6RdA0G":{"uri":"/melonJS/docs/melonjs/Renderable.html#isPersistent"},"tH-bSPhCsuf-DPKTpS9H_":{"uri":"/melonJS/docs/melonjs/Renderable.html#left"},"MALglXgJ2m7BIDTn1MEnR":{"uri":"/melonJS/docs/melonjs/Renderable.html#mask"},"hZK2rNSfS-5-1RkKpEHF7":{"uri":"/melonJS/docs/melonjs/Renderable.html#name"},"tm0rzYc3uKf6S4qeiUq0P":{"uri":"/melonJS/docs/melonjs/Renderable.html#onVisibilityChange"},"5u76IccMFlhKBbGjduNGa":{"uri":"/melonJS/docs/melonjs/Renderable.html#parentApp"},"__Tka25_RxdKzt6sCQyT6":{"uri":"/melonJS/docs/melonjs/Renderable.html#points"},"vNBeg8NCWsa-JLK2bRto5":{"uri":"/melonJS/docs/melonjs/Renderable.html#pos"},"P8C9EuFAZUMctmqfqLtvk":{"uri":"/melonJS/docs/melonjs/Renderable.html#right"},"tvODZ7Z5hDSbLKKLJlkYQ":{"uri":"/melonJS/docs/melonjs/Renderable.html#shader"},"qDXPLO_h5d9B0cxJ0EDZc":{"uri":"/melonJS/docs/melonjs/Renderable.html#tint"},"E0N71L9B5_1cKEF_MXUJ1":{"uri":"/melonJS/docs/melonjs/Renderable.html#top"},"O7s6BK7JEOGajHf138M9_":{"uri":"/melonJS/docs/melonjs/Renderable.html#type"},"5DEb18rGTiJvRtrnBw-4f":{"uri":"/melonJS/docs/melonjs/Renderable.html#updateWhenPaused"},"SIzfTEneJYTkiUfPp7lZ2":{"uri":"/melonJS/docs/melonjs/Renderable.html#width"},"T72r1qm76CROWXOcCKe4O":{"uri":"/melonJS/docs/melonjs/Renderable.html#angleTo"},"kwaEDW6HBUDbTlSAmHCwK":{"uri":"/melonJS/docs/melonjs/Renderable.html#centerOn"},"C0_i2q_H9BKUHsxFbwDjs":{"uri":"/melonJS/docs/melonjs/Renderable.html#clone"},"M4iueC6tw0dWAs8IT6fHT":{"uri":"/melonJS/docs/melonjs/Renderable.html#constructor"},"8InMhc95gRlk5dv-KpHJJ":{"uri":"/melonJS/docs/melonjs/Renderable.html#contains"},"iiJ0NtlJAWESn1oeBSEk4":{"uri":"/melonJS/docs/melonjs/Renderable.html#copy"},"C_CX1WsxgVPoQwg43NQw9":{"uri":"/melonJS/docs/melonjs/Renderable.html#distanceTo"},"em9INQPGShnbw8Nqtwd4b":{"uri":"/melonJS/docs/melonjs/Renderable.html#draw"},"vvLiuOYsfqWtGKuM4IKjB":{"uri":"/melonJS/docs/melonjs/Renderable.html#equals"},"BLt2L28hFXVb6yLT8As5W":{"uri":"/melonJS/docs/melonjs/Renderable.html#flipX"},"5CkPDplkIpkZRM6Wn8lA8":{"uri":"/melonJS/docs/melonjs/Renderable.html#flipY"},"UIIcTkWfQXFbEjdioV-Jc":{"uri":"/melonJS/docs/melonjs/Renderable.html#getAbsolutePosition"},"aLkQwldg6a-8rdn-0b9Q1":{"uri":"/melonJS/docs/melonjs/Renderable.html#getBounds"},"YQMtt4bZPPrL0gMIiI1W6":{"uri":"/melonJS/docs/melonjs/Renderable.html#getIndices"},"ktC4R023SjW3P5aJ4Kl_x":{"uri":"/melonJS/docs/melonjs/Renderable.html#getOpacity"},"kNz992Ddk1ThGp2oXkCDa":{"uri":"/melonJS/docs/melonjs/Renderable.html#isConvex"},"qAC75LKtrUlHrBezu5ZK1":{"uri":"/melonJS/docs/melonjs/Renderable.html#isFinite"},"FQThJgAx3SQ5ucyfjNh_x":{"uri":"/melonJS/docs/melonjs/Renderable.html#lookAt"},"vbn0AHE_PwOy17oiL4S2L":{"uri":"/melonJS/docs/melonjs/Renderable.html#onCollision"},"DfKiEoHnHzwJw6S9njV4R":{"uri":"/melonJS/docs/melonjs/Renderable.html#onDestroyEvent"},"Xki5wU7ERzUfFMc4hWCQW":{"uri":"/melonJS/docs/melonjs/Renderable.html#overlaps"},"GhQ16bmE6sMN-0qhUZd4x":{"uri":"/melonJS/docs/melonjs/Renderable.html#postDraw"},"jINveFK3ab9TeFhb1rJjm":{"uri":"/melonJS/docs/melonjs/Renderable.html#preDraw"},"-pvqzNE1_9StEauvG3p3m":{"uri":"/melonJS/docs/melonjs/Renderable.html#recalc"},"nZoo8RDzzEcKKZOxI28Fx":{"uri":"/melonJS/docs/melonjs/Renderable.html#resize"},"_awaR26YI-Osufl_rATAC":{"uri":"/melonJS/docs/melonjs/Renderable.html#rotate"},"Kgfjzrcxu7Jdgh5qB-5X0":{"uri":"/melonJS/docs/melonjs/Renderable.html#scale"},"GckZRoGX0dVC44h7CqBkz":{"uri":"/melonJS/docs/melonjs/Renderable.html#scaleV"},"YpLUYKn8suHNcYibFukJH":{"uri":"/melonJS/docs/melonjs/Renderable.html#setOpacity"},"OyUu7n4FQD2z7sFPyCs90":{"uri":"/melonJS/docs/melonjs/Renderable.html#setShape"},"5S9YC4GXnle7Xa9GsdrEh":{"uri":"/melonJS/docs/melonjs/Renderable.html#setVertices"},"RPyWuYRqDa9eQp99DTEDO":{"uri":"/melonJS/docs/melonjs/Renderable.html#shift"},"PWxl6whYhZ2aVzVsrZItk":{"uri":"/melonJS/docs/melonjs/Renderable.html#to2d"},"NxAVt6AKHvkLWHEFsRl6z":{"uri":"/melonJS/docs/melonjs/Renderable.html#toIso"},"aA14BKa0J1e96zIbwjB1F":{"uri":"/melonJS/docs/melonjs/Renderable.html#toPolygon"},"5MQ_x9ehLShvS3p9gFM7w":{"uri":"/melonJS/docs/melonjs/Renderable.html#transform"},"bjTVeyAqP9ln5S29HLVHV":{"uri":"/melonJS/docs/melonjs/Renderable.html#translate"},"oLa7zQXZ5XAl-zjL7LJDs":{"uri":"/melonJS/docs/melonjs/Renderable.html#union"},"CsJurCqU-y6egKX9tKj2F":{"uri":"/melonJS/docs/melonjs/Renderable.html#update"},"bMi9ggZ7_0X5IixfJAxm3":{"uri":"/melonJS/docs/melonjs/Renderable.html#updateBounds"},"8_fE92MQi0w2BqAdcoRtH":{"uri":"/melonJS/docs/melonjs/Renderable.html#onAnchorUpdate"},"azFoH79iblgL9amUAse9r":{"uri":"/melonJS/docs/melonjs/Renderer.html"},"GXXBXlnEpNz7fqIw4wldz":{"uri":"/melonJS/docs/melonjs/Renderer/getHeight.html"},"Op__EIjLg8Hz-6uBFaGih":{"uri":"/melonJS/docs/melonjs/Renderer/getHeight.html#constructor"},"3zBVysC3PFFJUlM_PbE6a":{"uri":"/melonJS/docs/melonjs/Renderer/getWidth.html"},"nhCtRUD1YJMDD6AaEMNo0":{"uri":"/melonJS/docs/melonjs/Renderer/getWidth.html#constructor"},"U-3YzQLHIU4MzF2grL2Sc":{"uri":"/melonJS/docs/melonjs/Renderer/Texture.html"},"zc-Ox5s4FIlBCbES8hCGv":{"uri":"/melonJS/docs/melonjs/Renderer/Texture.html#constructor"},"5sW5buQM48kkiX1xZjiRR":{"uri":"/melonJS/docs/melonjs/Renderer.html#depthTest"},"Yns7zyKioUhgxe2uVeGEQ":{"uri":"/melonJS/docs/melonjs/Renderer.html#designRatio"},"4F_oZ5Sy-dBftYVId-uZC":{"uri":"/melonJS/docs/melonjs/Renderer.html#height"},"1yO-DSp3npHZ7GDh5kk63":{"uri":"/melonJS/docs/melonjs/Renderer.html#isContextValid"},"Z0P0U7R7Jk_3T3zWJFuIo":{"uri":"/melonJS/docs/melonjs/Renderer.html#path2D"},"VjQgFk9eaBiYaMHbPHjKt":{"uri":"/melonJS/docs/melonjs/Renderer.html#scaleRatio"},"WHA13Zj6dyPMsh2Vh3nok":{"uri":"/melonJS/docs/melonjs/Renderer.html#settings"},"vUhMZPZaIuEFpYad2tiM_":{"uri":"/melonJS/docs/melonjs/Renderer.html#type"},"o9haq9fo4ypMYIBzlp52T":{"uri":"/melonJS/docs/melonjs/Renderer.html#width"},"YaHLZGytFYAttRGkLKrm4":{"uri":"/melonJS/docs/melonjs/Renderer.html#clear"},"xSeAclfR_5BSXnsCiACBq":{"uri":"/melonJS/docs/melonjs/Renderer.html#clearMask"},"8Em86qtbYhOW6s73UXnTH":{"uri":"/melonJS/docs/melonjs/Renderer.html#clearTint"},"j7cOZvUumSWVpOoByCRry":{"uri":"/melonJS/docs/melonjs/Renderer.html#constructor"},"6PIlgUbMnie8gpPZE_yvG":{"uri":"/melonJS/docs/melonjs/Renderer.html#fill"},"h786Rau8rLTjESlroifLM":{"uri":"/melonJS/docs/melonjs/Renderer.html#flush"},"Q_8LGyC8e5rtQlv6y0xF8":{"uri":"/melonJS/docs/melonjs/Renderer.html#getBlendMode"},"PDhz7WaSx1TGLwqFZF7al":{"uri":"/melonJS/docs/melonjs/Renderer.html#getCanvas"},"ItoRgk4jDPiZh-Q7otygu":{"uri":"/melonJS/docs/melonjs/Renderer.html#getColor"},"8pb6-oM-WuR5qN3jNyaCV":{"uri":"/melonJS/docs/melonjs/Renderer.html#getContext"},"D_uT7E_yvOV3FmoLClHmX":{"uri":"/melonJS/docs/melonjs/Renderer.html#getContext2d"},"e2HC8rBQitNoE6M7cLkjD":{"uri":"/melonJS/docs/melonjs/Renderer.html#getScreenCanvas"},"MRURH5aOJOfba_s3QifZk":{"uri":"/melonJS/docs/melonjs/Renderer.html#getScreenContext"},"sTzANkFWtXXAwRbH62Pwo":{"uri":"/melonJS/docs/melonjs/Renderer.html#globalAlpha"},"eq1JHL0j1Na0EVPCWppER":{"uri":"/melonJS/docs/melonjs/Renderer.html#overlaps"},"-w5wS-byKZJbyhzIu6rhV":{"uri":"/melonJS/docs/melonjs/Renderer.html#reset"},"btHnhQ-T-z8Cmfyww3xHt":{"uri":"/melonJS/docs/melonjs/Renderer.html#resize"},"ucSiIpZ4jz1kw0lI1wOa8":{"uri":"/melonJS/docs/melonjs/Renderer.html#setAntiAlias"},"V0Hh4G-wzhfhCSTVHfqUR":{"uri":"/melonJS/docs/melonjs/Renderer.html#setMask"},"YZTJ8Rl9MOmeDpJxfetg0":{"uri":"/melonJS/docs/melonjs/Renderer.html#setProjection"},"wxpbqPBd3bAwZlSByEzyQ":{"uri":"/melonJS/docs/melonjs/Renderer.html#setTint"},"xT8zWn0I_4P9NRdDSgMT9":{"uri":"/melonJS/docs/melonjs/Renderer.html#stroke"},"8wAXNHHbeRKQImICSd-Wg":{"uri":"/melonJS/docs/melonjs/Renderer.html#tint"},"SFL1kNgzY4uK6vDv0_ufR":{"uri":"/melonJS/docs/melonjs/Renderer.html#toBlob"},"0725VjADCFM8QWDPFz3sq":{"uri":"/melonJS/docs/melonjs/Renderer.html#toDataURL"},"e9iu15owq9uzH-TjWqTxv":{"uri":"/melonJS/docs/melonjs/Renderer.html#toImageBitmap"},"Tq1kZiZ6UcWQ5qUuwl8zh":{"uri":"/melonJS/docs/melonjs/ResponseObject.html"},"uXhUGys2XXyiAo_DDl-cf":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#a"},"15SjIrCL4-pk96yJLJMue":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#aInB"},"4BHdCdJLEFai7IXfMRhwS":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#b"},"xi6Lq_SFhqTdFyQB1zRz3":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#bInA"},"9yZKAv7Kc5BgdCyWhBMSo":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#indexShapeA"},"xmvoDArmyZLd8kDHfhUbr":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#indexShapeB"},"L5tiL1drOBzh54EYQJLtM":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#overlap"},"vJkYox5wb75FejnIYTIPx":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#overlapN"},"7MSNqqgm_Mq-CfMylUua2":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#overlapV"},"ahP9LoHR_yl5emu7c2992":{"uri":"/melonJS/docs/melonjs/ResponseObject.html#clear"},"i2Z8S7fNVys6EboB07wr8":{"uri":"/melonJS/docs/melonjs/RoundRect.html"},"-vVpUOGPtoj1dJLJt6gK7":{"uri":"/melonJS/docs/melonjs/RoundRect.html#bottom"},"vhfbZEfzDfB9H21Xjq-21":{"uri":"/melonJS/docs/melonjs/RoundRect.html#centerX"},"ajlRkZmID8CDzp4iiGlKe":{"uri":"/melonJS/docs/melonjs/RoundRect.html#centerY"},"_bU9C542d7qAClfAze8Cd":{"uri":"/melonJS/docs/melonjs/RoundRect.html#height"},"ZdruHNGUtho2qvTHiIjgB":{"uri":"/melonJS/docs/melonjs/RoundRect.html#left"},"6Nv38xcj8SCMpq76VC7sz":{"uri":"/melonJS/docs/melonjs/RoundRect.html#points"},"DCLK8slSc9TqBilMvLE-Z":{"uri":"/melonJS/docs/melonjs/RoundRect.html#pos"},"sO51jXU6XTdQA9M8iClZ6":{"uri":"/melonJS/docs/melonjs/RoundRect.html#radius"},"VEeGpYpAD98vNlZpbN6am":{"uri":"/melonJS/docs/melonjs/RoundRect.html#right"},"9yJMG7gYFlFQITzFN9hNX":{"uri":"/melonJS/docs/melonjs/RoundRect.html#top"},"LTtFFiJfqvmw_AQIrQl3d":{"uri":"/melonJS/docs/melonjs/RoundRect.html#type"},"htEPUzDmphKLJ9wrE5SVM":{"uri":"/melonJS/docs/melonjs/RoundRect.html#width"},"6qUbNVRRbPcCtMQuBrzhY":{"uri":"/melonJS/docs/melonjs/RoundRect.html#centerOn"},"oBermf1TEY10udVWJzIPz":{"uri":"/melonJS/docs/melonjs/RoundRect.html#clone"},"Naq3MQxng5nQVtMZe9AHy":{"uri":"/melonJS/docs/melonjs/RoundRect.html#constructor"},"xl_iQfWP4OVPy1yZvG_ZK":{"uri":"/melonJS/docs/melonjs/RoundRect.html#contains"},"2U5v_rDgIvPT4xnsAEswp":{"uri":"/melonJS/docs/melonjs/RoundRect.html#copy"},"PxDDlaDeBRpikd5dCkxtB":{"uri":"/melonJS/docs/melonjs/RoundRect.html#equals"},"EWMi-qHc4DwzcTBp0FQfk":{"uri":"/melonJS/docs/melonjs/RoundRect.html#getBounds"},"QwVXkm_jrVsRxXl5zQ7bg":{"uri":"/melonJS/docs/melonjs/RoundRect.html#getIndices"},"wOWrWEUrnBMjY5SnYMKy_":{"uri":"/melonJS/docs/melonjs/RoundRect.html#isConvex"},"m7eGztTLlP2ZzV0B0e8wv":{"uri":"/melonJS/docs/melonjs/RoundRect.html#isFinite"},"kB_nJqmtRCWFIEjhyCVlf":{"uri":"/melonJS/docs/melonjs/RoundRect.html#overlaps"},"6f0J6wcvz76itSd9g5K_E":{"uri":"/melonJS/docs/melonjs/RoundRect.html#recalc"},"aktxrvPWmLlaSGg4TjUp9":{"uri":"/melonJS/docs/melonjs/RoundRect.html#resize"},"IGoXjFYAmhKX1kdaH_mBr":{"uri":"/melonJS/docs/melonjs/RoundRect.html#rotate"},"zidYVgKKJPc0tmB6UPvyq":{"uri":"/melonJS/docs/melonjs/RoundRect.html#scale"},"Cgnnt7qc_iZqPCqRvjGbr":{"uri":"/melonJS/docs/melonjs/RoundRect.html#scaleV"},"jSK0iHhuBH0YH9lE9pSkv":{"uri":"/melonJS/docs/melonjs/RoundRect.html#setShape"},"_e5CEYywRSj-v1xLamewV":{"uri":"/melonJS/docs/melonjs/RoundRect.html#setVertices"},"PJ4yWBVdGzaRunQnJcMkp":{"uri":"/melonJS/docs/melonjs/RoundRect.html#shift"},"YuwIoPa0QqfPXJZlPjyUJ":{"uri":"/melonJS/docs/melonjs/RoundRect.html#to2d"},"Z_7bEQxEG1UdzwxLDzL9V":{"uri":"/melonJS/docs/melonjs/RoundRect.html#toIso"},"__DFfywy-KgWusgWc76bN":{"uri":"/melonJS/docs/melonjs/RoundRect.html#toPolygon"},"XnA9_oIhV9LDaeAt5psyG":{"uri":"/melonJS/docs/melonjs/RoundRect.html#transform"},"o5pqwKpmM3N4cQJT08Vnb":{"uri":"/melonJS/docs/melonjs/RoundRect.html#translate"},"Uw4Rk-f5538j9y8WdZSVu":{"uri":"/melonJS/docs/melonjs/RoundRect.html#union"},"DnxdxG7hl3WUs_wQDqRKe":{"uri":"/melonJS/docs/melonjs/RoundRect.html#updateBounds"},"wEgAr3cRwTqOzCeNp1nrS":{"uri":"/melonJS/docs/melonjs/Sprite.html"},"wmAXGA5TiZuO6VsYMIC0X":{"uri":"/melonJS/docs/melonjs/Sprite.html#alpha"},"f1aVBiv-3lb0L4L6RWedF":{"uri":"/melonJS/docs/melonjs/Sprite.html#alwaysUpdate"},"vZOKu07sBQcjWy0pN5gQO":{"uri":"/melonJS/docs/melonjs/Sprite.html#ancestor"},"As3YGjITQezvDQ42RYB3b":{"uri":"/melonJS/docs/melonjs/Sprite.html#anchorPoint"},"5QUTAWbSL3LGB-LzDzhLc":{"uri":"/melonJS/docs/melonjs/Sprite.html#animationpause"},"HLWsRtrjMLsJi7e_BspgX":{"uri":"/melonJS/docs/melonjs/Sprite.html#animationspeed"},"RK2mKSYU7iDDuhsje6EWj":{"uri":"/melonJS/docs/melonjs/Sprite.html#autoTransform"},"ifTBVsncXnBiQ64NM0s7K":{"uri":"/melonJS/docs/melonjs/Sprite.html#blendMode"},"2YYi4XmPLQ5zCUjFksTwT":{"uri":"/melonJS/docs/melonjs/Sprite.html#body"},"BytsTIiVcD7co-X7dOvUS":{"uri":"/melonJS/docs/melonjs/Sprite.html#bottom"},"_VKajyslw0XWTPnVzXU4L":{"uri":"/melonJS/docs/melonjs/Sprite.html#centerX"},"JxsnwVNwuVWhgq0N8jsgo":{"uri":"/melonJS/docs/melonjs/Sprite.html#centerY"},"mSClmf1coTji2cTLgbarI":{"uri":"/melonJS/docs/melonjs/Sprite.html#currentTransform"},"RR-dBUDLdiJgnuu8ydTd5":{"uri":"/melonJS/docs/melonjs/Sprite.html#depth"},"yzwTUiaAUJR3mLcIpzBYY":{"uri":"/melonJS/docs/melonjs/Sprite.html#floating"},"51Te7Yi0rMu7FsuD6beRf":{"uri":"/melonJS/docs/melonjs/Sprite.html#GUID"},"flVYmEyEA93RwsXuDJGXs":{"uri":"/melonJS/docs/melonjs/Sprite.html#height"},"8k6w02MtuOa87duxqmG3j":{"uri":"/melonJS/docs/melonjs/Sprite.html#inViewport"},"IPBs1HjJuv0GlfztFP9f2":{"uri":"/melonJS/docs/melonjs/Sprite.html#isDirty"},"K7xQwow2HeQyF8KqfHc7j":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFlippedX"},"QMSgdX4HWNW_ByDryPleu":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFlippedY"},"f1ZI9AFMJu6Hh3XBc5y6t":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFloating"},"D0tusg-a7NVVuwCuGGy9y":{"uri":"/melonJS/docs/melonjs/Sprite.html#isKinematic"},"v8MCDc3hF1IUVWCxfecA7":{"uri":"/melonJS/docs/melonjs/Sprite.html#isPersistent"},"yoVAQ7UzWN4yz2FWLW807":{"uri":"/melonJS/docs/melonjs/Sprite.html#left"},"vb2qcxGodS2uWf0vMO1e5":{"uri":"/melonJS/docs/melonjs/Sprite.html#mask"},"_8jQSpLnEL0cb80I4Hdxx":{"uri":"/melonJS/docs/melonjs/Sprite.html#name"},"rpUvZ2ORBG2dqNHWyT1hQ":{"uri":"/melonJS/docs/melonjs/Sprite.html#offset"},"NTyS5gvAhbn7YpybsmSnJ":{"uri":"/melonJS/docs/melonjs/Sprite.html#onVisibilityChange"},"H9GibqCzJGr4v2PzV0QLK":{"uri":"/melonJS/docs/melonjs/Sprite.html#parentApp"},"_DZMgnnIAEfANUblk6C4Q":{"uri":"/melonJS/docs/melonjs/Sprite.html#points"},"71tBN9addb-0O83ZW-Oqn":{"uri":"/melonJS/docs/melonjs/Sprite.html#pos"},"817uJDsQeVUBEQ_xZJZcV":{"uri":"/melonJS/docs/melonjs/Sprite.html#right"},"-ZuNT_DoqjNrW2JHcN0HP":{"uri":"/melonJS/docs/melonjs/Sprite.html#shader"},"JTxsyRuEHQkr7Ml5MQfrc":{"uri":"/melonJS/docs/melonjs/Sprite.html#source"},"0HkCpKWBbY4Hb_nSInm1Q":{"uri":"/melonJS/docs/melonjs/Sprite.html#tint"},"g33F5-pQf8P5HMhdjpwDl":{"uri":"/melonJS/docs/melonjs/Sprite.html#top"},"qtjeVuy9CiCAgb4t3j1_B":{"uri":"/melonJS/docs/melonjs/Sprite.html#type"},"kzi_MXpdHBX0fGJqFOUni":{"uri":"/melonJS/docs/melonjs/Sprite.html#updateWhenPaused"},"yjpCZrnyUhGXDgfzGn2MR":{"uri":"/melonJS/docs/melonjs/Sprite.html#width"},"oU2aFfbW7nrmJj8k2VEG3":{"uri":"/melonJS/docs/melonjs/Sprite.html#addAnimation"},"hesVlAu5xHtRPi6AJRNnZ":{"uri":"/melonJS/docs/melonjs/Sprite.html#angleTo"},"QU0KFd8uNskyMLvpQ_S1b":{"uri":"/melonJS/docs/melonjs/Sprite.html#centerOn"},"KiEiX-KT_-bRJlmLfhT88":{"uri":"/melonJS/docs/melonjs/Sprite.html#clone"},"-Eoa7kLq1GGWWwb2zezUn":{"uri":"/melonJS/docs/melonjs/Sprite.html#constructor"},"aHxxpzTHiaiF0sDXWZ1tC":{"uri":"/melonJS/docs/melonjs/Sprite.html#contains"},"f5IwOisJ_rJBCO9_YY-vm":{"uri":"/melonJS/docs/melonjs/Sprite.html#copy"},"_6WK7pE_xKtzr74tPN3Lo":{"uri":"/melonJS/docs/melonjs/Sprite.html#distanceTo"},"WMNrCpDZc9k2XKYy5lC-W":{"uri":"/melonJS/docs/melonjs/Sprite.html#equals"},"fTLUEdW66QUhuPaMV8ufb":{"uri":"/melonJS/docs/melonjs/Sprite.html#flicker"},"OkRJeJtRHgWTVt0Gx3Bmh":{"uri":"/melonJS/docs/melonjs/Sprite.html#flipX"},"z9xQjLpYcuJ_pfOBxabFI":{"uri":"/melonJS/docs/melonjs/Sprite.html#flipY"},"8wAh_QlQk3cki9PiD6VXf":{"uri":"/melonJS/docs/melonjs/Sprite.html#getAbsolutePosition"},"8ERDOplYoG6So94__IT5a":{"uri":"/melonJS/docs/melonjs/Sprite.html#getBounds"},"PDawEqeY99MwVoSMwPtJ2":{"uri":"/melonJS/docs/melonjs/Sprite.html#getCurrentAnimationFrame"},"vKI7FZ_RBZMMXthL2jeqJ":{"uri":"/melonJS/docs/melonjs/Sprite.html#getIndices"},"2eWvPczhbSDdWLOgi25I-":{"uri":"/melonJS/docs/melonjs/Sprite.html#getOpacity"},"jClXlc9EfWFjZqq8MHPst":{"uri":"/melonJS/docs/melonjs/Sprite.html#isConvex"},"IGG7rjsbRgpUrucfYK9OD":{"uri":"/melonJS/docs/melonjs/Sprite.html#isCurrentAnimation"},"0tq7sYpl_A4av-Ev0pd-M":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFinite"},"V4EQhasqIyOey2ETV202N":{"uri":"/melonJS/docs/melonjs/Sprite.html#isFlickering"},"X6LPjXTfPdZN1pBvQm9YQ":{"uri":"/melonJS/docs/melonjs/Sprite.html#lookAt"},"Nu42GuWktOnC8N7Z_4mjR":{"uri":"/melonJS/docs/melonjs/Sprite.html#onCollision"},"Jzt8vtSxFvJyACZjJUanh":{"uri":"/melonJS/docs/melonjs/Sprite.html#onDestroyEvent"},"xrKXZSipmvrEv3KMVKrsh":{"uri":"/melonJS/docs/melonjs/Sprite.html#overlaps"},"V8WVi0prpE-SqIjZpJ30B":{"uri":"/melonJS/docs/melonjs/Sprite.html#postDraw"},"gDgB92FYStPXQVRCWu7Kn":{"uri":"/melonJS/docs/melonjs/Sprite.html#preDraw"},"TCmF-pg3Fi_RI-AGjMDFj":{"uri":"/melonJS/docs/melonjs/Sprite.html#recalc"},"7DSUeqVApucpmhfSFS_23":{"uri":"/melonJS/docs/melonjs/Sprite.html#resize"},"HfJmGYSrSnPfNqHFM8ohi":{"uri":"/melonJS/docs/melonjs/Sprite.html#reverseAnimation"},"WHzLkr95pgE_Th-fuG4-R":{"uri":"/melonJS/docs/melonjs/Sprite.html#rotate"},"ALCE0PKReZ5hArjTOy97a":{"uri":"/melonJS/docs/melonjs/Sprite.html#scale"},"wq6hEbzTmfK9gZYOXJWho":{"uri":"/melonJS/docs/melonjs/Sprite.html#scaleV"},"kTVlyYKdrC3YQAI1jPG09":{"uri":"/melonJS/docs/melonjs/Sprite.html#setAnimationFrame"},"I0Jzy0IDKP18qsD2Ws8ZJ":{"uri":"/melonJS/docs/melonjs/Sprite.html#setCurrentAnimation"},"TYNg1oq0aDZyckQmSAKrV":{"uri":"/melonJS/docs/melonjs/Sprite.html#setOpacity"},"tSR5zNGPO2Cj1tSJk8ImC":{"uri":"/melonJS/docs/melonjs/Sprite.html#setRegion"},"TAJVQ0RblRyYAdsV2UNt3":{"uri":"/melonJS/docs/melonjs/Sprite.html#setShape"},"L5vPbSQcyIvQPhrYzx7mc":{"uri":"/melonJS/docs/melonjs/Sprite.html#setVertices"},"3Zy9ZElpm4WthNZYCCICS":{"uri":"/melonJS/docs/melonjs/Sprite.html#shift"},"uUosdKzSARvIztF2NuiPT":{"uri":"/melonJS/docs/melonjs/Sprite.html#to2d"},"M9JeA9_9IWbgIXJJ_dmKe":{"uri":"/melonJS/docs/melonjs/Sprite.html#toIso"},"tGMhSG-ocY4hzs0_DZR3g":{"uri":"/melonJS/docs/melonjs/Sprite.html#toPolygon"},"n17jLKZKxxB2HKOkic9LV":{"uri":"/melonJS/docs/melonjs/Sprite.html#transform"},"5-4U_8zz-NPhwhD_eOSJB":{"uri":"/melonJS/docs/melonjs/Sprite.html#translate"},"wDqInWvUzOeaTrRw-P7t7":{"uri":"/melonJS/docs/melonjs/Sprite.html#union"},"-ugBjk_pD07NGcpBijkwC":{"uri":"/melonJS/docs/melonjs/Sprite.html#updateBounds"},"EMm8zdgkBsAj-6SuHhGZs":{"uri":"/melonJS/docs/melonjs/Sprite.html#draw"},"nU6U7fxzThqPvDlgvOAlE":{"uri":"/melonJS/docs/melonjs/Sprite.html#update"},"250QEwdiqfYyuBv0wxv5E":{"uri":"/melonJS/docs/melonjs/Sprite.html#onAnchorUpdate"},"6KpCx3QtSg0VNwUFDtT-6":{"uri":"/melonJS/docs/melonjs/Stage.html"},"EMu0UdfY5vh5osGIHOtrd":{"uri":"/melonJS/docs/melonjs/Stage.html#ambientLight"},"h6VYnLkAVO206j4MYi2nB":{"uri":"/melonJS/docs/melonjs/Stage.html#cameras"},"6D_s9c32PKQYvWvT9Cyos":{"uri":"/melonJS/docs/melonjs/Stage.html#lights"},"gsiNPm61kvY3xWPb_nqve":{"uri":"/melonJS/docs/melonjs/Stage.html#settings"},"xNvLHnI0Qs8Tes4La8M40":{"uri":"/melonJS/docs/melonjs/Stage.html#constructor"},"KmZZCwnVVe7rizHtDItcH":{"uri":"/melonJS/docs/melonjs/Stage.html#onDestroyEvent"},"V4BSMW4dZn-GakI9Q-RbF":{"uri":"/melonJS/docs/melonjs/Stage.html#onResetEvent"},"nFGjWKZdAMntBZPvCT5vF":{"uri":"/melonJS/docs/melonjs/Text.html"},"oh0-8wbpZsxoGd7uZ5c7s":{"uri":"/melonJS/docs/melonjs/Text.html#alpha"},"vQq-3CIbHugmZaTVc05Ly":{"uri":"/melonJS/docs/melonjs/Text.html#alwaysUpdate"},"TGvSJAI8xHlDKlqQrC5ip":{"uri":"/melonJS/docs/melonjs/Text.html#ancestor"},"36W5V-woYEylVKKvbWBNk":{"uri":"/melonJS/docs/melonjs/Text.html#anchorPoint"},"YXMs6-Qv8kTOcFiq5fR8M":{"uri":"/melonJS/docs/melonjs/Text.html#autoTransform"},"BGJW_TUIozcXs7MUW03eO":{"uri":"/melonJS/docs/melonjs/Text.html#blendMode"},"-nNzJfK3Rnlt8uR0F0MH8":{"uri":"/melonJS/docs/melonjs/Text.html#body"},"azNCgUYcim_7gQq_8-8C2":{"uri":"/melonJS/docs/melonjs/Text.html#bottom"},"Te0iKzDU4qkfvR0h5XOED":{"uri":"/melonJS/docs/melonjs/Text.html#centerX"},"ndtTeXPd51o5b96x-Xc2I":{"uri":"/melonJS/docs/melonjs/Text.html#centerY"},"0WtVx_yCAbSDBrzTrqePM":{"uri":"/melonJS/docs/melonjs/Text.html#currentTransform"},"Ix5nPLZ0l0krH8LjkBD_L":{"uri":"/melonJS/docs/melonjs/Text.html#depth"},"4brKVC9jgXuqx3SL6ll_C":{"uri":"/melonJS/docs/melonjs/Text.html#fillStyle"},"6MLajCLRQia3w_w1VgQTP":{"uri":"/melonJS/docs/melonjs/Text.html#floating"},"qH-5sQmYd_9ZgJ0CUEABc":{"uri":"/melonJS/docs/melonjs/Text.html#fontSize"},"e2HXYPIzlRldczrTMzSNR":{"uri":"/melonJS/docs/melonjs/Text.html#GUID"},"fW5ZECxQ4l0y0EIMvRbEj":{"uri":"/melonJS/docs/melonjs/Text.html#height"},"cZCPLIf1jJ1S9_bD8L9Ft":{"uri":"/melonJS/docs/melonjs/Text.html#inViewport"},"XyaaeNJC6coq38FcLSVxf":{"uri":"/melonJS/docs/melonjs/Text.html#isDirty"},"IvI6DjPfLeBuEbZW6Akbl":{"uri":"/melonJS/docs/melonjs/Text.html#isFlippedX"},"yKf3LQNz7W2pqiS1F1ZFQ":{"uri":"/melonJS/docs/melonjs/Text.html#isFlippedY"},"e9A1cs0JOW4a13AzmDcuR":{"uri":"/melonJS/docs/melonjs/Text.html#isFloating"},"VzZPLYPI3bkjDdMIuKT0p":{"uri":"/melonJS/docs/melonjs/Text.html#isKinematic"},"Z54XJkY6JqOXgCsMr5K9w":{"uri":"/melonJS/docs/melonjs/Text.html#isPersistent"},"lXJDrgr6CVqHHkm8Xgjtz":{"uri":"/melonJS/docs/melonjs/Text.html#left"},"TN0_9YR7geDukKezpRt8i":{"uri":"/melonJS/docs/melonjs/Text.html#lineHeight"},"meHD7ocOc3ragFkFLPFUi":{"uri":"/melonJS/docs/melonjs/Text.html#lineWidth"},"ko7s7vy3_F7yT3rjSj9ef":{"uri":"/melonJS/docs/melonjs/Text.html#mask"},"Vrck4HzPUtHg5XeKgn1rl":{"uri":"/melonJS/docs/melonjs/Text.html#name"},"VOUFcbBpQqVuoBuLO8Wkd":{"uri":"/melonJS/docs/melonjs/Text.html#onVisibilityChange"},"JKS6Q1Kp4wk3BJMOYwSrE":{"uri":"/melonJS/docs/melonjs/Text.html#parentApp"},"oyu85jyeNj5nHrEU-ziki":{"uri":"/melonJS/docs/melonjs/Text.html#points"},"96amLfABUYf-SzLNTxKgM":{"uri":"/melonJS/docs/melonjs/Text.html#pos"},"AUJrB2pq9Q8ofmy1M1ym8":{"uri":"/melonJS/docs/melonjs/Text.html#right"},"flknvOyyP59MYAYOJuyEF":{"uri":"/melonJS/docs/melonjs/Text.html#shader"},"pxly2STM2Tbzd76om6CQe":{"uri":"/melonJS/docs/melonjs/Text.html#strokeStyle"},"nJ_doMkUFTF53lxCrZNKE":{"uri":"/melonJS/docs/melonjs/Text.html#textAlign"},"560V5hBobUKBeX7WgmXg-":{"uri":"/melonJS/docs/melonjs/Text.html#textBaseline"},"QxOPwu_42V4kgXvb78HyU":{"uri":"/melonJS/docs/melonjs/Text.html#tint"},"AFNreutPUy0ykrjGflsss":{"uri":"/melonJS/docs/melonjs/Text.html#top"},"elU5DTskwaHNKgGkN-eDE":{"uri":"/melonJS/docs/melonjs/Text.html#type"},"AUc0nIuNtngH_c_hjUO11":{"uri":"/melonJS/docs/melonjs/Text.html#updateWhenPaused"},"VKijmAu9_ZbvWVxnfJnAf":{"uri":"/melonJS/docs/melonjs/Text.html#width"},"Xb1AF1ZrOcIhD_erdCjIo":{"uri":"/melonJS/docs/melonjs/Text.html#wordWrapWidth"},"46iIuWtJ57p94EPMQXa0o":{"uri":"/melonJS/docs/melonjs/Text.html#_text"},"ruHHdmPH3BwqQVdhBU513":{"uri":"/melonJS/docs/melonjs/Text.html#angleTo"},"BHyPELZCXURTR7yVUXIkF":{"uri":"/melonJS/docs/melonjs/Text.html#bold"},"G6QFoddyD7yC2s2gyIDm9":{"uri":"/melonJS/docs/melonjs/Text.html#centerOn"},"g10aQ-v_f09X_vZA4pMV7":{"uri":"/melonJS/docs/melonjs/Text.html#clone"},"mC0_DqqGwPQRLBmo1hyAA":{"uri":"/melonJS/docs/melonjs/Text.html#constructor"},"ksviHNMMu5gczox85mJ1-":{"uri":"/melonJS/docs/melonjs/Text.html#contains"},"fNaFpp5Clei-IxtK8FFJc":{"uri":"/melonJS/docs/melonjs/Text.html#copy"},"M9PsV8e5k1gdMjxSCIkqd":{"uri":"/melonJS/docs/melonjs/Text.html#distanceTo"},"yaHGtP49nyfwPwC1E8Z-8":{"uri":"/melonJS/docs/melonjs/Text.html#draw"},"DB0zACYmDlSYUfAV9M_Rm":{"uri":"/melonJS/docs/melonjs/Text.html#drawStroke"},"TIUn0Yr7o_jPFI8CNV2nb":{"uri":"/melonJS/docs/melonjs/Text.html#equals"},"fS7NG0kPRjPZtrDVID6AK":{"uri":"/melonJS/docs/melonjs/Text.html#flipX"},"g_JZ1ljAiR-K0ofk0wbgD":{"uri":"/melonJS/docs/melonjs/Text.html#flipY"},"gZN9zlW2NYpvnLa0043uh":{"uri":"/melonJS/docs/melonjs/Text.html#getAbsolutePosition"},"BGq5sdDMEywyM2Ew8O6_P":{"uri":"/melonJS/docs/melonjs/Text.html#getBounds"},"SEYWypiaKiyXS4-w4X2rb":{"uri":"/melonJS/docs/melonjs/Text.html#getIndices"},"sZmvHl7vrYLCefuDcwbzY":{"uri":"/melonJS/docs/melonjs/Text.html#getOpacity"},"mZr9XJpQ2jIpeXuqkgdqf":{"uri":"/melonJS/docs/melonjs/Text.html#isConvex"},"qKsWnTk22oy-tLCx9JANo":{"uri":"/melonJS/docs/melonjs/Text.html#isFinite"},"33vNQ1VyL5sSxlKTR2Ggw":{"uri":"/melonJS/docs/melonjs/Text.html#italic"},"gxNceJCIG68FXZl7J83Q1":{"uri":"/melonJS/docs/melonjs/Text.html#lookAt"},"-6Hiuh8bysSnpRscRu7rH":{"uri":"/melonJS/docs/melonjs/Text.html#measureText"},"k0sb3rB1kGnVsg2Lxf3FQ":{"uri":"/melonJS/docs/melonjs/Text.html#onCollision"},"MaqIDk0x7OBwIrc8U2xE3":{"uri":"/melonJS/docs/melonjs/Text.html#onDestroyEvent"},"T8Bum1Z8g0_64FR08JDi-":{"uri":"/melonJS/docs/melonjs/Text.html#overlaps"},"yv4S2afxknlcBffi1cfQG":{"uri":"/melonJS/docs/melonjs/Text.html#postDraw"},"BOIM4FilGcBw3HEa4GbXW":{"uri":"/melonJS/docs/melonjs/Text.html#preDraw"},"CN8Q49kIGkncgzsa4E7vf":{"uri":"/melonJS/docs/melonjs/Text.html#recalc"},"ScfKx6vHOZ2XjNvolGu6C":{"uri":"/melonJS/docs/melonjs/Text.html#resize"},"kh0taUprBE1UWaWPXif_p":{"uri":"/melonJS/docs/melonjs/Text.html#rotate"},"dF-hLn7LPEQglu4w1Uug6":{"uri":"/melonJS/docs/melonjs/Text.html#scale"},"YXWReIi5jMbfPEeuMWpNU":{"uri":"/melonJS/docs/melonjs/Text.html#scaleV"},"PGcQ_o9w5beXSqD4JnAW3":{"uri":"/melonJS/docs/melonjs/Text.html#setFont"},"siLV0YP63OrgPozExNVyq":{"uri":"/melonJS/docs/melonjs/Text.html#setOpacity"},"LMnUSIH3HwRnC4sbY59_y":{"uri":"/melonJS/docs/melonjs/Text.html#setShape"},"H7PPsJ6_iOazJEC9LZNNN":{"uri":"/melonJS/docs/melonjs/Text.html#setText"},"ZAQwbJ0LT9XYaKXReBVkN":{"uri":"/melonJS/docs/melonjs/Text.html#setVertices"},"0_LL60wiQja_wscAiul_A":{"uri":"/melonJS/docs/melonjs/Text.html#shift"},"xIYFhs3pjieqVzaXuNVEm":{"uri":"/melonJS/docs/melonjs/Text.html#to2d"},"A7RnpI003tn9CTfTES9_5":{"uri":"/melonJS/docs/melonjs/Text.html#toIso"},"qHYrPy1pIXNLGiy7dAYq2":{"uri":"/melonJS/docs/melonjs/Text.html#toPolygon"},"CPr29bKFpb6oTi1ksRRKB":{"uri":"/melonJS/docs/melonjs/Text.html#transform"},"Go1C6mbJ4yv8JvuypQ6O1":{"uri":"/melonJS/docs/melonjs/Text.html#translate"},"buE1HpRanUB6YbKXP081v":{"uri":"/melonJS/docs/melonjs/Text.html#union"},"UdmWMr7IKFPpBy29sWa_3":{"uri":"/melonJS/docs/melonjs/Text.html#update"},"cf5iHehzrGZzBECaWrGS2":{"uri":"/melonJS/docs/melonjs/Text.html#updateBounds"},"1Z7BuzgESi_1gYVqQ459R":{"uri":"/melonJS/docs/melonjs/Text.html#onAnchorUpdate"},"vR4rGdad1RTpPo7SmkHfd":{"uri":"/melonJS/docs/melonjs/TextMetrics.html"},"D1AZrTmz-dcIEZiUNqGqR":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#ancestor"},"CPaAutXy1qew8IVMTvluc":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#bottom"},"b3PRDngXy-ZP8LHhFKQMy":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#center"},"T_1SWFtNKgVQVHBCPQAFF":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#centerX"},"oHllwGBVAEno3AqKJRA-W":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#centerY"},"Er1aXyqlafZCw5x2858Cj":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#height"},"hhWu2CLzGqCRP16v6B__s":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#left"},"R0Emad43rTJj5QarfWu7z":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#right"},"vv1O6j8NVQtMaDHGC60ER":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#top"},"XYlrFJ5cyPFb_agRwCbpR":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#type"},"c1xKP1p0M-F2HIsFlY6PA":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#width"},"9ZoftSqJOQEae0Phm0832":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#x"},"_YCoK9OZQY5-PfhVPWJda":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#y"},"pM4HBgIvY0bywd45mdpYK":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#add"},"b970c-pXtW8gr3l0bG_7r":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#addBounds"},"5-fIKdUKNkgKIGpdqKcsb":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#addFrame"},"0STXRQFz-1IsaQStNu4JZ":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#addPoint"},"Wyz6JV1mvi0LPw5M-sWrB":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#centerOn"},"5pBX6WzLunWEhtN0zli8k":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#clear"},"XjkP2cTpDU5xZ5L7lEyqX":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#clone"},"QW0VvMIp9WxnIlHPDb38B":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#constructor"},"w0TAVcU8EtX-ZWMilyWUs":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#contains"},"8htY0sy4e4YacfYKmw_UW":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#isFinite"},"cgBuG3whJAwM46wvhqkLY":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#lineHeight"},"QzTsQjMEdJv3RRWgcCU6B":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#lineWidth"},"_36mBuW4NCdypcVFDlV_N":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#measureText"},"kjvX9uRtFUtCJW6VxNzKD":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#overlaps"},"1ysf-JUXKXnY9PCm3FJAk":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#setMinMax"},"wW1KUwaGtm_ZoxGNPrYOH":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#shift"},"1Vf390bEnZCCDqzpsyood":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#toPolygon"},"S2ndJa34bQPRCuOQCn7vY":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#translate"},"gOI0GiHBibdM6QCxvYqDr":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#update"},"Mt4DOu7nnsNs2LfARt1LF":{"uri":"/melonJS/docs/melonjs/TextMetrics.html#wordWrap"},"Uxt_UzzxLDcSDW0rjWZSh":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html"},"Owlw7jf68cPsbArdPrlAP":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#addRegion"},"-QDiuWYHYRYLmyLVBUQtq":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#addUVs"},"8Dv6cceVHGKHkR8RqM-JZ":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#constructor"},"PnHpD9MrVF1lvj9xPN8ij":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#createAnimationFromName"},"7XEC8BW0p-IYA_A0PcxHS":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#createSpriteFromName"},"6p24hYnKvJbXWF25hlNl5":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getAtlas"},"6wa_S7CcBZkKqZ-z8nj78":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getFormat"},"7swzSW3Z6eR0QQrS_PuGF":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getRegion"},"Lj8G_fFEciU7fQdpzvmLl":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getTexture"},"5QfsLB-zny5ClUwkU9Stf":{"uri":"/melonJS/docs/melonjs/TextureAtlas.html#getUVs"},"dvg1Fz4Zh6L7Cw7jSa0-n":{"uri":"/melonJS/docs/melonjs/Tile.html"},"gpt34XTWFLhYYIVju21JJ":{"uri":"/melonJS/docs/melonjs/Tile.html#bottom"},"wWEQD9jFyhvApMnHlhJsy":{"uri":"/melonJS/docs/melonjs/Tile.html#center"},"a1oT9FkElGdkX8YgC-qXq":{"uri":"/melonJS/docs/melonjs/Tile.html#centerX"},"P1MaibCbi_Ibi9XPOPuET":{"uri":"/melonJS/docs/melonjs/Tile.html#centerY"},"rt0AAoEc3nZpCbWMOIZZf":{"uri":"/melonJS/docs/melonjs/Tile.html#flipped"},"cnX1iOkbLb3cTivLsWLMr":{"uri":"/melonJS/docs/melonjs/Tile.html#flippedAD"},"Dq7hUk3ysET00foI3Wrk4":{"uri":"/melonJS/docs/melonjs/Tile.html#flippedX"},"KgmzVvhm4PO3IdR2aHK9t":{"uri":"/melonJS/docs/melonjs/Tile.html#flippedY"},"V1wHTD8K6EgammmcTwvhk":{"uri":"/melonJS/docs/melonjs/Tile.html#height"},"HxsmRmAeSF4MPR_rj089J":{"uri":"/melonJS/docs/melonjs/Tile.html#left"},"v_cxXyhCNh39-LeJn8ogS":{"uri":"/melonJS/docs/melonjs/Tile.html#right"},"mGkuJlGzYVpPECWBlU9Bo":{"uri":"/melonJS/docs/melonjs/Tile.html#tileId"},"W7srnCo986Ibw8J-cwSTn":{"uri":"/melonJS/docs/melonjs/Tile.html#tileset"},"AkrrRFr67kddrSiQ997Rq":{"uri":"/melonJS/docs/melonjs/Tile.html#top"},"fCTJDLLzFeTdddaq9bf5C":{"uri":"/melonJS/docs/melonjs/Tile.html#type"},"HxsWa47ioPSzLKlCKkBGU":{"uri":"/melonJS/docs/melonjs/Tile.html#width"},"I5kNZnzsoxrPyeepJoN2T":{"uri":"/melonJS/docs/melonjs/Tile.html#x"},"CX7bPpVAGcs5HmVi7hBWj":{"uri":"/melonJS/docs/melonjs/Tile.html#y"},"mWCo--7M71pEFpctKRQLa":{"uri":"/melonJS/docs/melonjs/Tile.html#add"},"N0RdxWHzvl2cqf2BAkyPX":{"uri":"/melonJS/docs/melonjs/Tile.html#addBounds"},"yvmNLufEZCGHvjph8UEa0":{"uri":"/melonJS/docs/melonjs/Tile.html#addFrame"},"5C2unieNdBn3nS6FSOKKV":{"uri":"/melonJS/docs/melonjs/Tile.html#addPoint"},"E4kkQ4qcjLP9NmSCSDWmE":{"uri":"/melonJS/docs/melonjs/Tile.html#centerOn"},"hrk4uKTPF3k84ttNOHu8U":{"uri":"/melonJS/docs/melonjs/Tile.html#clear"},"ueBdhJdSh0Xr39i4dXBfA":{"uri":"/melonJS/docs/melonjs/Tile.html#clone"},"MppjQzTo0I0zdm1JYxL_T":{"uri":"/melonJS/docs/melonjs/Tile.html#constructor"},"h0DLmr2qa_ow8CT5mjuAX":{"uri":"/melonJS/docs/melonjs/Tile.html#contains"},"HAE1qB0Q4K0vJqIgrLo6L":{"uri":"/melonJS/docs/melonjs/Tile.html#getRenderable"},"SPRhGG09fa5u3xRG9bKEY":{"uri":"/melonJS/docs/melonjs/Tile.html#isFinite"},"pAOsPxnWN_p5dt9N3fvYo":{"uri":"/melonJS/docs/melonjs/Tile.html#overlaps"},"wz4k7t3RGf0CGUUiSl0_e":{"uri":"/melonJS/docs/melonjs/Tile.html#setMinMax"},"yHyKMuMxr71pSXwTfY8o-":{"uri":"/melonJS/docs/melonjs/Tile.html#shift"},"DHT5VRtDaw3VYZgg1Y7fd":{"uri":"/melonJS/docs/melonjs/Tile.html#toPolygon"},"pWPZm8u-bFc_ruz9Da3Nr":{"uri":"/melonJS/docs/melonjs/Tile.html#translate"},"hG9fnOzPhEn9JCpgjHBvk":{"uri":"/melonJS/docs/melonjs/Tile.html#update"},"ZE_GLXU_L0kGedaVrEDWA":{"uri":"/melonJS/docs/melonjs/Timer_.html"},"xEI3wyJxxm1WOYbQuvkJB":{"uri":"/melonJS/docs/melonjs/Timer_.html#fps"},"dga8NOXj3hIHnoXzpeJ7R":{"uri":"/melonJS/docs/melonjs/Timer_.html#interpolation"},"NfESzfDH0phpAXrgvaxdi":{"uri":"/melonJS/docs/melonjs/Timer_.html#maxfps"},"6FwN4SWjeNi_Tvqn_SmOG":{"uri":"/melonJS/docs/melonjs/Timer_.html#tick"},"0e7Awd3GhGo5KqtKgl8pT":{"uri":"/melonJS/docs/melonjs/Timer_.html#clearInterval"},"GNpcIBpFCN5DeVDe_p-Yk":{"uri":"/melonJS/docs/melonjs/Timer_.html#clearTimeout"},"XiIlYW_I16079DErG3oV-":{"uri":"/melonJS/docs/melonjs/Timer_.html#getDelta"},"ZtcwzcHgizbeexWwPSpZE":{"uri":"/melonJS/docs/melonjs/Timer_.html#getTime"},"j7bWSfTTj_4Dws11jU8y7":{"uri":"/melonJS/docs/melonjs/Timer_.html#setInterval"},"OiuGmQRAY07-Ub-zsfq1m":{"uri":"/melonJS/docs/melonjs/Timer_.html#setTimeout"},"6XwwEOYopFlDEP_2rHRlU":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html"},"WP2Sp7ck93EN7qRJL0qKK":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#canRender"},"gbBupFSP0fvf4k2WaCtTs":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#constructor"},"QOORLfx0j-apm_DUIDs81":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#drawTile"},"JfibTcBOjFB8-IzkFTCrz":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#drawTileLayer"},"nmGaw6eBru5nkqqNBpc1H":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#getBounds"},"bA-vV2_8TNbb8DL2Cqp2k":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#pixelToTileCoords"},"5ZC7zE3H3sgDGMhvnch-P":{"uri":"/melonJS/docs/melonjs/TMXHexagonalRenderer.html#tileToPixelCoords"},"AO6Jg4gTRDXOgK6tHcaK5":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html"},"ELzpKU-YDT9FfXmEwN4nI":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#canRender"},"tuh1w5jtv2tMM8HKXQJKW":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#constructor"},"UpHeVKMCx2uRiitZo7rii":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#drawTile"},"chpaQDAQ-5dIcB641K-Ph":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#drawTileLayer"},"GhWz_yXtF0hzufj8ndEm8":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#getBounds"},"aULqedw4xit06WYr74y_C":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#pixelToTileCoords"},"5N1stZ_hlel3YUrpK7VcN":{"uri":"/melonJS/docs/melonjs/TMXIsometricRenderer.html#tileToPixelCoords"},"fUehKNa6kLgso4GJoNjWg":{"uri":"/melonJS/docs/melonjs/TMXLayer.html"},"zdOY_D9g1zX9G1Igimchp":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#alpha"},"XipCS3hWvqEmTC7YJCCrQ":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#alwaysUpdate"},"ZOsILuFQXy99Lw3tA8ZZE":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#ancestor"},"18buRAvJ2ov-aYYtQ9BfH":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#anchorPoint"},"rikoJgpOyvByEKNKjNeaH":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#animatedTilesets"},"oiPp6WAjXvqBCVQnjzvSq":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#autoTransform"},"MNTIzmjz6fmtN4qq9dCDi":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#blendMode"},"qKmUOLZe7Vfg9MqQDCpt8":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#body"},"IfNs5vsZMXcKwQ1Ojlj9j":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#bottom"},"00Kgjjo1Q23t6S7OhdG6m":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#centerX"},"cGTKWVvWJvmTVAgulR-Zn":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#centerY"},"aJF-IkSRK0hZ3IxnZaKJH":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#class"},"p4yHP4a5CMcDNInrLsBJ5":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#currentTransform"},"tKGzJNkOEPgNv5dsTfoUx":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#depth"},"LcoB9ZomXPYKSEr5e1Dcv":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#floating"},"TQtc6Fpi66s13O94Jj4p3":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#GUID"},"E0NGcvuBNA-Eh9JkJjD89":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#height"},"m_uayeGwesDGJNum2FZ7A":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#inViewport"},"RAGSM2Qj63DZqYLnU6Z0h":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isAnimated"},"QV-ruqy_bARkHigaQkTZv":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isDirty"},"daSOA1bhj8XT0eAGGJSwq":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isFlippedX"},"09PDzcXiE5iCypXcY7cho":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isFlippedY"},"RDXKbuk_IuYMLiwa7Sfx2":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isFloating"},"2bzaUj_BU6jvDXA79pqNS":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isKinematic"},"yY3Ky5hCKuso-A6jEvPjQ":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isPersistent"},"vQHq3Eq3l6aQYSqvq04sR":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#left"},"RLtImh29uyMQdZWr8gNzE":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#mask"},"ftvcQgxceOy81Usa86J3P":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#name"},"jYrf6RZ1W-9trFAbmxMCG":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#onVisibilityChange"},"MZbObCM1CqD_RuYej8KRG":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#parentApp"},"jvC8eD4bus7kZfLss4p2g":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#points"},"bR8nZOqstNq0XZyd3tKfM":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#pos"},"r0dV0Jt03LvIEeuAS-Iny":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#renderorder"},"-mS63fTMgwT5iZpZQ3PA3":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#right"},"H3YP_ec5VemBFsfeFi2Fv":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#shader"},"wF8EJ0NI8uhSbnKdwd55X":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#tilesets"},"wVKOxQpInUBJ4BFdboIO-":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#tint"},"RJ4W349bwYUyOYNdxC_vx":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#top"},"cYmtLx7gm4yH4mwwPNt-5":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#type"},"pTEyaiUaqoyQXsJ5POCfL":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#updateWhenPaused"},"-_FJ6NbQ0m0pN3iYm3qEV":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#width"},"mt0LtTM0bNetXb3mog_Qf":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#x"},"V7PNQ-UoGAV1k9GSbLgi0":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#y"},"TfNHF9BmYkduw-5B_ye34":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#angleTo"},"5YUnV9408TM5sAiTlrTPf":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#cellAt"},"ylBdlL3cuet4pdgvtLLQJ":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#centerOn"},"sdtwKbSeM8PK55DG-g8Kz":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#clearTile"},"iiwt5k2RnxwqSx0YsCCa-":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#clone"},"WTyYgZoVS5NHxwhWTVWx6":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#constructor"},"lavu2FbivwS7oLl8P6Y3J":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#contains"},"B138ZB8eb8aCXLNaL0m_S":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#copy"},"4T0HJ3dMLjVxzBOXHekuB":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#distanceTo"},"RItptviWUhYZOdlxXe9iA":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#draw"},"4eTVlHy5eB3VBuETFHq49":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#equals"},"bVYUnXo-n9QexGjd3Lldt":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#flipX"},"274IcTdD8xlp7fCrbSuE9":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#flipY"},"uZx_vx8-FfDLzTraIGa6O":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getAbsolutePosition"},"j1y2WR_JNtU5U8SXxReet":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getBounds"},"eE_KVaFAL81kuJAtv_9J9":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getIndices"},"UzPloDS5Fl_dgkYi2UHoN":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getOpacity"},"VW4G0hxNsDKtxUCPPJZAs":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getRenderer"},"meqm_LgLZeIt0jmexfoV5":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getTile"},"dfBhnZNI8_jGFbAa7X9X4":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getTileById"},"IonsEHppfLNlQULPuVzL4":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#getTileId"},"oMbbiTAZlVnnKsDxsVo-S":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isConvex"},"gm4ZyoeEWDRkQV26c15yF":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#isFinite"},"kj3DwWocwgs9C_n0IMWF4":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#lookAt"},"P3GT5jsrHDArV7LmLVWTL":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#onCollision"},"DVvUhruZUekYKKVrJ2HZn":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#onDestroyEvent"},"cJ_q4JjfB7MnY0ileEylh":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#overlaps"},"TC_Srg3APT3elnGWatQPn":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#postDraw"},"nvdPABSWyRkaHWikDMQuS":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#preDraw"},"2hTX2DMDCQjezA9I5u4v7":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#recalc"},"_FZuOpzWL6OXwWgXM6U1j":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#resize"},"ujc_Io2G1WymegFN_qnNC":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#rotate"},"ocKZWJMdz6CBkKgC9Dwjc":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#scale"},"t0X7Vn_KSIpln41wTFMJR":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#scaleV"},"yyaT3df0ApX-pGkddWdkS":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setOpacity"},"oyj9QXfbjbx8GtcerOZIe":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setRenderer"},"J9xNCP7wU_be3iLMhMYIY":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setShape"},"0c_RoPdPYp6qpA5uc2Ka6":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setTile"},"nZtQRhJ1FKVrPObAxTfm6":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#setVertices"},"s3A0xSZqRf-VXFpVLwb61":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#shift"},"DvFz2FgMr1A91tWLSrhfO":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#to2d"},"35qMhQ8LFqW29zJP3F4Cb":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#toIso"},"OcR3CXEwKyuvR--5xB9HH":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#toPolygon"},"rjQlY93vS8jM2GTbBu9u8":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#transform"},"VpNXA8CNL9-FYEZcBgdx_":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#translate"},"qTJgHxPWiWpI6Y5AHtk1x":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#union"},"EeH0bitK7bRRgahkd0fRX":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#update"},"aFMNcAZZHNyQE8xT0ogZw":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#updateBounds"},"aUsyXon0S2pTo3svYFEBM":{"uri":"/melonJS/docs/melonjs/TMXLayer.html#onAnchorUpdate"},"CAuNmUSNR49PvyREPy16U":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html"},"bz6DyKauOtlS6n6Pv_V1z":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#canRender"},"rtDttc3ykiiKvf1MdK6QT":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#constructor"},"gdkqVEBAv7nGbaUVMsZzC":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#drawTile"},"RvF12PkODCuZg0TniNRTI":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#drawTileLayer"},"9vpKSUBYrRFoY4LrV-9sR":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#getBounds"},"CBHttKpfTBQb18L2EfH1O":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#pixelToTileCoords"},"ci7RYirIvhzG04BVItpal":{"uri":"/melonJS/docs/melonjs/TMXOrthogonalRenderer.html#tileToPixelCoords"},"Pl9BpsjvkxKIo4tmlIohm":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html"},"2kPvNNFT1OmfHykjjQu2E":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#canRender"},"OTKAYEbqc2qFD4OL-LE9S":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#constructor"},"nBCPZSiQnsLC6m6_Ibzup":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#drawTile"},"EKbk68WpMSKrha3POMDs3":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#drawTileLayer"},"L0vNKezwYhPqXUiMPquLb":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#getBounds"},"gwnCUMTLNHWHQmu8pKFgs":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#pixelToTileCoords"},"OYCirZuDzG8C0JuZ9Szl9":{"uri":"/melonJS/docs/melonjs/TMXRenderer.html#tileToPixelCoords"},"7Gt6EXCtMgqXe-p1HNlSd":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html"},"GXmDLRwaBd1tEgsIcXZtw":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#canRender"},"PijedHrmKS6qDz3WGbfrq":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#constructor"},"mAh7gTk5YOkM3p7XDDMAp":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#drawTile"},"8ZSByc67AnddYGVzPMIzX":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#drawTileLayer"},"MDqBfgYtVWxWtqH028a3D":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#getBounds"},"CCGJOU30W0-sCBxPbp1xG":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#pixelToTileCoords"},"RziJLgWlsxRVFYI8079eb":{"uri":"/melonJS/docs/melonjs/TMXStaggeredRenderer.html#tileToPixelCoords"},"WHGIqVjOZjUnYgiVx_5x3":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html"},"t7RQDtG5m4k5Lpe-fM1IK":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#class"},"8csp_SWPlOSVmPaZkrUYx":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#cols"},"QpCmS7O_JeMSNIrCSPgRi":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#infinite"},"JTR7v8t7XA8HjtsbC6BAl":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#name"},"ed6nL4nFtROyZcZVrVvmq":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#orientation"},"wZtv4i-ZdcXrvrcx9RbV2":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#renderorder"},"WLgArr60elNAIfJfxGHuO":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#rows"},"Eh3qbkcDo9ae76RxGDH5K":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#tiledversion"},"VKH-qZqnMPgjH38bOe1xD":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#tileheight"},"AdRzE9kNitKe5PjOgE-hA":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#tilewidth"},"nLO2RX-xuURoymbjOVure":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#version"},"Wrqdu96pYSlMqxG6UhHhq":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#addTo"},"Th0kSkkxRhiT7aGXEsoRI":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#constructor"},"Oy5cL7yyuCXP2Npi4_STN":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#destroy"},"tbMIqRbESKtFXmQdIxvNa":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#getBounds"},"OamkFQZtOY_FKeVJely0U":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#getLayers"},"PKC17c72-rJFiDB44OUjF":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#getObjects"},"Aw8-avrmjLophRXzQJB-m":{"uri":"/melonJS/docs/melonjs/TMXTileMap.html#getRenderer"},"tCj-7JKBQUMZa-HddEdRF":{"uri":"/melonJS/docs/melonjs/TMXTileset.html"},"UIal1-G9-Xo6Syg6loCyG":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#class"},"8ONdXe5z5tClly2gXoD4f":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#isAnimated"},"yFPcJXoJckBHS0TAbPfot":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#isCollection"},"VZPdfoCE6baAIHiMAcb28":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#_lastUpdate"},"5I3kr50ddC_I3hvoFeO8R":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#animations"},"3dmXoHASgc-Sg9nP7hlo4":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#constructor"},"d76D9Q_E6TzerH41Bndcc":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#contains"},"QfSQdSggMrftzfnU_5m8u":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#getTileImage"},"UBZV7DcdnJu6SZyltGBbv":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#getTileProperties"},"RII5XnuLPPx5NRweIQXXA":{"uri":"/melonJS/docs/melonjs/TMXTileset.html#getViewTileId"},"1Wke2pIPVc7D5oJrcEw_n":{"uri":"/melonJS/docs/melonjs/TMXTilesetGroup.html"},"2-CzWKQd0ComT9pdvZeaS":{"uri":"/melonJS/docs/melonjs/TMXTilesetGroup.html#add"},"08wHty3esXyS-e5617-AM":{"uri":"/melonJS/docs/melonjs/TMXTilesetGroup.html#getTilesetByGid"},"8X-rFfvAykOHnHM1MzNR8":{"uri":"/melonJS/docs/melonjs/TMXTilesetGroup.html#getTilesetByIndex"},"x1eveCjo6ntqQMU7tRHS8":{"uri":"/melonJS/docs/melonjs/Trigger.html"},"yXa1hlneD-HYDGU6AX4WQ":{"uri":"/melonJS/docs/melonjs/Trigger.html#alpha"},"FRCk9si0jatpd7BjpN1w9":{"uri":"/melonJS/docs/melonjs/Trigger.html#alwaysUpdate"},"Q9Dix0fIgxP7ZbvYsW2MC":{"uri":"/melonJS/docs/melonjs/Trigger.html#ancestor"},"cNMR-Ob-PKwaNgSzTMrvh":{"uri":"/melonJS/docs/melonjs/Trigger.html#anchorPoint"},"VFH1bLB9H9JAtphORzmpq":{"uri":"/melonJS/docs/melonjs/Trigger.html#autoTransform"},"yympsowXt2APXjjxVrHuc":{"uri":"/melonJS/docs/melonjs/Trigger.html#blendMode"},"nyjzUW6ru4muyYu6wGJRq":{"uri":"/melonJS/docs/melonjs/Trigger.html#body"},"d0kngkLXc7jz-taZSaYso":{"uri":"/melonJS/docs/melonjs/Trigger.html#bottom"},"GXtLi9TXLk7JKt7KyV7LD":{"uri":"/melonJS/docs/melonjs/Trigger.html#centerX"},"kKTY2xQDs_-XxjKfHQZFO":{"uri":"/melonJS/docs/melonjs/Trigger.html#centerY"},"seDU5aubfYDs3vQl3Pj8v":{"uri":"/melonJS/docs/melonjs/Trigger.html#currentTransform"},"1pVh7swM_75tT4XswAgyX":{"uri":"/melonJS/docs/melonjs/Trigger.html#depth"},"vfmdmBAwjw9u_1HB2ZxVH":{"uri":"/melonJS/docs/melonjs/Trigger.html#floating"},"85mj-ku4u2tIkiDi2jd_Y":{"uri":"/melonJS/docs/melonjs/Trigger.html#GUID"},"S5QErpjHeuHetKSjYdypR":{"uri":"/melonJS/docs/melonjs/Trigger.html#height"},"LFZdMNHMeYmhOD5eAK7A_":{"uri":"/melonJS/docs/melonjs/Trigger.html#inViewport"},"XWoNubY10j5nuTt48IAyi":{"uri":"/melonJS/docs/melonjs/Trigger.html#isDirty"},"HA0OVtM4NA81i8T3JePxk":{"uri":"/melonJS/docs/melonjs/Trigger.html#isFlippedX"},"H31VXKRnindB46q7rjqW4":{"uri":"/melonJS/docs/melonjs/Trigger.html#isFlippedY"},"77H34fJM55L2E7jS2UNoN":{"uri":"/melonJS/docs/melonjs/Trigger.html#isFloating"},"x_YX5he39kbGMFm4zD5IJ":{"uri":"/melonJS/docs/melonjs/Trigger.html#isKinematic"},"zuwnChs_Vn-gB99VrUZCx":{"uri":"/melonJS/docs/melonjs/Trigger.html#isPersistent"},"6mHiZvlHmmMtuFDFanwpA":{"uri":"/melonJS/docs/melonjs/Trigger.html#left"},"NmbS8nzbXwlLVXcqoWKLC":{"uri":"/melonJS/docs/melonjs/Trigger.html#mask"},"DeH8IPsY3kmXGLuJAxx_q":{"uri":"/melonJS/docs/melonjs/Trigger.html#name"},"_DrHLik642pSZVTTleA7d":{"uri":"/melonJS/docs/melonjs/Trigger.html#onVisibilityChange"},"oh6vekvIDxqU4hWFQb8L9":{"uri":"/melonJS/docs/melonjs/Trigger.html#parentApp"},"OSCz68AV-6E-7Kr7_z3b7":{"uri":"/melonJS/docs/melonjs/Trigger.html#points"},"9DRwz3Ub3A69BlSp2zZj8":{"uri":"/melonJS/docs/melonjs/Trigger.html#pos"},"nCIbJwxInn8xA96zUTDtv":{"uri":"/melonJS/docs/melonjs/Trigger.html#right"},"TSLynZhPwLCS4q5xZuTTs":{"uri":"/melonJS/docs/melonjs/Trigger.html#shader"},"Owh3eNG530IMrQJuxrBK3":{"uri":"/melonJS/docs/melonjs/Trigger.html#tint"},"9ByjfsfbFJKty-qEfMDYp":{"uri":"/melonJS/docs/melonjs/Trigger.html#top"},"6m8zgHLupmrGXk1uLFdqc":{"uri":"/melonJS/docs/melonjs/Trigger.html#type"},"TxvjFlDTm0ZSJ8GpYyP4I":{"uri":"/melonJS/docs/melonjs/Trigger.html#updateWhenPaused"},"samP4_ntfrtu0IAHsPBxT":{"uri":"/melonJS/docs/melonjs/Trigger.html#width"},"0gpl_MvMClJQ-4tcuKE7u":{"uri":"/melonJS/docs/melonjs/Trigger.html#angleTo"},"4JtmhkwXjez4vf499QkQZ":{"uri":"/melonJS/docs/melonjs/Trigger.html#centerOn"},"BKIOxoIi8Wc1QxUEVNoSC":{"uri":"/melonJS/docs/melonjs/Trigger.html#clone"},"QO4i_SmPAO_5Ar_tRCfZT":{"uri":"/melonJS/docs/melonjs/Trigger.html#constructor"},"egClEt8X-L7ht8UL89n9A":{"uri":"/melonJS/docs/melonjs/Trigger.html#contains"},"c7FBD87sl1mxFMIaOamtn":{"uri":"/melonJS/docs/melonjs/Trigger.html#copy"},"61cSzKXymdETwFssPDfIg":{"uri":"/melonJS/docs/melonjs/Trigger.html#distanceTo"},"DY7OM6N4WWXZqdci4Bezo":{"uri":"/melonJS/docs/melonjs/Trigger.html#draw"},"3AH6tMUlYksehtNfHoCvL":{"uri":"/melonJS/docs/melonjs/Trigger.html#equals"},"ql8QHP6Ir3uzYasNMEns6":{"uri":"/melonJS/docs/melonjs/Trigger.html#flipX"},"8Z3bCBN-oWnY1PRAAdpVG":{"uri":"/melonJS/docs/melonjs/Trigger.html#flipY"},"qKpEWm9eKA_gB9-r2pDOW":{"uri":"/melonJS/docs/melonjs/Trigger.html#getAbsolutePosition"},"PZwmFn7X7F1Rpt6zI0-tI":{"uri":"/melonJS/docs/melonjs/Trigger.html#getBounds"},"IGaZ9ho2PS9_m90TgDjzx":{"uri":"/melonJS/docs/melonjs/Trigger.html#getIndices"},"uwnbig7nPSdYeTYgQ9d_M":{"uri":"/melonJS/docs/melonjs/Trigger.html#getOpacity"},"DWVtc3n5EISK6d_dhN7Xa":{"uri":"/melonJS/docs/melonjs/Trigger.html#isConvex"},"1lOGfRImpnqj9-gfjW59D":{"uri":"/melonJS/docs/melonjs/Trigger.html#isFinite"},"jE85eehJrKL406rcq5OhZ":{"uri":"/melonJS/docs/melonjs/Trigger.html#lookAt"},"RthE_P-CXIxp4ibY6m3Y1":{"uri":"/melonJS/docs/melonjs/Trigger.html#onCollision"},"PEKH10FumwpUhhfEfy2sF":{"uri":"/melonJS/docs/melonjs/Trigger.html#onDestroyEvent"},"ApcQYZdGCmVfaCZJu4K-L":{"uri":"/melonJS/docs/melonjs/Trigger.html#overlaps"},"8JKz9aAGgALJfhh0QM48w":{"uri":"/melonJS/docs/melonjs/Trigger.html#postDraw"},"xzp5OKBuIrNFK8YlBI7JS":{"uri":"/melonJS/docs/melonjs/Trigger.html#preDraw"},"tmbEqBRwg3_nCTKDf1wMS":{"uri":"/melonJS/docs/melonjs/Trigger.html#recalc"},"zRYW_Hh_t2EcqKHGG2BNJ":{"uri":"/melonJS/docs/melonjs/Trigger.html#resize"},"uehOMcMdfWFIc1_mrKBcM":{"uri":"/melonJS/docs/melonjs/Trigger.html#rotate"},"-wYCX2GdqhX2V-VGSRy2m":{"uri":"/melonJS/docs/melonjs/Trigger.html#scale"},"IaMbLwOpzaHihji5iHrln":{"uri":"/melonJS/docs/melonjs/Trigger.html#scaleV"},"gwAFtagMpVnio7Ow8knG4":{"uri":"/melonJS/docs/melonjs/Trigger.html#setOpacity"},"QZYbBAsZh5IOBW818cgeV":{"uri":"/melonJS/docs/melonjs/Trigger.html#setShape"},"5gDwaaWquotVNxWxXwWjr":{"uri":"/melonJS/docs/melonjs/Trigger.html#setVertices"},"UH7ZR8l9_JGHzCmnI5oxK":{"uri":"/melonJS/docs/melonjs/Trigger.html#shift"},"QBuu4IovRvhZKt5lCxTfE":{"uri":"/melonJS/docs/melonjs/Trigger.html#to2d"},"JYf90VHwSEDd7VQdFAzo7":{"uri":"/melonJS/docs/melonjs/Trigger.html#toIso"},"iwVnHue-dZJ799xai4Zx7":{"uri":"/melonJS/docs/melonjs/Trigger.html#toPolygon"},"4qnRCuTABT0oVDkdLwAwd":{"uri":"/melonJS/docs/melonjs/Trigger.html#transform"},"XgiFm4PzZ3T-Nz2MrCK1p":{"uri":"/melonJS/docs/melonjs/Trigger.html#translate"},"OwpLzdKe9GHT3rpTbpAwc":{"uri":"/melonJS/docs/melonjs/Trigger.html#union"},"4FDOxEKkG0eQ4aoDW9i_2":{"uri":"/melonJS/docs/melonjs/Trigger.html#update"},"ulaJ0ASVVDvigUcuUjzEu":{"uri":"/melonJS/docs/melonjs/Trigger.html#updateBounds"},"aYmDpzNcfg9bqkjD8lnzZ":{"uri":"/melonJS/docs/melonjs/Trigger.html#triggerEvent"},"jpkk1ihstCwYAMBlj4Cxd":{"uri":"/melonJS/docs/melonjs/Trigger.html#onAnchorUpdate"},"i7M9mZ6YhBRGDcynCsdAW":{"uri":"/melonJS/docs/melonjs/Tween.html"},"Ki4hXv1XuYYUdAWhA5N1-":{"uri":"/melonJS/docs/melonjs/Tween/Easing.html"},"u8whHpVRk7t05-ILpHgYH":{"uri":"/melonJS/docs/melonjs/Tween/Interpolation.html"},"8axIk7GQNHWfzK5awKMYq":{"uri":"/melonJS/docs/melonjs/Tween.html#chain"},"B7Wa8Y7DfPk99VqF8NKqB":{"uri":"/melonJS/docs/melonjs/Tween.html#constructor"},"w3LP-FEx8yqQbeFL56TEM":{"uri":"/melonJS/docs/melonjs/Tween.html#delay"},"n8bejbtF8zzAXnV_uXWEy":{"uri":"/melonJS/docs/melonjs/Tween.html#easing"},"9T2Kv9Zx_-QtXOfBrjs1C":{"uri":"/melonJS/docs/melonjs/Tween.html#interpolation"},"0tp_CijjXslX3tvw2DBEk":{"uri":"/melonJS/docs/melonjs/Tween.html#onComplete"},"e_sdJowsHotNISD5IGNAO":{"uri":"/melonJS/docs/melonjs/Tween.html#onStart"},"-26l7HgF56iA9paXAq-m1":{"uri":"/melonJS/docs/melonjs/Tween.html#onUpdate"},"fwGnguXQrbzV84r4zhZqH":{"uri":"/melonJS/docs/melonjs/Tween.html#repeat"},"JzSZUsdUcF2bmr-lsAj7F":{"uri":"/melonJS/docs/melonjs/Tween.html#start"},"MgeqmJPtG6_na5Q_uoRNk":{"uri":"/melonJS/docs/melonjs/Tween.html#stop"},"bhJ5mLWuoPrBYxeQR1LIQ":{"uri":"/melonJS/docs/melonjs/Tween.html#to"},"D5EB0FJVES1Y0HnyhQVjB":{"uri":"/melonJS/docs/melonjs/Tween.html#yoyo"},"jjRaF2nV47LWRKe7jLSg5":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html"},"OlqgRnWBvPSaMukthWjW3":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#alpha"},"VffftluZ18DbSQaZC_St_":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#alwaysUpdate"},"ocLOSvofeGnNN8YsmUDrU":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#ancestor"},"qsT2TQApQYjiXl_KVFB1i":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#anchorPoint"},"vYn_HPmkML2j8xr9ApSaZ":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#autoDepth"},"P69WQM2cQbe-zZJleNaru":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#autoSort"},"NZQZAQhYxSwjTt4qtPeAQ":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#autoTransform"},"qy79HKGc_IkT_Uy6VtG9T":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#backgroundColor"},"SRATwV8VTXNkpES1ywye2":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#blendMode"},"StFSFql0YBTkb0dFygYVh":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#body"},"yW38b9yVuAFS5P_SiEFr1":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#bottom"},"PF7yDVM0oojPfpREcuJ9x":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#centerX"},"rHj4LC9qKGKwRaAb1-PoS":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#centerY"},"OwNwX1kuiT9-4GHkY4Dvr":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#clipping"},"vdlngTkpTyF3wRQ__D06U":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#currentTransform"},"_gqBTu52jxy41JFdumnhW":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#depth"},"saieshpKLopWbMMloMeXX":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#enableChildBoundsUpdate"},"6Mk8Y6vSHF10AVy_YCHjB":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#floating"},"ARgDzISgZ1VAEfnOmo-cv":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#GUID"},"T71pCWkm-8oeldZi5vhFR":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#height"},"QpMdKNiaI1aLkEHv7QNXZ":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#holdThreshold"},"DTq3PONi336CVPTvcnCEI":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#hover"},"kJTG827ZxeWR0r-MJg54B":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#inViewport"},"2Zcx5TCom5O7CPmg0v2zX":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isClickable"},"L7hZtXvml174hWVwD-3Gw":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isDirty"},"X-oLYpNACigmWUoYRt581":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isDraggable"},"h2KWmzvIbfOg7GZZ7dh18":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isFlippedX"},"biku-ZLTRJGp55tc8xKMr":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isFlippedY"},"_dpePB-zmCY3vHRfgeaqI":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isFloating"},"Jg3S_3B1AwIXrpo1s02Ap":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isHoldable"},"IHHd8oCV7nphu76sO3F39":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isKinematic"},"mbBOOi5EluXYSzLLrbDBb":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isPersistent"},"WQXx5aE7vy2KbiriJ6bg1":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#left"},"DyTXrULjzRWX3lsMGDG_4":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#mask"},"n1ouWoRfL8dPE4ZmvKmhS":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#name"},"251rYcwVAZPoXIDNCLSLP":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onVisibilityChange"},"yJx837u_yd-RtUA8AsZxO":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#parentApp"},"rxIbp1qpRl7x3VAZOP8-C":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#points"},"edJRSp_q3dOoZNtICcjdq":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#pos"},"MvCm9AXaOqv6U3-KPQ2Qm":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#released"},"xCIMQI3v6c0JW9w6mSRD_":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#right"},"oYBf2263SHR1Yvg9LLCHc":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#root"},"WQHLH_fxFxjMl5W49YSCq":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#shader"},"mXTkwVvY2a9rLGIkhN_8A":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#sortOn"},"RCTBIffFO9rrf6RZUCXeK":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#tint"},"5K64OCT5fP6Wth-B0UfE3":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#top"},"AJOEZGVgGENxPsUXt8Nxd":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#type"},"lyNvQ7F0b82JFDZATCGdp":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#updateWhenPaused"},"O8Oz1tax-b_7BF0N2RGGe":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#width"},"1SikCNHpcBsBdFDwGdf6M":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#addChild"},"VBstR_1AqfUWY4zSlF9d2":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#addChildAt"},"bXyRQ3u9fF8U5JL2SIPXv":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#angleTo"},"tinfFCjX56zJXVnf1YXew":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#centerOn"},"ZHxqJZGVa8MokbYlyeLyZ":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#clone"},"zOppIElC3I7uwo4HhdM20":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#constructor"},"ELJx4pKCWsWz8rJssMDBz":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#contains"},"tQ0qLxWyP9BKzTcl0Drmm":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#copy"},"s_hXjNtpIsUMahouQUYqT":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#distanceTo"},"yQ96IZikZ39bJna_fLXi4":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#equals"},"TpqMZAXDoQRHd6Z5evQJR":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#flipX"},"3u6VlZgLpKQ5SD2u88UAZ":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#flipY"},"H0jyKWZRWATQmzDKcAM6p":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#forEach"},"Z-VSvRppFp6y1TYSoseH1":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getAbsolutePosition"},"9l1o3et2I8Rpo-1pna1pc":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getBounds"},"ENKtHJb49Ct9iWLC3JP-6":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildAt"},"Mx0MVX2M52eJbD0934NvJ":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildByGUID"},"oDJaJ6n6T7OboIYtX0YGv":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildByName"},"A0Gvj2XlbdmbkBlY-0zE0":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildByProp"},"809ZXyNh9YeQZE6u3S474":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildByType"},"2M1KKgsDoYqJj0cehzN37":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildIndex"},"NdWijPdM7cOtnFS8dQ9Py":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getChildren"},"kbc4furGkltI3vrnhFrdF":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getIndices"},"5_NVirOqz33U-ihdFrUAw":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getNextChild"},"myKVlJwbzYbT_hwJFFWG_":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getOpacity"},"pznMClm15lwFeGZmNZRlS":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#getRootAncestor"},"HVEVrryyHqIX-28sqR4dV":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#hasChild"},"45j_gj3ao4xtqeCBhUoQR":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isAttachedToRoot"},"ByeCe7h7_aGmaJEYLmBc5":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isConvex"},"CkoFyb5iIs47aJK-SIy_H":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#isFinite"},"CFaswOW4_GL8HwUfiUY0J":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#lookAt"},"hiU9l4QJDXK852La_OM7a":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#moveDown"},"ZEb8tQVIH-dsJXXG0bW07":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#moveToBottom"},"SWNsHy8EMramJWOnBWto1":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#moveToTop"},"plmqKPh1UwnXXFoUyvS9H":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#moveUp"},"XCy1EGfLl51sgFtKJKzod":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onChildChange"},"W5P2Xt6sYpdjNMmyEhHCd":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onClick"},"i5Da26rsu1LPgO-sc8zhx":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onCollision"},"mmyGm37ccgUKw-YSG0b9d":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onDestroyEvent"},"sf1vqbsbmueukstuUHT6u":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onHold"},"Z7UmmIb83oUAgaqYKncW_":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onMove"},"066FbhPOLtThLGX986uXC":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onOut"},"lwbx7sG0qvGU5r3ndlBMV":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onOver"},"HQ8erSWM_iNkfabFzoVwn":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onRelease"},"8rDWZwNBQWOi_RGtY_7eu":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#overlaps"},"6J11ALnatn449pT7FUT7K":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#postDraw"},"gZ1c2OttQFZKNVANN-QtY":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#preDraw"},"J7icxmjdYuxIv79RgTGv7":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#recalc"},"2blBdxzISgo-1pqo-Fmb2":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#removeChild"},"ohi5eo7DrAIoD2iYWbH5n":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#removeChildNow"},"3iu2b2ylV_iY76vZZIWlm":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#reset"},"YBB4RuiCXycNfNoZ2gx8H":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#resize"},"JL3KLFur3pZ19ixCaSg_v":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#rotate"},"Grejl0eLFB3CeeK_rf_n8":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#scale"},"ba7rxHbW-3VTkUEsnRBUH":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#scaleV"},"omLTpM73YlxyzzQmPOaqx":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#setChildsProperty"},"sG2TEU646VUbLJPWiCcB0":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#setOpacity"},"vM-L2LqXfHyKwpz_0ttbo":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#setShape"},"lD5WYgJyHhW9F2IuhG41d":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#setVertices"},"_IDTGzjSUmKOGB4YW9Yru":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#shift"},"5wF6D7Yig0E63dzBOkCwr":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#sort"},"PNX3MxKs2zSZb9nfBtPmI":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#swapChildren"},"10CjgdcJN89ung0mPPvHZ":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#to2d"},"YzJSFpaCMIQxBVgUt8NxV":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#toIso"},"X8lQH-5cOFn_c2ULdaMUG":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#toPolygon"},"upEwLa7SBMkkjNvdxIcxy":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#transform"},"8VlB0c5hAdX_pS34D890p":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#translate"},"TEaorABNngDRaW1f_1-y1":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#union"},"e8jtbovWwZ6ps1Yjg7Mkz":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#updateBounds"},"njG53zZS3tuuFIZIiM5KY":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#draw"},"ZPhkk_1Q3-y8sTmtxJ-8N":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#update"},"XnGSSi1G72pB_vxYNOKUZ":{"uri":"/melonJS/docs/melonjs/UIBaseElement.html#onAnchorUpdate"},"-JMnS0qbLUN7R7p6qwsbI":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html"},"aixvmlUxXC9cR0vz1-788":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#alpha"},"EAEQ4FStg1rMgoWrKKswm":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#alwaysUpdate"},"px4O_R6XXqTg7iDmJu1sL":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#ancestor"},"GCkBE5e0MWDK4WVml3l4y":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#anchorPoint"},"DkEvAr5wiFiwW7mV2R8L8":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#animationpause"},"6-Zy1Oxwt3QfcMN6sg6AI":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#animationspeed"},"bcrw0lnrp75VmYs1_kMY6":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#autoTransform"},"rucsyyaMLkbR3X7v5U_Gi":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#blendMode"},"2bDx7FSGg-BIKATbHqzYt":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#body"},"lv3qbuJ2rwDExzpY8zf0C":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#bottom"},"DmEFtMF1OKJc5BHA1klfV":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#centerX"},"NZkvoXtfBTZ59thG94ivz":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#centerY"},"rZz2IRT5MPv6POot-wrRE":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#currentTransform"},"GRFy9vmiu2i5Q6gSwxInj":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#depth"},"ab4rcYssDOo-RyTTyO1rP":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#floating"},"FCyhCzGVAcbRorAUTA7Z8":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#GUID"},"18HLhEIysKVcwN0TCuAXD":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#height"},"yFdV-lqZWMtmjdClzWeSU":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#holdThreshold"},"nhbGBKNVmAuIWFv5Pz8Fb":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#hover"},"RQ97drHBu15-zRUfLO3Us":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#inViewport"},"FONKhoelIRBwYAW4UyXA9":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isClickable"},"Ql4GWmopRSMG7cTFJaJhn":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isDirty"},"_UmWblA6Lgz2jbZRQ479R":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFlippedX"},"5FHmL49EgHhERWyWp3yBQ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFlippedY"},"Yw1S2IfFfpbqQPpI2wxWD":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFloating"},"R_hyxFEIp21e6I3uQki9Y":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isHoldable"},"zCAiPbyXIb8CjlkZ-S3bS":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isKinematic"},"WJbrTGPkuVd9kve7XxHWH":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isPersistent"},"IdL5k1-4sP-bBFdPDSHb7":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#left"},"Xv3f4K4yNzdXaBKFy0U86":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#mask"},"UeCVO_sSZPR3eXzffS_c5":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#name"},"zSMq530OgNi4fBhrDek0t":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#offset"},"X88SJwypJJ8YU2ohPWEz_":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onVisibilityChange"},"TIDev4_neQyF_N1j2RI0X":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#parentApp"},"ZCGjVGR4tKlv8798DfB1H":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#points"},"RnWpm_Gyk26eJzQfbgo5x":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#pos"},"R7QEtD0ct7XeZ236OCmX6":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#right"},"5vi-hBuns0Xph-tWzC6ME":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#shader"},"MO9rcf8mZ6qQJWYc2e2DM":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#source"},"ueSwhY-PCXKO7uFjYomSA":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#tint"},"5Es0D8HT4Khx8qR3rUvkY":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#top"},"YOTcc3KaRBYEPTxCJeXOt":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#type"},"aKMP-0CM0RF7WofhQBndq":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#updateWhenPaused"},"pjpiBn3HWZKUeMhA5BGKY":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#width"},"UHIz0H7XOHeiM59vzQ9DL":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#addAnimation"},"x-n6WLXHvVBLQvhJifu9s":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#angleTo"},"2hzc6taOqZ0y_uIUHOf4W":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#centerOn"},"unB4C_j-P7tOKCM9XHy7K":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#clone"},"YgvnJsfmqeLxJK5IAFeFQ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#constructor"},"dfE3qYzwlZs3-d2kBuQwN":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#contains"},"fzczv7CJiUfb4JdqFoLap":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#copy"},"J2HUxdk8MfZxKUbu1JMpi":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#distanceTo"},"K2DHhrum24PW5pWUUjxxn":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#equals"},"U13xZM760Wz_DInwGVaOz":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#flicker"},"YMCFagmbhLU8HBXh8j9pT":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#flipX"},"UqF-tv8y-1IDqhA5tG9hR":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#flipY"},"yJf3QV_6EcWhb_RZDcE_B":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getAbsolutePosition"},"PxJxu7GzN0CmuXIRDNGpG":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getBounds"},"sRZaqMHwuHdhRi2bHO1gA":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getCurrentAnimationFrame"},"Xk6lz0WQymjIK1vF1C53E":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getIndices"},"1h1XPBjc6Y9sI3L7MYD1q":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#getOpacity"},"a5k9ubQLa_7kvSJzn22pP":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isConvex"},"yGgynwOwEGSW5uOqs1qZB":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isCurrentAnimation"},"Cpi7WWB_d0ULjfmxJi3tt":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFinite"},"NZJCK1Ydb0XnfzrDjVKUG":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#isFlickering"},"YSdajQS_kI0mBvqi9dif-":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#lookAt"},"N3B2ECVYgh02xJYDLF_B1":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onClick"},"G41KAkXHz8JTqsKrld2aI":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onCollision"},"9DyE2GYicGhMWwem8Tv3o":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onDestroyEvent"},"4Llu-YuJDpI4uRgOU8bt0":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onHold"},"JVQbJZN8p2Og1nagiq-ED":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onOut"},"Y1SIOAhClPwRKwr4xDi6o":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onOver"},"ZiqTlGFmlSwKcK6sIhkiQ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onRelease"},"jwYsj7kY0dx0vhAiCnAvC":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#overlaps"},"7kq3I8yPGzaejxfdYHrMt":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#postDraw"},"80OPaTB4pIv9vBbRUjmFN":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#preDraw"},"wEDOsVgckfx8R8W70OX7n":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#recalc"},"s4pXHvhHIv6Wv7s_ZxPu-":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#resize"},"frLm37hPdL2LEubFq-QLV":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#reverseAnimation"},"OwQwAwY1_DrHrdfaiq8aA":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#rotate"},"tIXH2qeiDNMg7brj3icNV":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#scale"},"idKYKbPutNzBq4CZAw9jn":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#scaleV"},"BaIGlkgDUEsD2VL92fC1B":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setAnimationFrame"},"dfu8E4das-KmHKRfu44f5":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setCurrentAnimation"},"cE9nttx0-xdxlwBwNER5b":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setOpacity"},"8GDr5Q_WnWBLBeO7edggl":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setRegion"},"GtUbCgw6KZyEuaViKpa0_":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setShape"},"DYIoLaU1KbmunHhepiGk5":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#setVertices"},"dmI5_pLXqj8mWSRmY1D19":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#shift"},"FJZGFA4V0cofsOHZ06Xw1":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#to2d"},"tcz4C6xbiG7Hxo4U7n_C7":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#toIso"},"GuNWJOW2j0qEyfpBXbDiE":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#toPolygon"},"_oI5mDJ5hSuqcv69e1bEP":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#transform"},"aH85p6oTOJYYKtpeOS2wT":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#translate"},"60-vQA1yizkLpERaK4qYG":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#union"},"47E1_Ul5q9kcAbwXqaWvz":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#updateBounds"},"Us7rycWQBBVFkeJgOFbmZ":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#draw"},"q7B6CFu-8rc759sK3oc5E":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#update"},"6bGmcZSGQxEMCOUCBAkYd":{"uri":"/melonJS/docs/melonjs/UISpriteElement.html#onAnchorUpdate"},"nV0-AUxvR2auotttUlq1C":{"uri":"/melonJS/docs/melonjs/UITextButton.html"},"4ehJEoqlKQa2mAFxYX6XJ":{"uri":"/melonJS/docs/melonjs/UITextButton.html#alpha"},"hp2o5aea9JXf3s9tbTsct":{"uri":"/melonJS/docs/melonjs/UITextButton.html#alwaysUpdate"},"cYhKqIxP7gfbGZAt3IX7F":{"uri":"/melonJS/docs/melonjs/UITextButton.html#ancestor"},"SHocb3Rq23ckuSArW9-6i":{"uri":"/melonJS/docs/melonjs/UITextButton.html#anchorPoint"},"TsB0FnNKFN5TJ562yjN_z":{"uri":"/melonJS/docs/melonjs/UITextButton.html#autoDepth"},"z0CmgHnYPkONZRnCarydc":{"uri":"/melonJS/docs/melonjs/UITextButton.html#autoSort"},"sYcf7Z9fg4QJAsipa-6Zo":{"uri":"/melonJS/docs/melonjs/UITextButton.html#autoTransform"},"7vbXL4i8d0wAgM-TxyDhP":{"uri":"/melonJS/docs/melonjs/UITextButton.html#backgroundColor"},"Cd4CITZm_pmYDHQrHLHtA":{"uri":"/melonJS/docs/melonjs/UITextButton.html#bindKey"},"_VH60CAoxDQRUO6TTnyxn":{"uri":"/melonJS/docs/melonjs/UITextButton.html#bitmapText"},"LuBxVND7NKUSn8TiDLB-l":{"uri":"/melonJS/docs/melonjs/UITextButton.html#blendMode"},"9vgv_1oAO3b2_fE8ZqPzO":{"uri":"/melonJS/docs/melonjs/UITextButton.html#body"},"vjX6WLtqjEVWz7nuD7D9a":{"uri":"/melonJS/docs/melonjs/UITextButton.html#borderStrokeColor"},"jQH19n1cyWTkbcI3QEu7F":{"uri":"/melonJS/docs/melonjs/UITextButton.html#bottom"},"pXyaeTtVuB8lPQTYiiaFj":{"uri":"/melonJS/docs/melonjs/UITextButton.html#centerX"},"LBL-IX4uf9LDMkus-GiT_":{"uri":"/melonJS/docs/melonjs/UITextButton.html#centerY"},"CUEvVb1Bh6GT0yX-MZeFV":{"uri":"/melonJS/docs/melonjs/UITextButton.html#clipping"},"ZN98x80ts6YAojlxmAinO":{"uri":"/melonJS/docs/melonjs/UITextButton.html#currentTransform"},"V6AnTg6C90vRF0wHxqbJC":{"uri":"/melonJS/docs/melonjs/UITextButton.html#depth"},"k992S_hWq5f6q0KArCQ2W":{"uri":"/melonJS/docs/melonjs/UITextButton.html#enableChildBoundsUpdate"},"A_QWK3RAeF4NNkj9kgPt4":{"uri":"/melonJS/docs/melonjs/UITextButton.html#floating"},"TvB6x_Ws1AN-sMwwEwYSw":{"uri":"/melonJS/docs/melonjs/UITextButton.html#GUID"},"eS__eA3URePCfgnEsCPCB":{"uri":"/melonJS/docs/melonjs/UITextButton.html#height"},"mRgjp37KOhGG3fwZ7Vble":{"uri":"/melonJS/docs/melonjs/UITextButton.html#holdThreshold"},"XzqIutmOjIUvLLLaHyR8B":{"uri":"/melonJS/docs/melonjs/UITextButton.html#hover"},"bbH0zCqL1FmjEA9P3E5F3":{"uri":"/melonJS/docs/melonjs/UITextButton.html#hoverOffColor"},"ndrMbwRDc84E6OtEzt279":{"uri":"/melonJS/docs/melonjs/UITextButton.html#hoverOnColor"},"AZSWTO3k1LRMlphRjwMVe":{"uri":"/melonJS/docs/melonjs/UITextButton.html#inViewport"},"odkZBqJ4HeVR0fXUhreON":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isClickable"},"OMpJyI0OogvAf_DLjVadK":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isDirty"},"a4s_F9nWHJpUsLemIYSrC":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isDraggable"},"BD9deeDHZzroKuU3uW6Rg":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isFlippedX"},"7kilQX68dh97f0aSgU0B1":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isFlippedY"},"uTKKteG0u7VDI0vKbaU1L":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isFloating"},"itA1diVJH2G0dUSv-Vmo8":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isHoldable"},"CUPBAUws31zHnc1RwGX55":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isKinematic"},"pjQzwuA1twEd-Z9h-UBfX":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isPersistent"},"N26ZUsiRRWE07JFWiWd4J":{"uri":"/melonJS/docs/melonjs/UITextButton.html#left"},"e0RGqMRG0JHf2Y75wwz3-":{"uri":"/melonJS/docs/melonjs/UITextButton.html#mask"},"cEuNaNOQCkJCnht1VwMb1":{"uri":"/melonJS/docs/melonjs/UITextButton.html#name"},"YS4S0JU3haQpmhh6pQMf6":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onVisibilityChange"},"6vKFLxzgaCx3_4f08_E8m":{"uri":"/melonJS/docs/melonjs/UITextButton.html#parentApp"},"Iq1HbtR4gfVWw31DyoQsd":{"uri":"/melonJS/docs/melonjs/UITextButton.html#points"},"wQwk4OhhrTu0jb-AQSAPa":{"uri":"/melonJS/docs/melonjs/UITextButton.html#pos"},"JjWeEeqO_frx4I-c4-Nda":{"uri":"/melonJS/docs/melonjs/UITextButton.html#released"},"q1EBfUlSXfb3kMkBrYoZA":{"uri":"/melonJS/docs/melonjs/UITextButton.html#right"},"v4UH7rsQuAx4ljwB6VaX7":{"uri":"/melonJS/docs/melonjs/UITextButton.html#root"},"s_tujpGeeufx3Od_KVrcW":{"uri":"/melonJS/docs/melonjs/UITextButton.html#shader"},"eUlUUck4g05rqClLmpImS":{"uri":"/melonJS/docs/melonjs/UITextButton.html#sortOn"},"SWLGM8c8UmT7iN7ysfCij":{"uri":"/melonJS/docs/melonjs/UITextButton.html#textAlign"},"m0ThLFyMQQ1XYxK2Ak4Qf":{"uri":"/melonJS/docs/melonjs/UITextButton.html#textBaseline"},"thOOUSPF_pp8EIw1gDZLo":{"uri":"/melonJS/docs/melonjs/UITextButton.html#tint"},"DjeSkp7rlZxjNft1z3pZj":{"uri":"/melonJS/docs/melonjs/UITextButton.html#top"},"-huUzvHyZKFU7Y_8d1_sx":{"uri":"/melonJS/docs/melonjs/UITextButton.html#type"},"AAI39-abxT28Elba8gSWG":{"uri":"/melonJS/docs/melonjs/UITextButton.html#updateWhenPaused"},"_kGXE4bRxa2ayUOcyj7Qw":{"uri":"/melonJS/docs/melonjs/UITextButton.html#width"},"hOKOEPlnLLZ3B-TfOK7Hv":{"uri":"/melonJS/docs/melonjs/UITextButton.html#addChild"},"8QbD5dHI_BDxLvUku1ZDR":{"uri":"/melonJS/docs/melonjs/UITextButton.html#addChildAt"},"no47ASU00zfATr9xay8kT":{"uri":"/melonJS/docs/melonjs/UITextButton.html#angleTo"},"t0I7QEUMsqNRbWHGSFjYK":{"uri":"/melonJS/docs/melonjs/UITextButton.html#centerOn"},"4k3mdyejKVvyxyVT8FPZV":{"uri":"/melonJS/docs/melonjs/UITextButton.html#clone"},"eXKlBH8ChEfamLiX2-7Ek":{"uri":"/melonJS/docs/melonjs/UITextButton.html#constructor"},"p9EZPP2XAz_RtfT5eDpjy":{"uri":"/melonJS/docs/melonjs/UITextButton.html#contains"},"2C4qYMnq3Qvpw-JybjsJL":{"uri":"/melonJS/docs/melonjs/UITextButton.html#copy"},"A-0AwgMKiNBtUJs7DTG_u":{"uri":"/melonJS/docs/melonjs/UITextButton.html#distanceTo"},"-o1lgt6OHVBsaO_pn-tRd":{"uri":"/melonJS/docs/melonjs/UITextButton.html#equals"},"XZByPPHviTbXHUAAdyd9g":{"uri":"/melonJS/docs/melonjs/UITextButton.html#flipX"},"_ytDOERl-dx1cMaUDuyRI":{"uri":"/melonJS/docs/melonjs/UITextButton.html#flipY"},"w3FAkjAat7l4HrNOl_IJd":{"uri":"/melonJS/docs/melonjs/UITextButton.html#forEach"},"PJ14P0RL2dhzpgltGSYm6":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getAbsolutePosition"},"FB9DoF_5fMNQxYCjIUKT0":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getBounds"},"WJ2hbCOGO8whCgG06q2dN":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildAt"},"G8AUrJKJtNWgAzT-kwjH9":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildByGUID"},"0GA7-MIfYvdS8KPPvZrnB":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildByName"},"HjVTYHo-8wAXPCPZ5pMCC":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildByProp"},"kuFVBNRwSOgwlpnhpVvbw":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildByType"},"lb4rjMIF7d2-bdJzvjC1c":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildIndex"},"8sA5yOn6S69aEWfgLycs0":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getChildren"},"QoaOBdm__Ry6tpWM6rat6":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getIndices"},"HYYfPnl91YDPoFkVzjOba":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getNextChild"},"vUXGl0dBluF9YyJQ7FqHs":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getOpacity"},"p13MVJMtt_yxMJTPKb8ZT":{"uri":"/melonJS/docs/melonjs/UITextButton.html#getRootAncestor"},"bX37ZSaRpWnvnScwQ2LXj":{"uri":"/melonJS/docs/melonjs/UITextButton.html#hasChild"},"UNuFQoGHgkmY47yd3ol_g":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isAttachedToRoot"},"mxq14fGy7R1VxGjDkVeCJ":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isConvex"},"B5k72jn2NQNrLrRMUnRxH":{"uri":"/melonJS/docs/melonjs/UITextButton.html#isFinite"},"jLuwMK7wmXrsr_R8SUC_O":{"uri":"/melonJS/docs/melonjs/UITextButton.html#lookAt"},"iTNY6UZbfWDBMAN5DF7wu":{"uri":"/melonJS/docs/melonjs/UITextButton.html#moveDown"},"B14_3zcYB6114LsShN_GO":{"uri":"/melonJS/docs/melonjs/UITextButton.html#moveToBottom"},"8vqJfvCBjzvZumKWbdo-h":{"uri":"/melonJS/docs/melonjs/UITextButton.html#moveToTop"},"v8Yx03PXLzVvF1_JQicPM":{"uri":"/melonJS/docs/melonjs/UITextButton.html#moveUp"},"YGucPl6v-PlF2qf4deCdx":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onChildChange"},"5hCDXscOiK8tQ19kTI7Vv":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onClick"},"aYoBNyGxGFkY2cDy2famV":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onCollision"},"ACiCRwAUJBPEQMez5QTkH":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onDestroyEvent"},"zRiy3UuXvRZL-VQWplkpf":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onHold"},"IiAxxWEUEOHpV4Nm5ZOOu":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onMove"},"2ylbZaRMw-ubB-OV1zPjv":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onOut"},"zosu9VNGhAjR17gyMu9C-":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onOver"},"4ZtV9bk9Vi8jncrKgQuKN":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onRelease"},"ML5KhNsiZNnbgvmxIexNn":{"uri":"/melonJS/docs/melonjs/UITextButton.html#overlaps"},"NPgeo6LIN8ITtkXiYgu1I":{"uri":"/melonJS/docs/melonjs/UITextButton.html#postDraw"},"eLBfkpaHAwep1imOj9lb0":{"uri":"/melonJS/docs/melonjs/UITextButton.html#preDraw"},"yy1X34nPwhXH0-kNBfrf1":{"uri":"/melonJS/docs/melonjs/UITextButton.html#recalc"},"WWU4K2zpf6ajZNibzctuS":{"uri":"/melonJS/docs/melonjs/UITextButton.html#removeChild"},"yMM89a_e4Ga2WMRA4whwz":{"uri":"/melonJS/docs/melonjs/UITextButton.html#removeChildNow"},"pvJ3uL5hVIJf2pvPJwo01":{"uri":"/melonJS/docs/melonjs/UITextButton.html#reset"},"Nvn8YBi72u0pqFod5k7oC":{"uri":"/melonJS/docs/melonjs/UITextButton.html#resize"},"eMCaIhuMY-CjlmyIAsQlz":{"uri":"/melonJS/docs/melonjs/UITextButton.html#rotate"},"wsIYphSHsUGdS-5H0pKhf":{"uri":"/melonJS/docs/melonjs/UITextButton.html#scale"},"eUXoMbVMWddWiqRa_oTsm":{"uri":"/melonJS/docs/melonjs/UITextButton.html#scaleV"},"nsa5ZHVqmHxKx_wy1rm2_":{"uri":"/melonJS/docs/melonjs/UITextButton.html#setChildsProperty"},"hXLTEPLcdLla6rQIVXehr":{"uri":"/melonJS/docs/melonjs/UITextButton.html#setOpacity"},"vhCQRwbN1MA2Oxh9xEGsj":{"uri":"/melonJS/docs/melonjs/UITextButton.html#setShape"},"V9v84ylB6VvoaI_wqzYVc":{"uri":"/melonJS/docs/melonjs/UITextButton.html#setVertices"},"bXu8BJtugChxgaWiPVo5l":{"uri":"/melonJS/docs/melonjs/UITextButton.html#shift"},"v5K-DRE-hSki9lPmddrgo":{"uri":"/melonJS/docs/melonjs/UITextButton.html#sort"},"YO7iUpU0xsJjbtmBbCoxP":{"uri":"/melonJS/docs/melonjs/UITextButton.html#swapChildren"},"ADIGkEjLcQNlH32yOi0xq":{"uri":"/melonJS/docs/melonjs/UITextButton.html#to2d"},"NP40pdjD5v4WovPeM7qRA":{"uri":"/melonJS/docs/melonjs/UITextButton.html#toIso"},"Zt61xvsKIGpWHr4Nah6F2":{"uri":"/melonJS/docs/melonjs/UITextButton.html#toPolygon"},"NqJaywvrQM35xeFJYa9xd":{"uri":"/melonJS/docs/melonjs/UITextButton.html#transform"},"dgbQGPGjpVniTxA3u_Bq6":{"uri":"/melonJS/docs/melonjs/UITextButton.html#translate"},"-7P1JPq14Vg2qIkE-1MU2":{"uri":"/melonJS/docs/melonjs/UITextButton.html#union"},"EZ721J0HPkC81dRbn37rX":{"uri":"/melonJS/docs/melonjs/UITextButton.html#updateBounds"},"5g6Eo9t8VB2e7g60kugCg":{"uri":"/melonJS/docs/melonjs/UITextButton.html#draw"},"qQl2JmggPc7hONXxf85Hg":{"uri":"/melonJS/docs/melonjs/UITextButton.html#update"},"itelgATfMKwA4DDtYqA7c":{"uri":"/melonJS/docs/melonjs/UITextButton.html#onAnchorUpdate"},"Le1nK6Y-rZJGrTXYWDu5k":{"uri":"/melonJS/docs/melonjs/Vector2d.html"},"kigLkgPsa7fpQPpp83i6a":{"uri":"/melonJS/docs/melonjs/Vector2d.html#x"},"jab7Xk-Ynk9G3KI4dgzTy":{"uri":"/melonJS/docs/melonjs/Vector2d.html#y"},"uIM0HcRR_VZG-VdX6n0T-":{"uri":"/melonJS/docs/melonjs/Vector2d.html#abs"},"rOrPErM0gPm_Bw8s8zp2J":{"uri":"/melonJS/docs/melonjs/Vector2d.html#add"},"uOQgJlqiwxHUqDGUZnxt8":{"uri":"/melonJS/docs/melonjs/Vector2d.html#angle"},"vgjsSznX_g-606z5ut5Wz":{"uri":"/melonJS/docs/melonjs/Vector2d.html#ceil"},"3TFhRyNJa2FtCSMIVdgRW":{"uri":"/melonJS/docs/melonjs/Vector2d.html#ceilSelf"},"2Q63XQ-0sC30yNGgT0U1O":{"uri":"/melonJS/docs/melonjs/Vector2d.html#clamp"},"UKy9B881OwFtMMmIU7YLs":{"uri":"/melonJS/docs/melonjs/Vector2d.html#clampSelf"},"hPSZy8sU-Tt5_rRG4GSEb":{"uri":"/melonJS/docs/melonjs/Vector2d.html#clone"},"mPsHqKvjD3vEzhcEWIT9g":{"uri":"/melonJS/docs/melonjs/Vector2d.html#constructor"},"TvPkqrsiFwJSCe5uho9jx":{"uri":"/melonJS/docs/melonjs/Vector2d.html#copy"},"KZcI_a11NhG5pSEwRCsFj":{"uri":"/melonJS/docs/melonjs/Vector2d.html#cross"},"A8cC-z7ItXA0BZok86Tfi":{"uri":"/melonJS/docs/melonjs/Vector2d.html#distance"},"iOB4gaitaUcNDZVYXuqXl":{"uri":"/melonJS/docs/melonjs/Vector2d.html#div"},"Se2yNIi4gFbZzlkPxtE1P":{"uri":"/melonJS/docs/melonjs/Vector2d.html#dot"},"aKOYSCy9Jpw_UbqFdhp9C":{"uri":"/melonJS/docs/melonjs/Vector2d.html#equals"},"ZnddePOPk0Yea62QMtrWM":{"uri":"/melonJS/docs/melonjs/Vector2d.html#floor"},"k4JQSO3qSDpNj6oYfsfgN":{"uri":"/melonJS/docs/melonjs/Vector2d.html#floorSelf"},"PgW-byN7LMbevYdxe6fOW":{"uri":"/melonJS/docs/melonjs/Vector2d.html#length"},"lzc0dk_VQsWGTiipyGiT8":{"uri":"/melonJS/docs/melonjs/Vector2d.html#length2"},"s6advpuTPtBGtNRCOpnDg":{"uri":"/melonJS/docs/melonjs/Vector2d.html#lerp"},"JbJDXGTi6EFi991WcNeuF":{"uri":"/melonJS/docs/melonjs/Vector2d.html#maxV"},"fQskYwZ_nhjAattz1CY_I":{"uri":"/melonJS/docs/melonjs/Vector2d.html#minV"},"MJP_e1VJcWGxkARQxqjjd":{"uri":"/melonJS/docs/melonjs/Vector2d.html#moveTowards"},"iaS6N4LoYms0akboLAnqw":{"uri":"/melonJS/docs/melonjs/Vector2d.html#negate"},"s0FMnXXRgCKgDbJpe2y_E":{"uri":"/melonJS/docs/melonjs/Vector2d.html#negateSelf"},"jsNvNt-Nytfop8kPvF2bc":{"uri":"/melonJS/docs/melonjs/Vector2d.html#normalize"},"tETBS2vVc-u7gr11gQjga":{"uri":"/melonJS/docs/melonjs/Vector2d.html#perp"},"wJ3CAuu2CrVRy5uR9Mrt5":{"uri":"/melonJS/docs/melonjs/Vector2d.html#project"},"gyFHY-Bvg4MSyUuE9v3wR":{"uri":"/melonJS/docs/melonjs/Vector2d.html#projectN"},"XnsF48Gy-xAW5ss5KVsgv":{"uri":"/melonJS/docs/melonjs/Vector2d.html#rotate"},"K7IqzH1K94U1U0QAmF6pe":{"uri":"/melonJS/docs/melonjs/Vector2d.html#scale"},"zP193T95evEOQE-XJvzVg":{"uri":"/melonJS/docs/melonjs/Vector2d.html#scaleV"},"SOjq8wOLfv4Tb4Vc-6mJd":{"uri":"/melonJS/docs/melonjs/Vector2d.html#set"},"kn-8AvEDSn3ehMURyXrKs":{"uri":"/melonJS/docs/melonjs/Vector2d.html#setV"},"EoKILJ2bIT7rf_XC3YeZ1":{"uri":"/melonJS/docs/melonjs/Vector2d.html#setZero"},"idFItpQISDOUTLOuPvi-L":{"uri":"/melonJS/docs/melonjs/Vector2d.html#sub"},"ukbjiK-jhHe7w6gDXFpC9":{"uri":"/melonJS/docs/melonjs/Vector2d.html#to2d"},"PRa8WDMhBNI2NaLyddszA":{"uri":"/melonJS/docs/melonjs/Vector2d.html#toIso"},"B5wzHKQIqdUVHBd_pVLvr":{"uri":"/melonJS/docs/melonjs/Vector2d.html#toString"},"v1uHJrPO7pLCM3x_A0Xxp":{"uri":"/melonJS/docs/melonjs/Vector3d.html"},"aYaZT_vbi_gHjCa9ENtRk":{"uri":"/melonJS/docs/melonjs/Vector3d.html#x"},"EMrBBYqYOj_f2BGXHJg_7":{"uri":"/melonJS/docs/melonjs/Vector3d.html#y"},"VkbgOkr6JYBNqennBPz9d":{"uri":"/melonJS/docs/melonjs/Vector3d.html#z"},"bqrpbDohY8iseqai6SINv":{"uri":"/melonJS/docs/melonjs/Vector3d.html#abs"},"zOrJmcSxkuQA5QnlzXSL0":{"uri":"/melonJS/docs/melonjs/Vector3d.html#add"},"86NcuAHwVsljLrrxXGHPc":{"uri":"/melonJS/docs/melonjs/Vector3d.html#angle"},"emhcMXljH7X-WGnBVM8Mm":{"uri":"/melonJS/docs/melonjs/Vector3d.html#ceil"},"Vj0TeQXCktVoJCoZHe6ho":{"uri":"/melonJS/docs/melonjs/Vector3d.html#ceilSelf"},"g-A-RGYHTO45jSUxe2UXQ":{"uri":"/melonJS/docs/melonjs/Vector3d.html#clamp"},"W9biugvBq-prqRvZY1sOz":{"uri":"/melonJS/docs/melonjs/Vector3d.html#clampSelf"},"F4X1rGBzU836VGPToJk4q":{"uri":"/melonJS/docs/melonjs/Vector3d.html#clone"},"-wphxjq36b75sP5Qs2Av7":{"uri":"/melonJS/docs/melonjs/Vector3d.html#constructor"},"j4BpL1ZWTCbILIteAUoQ0":{"uri":"/melonJS/docs/melonjs/Vector3d.html#copy"},"UOaB9u1GFti3w5-MYAeNU":{"uri":"/melonJS/docs/melonjs/Vector3d.html#cross"},"vUZeNBGfpSWQ6zF8dBdwh":{"uri":"/melonJS/docs/melonjs/Vector3d.html#distance"},"JmYSSFYTnhUoxjYZXYVwn":{"uri":"/melonJS/docs/melonjs/Vector3d.html#div"},"PCuNlqfrS5h5ZzJBu_p0n":{"uri":"/melonJS/docs/melonjs/Vector3d.html#dot"},"IJldPSry3jYgPx2qedR1N":{"uri":"/melonJS/docs/melonjs/Vector3d.html#equals"},"KeGpL9aVAOc51gEtd86aM":{"uri":"/melonJS/docs/melonjs/Vector3d.html#floor"},"COoheSbxWJ6KR4xL9W-x7":{"uri":"/melonJS/docs/melonjs/Vector3d.html#floorSelf"},"BoTIi5chsMwBIfc53Yj2Z":{"uri":"/melonJS/docs/melonjs/Vector3d.html#length"},"4veNEaQeVl5GMUzZVG8D9":{"uri":"/melonJS/docs/melonjs/Vector3d.html#length2"},"lNKoNdreddoAGEnZVUBOi":{"uri":"/melonJS/docs/melonjs/Vector3d.html#lerp"},"LgfrUDvE6hKOzUI21LbQe":{"uri":"/melonJS/docs/melonjs/Vector3d.html#maxV"},"mQhKxW2ziGjpqFfvxWdB0":{"uri":"/melonJS/docs/melonjs/Vector3d.html#minV"},"sXOEWX5J98QPjALI696vH":{"uri":"/melonJS/docs/melonjs/Vector3d.html#moveTowards"},"6ZW43sNmXZZGCVxPfNFt6":{"uri":"/melonJS/docs/melonjs/Vector3d.html#negate"},"XkCsjfmVHf5ZOY9ToWnCa":{"uri":"/melonJS/docs/melonjs/Vector3d.html#negateSelf"},"hJVg36yWYPPdn_NLx6N1J":{"uri":"/melonJS/docs/melonjs/Vector3d.html#normalize"},"7KE7-CNSRldsQSf3uV0oN":{"uri":"/melonJS/docs/melonjs/Vector3d.html#perp"},"8UF86D2krfFbB2-pzvJHf":{"uri":"/melonJS/docs/melonjs/Vector3d.html#project"},"KQEtU1gFgHZ22NH1WTw_B":{"uri":"/melonJS/docs/melonjs/Vector3d.html#projectN"},"R2PnBNiM2zHs1KE1Sm3qv":{"uri":"/melonJS/docs/melonjs/Vector3d.html#rotate"},"R0ViPDvK_kdoYaRJiWdZK":{"uri":"/melonJS/docs/melonjs/Vector3d.html#scale"},"NYkR8-bm1Du_muCPbpVC7":{"uri":"/melonJS/docs/melonjs/Vector3d.html#scaleV"},"rOCyy9fAYVhlL8u0_n4Tb":{"uri":"/melonJS/docs/melonjs/Vector3d.html#set"},"ubZ9ncP4ZEgkriu0Df1iM":{"uri":"/melonJS/docs/melonjs/Vector3d.html#setV"},"T_v5VhtiH-655VZlUhOW2":{"uri":"/melonJS/docs/melonjs/Vector3d.html#setZero"},"tsS4n-KZaoBjZk0yYtVFl":{"uri":"/melonJS/docs/melonjs/Vector3d.html#sub"},"deyVQpFkTikMc9fU-1go4":{"uri":"/melonJS/docs/melonjs/Vector3d.html#to2d"},"gcK9cbVkE7CBY-pkyyiwL":{"uri":"/melonJS/docs/melonjs/Vector3d.html#toIso"},"bel5Yxe1n5bKLBwwqYLgi":{"uri":"/melonJS/docs/melonjs/Vector3d.html#toString"},"Z4FwwHqOAKZguFdqW09uK":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html"},"pUisSviCSlH4NwV0NKuym":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#compositors"},"RSsXV2lF6QmfL6bZOLLkO":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#currentCompositor"},"9lWsTxNdxK1pa104VS0QV":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#currentProgram"},"vwqFv7SviPy0kgWaMnmZR":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#currentTransform"},"Xsbr_tDo97DkB5kIWuLhc":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#depthTest"},"-nth9EkqkOQFnRBJ52wkV":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#designRatio"},"Pdn5Rzs--hRUz1rwTDuoa":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#gl"},"aWMwwqQ0jWthT1P4_7kKg":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#GPURenderer"},"fA8WFhz8xU6Ec1U42b78Z":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#GPUVendor"},"uycah2FIDaIpl1FzqBUJg":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#height"},"tUytOw38qJpToMQ1FLZ2v":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#isContextValid"},"iCn20hK6mjSCmJL9V6FYM":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#maxTextures"},"7NNHSSsCpc8xcmByelXjg":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#path2D"},"yBrqHLH90rdZnrnLphnaz":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#scaleRatio"},"OwrVqzrIhXB3H9W-DizEA":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#settings"},"4ymWtJllvqe1N-VFgI3Al":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#type"},"DgA_JRBA9YJcPZ2j54k28":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#vertexBuffer"},"FccIVzlo4lBRak37ys8Es":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#WebGLVersion"},"3xKYtbX1A-4wfJ9IRohHD":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#width"},"-NjPS4l1TmnHYlXShKQXN":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#addCompositor"},"zM8ExRegGNETTYUMFKIqF":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#beginPath"},"CL0tVt9DO9cWZ286oQkuk":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clear"},"HZMJHFb50flxvgwGL8U6G":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clearColor"},"UK-cy6HeLG8p4lMPwWOe8":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clearMask"},"-lSvs-1SlA19HqROh7veR":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clearRect"},"06DEup942bsIAn4LmirMH":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clearTint"},"gnC7coRBPMVWikiiFwzmA":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#clipRect"},"DvASW22cLdI_OV2mqJqn3":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#closePath"},"wUn98qaFJ8-Su2xkX79UR":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#constructor"},"gKVit1bc3b1VweYtfw2nN":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#createPattern"},"y9IwPbbspUkCCJdCNUvoH":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#drawImage"},"xzKO5Hg9SAw9hwsL2oZyQ":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#drawPattern"},"iZJ0mqgUOy7X0b_XGRu9n":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fill"},"ihnHWK8Tr4EofgnhzaRMk":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillArc"},"oMXQ9Uaa8JmuBa5gAIhjW":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillEllipse"},"1NSPimfdLuM0fFicn9n0_":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillLine"},"NLVdycNIK6YNxXlTCTCLN":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillPoint"},"PlnipXS_MqWcc5m04ju_A":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillPolygon"},"_7HbcAumQnHYUGZSV4haP":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillRect"},"Y508idcbyW-wNmZ8nLlFC":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#fillRoundRect"},"yYegf5q4G-aaKAj4MalCs":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#flush"},"YPOI7oMzh_SxiCBUcWE2b":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getBlendMode"},"JVzD6Y9_aOdpupHk7ykQq":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getCanvas"},"a5sqc7bCzKY87wNZVsFPX":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getColor"},"jzxBfSGutTRbe18Puj2Il":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getContext"},"Qy-xk1IrWJbtpY1HMF5GC":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getContext2d"},"wxx4POUurkfqfdCBtMF7S":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getContextGL"},"j-s9n6Solh86joDzppUB_":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getGlobalAlpha"},"xV4ZwiJKO_iym-j0w-89f":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getScreenCanvas"},"DGvjRxHWXqDmWHRcV6krh":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#getScreenContext"},"nB6BdxQu4K8XK2OiSiZL7":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#globalAlpha"},"LmKxyH-Y8JUTzFapwyXYP":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#lineTo"},"BA_OSuZ0Aql3kbhtOL8Wj":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#moveTo"},"1PbYGeW50xyh2AEfR5I5D":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#overlaps"},"clWVdInQP0Si5UgnWTTyO":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#rect"},"oae0vvLOy-tPZXolUoRQw":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#reset"},"DQkyLV6xWm9IzMInJCXh_":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#resetTransform"},"ICYHoiDCY3pVvH_jzkNpk":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#resize"},"Lg1AmhWiIbs0ojrJZVtZy":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#restore"},"95e_LJJ2M86zcogmsfsxp":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#rotate"},"SxePs_9SJJFfobr1DO-PD":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#roundRect"},"mtsZictMFY9tAXHg1KFgB":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#save"},"hS6OUSEmlPBkV5WiD-A_5":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#scale"},"ZMdkp7F2B5xQteAM1wD8c":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setAntiAlias"},"U_E2yO7VlOmzA_S-6DaL-":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setBlendMode"},"eiKsYGBCNhgC0dnzrjkTw":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setColor"},"ri-YwoIuLrK_92XB7tcmS":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setCompositor"},"L4czkr-hV_kWkGaFbq_aQ":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setGlobalAlpha"},"oB3C1SUc9TJklhMcKgjQS":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setLineWidth"},"bggl4DjB1JR7auq2PAXrb":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setMask"},"0Rw_h2C6OHaXE7qT-7yp3":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setProjection"},"SnzZ-tpS8cUlNfb7EEShI":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setTint"},"rXn1GfhG3VfDiMkxfUq5G":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setTransform"},"lSY_XmSadp0EcvCQvm9z5":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#setViewport"},"2scR_zIzoquu9NHoBldce":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#stroke"},"wGzg_qjqNriDtW64aBAGF":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeArc"},"M2zBvkdp74X6p6fWJzFdx":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeEllipse"},"jXk2vEO7AZtDAYvKegEye":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeLine"},"LZU79A2WeNCOZ2AIdtcNt":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokePoint"},"IHbIz39qFJi51jAXc7gXQ":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokePolygon"},"XLsYQm6th1WvnrO7QXqUU":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeRect"},"8Dh48ps35ZWsi6mU5Hplw":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#strokeRoundRect"},"sLOkdX2UH0ovGRx40mJ7k":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#tint"},"SsKiDdgc0lciaJ9cUp3uk":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#toBlob"},"XVzFRXqixMqzX43JdwDwU":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#toDataURL"},"YbADrI9qsk9mNqJ_05rgH":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#toImageBitmap"},"ggpNsHjA6B7WdenBJ7OWA":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#transform"},"MwRS_b9JpvD3JV1WnzM0W":{"uri":"/melonJS/docs/melonjs/WebGLRenderer.html#translate"},"umextkeBdxAmhWZ2LQlrT":{"uri":"/melonJS/docs/melonjs/World.html"},"D6rZ9qSP2p6xeTESGuJug":{"uri":"/melonJS/docs/melonjs/World.html#alpha"},"kjq7Miq_Z_L3NT2DDKrNH":{"uri":"/melonJS/docs/melonjs/World.html#alwaysUpdate"},"tmbueH72WalTCdkSuWsbK":{"uri":"/melonJS/docs/melonjs/World.html#ancestor"},"zzT8YE4bSuf3282S0czbD":{"uri":"/melonJS/docs/melonjs/World.html#anchorPoint"},"y0t7MHBoF_RI5Vh7BIBlt":{"uri":"/melonJS/docs/melonjs/World.html#app"},"9frFOUiMgHm97J3mbfLu9":{"uri":"/melonJS/docs/melonjs/World.html#autoDepth"},"a3fmgThQ3Wx1iUaaP7ybp":{"uri":"/melonJS/docs/melonjs/World.html#autoSort"},"-6ix3bV4RriY2dxYXwDSW":{"uri":"/melonJS/docs/melonjs/World.html#autoTransform"},"rlAzWo0fpcg3Pe6G1iCuS":{"uri":"/melonJS/docs/melonjs/World.html#backgroundColor"},"SuhITWBawJ0FSr8yjl-sI":{"uri":"/melonJS/docs/melonjs/World.html#blendMode"},"26UOiFxDQ9UTEJfGLlRlV":{"uri":"/melonJS/docs/melonjs/World.html#bodies"},"SndidJJHixm2jz2QiBvEo":{"uri":"/melonJS/docs/melonjs/World.html#body"},"g4tO9mGVffkCE6YQyBnj_":{"uri":"/melonJS/docs/melonjs/World.html#bottom"},"6KJSl3qRxcbJDz7ceZ2jo":{"uri":"/melonJS/docs/melonjs/World.html#broadphase"},"8KX6JNApIb4MvLZCfh8Tp":{"uri":"/melonJS/docs/melonjs/World.html#centerX"},"5lz7DSCsalKiKdZy1XfG0":{"uri":"/melonJS/docs/melonjs/World.html#centerY"},"Tl2ZiRLAvkjdk6npk2a-n":{"uri":"/melonJS/docs/melonjs/World.html#clipping"},"FseXd6q0Kr-aaS8DWFBy-":{"uri":"/melonJS/docs/melonjs/World.html#currentTransform"},"O96MQB8fnrNbgPhcVj2-3":{"uri":"/melonJS/docs/melonjs/World.html#depth"},"lw7aFaRI6CEcQnL1taddU":{"uri":"/melonJS/docs/melonjs/World.html#detector"},"-ltEYH5jFAoU53pjDwSo9":{"uri":"/melonJS/docs/melonjs/World.html#enableChildBoundsUpdate"},"Bxl0-AootBrxGi1MspH87":{"uri":"/melonJS/docs/melonjs/World.html#floating"},"FRpn8tYNffibPKkOc6Ks9":{"uri":"/melonJS/docs/melonjs/World.html#fps"},"6YgaJLlCNkJWv7ltNSqos":{"uri":"/melonJS/docs/melonjs/World.html#gravity"},"77XIYf0gFCmqOrp3Z7rZr":{"uri":"/melonJS/docs/melonjs/World.html#GUID"},"n1dCRLANAOZD7TAm8VFB0":{"uri":"/melonJS/docs/melonjs/World.html#height"},"rPJvfazEjMbjEj6ALmW3u":{"uri":"/melonJS/docs/melonjs/World.html#inViewport"},"RRdX-3i8vkKETX8_CCXbK":{"uri":"/melonJS/docs/melonjs/World.html#isDirty"},"x0Oozu6bL6RMU3jWIT1bh":{"uri":"/melonJS/docs/melonjs/World.html#isFlippedX"},"f5l-6b9sSSN8xRi_JMPCA":{"uri":"/melonJS/docs/melonjs/World.html#isFlippedY"},"7418muQvOl0yS6cBc-857":{"uri":"/melonJS/docs/melonjs/World.html#isFloating"},"wpC_9I1Zn87c1GtTpXeUU":{"uri":"/melonJS/docs/melonjs/World.html#isKinematic"},"7dE0XCwjFbajyEsJckJyh":{"uri":"/melonJS/docs/melonjs/World.html#isPersistent"},"jsDG0wwULHuplysx3EZK4":{"uri":"/melonJS/docs/melonjs/World.html#left"},"9MUUDFIXTFNvTPVjZ88QA":{"uri":"/melonJS/docs/melonjs/World.html#mask"},"98SWcawY731iZBsK1ISNG":{"uri":"/melonJS/docs/melonjs/World.html#name"},"LdNHHrSz4i9Q0hd0TTXKh":{"uri":"/melonJS/docs/melonjs/World.html#onVisibilityChange"},"8wMYjJZZirV-PHHAcTwbX":{"uri":"/melonJS/docs/melonjs/World.html#parentApp"},"g-VtV0bscHmPtUSpEvNNm":{"uri":"/melonJS/docs/melonjs/World.html#physic"},"LrS-MUOUERAAwm-qF3Rhb":{"uri":"/melonJS/docs/melonjs/World.html#points"},"V4nxdePrIH-3mFzCaNKB-":{"uri":"/melonJS/docs/melonjs/World.html#pos"},"7orCJfM1z_ItwSIgCq1mI":{"uri":"/melonJS/docs/melonjs/World.html#preRender"},"9QeHoR6WkcDffrIz4vMYC":{"uri":"/melonJS/docs/melonjs/World.html#right"},"ZM4ROhP6TH-auNt6pL5yB":{"uri":"/melonJS/docs/melonjs/World.html#root"},"duyNE-ZwJBqBrd1J171oR":{"uri":"/melonJS/docs/melonjs/World.html#shader"},"f6eo3xDJvmQ0NeN8ewaOJ":{"uri":"/melonJS/docs/melonjs/World.html#sortOn"},"ayayceKG__p_nCAmsjPQV":{"uri":"/melonJS/docs/melonjs/World.html#tint"},"Kq_smXRNzMnfeaK-K0VUK":{"uri":"/melonJS/docs/melonjs/World.html#top"},"O3fVk5XYhaJb4uVElUXas":{"uri":"/melonJS/docs/melonjs/World.html#type"},"C6YVM8SgudD0ZN2_UDeQH":{"uri":"/melonJS/docs/melonjs/World.html#updateWhenPaused"},"UJBdeW2VVph_RzTmKdHxL":{"uri":"/melonJS/docs/melonjs/World.html#width"},"1EeJlXjGLzaWepDk-7pxw":{"uri":"/melonJS/docs/melonjs/World.html#addBody"},"eV-7agARmTV9C2aW9RTXR":{"uri":"/melonJS/docs/melonjs/World.html#addChild"},"W0ieuqbdQEN23GyoGxv3r":{"uri":"/melonJS/docs/melonjs/World.html#addChildAt"},"Kj0QJFDiWBgULNuwRp4Qh":{"uri":"/melonJS/docs/melonjs/World.html#angleTo"},"X0JoBAQdXuHe7gVdC--ps":{"uri":"/melonJS/docs/melonjs/World.html#centerOn"},"KaI6gRSe25SWqwCoWnuZP":{"uri":"/melonJS/docs/melonjs/World.html#clone"},"hN9QJgk8apawRcwGaVUBR":{"uri":"/melonJS/docs/melonjs/World.html#constructor"},"Mk82sqf_wsGglp_IOns24":{"uri":"/melonJS/docs/melonjs/World.html#contains"},"oK84XocQxQUeOlQITTGUz":{"uri":"/melonJS/docs/melonjs/World.html#copy"},"YCgMB8DGl18nKIaSAc5Xk":{"uri":"/melonJS/docs/melonjs/World.html#distanceTo"},"efFiniEa_Qh5mzIGMeYc6":{"uri":"/melonJS/docs/melonjs/World.html#equals"},"-Y_2XWQL5abZn0WpKse9Y":{"uri":"/melonJS/docs/melonjs/World.html#flipX"},"QvMg1F0znMgh5zoVFAYOu":{"uri":"/melonJS/docs/melonjs/World.html#flipY"},"Rv7N6ukV-Fc-yIie6i1dq":{"uri":"/melonJS/docs/melonjs/World.html#forEach"},"9qwfxw-R8i_M0NxzDdsEr":{"uri":"/melonJS/docs/melonjs/World.html#getAbsolutePosition"},"_7lQ10_yxZpJh7EhtoiLp":{"uri":"/melonJS/docs/melonjs/World.html#getBounds"},"tuoOcoG8soVdFhVmLNT-y":{"uri":"/melonJS/docs/melonjs/World.html#getChildAt"},"qUgiJ6k6i0XmL1ytIi--Z":{"uri":"/melonJS/docs/melonjs/World.html#getChildByGUID"},"1f04t2HLs8vgTV6qEwtEF":{"uri":"/melonJS/docs/melonjs/World.html#getChildByName"},"mFkwbbMhZrf61PCqJHl40":{"uri":"/melonJS/docs/melonjs/World.html#getChildByProp"},"nAJeuiXjFJQOxHGGwUjvd":{"uri":"/melonJS/docs/melonjs/World.html#getChildByType"},"Pb7aSZLrlIm26XT0mvA8T":{"uri":"/melonJS/docs/melonjs/World.html#getChildIndex"},"Go_d8hU3w9zvB4t399DAJ":{"uri":"/melonJS/docs/melonjs/World.html#getChildren"},"6op24fTFo2gVkBSA2Dci7":{"uri":"/melonJS/docs/melonjs/World.html#getIndices"},"h9pVxSTZmztWivOsGL5FK":{"uri":"/melonJS/docs/melonjs/World.html#getNextChild"},"Pn2Ey_FFFz2MZvlk_EPmD":{"uri":"/melonJS/docs/melonjs/World.html#getOpacity"},"UUTxSca_tLv-hHogfekqp":{"uri":"/melonJS/docs/melonjs/World.html#getRootAncestor"},"W67Dj_SclvfVIYSmLRzmw":{"uri":"/melonJS/docs/melonjs/World.html#hasChild"},"n21KVsxI_KUQeksTAzED4":{"uri":"/melonJS/docs/melonjs/World.html#isAttachedToRoot"},"CrLeIvbBQfDfMF6p8d5wL":{"uri":"/melonJS/docs/melonjs/World.html#isConvex"},"OAMjB1eFWFUDYOpfoC1c2":{"uri":"/melonJS/docs/melonjs/World.html#isFinite"},"nbBKq4uW3CxWmw83TorPX":{"uri":"/melonJS/docs/melonjs/World.html#lookAt"},"_bKfUm-EhRGLFdYGZu__b":{"uri":"/melonJS/docs/melonjs/World.html#moveDown"},"6uwSorC6WGdjWqjrbyULh":{"uri":"/melonJS/docs/melonjs/World.html#moveToBottom"},"Lcfzu2VySnOFtVcB1YQfO":{"uri":"/melonJS/docs/melonjs/World.html#moveToTop"},"BZPtxE_H58drAy0zMVnST":{"uri":"/melonJS/docs/melonjs/World.html#moveUp"},"6xT-rQE_NbNlVJLxTh93N":{"uri":"/melonJS/docs/melonjs/World.html#onChildChange"},"GANEWpweZWFvP6Lzm8b4T":{"uri":"/melonJS/docs/melonjs/World.html#onCollision"},"L164qDDNetfMZjbE1DcNV":{"uri":"/melonJS/docs/melonjs/World.html#onDestroyEvent"},"jT9o7Lo6UZqUI333D1SnC":{"uri":"/melonJS/docs/melonjs/World.html#overlaps"},"XgsNoY3HPgbBEG_DO7TC5":{"uri":"/melonJS/docs/melonjs/World.html#postDraw"},"2HPvZo8nL4CSTJWb6wRb2":{"uri":"/melonJS/docs/melonjs/World.html#preDraw"},"8bS8b_mZvHMjeAhjiVhhX":{"uri":"/melonJS/docs/melonjs/World.html#recalc"},"Kx50DLLDdy661RUE4Zuun":{"uri":"/melonJS/docs/melonjs/World.html#removeBody"},"6O8W3wJeoaPhZLiNA56rQ":{"uri":"/melonJS/docs/melonjs/World.html#removeChild"},"My3phcdf9FTIKqw0koh1z":{"uri":"/melonJS/docs/melonjs/World.html#removeChildNow"},"cTQKTOmEOI20GuJoq2beO":{"uri":"/melonJS/docs/melonjs/World.html#reset"},"BsA4G9fKsg9qw7SNI0-oi":{"uri":"/melonJS/docs/melonjs/World.html#resize"},"7ykqcpGM8qCAPMoh9_c1h":{"uri":"/melonJS/docs/melonjs/World.html#rotate"},"--65e-uXMxrSVNMb83m18":{"uri":"/melonJS/docs/melonjs/World.html#scale"},"9XvHSYY1xtHW-Z-RtjzaG":{"uri":"/melonJS/docs/melonjs/World.html#scaleV"},"o-tOWe7PsCb0aS522eM9o":{"uri":"/melonJS/docs/melonjs/World.html#setChildsProperty"},"3I7Ps2oWeTfMC-5JB7OMy":{"uri":"/melonJS/docs/melonjs/World.html#setOpacity"},"a-7yXfZ9X7dBi6oHLcgxA":{"uri":"/melonJS/docs/melonjs/World.html#setShape"},"sN3zfJnYNRu9Sew6e8Fny":{"uri":"/melonJS/docs/melonjs/World.html#setVertices"},"Xq_GBVbXjpwOBA3ksonxe":{"uri":"/melonJS/docs/melonjs/World.html#shift"},"YdbfMRRzsKkpzgets1g46":{"uri":"/melonJS/docs/melonjs/World.html#sort"},"omPQk4xIyJGrAw2OW_0J_":{"uri":"/melonJS/docs/melonjs/World.html#step"},"piWjlAdY21fj-T_U9fkAU":{"uri":"/melonJS/docs/melonjs/World.html#swapChildren"},"I2YvrZLL_1hmgC9TB2Qol":{"uri":"/melonJS/docs/melonjs/World.html#to2d"},"BZOCZzEqWLOORdeBg8Hru":{"uri":"/melonJS/docs/melonjs/World.html#toIso"},"SLrTAjroWV1yznibzzaXm":{"uri":"/melonJS/docs/melonjs/World.html#toPolygon"},"fqbhbJgO-K7ps6qsqWwca":{"uri":"/melonJS/docs/melonjs/World.html#transform"},"i9Rpu6tZh0Uy9ZHAdkki4":{"uri":"/melonJS/docs/melonjs/World.html#translate"},"bGyb4YRzoBsW8XLwSkqOB":{"uri":"/melonJS/docs/melonjs/World.html#union"},"VODk_I_vJnTdhEW8tRAMb":{"uri":"/melonJS/docs/melonjs/World.html#update"},"MMIEt5cUE0lxbFxP6KU2R":{"uri":"/melonJS/docs/melonjs/World.html#updateBounds"},"rp_g2xyv229voiDWsAcY4":{"uri":"/melonJS/docs/melonjs/World.html#draw"},"6zxA22DaPD_myUcliG-K3":{"uri":"/melonJS/docs/melonjs/World.html#bodyApplyGravity"},"duGzkxNgnIO8siXXPfwjx":{"uri":"/melonJS/docs/melonjs/World.html#onAnchorUpdate"},"WEV3Ye_GEWWLvV4nC0TZY":{"uri":"global.html#AUTO"},"2e4Vm5HL3Rh-yizq11NBl":{"uri":"global.html#CANVAS"},"JcsO-jSiVRwpcW1U7y8Bg":{"uri":"global.html#version"},"BwfV6bVlvJtNW2EhSA8Lo":{"uri":"global.html#WEBGL"},"lYtlS_2R152LH-WxhxX91":{"uri":"global.html#failureLoadedAssets"},"ysNSlUPeI4ueQFTd0KrxH":{"uri":"global.html#imgList"},"gR-BLDonjgsC1Epvmb8M5":{"uri":"global.html#initialized"},"QPC3neY8FTTgRchRSjfJC":{"uri":"global.html#parserInitialized"},"-o-nQLgoeVvF4wgKMGsSy":{"uri":"global.html#parsers"},"FMI3bphiXGGf1jf7BkRkX":{"uri":"global.html#skipAutoInit"},"bRbIboKPBZnfKAFLtGQKt":{"uri":"/melonJS/docs/melonjs/boot.html"},"F6ym2eIKgrdYDjpMqfVh2":{"uri":"/melonJS/docs/melonjs/consoleHeader.html"},"sfBQHcSQlANe1OSKQhMTA":{"uri":"/melonJS/docs/melonjs/warning.html"},"EN7DP4aOJvkd7Kvyv-K9v":{"uri":"/melonJS/docs/melonjs/onresize.html"},"_taG8mdFZGSdsowwJ5cRS":{"uri":"/melonJS/docs/melonjs/scale.html"}}} \ No newline at end of file diff --git a/docs/docs/melonjs.api.json.md5 b/docs/docs/melonjs.api.json.md5 index 9e62f0ec9a..054c6dd3aa 100644 --- a/docs/docs/melonjs.api.json.md5 +++ b/docs/docs/melonjs.api.json.md5 @@ -1 +1 @@ -5d4ef341e33c9616da21446777036ee1 \ No newline at end of file +f7c8263b93426b102287bbdae09c335c \ No newline at end of file diff --git a/docs/docs/melonjs.html b/docs/docs/melonjs.html index 6c66a60fdf..1dd6f01eb5 100644 --- a/docs/docs/melonjs.html +++ b/docs/docs/melonjs.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Application.html b/docs/docs/melonjs/Application.html index ff121ce8ac..430be26454 100644 --- a/docs/docs/melonjs/Application.html +++ b/docs/docs/melonjs/Application.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Application/Settings.html b/docs/docs/melonjs/Application/Settings.html index b4fa78742f..1b1e0f425a 100644 --- a/docs/docs/melonjs/Application/Settings.html +++ b/docs/docs/melonjs/Application/Settings.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/BitmapText.html b/docs/docs/melonjs/BitmapText.html index ab6e37e4b7..963bcf6118 100644 --- a/docs/docs/melonjs/BitmapText.html +++ b/docs/docs/melonjs/BitmapText.html @@ -1,5 +1,5 @@ - + @@ -999,6 +999,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Body.html b/docs/docs/melonjs/Body.html index 1d796b600d..fe275320eb 100644 --- a/docs/docs/melonjs/Body.html +++ b/docs/docs/melonjs/Body.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Bounds.html b/docs/docs/melonjs/Bounds.html index d8027c4010..382e4e5446 100644 --- a/docs/docs/melonjs/Bounds.html +++ b/docs/docs/melonjs/Bounds.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Camera2d.html b/docs/docs/melonjs/Camera2d.html index 0ec82da9f7..05a608cb3b 100644 --- a/docs/docs/melonjs/Camera2d.html +++ b/docs/docs/melonjs/Camera2d.html @@ -1,5 +1,5 @@ - + @@ -904,6 +904,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Camera2d/AXIS.html b/docs/docs/melonjs/Camera2d/AXIS.html index 5aa6259741..799bcf13a5 100644 --- a/docs/docs/melonjs/Camera2d/AXIS.html +++ b/docs/docs/melonjs/Camera2d/AXIS.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/CanvasRenderer.html b/docs/docs/melonjs/CanvasRenderer.html index 93331e6ac4..b783617a36 100644 --- a/docs/docs/melonjs/CanvasRenderer.html +++ b/docs/docs/melonjs/CanvasRenderer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/CanvasTexture.html b/docs/docs/melonjs/CanvasTexture.html index da4f39943f..7ec0d17834 100644 --- a/docs/docs/melonjs/CanvasTexture.html +++ b/docs/docs/melonjs/CanvasTexture.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Collectable.html b/docs/docs/melonjs/Collectable.html index 061663943a..4745448c93 100644 --- a/docs/docs/melonjs/Collectable.html +++ b/docs/docs/melonjs/Collectable.html @@ -1,5 +1,5 @@ - + @@ -642,6 +642,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Color.html b/docs/docs/melonjs/Color.html index ad78603d1f..623b121dc0 100644 --- a/docs/docs/melonjs/Color.html +++ b/docs/docs/melonjs/Color.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/ColorLayer.html b/docs/docs/melonjs/ColorLayer.html index 81c8517a29..9488fccf49 100644 --- a/docs/docs/melonjs/ColorLayer.html +++ b/docs/docs/melonjs/ColorLayer.html @@ -1,5 +1,5 @@ - + @@ -642,6 +642,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Compositor.html b/docs/docs/melonjs/Compositor.html index d3e7380dc9..302bd66d28 100644 --- a/docs/docs/melonjs/Compositor.html +++ b/docs/docs/melonjs/Compositor.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Container.html b/docs/docs/melonjs/Container.html index 1766a897d0..13e5b30cf9 100644 --- a/docs/docs/melonjs/Container.html +++ b/docs/docs/melonjs/Container.html @@ -1,5 +1,5 @@ - + @@ -1166,6 +1166,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Detector.html b/docs/docs/melonjs/Detector.html index 82c9641753..f5eaa670c0 100644 --- a/docs/docs/melonjs/Detector.html +++ b/docs/docs/melonjs/Detector.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Draggable.html b/docs/docs/melonjs/Draggable.html index 63eed047b9..4d582fad1d 100644 --- a/docs/docs/melonjs/Draggable.html +++ b/docs/docs/melonjs/Draggable.html @@ -1,5 +1,5 @@ - + @@ -643,6 +643,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/DraggableEntity.html b/docs/docs/melonjs/DraggableEntity.html index 72569fd048..ad58bf9be6 100644 --- a/docs/docs/melonjs/DraggableEntity.html +++ b/docs/docs/melonjs/DraggableEntity.html @@ -1,5 +1,5 @@ - + @@ -654,6 +654,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/DropTarget.html b/docs/docs/melonjs/DropTarget.html index a3c2fd9189..fc03680ca0 100644 --- a/docs/docs/melonjs/DropTarget.html +++ b/docs/docs/melonjs/DropTarget.html @@ -1,5 +1,5 @@ - + @@ -704,6 +704,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/DroptargetEntity.html b/docs/docs/melonjs/DroptargetEntity.html index 102b9eeabc..d6f482d743 100644 --- a/docs/docs/melonjs/DroptargetEntity.html +++ b/docs/docs/melonjs/DroptargetEntity.html @@ -1,5 +1,5 @@ - + @@ -654,6 +654,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Ellipse.html b/docs/docs/melonjs/Ellipse.html index d3853273bc..bbc029eeca 100644 --- a/docs/docs/melonjs/Ellipse.html +++ b/docs/docs/melonjs/Ellipse.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Entity.html b/docs/docs/melonjs/Entity.html index 967bf43a25..68d9c38523 100644 --- a/docs/docs/melonjs/Entity.html +++ b/docs/docs/melonjs/Entity.html @@ -1,5 +1,5 @@ - + @@ -937,6 +937,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/GLShader.html b/docs/docs/melonjs/GLShader.html index 9037bc2fed..0d2ac3dca3 100644 --- a/docs/docs/melonjs/GLShader.html +++ b/docs/docs/melonjs/GLShader.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/GUI_Object.html b/docs/docs/melonjs/GUI_Object.html index 9aa8f2ea37..5bdee7b90e 100644 --- a/docs/docs/melonjs/GUI_Object.html +++ b/docs/docs/melonjs/GUI_Object.html @@ -1,5 +1,5 @@ - + @@ -654,6 +654,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/ImageLayer.html b/docs/docs/melonjs/ImageLayer.html index 20a198496f..7c704bbdd9 100644 --- a/docs/docs/melonjs/ImageLayer.html +++ b/docs/docs/melonjs/ImageLayer.html @@ -1,5 +1,5 @@ - + @@ -870,6 +870,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + @@ -2096,7 +2112,7 @@

                              Public Methods

                              - imagelayer.js:138 + imagelayer.js:136 diff --git a/docs/docs/melonjs/Light2d.html b/docs/docs/melonjs/Light2d.html index 610e7ac57a..59470cb572 100644 --- a/docs/docs/melonjs/Light2d.html +++ b/docs/docs/melonjs/Light2d.html @@ -1,5 +1,5 @@ - + @@ -771,6 +771,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Line.html b/docs/docs/melonjs/Line.html index 0e7ecbed1e..628ccb5b51 100644 --- a/docs/docs/melonjs/Line.html +++ b/docs/docs/melonjs/Line.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math.html b/docs/docs/melonjs/Math.html index 9a8a9efc9f..0c7de37641 100644 --- a/docs/docs/melonjs/Math.html +++ b/docs/docs/melonjs/Math.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/clamp.html b/docs/docs/melonjs/Math/clamp.html index 1482044dd5..bec6d011aa 100644 --- a/docs/docs/melonjs/Math/clamp.html +++ b/docs/docs/melonjs/Math/clamp.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/degToRad.html b/docs/docs/melonjs/Math/degToRad.html index 9fac5d9bc2..e1c6e66764 100644 --- a/docs/docs/melonjs/Math/degToRad.html +++ b/docs/docs/melonjs/Math/degToRad.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/isPowerOfTwo.html b/docs/docs/melonjs/Math/isPowerOfTwo.html index f1be7d54c7..74a81f3149 100644 --- a/docs/docs/melonjs/Math/isPowerOfTwo.html +++ b/docs/docs/melonjs/Math/isPowerOfTwo.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/nextPowerOfTwo.html b/docs/docs/melonjs/Math/nextPowerOfTwo.html index f842beb8ef..bf8f86d0a3 100644 --- a/docs/docs/melonjs/Math/nextPowerOfTwo.html +++ b/docs/docs/melonjs/Math/nextPowerOfTwo.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/radToDeg.html b/docs/docs/melonjs/Math/radToDeg.html index ec02c90b92..21ab468208 100644 --- a/docs/docs/melonjs/Math/radToDeg.html +++ b/docs/docs/melonjs/Math/radToDeg.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/random.html b/docs/docs/melonjs/Math/random.html index 1a13316712..53248c1a1e 100644 --- a/docs/docs/melonjs/Math/random.html +++ b/docs/docs/melonjs/Math/random.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/randomFloat.html b/docs/docs/melonjs/Math/randomFloat.html index 232f9ea7b1..3d4883b072 100644 --- a/docs/docs/melonjs/Math/randomFloat.html +++ b/docs/docs/melonjs/Math/randomFloat.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/round.html b/docs/docs/melonjs/Math/round.html index 059631acdd..8bfaa618c7 100644 --- a/docs/docs/melonjs/Math/round.html +++ b/docs/docs/melonjs/Math/round.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/toBeCloseTo.html b/docs/docs/melonjs/Math/toBeCloseTo.html index 4d53ba9193..9b246be6f9 100644 --- a/docs/docs/melonjs/Math/toBeCloseTo.html +++ b/docs/docs/melonjs/Math/toBeCloseTo.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Math/weightedRandom.html b/docs/docs/melonjs/Math/weightedRandom.html index b197e41962..b991267873 100644 --- a/docs/docs/melonjs/Math/weightedRandom.html +++ b/docs/docs/melonjs/Math/weightedRandom.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Matrix2d.html b/docs/docs/melonjs/Matrix2d.html index 259b013aae..63e73735a4 100644 --- a/docs/docs/melonjs/Matrix2d.html +++ b/docs/docs/melonjs/Matrix2d.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Matrix3d.html b/docs/docs/melonjs/Matrix3d.html index d5f1fea449..6b3f374c22 100644 --- a/docs/docs/melonjs/Matrix3d.html +++ b/docs/docs/melonjs/Matrix3d.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/NineSliceSprite.html b/docs/docs/melonjs/NineSliceSprite.html index c33d7a42a0..c925cfdd9d 100644 --- a/docs/docs/melonjs/NineSliceSprite.html +++ b/docs/docs/melonjs/NineSliceSprite.html @@ -1,5 +1,5 @@ - + @@ -962,6 +962,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/ObjectPool.html b/docs/docs/melonjs/ObjectPool.html index b27f345fbe..3658058226 100644 --- a/docs/docs/melonjs/ObjectPool.html +++ b/docs/docs/melonjs/ObjectPool.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/ObservableVector2d.html b/docs/docs/melonjs/ObservableVector2d.html index bcb2e82ce8..32d7edf635 100644 --- a/docs/docs/melonjs/ObservableVector2d.html +++ b/docs/docs/melonjs/ObservableVector2d.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/ObservableVector3d.html b/docs/docs/melonjs/ObservableVector3d.html index 6427f54cf1..d3f172b6fa 100644 --- a/docs/docs/melonjs/ObservableVector3d.html +++ b/docs/docs/melonjs/ObservableVector3d.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Particle.html b/docs/docs/melonjs/Particle.html index 5d96bf8f65..59c6d6121f 100644 --- a/docs/docs/melonjs/Particle.html +++ b/docs/docs/melonjs/Particle.html @@ -1,5 +1,5 @@ - + @@ -536,6 +536,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/ParticleEmitter.html b/docs/docs/melonjs/ParticleEmitter.html index 565ee14c6d..843cc19f11 100644 --- a/docs/docs/melonjs/ParticleEmitter.html +++ b/docs/docs/melonjs/ParticleEmitter.html @@ -1,5 +1,5 @@ - + @@ -891,6 +891,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/ParticleEmitterSettings.html b/docs/docs/melonjs/ParticleEmitterSettings.html index c96bc5c63e..831af3f892 100644 --- a/docs/docs/melonjs/ParticleEmitterSettings.html +++ b/docs/docs/melonjs/ParticleEmitterSettings.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Path2D.html b/docs/docs/melonjs/Path2D.html index 51b5d61bee..15a4e32bfa 100644 --- a/docs/docs/melonjs/Path2D.html +++ b/docs/docs/melonjs/Path2D.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Point.html b/docs/docs/melonjs/Point.html index 6990272169..6ce9b67714 100644 --- a/docs/docs/melonjs/Point.html +++ b/docs/docs/melonjs/Point.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Pointer.html b/docs/docs/melonjs/Pointer.html index 5fcdb81420..07cbef896f 100644 --- a/docs/docs/melonjs/Pointer.html +++ b/docs/docs/melonjs/Pointer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Polygon.html b/docs/docs/melonjs/Polygon.html index c40e64258f..ca6096ad82 100644 --- a/docs/docs/melonjs/Polygon.html +++ b/docs/docs/melonjs/Polygon.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/PrimitiveCompositor.html b/docs/docs/melonjs/PrimitiveCompositor.html index e3c17fe49d..317ca323b4 100644 --- a/docs/docs/melonjs/PrimitiveCompositor.html +++ b/docs/docs/melonjs/PrimitiveCompositor.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/QuadCompositor.html b/docs/docs/melonjs/QuadCompositor.html index 2fa895bd3c..845af8f20e 100644 --- a/docs/docs/melonjs/QuadCompositor.html +++ b/docs/docs/melonjs/QuadCompositor.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/QuadTree.html b/docs/docs/melonjs/QuadTree.html index a96676a228..d5823c452d 100644 --- a/docs/docs/melonjs/QuadTree.html +++ b/docs/docs/melonjs/QuadTree.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Rect.html b/docs/docs/melonjs/Rect.html index 6f8c675825..b103f1b0c0 100644 --- a/docs/docs/melonjs/Rect.html +++ b/docs/docs/melonjs/Rect.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Renderable.html b/docs/docs/melonjs/Renderable.html index 89c2a50399..163fff72fb 100644 --- a/docs/docs/melonjs/Renderable.html +++ b/docs/docs/melonjs/Renderable.html @@ -1,5 +1,5 @@ - + @@ -557,6 +557,22 @@

                              Properties from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + @@ -2015,7 +2031,7 @@

                              Public Properties

                              - renderable.js:295 + renderable.js:312 @@ -2165,7 +2181,7 @@

                              Public Properties

                              - renderable.js:307 + renderable.js:324 @@ -2263,7 +2279,7 @@

                              Public Properties

                              - renderable.js:324 + renderable.js:341 @@ -2320,7 +2336,7 @@

                              Public Properties

                              - renderable.js:334 + renderable.js:351 @@ -2377,7 +2393,7 @@

                              Public Properties

                              - renderable.js:268 + renderable.js:285 @@ -2684,6 +2700,79 @@

                              Public Properties

                              + + + + +
                              + +
                              + + + + + parentApp + + + + + + renderable.js:271 + + + +
                              + + +
                              parentApp
                              + +
                              + +
                              + +
                              +
                              +

                              returns the parent application (or game) to which this renderable is attached to

                              +
                              + + + + + + + + + +
                              + + + + + + + + + + + + + + +
                              Returns:
                              TypeDescription
                              + Application + + +

                              the parent application or undefined if not attached to any container/app

                              + +
                              +
                              + + +
                              @@ -2803,7 +2892,7 @@

                              Public Properties

                              - renderable.js:277 + renderable.js:294 @@ -2917,7 +3006,7 @@

                              Public Methods

                              - renderable.js:422 + renderable.js:439 @@ -3020,7 +3109,7 @@

                              Public Methods

                              - renderable.js:443 + renderable.js:460 @@ -3123,7 +3212,7 @@

                              Public Methods

                              - renderable.js:688 + renderable.js:705 @@ -3242,7 +3331,7 @@

                              Public Methods

                              - renderable.js:385 + renderable.js:402 @@ -3361,7 +3450,7 @@

                              Public Methods

                              - renderable.js:397 + renderable.js:414 @@ -3480,7 +3569,7 @@

                              Public Methods

                              - renderable.js:599 + renderable.js:616 @@ -3550,7 +3639,7 @@

                              Public Methods

                              - renderable.js:344 + renderable.js:361 @@ -3623,7 +3712,7 @@

                              Public Methods

                              - renderable.js:362 + renderable.js:379 @@ -3696,7 +3785,7 @@

                              Public Methods

                              - renderable.js:464 + renderable.js:481 @@ -3801,7 +3890,7 @@

                              Public Methods

                              - renderable.js:733 + renderable.js:750 @@ -3934,7 +4023,7 @@

                              Public Methods

                              - renderable.js:813 + renderable.js:831 @@ -3982,7 +4071,7 @@

                              Public Methods

                              - renderable.js:705 + renderable.js:722 @@ -4075,7 +4164,7 @@

                              Public Methods

                              - renderable.js:630 + renderable.js:647 @@ -4169,7 +4258,7 @@

                              Public Methods

                              - renderable.js:485 + renderable.js:502 @@ -4294,7 +4383,7 @@

                              Public Methods

                              - renderable.js:500 + renderable.js:517 @@ -4427,7 +4516,7 @@

                              Public Methods

                              - renderable.js:517 + renderable.js:534 @@ -4532,7 +4621,7 @@

                              Public Methods

                              - renderable.js:370 + renderable.js:387 @@ -4611,7 +4700,7 @@

                              Public Methods

                              - renderable.js:409 + renderable.js:426 @@ -4724,7 +4813,7 @@

                              Public Methods

                              - renderable.js:527 + renderable.js:544 @@ -4829,7 +4918,7 @@

                              Public Methods

                              - renderable.js:536 + renderable.js:553 @@ -5032,6 +5121,10 @@

                              Public Methods

                              onVisibilityChange
                            • +
                            • + parentApp +
                            • +
                            • pos
                            • diff --git a/docs/docs/melonjs/Renderer.html b/docs/docs/melonjs/Renderer.html index 29a1e5c6f0..91638b9b1d 100644 --- a/docs/docs/melonjs/Renderer.html +++ b/docs/docs/melonjs/Renderer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Renderer/Texture.html b/docs/docs/melonjs/Renderer/Texture.html index 567323fee2..80b9705471 100644 --- a/docs/docs/melonjs/Renderer/Texture.html +++ b/docs/docs/melonjs/Renderer/Texture.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Renderer/getHeight.html b/docs/docs/melonjs/Renderer/getHeight.html index 53725e2b48..7e5fd016d1 100644 --- a/docs/docs/melonjs/Renderer/getHeight.html +++ b/docs/docs/melonjs/Renderer/getHeight.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Renderer/getWidth.html b/docs/docs/melonjs/Renderer/getWidth.html index 38a7f06fa3..b67a91722b 100644 --- a/docs/docs/melonjs/Renderer/getWidth.html +++ b/docs/docs/melonjs/Renderer/getWidth.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/ResponseObject.html b/docs/docs/melonjs/ResponseObject.html index 4b6536b3dc..a07d7a6c2c 100644 --- a/docs/docs/melonjs/ResponseObject.html +++ b/docs/docs/melonjs/ResponseObject.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/RoundRect.html b/docs/docs/melonjs/RoundRect.html index 6b8f935342..ea5e93cca2 100644 --- a/docs/docs/melonjs/RoundRect.html +++ b/docs/docs/melonjs/RoundRect.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Sprite.html b/docs/docs/melonjs/Sprite.html index 526883426c..f9f8900463 100644 --- a/docs/docs/melonjs/Sprite.html +++ b/docs/docs/melonjs/Sprite.html @@ -1,5 +1,5 @@ - + @@ -1032,6 +1032,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Stage.html b/docs/docs/melonjs/Stage.html index 1276ff416c..8cfa87e414 100644 --- a/docs/docs/melonjs/Stage.html +++ b/docs/docs/melonjs/Stage.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXHexagonalRenderer.html b/docs/docs/melonjs/TMXHexagonalRenderer.html index 74e9ca212e..baf6dd1535 100644 --- a/docs/docs/melonjs/TMXHexagonalRenderer.html +++ b/docs/docs/melonjs/TMXHexagonalRenderer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXIsometricRenderer.html b/docs/docs/melonjs/TMXIsometricRenderer.html index a6d75d3e4c..f1edc80f29 100644 --- a/docs/docs/melonjs/TMXIsometricRenderer.html +++ b/docs/docs/melonjs/TMXIsometricRenderer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXLayer.html b/docs/docs/melonjs/TMXLayer.html index e5988f0b31..d4dc733bd5 100644 --- a/docs/docs/melonjs/TMXLayer.html +++ b/docs/docs/melonjs/TMXLayer.html @@ -1,5 +1,5 @@ - + @@ -879,6 +879,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/TMXOrthogonalRenderer.html b/docs/docs/melonjs/TMXOrthogonalRenderer.html index e9838cca15..a8c72a08e0 100644 --- a/docs/docs/melonjs/TMXOrthogonalRenderer.html +++ b/docs/docs/melonjs/TMXOrthogonalRenderer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXRenderer.html b/docs/docs/melonjs/TMXRenderer.html index 9918268105..436c0a5c2f 100644 --- a/docs/docs/melonjs/TMXRenderer.html +++ b/docs/docs/melonjs/TMXRenderer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXStaggeredRenderer.html b/docs/docs/melonjs/TMXStaggeredRenderer.html index dff68d080e..814b0b49b3 100644 --- a/docs/docs/melonjs/TMXStaggeredRenderer.html +++ b/docs/docs/melonjs/TMXStaggeredRenderer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXTileMap.html b/docs/docs/melonjs/TMXTileMap.html index 88741ff3dd..86f72d2cb2 100644 --- a/docs/docs/melonjs/TMXTileMap.html +++ b/docs/docs/melonjs/TMXTileMap.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXTileset.html b/docs/docs/melonjs/TMXTileset.html index 4f4606ccf5..0b89d6d843 100644 --- a/docs/docs/melonjs/TMXTileset.html +++ b/docs/docs/melonjs/TMXTileset.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXTilesetGroup.html b/docs/docs/melonjs/TMXTilesetGroup.html index 1c01a43035..f305203c50 100644 --- a/docs/docs/melonjs/TMXTilesetGroup.html +++ b/docs/docs/melonjs/TMXTilesetGroup.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXUtils.html b/docs/docs/melonjs/TMXUtils.html index a7c9d937f7..384be0f8f5 100644 --- a/docs/docs/melonjs/TMXUtils.html +++ b/docs/docs/melonjs/TMXUtils.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXUtils/applyTMXProperties.html b/docs/docs/melonjs/TMXUtils/applyTMXProperties.html index a2bad58b43..03fca6a1de 100644 --- a/docs/docs/melonjs/TMXUtils/applyTMXProperties.html +++ b/docs/docs/melonjs/TMXUtils/applyTMXProperties.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXUtils/decode.html b/docs/docs/melonjs/TMXUtils/decode.html index 25d05bcd29..ae1bdcc331 100644 --- a/docs/docs/melonjs/TMXUtils/decode.html +++ b/docs/docs/melonjs/TMXUtils/decode.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXUtils/decodeBase64AsArray.html b/docs/docs/melonjs/TMXUtils/decodeBase64AsArray.html index 5516c799cf..f778abde7f 100644 --- a/docs/docs/melonjs/TMXUtils/decodeBase64AsArray.html +++ b/docs/docs/melonjs/TMXUtils/decodeBase64AsArray.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXUtils/decodeCSV.html b/docs/docs/melonjs/TMXUtils/decodeCSV.html index 4a295615a9..1a935a34e8 100644 --- a/docs/docs/melonjs/TMXUtils/decodeCSV.html +++ b/docs/docs/melonjs/TMXUtils/decodeCSV.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXUtils/decompress.html b/docs/docs/melonjs/TMXUtils/decompress.html index 8d80f2ecab..ee8c2bfcfb 100644 --- a/docs/docs/melonjs/TMXUtils/decompress.html +++ b/docs/docs/melonjs/TMXUtils/decompress.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXUtils/parse.html b/docs/docs/melonjs/TMXUtils/parse.html index b54b5d777d..c81a9d1bde 100644 --- a/docs/docs/melonjs/TMXUtils/parse.html +++ b/docs/docs/melonjs/TMXUtils/parse.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TMXUtils/setInflateFunction.html b/docs/docs/melonjs/TMXUtils/setInflateFunction.html index d08cb9a86b..fef6f13656 100644 --- a/docs/docs/melonjs/TMXUtils/setInflateFunction.html +++ b/docs/docs/melonjs/TMXUtils/setInflateFunction.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Text.html b/docs/docs/melonjs/Text.html index 081ff1825f..6aa29efd26 100644 --- a/docs/docs/melonjs/Text.html +++ b/docs/docs/melonjs/Text.html @@ -1,5 +1,5 @@ - + @@ -1050,6 +1050,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/TextMetrics.html b/docs/docs/melonjs/TextMetrics.html index d46266f4fb..48434570b0 100644 --- a/docs/docs/melonjs/TextMetrics.html +++ b/docs/docs/melonjs/TextMetrics.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/TextureAtlas.html b/docs/docs/melonjs/TextureAtlas.html index 79b19ebf62..a00820e1d4 100644 --- a/docs/docs/melonjs/TextureAtlas.html +++ b/docs/docs/melonjs/TextureAtlas.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Tile.html b/docs/docs/melonjs/Tile.html index 0e80d82671..9f0157436c 100644 --- a/docs/docs/melonjs/Tile.html +++ b/docs/docs/melonjs/Tile.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Timer_.html b/docs/docs/melonjs/Timer_.html index 4bb60d3209..691680b59b 100644 --- a/docs/docs/melonjs/Timer_.html +++ b/docs/docs/melonjs/Timer_.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Trigger.html b/docs/docs/melonjs/Trigger.html index db484cfa2b..f14da678d4 100644 --- a/docs/docs/melonjs/Trigger.html +++ b/docs/docs/melonjs/Trigger.html @@ -1,5 +1,5 @@ - + @@ -816,6 +816,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Tween.html b/docs/docs/melonjs/Tween.html index b7722cb142..2890f7db45 100644 --- a/docs/docs/melonjs/Tween.html +++ b/docs/docs/melonjs/Tween.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Tween/Easing.html b/docs/docs/melonjs/Tween/Easing.html index c6b6a16526..691b91f076 100644 --- a/docs/docs/melonjs/Tween/Easing.html +++ b/docs/docs/melonjs/Tween/Easing.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Tween/Interpolation.html b/docs/docs/melonjs/Tween/Interpolation.html index 9c3be1e884..c1877e992b 100644 --- a/docs/docs/melonjs/Tween/Interpolation.html +++ b/docs/docs/melonjs/Tween/Interpolation.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/UIBaseElement.html b/docs/docs/melonjs/UIBaseElement.html index e126032a91..8ab86c7e18 100644 --- a/docs/docs/melonjs/UIBaseElement.html +++ b/docs/docs/melonjs/UIBaseElement.html @@ -1,5 +1,5 @@ - + @@ -921,6 +921,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/UISpriteElement.html b/docs/docs/melonjs/UISpriteElement.html index ee81ac9b24..3a8a69bd65 100644 --- a/docs/docs/melonjs/UISpriteElement.html +++ b/docs/docs/melonjs/UISpriteElement.html @@ -1,5 +1,5 @@ - + @@ -839,6 +839,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/UITextButton.html b/docs/docs/melonjs/UITextButton.html index ebfeac193f..2badb1f938 100644 --- a/docs/docs/melonjs/UITextButton.html +++ b/docs/docs/melonjs/UITextButton.html @@ -1,5 +1,5 @@ - + @@ -1177,6 +1177,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/Vector2d.html b/docs/docs/melonjs/Vector2d.html index c80f1b59d8..72a8f4f8b0 100644 --- a/docs/docs/melonjs/Vector2d.html +++ b/docs/docs/melonjs/Vector2d.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/Vector3d.html b/docs/docs/melonjs/Vector3d.html index 80abff30e7..09779db540 100644 --- a/docs/docs/melonjs/Vector3d.html +++ b/docs/docs/melonjs/Vector3d.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/WebGLRenderer.html b/docs/docs/melonjs/WebGLRenderer.html index 7c504529ac..e5f8d3d239 100644 --- a/docs/docs/melonjs/WebGLRenderer.html +++ b/docs/docs/melonjs/WebGLRenderer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/World.html b/docs/docs/melonjs/World.html index e193486031..2d904e9394 100644 --- a/docs/docs/melonjs/World.html +++ b/docs/docs/melonjs/World.html @@ -1,5 +1,5 @@ - + @@ -966,6 +966,22 @@

                              Properties inherited from Renderable

                              + + + + Application + + + +
                              + parentApp +
                              +
                              + +
                              + + + diff --git a/docs/docs/melonjs/audio.html b/docs/docs/melonjs/audio.html index 8636110b9f..f32e5142bf 100644 --- a/docs/docs/melonjs/audio.html +++ b/docs/docs/melonjs/audio.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/disable.html b/docs/docs/melonjs/audio/disable.html index 733ea25dbe..ff0e400772 100644 --- a/docs/docs/melonjs/audio/disable.html +++ b/docs/docs/melonjs/audio/disable.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/enable.html b/docs/docs/melonjs/audio/enable.html index f84dfb098c..72f3db5b65 100644 --- a/docs/docs/melonjs/audio/enable.html +++ b/docs/docs/melonjs/audio/enable.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/fade.html b/docs/docs/melonjs/audio/fade.html index 5ee722ce31..ce864cb2f6 100644 --- a/docs/docs/melonjs/audio/fade.html +++ b/docs/docs/melonjs/audio/fade.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/getCurrentTrack.html b/docs/docs/melonjs/audio/getCurrentTrack.html index 4db1c9a953..dfb1392384 100644 --- a/docs/docs/melonjs/audio/getCurrentTrack.html +++ b/docs/docs/melonjs/audio/getCurrentTrack.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/getVolume.html b/docs/docs/melonjs/audio/getVolume.html index 5eaf8abb78..190408b5d6 100644 --- a/docs/docs/melonjs/audio/getVolume.html +++ b/docs/docs/melonjs/audio/getVolume.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/hasAudio.html b/docs/docs/melonjs/audio/hasAudio.html index a65c5b9e59..431f08caf6 100644 --- a/docs/docs/melonjs/audio/hasAudio.html +++ b/docs/docs/melonjs/audio/hasAudio.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/hasFormat.html b/docs/docs/melonjs/audio/hasFormat.html index 35217fde89..f04d8f2242 100644 --- a/docs/docs/melonjs/audio/hasFormat.html +++ b/docs/docs/melonjs/audio/hasFormat.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/init.html b/docs/docs/melonjs/audio/init.html index 3511d2d6cb..13cc00dff8 100644 --- a/docs/docs/melonjs/audio/init.html +++ b/docs/docs/melonjs/audio/init.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/load.html b/docs/docs/melonjs/audio/load.html index 58f5f396b1..bbf3f67bea 100644 --- a/docs/docs/melonjs/audio/load.html +++ b/docs/docs/melonjs/audio/load.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/mute.html b/docs/docs/melonjs/audio/mute.html index 4414093b1b..3cdf86abee 100644 --- a/docs/docs/melonjs/audio/mute.html +++ b/docs/docs/melonjs/audio/mute.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/muteAll.html b/docs/docs/melonjs/audio/muteAll.html index 5b8868a951..ad9f2ada84 100644 --- a/docs/docs/melonjs/audio/muteAll.html +++ b/docs/docs/melonjs/audio/muteAll.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/muted.html b/docs/docs/melonjs/audio/muted.html index 33c2f8d4d1..f142e1d122 100644 --- a/docs/docs/melonjs/audio/muted.html +++ b/docs/docs/melonjs/audio/muted.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/pause.html b/docs/docs/melonjs/audio/pause.html index d7bce73250..f62c6bf1b6 100644 --- a/docs/docs/melonjs/audio/pause.html +++ b/docs/docs/melonjs/audio/pause.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/pauseTrack.html b/docs/docs/melonjs/audio/pauseTrack.html index d50ecc27a9..03b6b6ca50 100644 --- a/docs/docs/melonjs/audio/pauseTrack.html +++ b/docs/docs/melonjs/audio/pauseTrack.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/play.html b/docs/docs/melonjs/audio/play.html index 5f92119d48..833472d3bd 100644 --- a/docs/docs/melonjs/audio/play.html +++ b/docs/docs/melonjs/audio/play.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/playTrack.html b/docs/docs/melonjs/audio/playTrack.html index 8c7febd473..83ec7c625f 100644 --- a/docs/docs/melonjs/audio/playTrack.html +++ b/docs/docs/melonjs/audio/playTrack.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/rate.html b/docs/docs/melonjs/audio/rate.html index 67926a60c0..ca0eacfde7 100644 --- a/docs/docs/melonjs/audio/rate.html +++ b/docs/docs/melonjs/audio/rate.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/resume.html b/docs/docs/melonjs/audio/resume.html index bac6310386..d01efda8c2 100644 --- a/docs/docs/melonjs/audio/resume.html +++ b/docs/docs/melonjs/audio/resume.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/resumeTrack.html b/docs/docs/melonjs/audio/resumeTrack.html index 12f40da938..2990877cdf 100644 --- a/docs/docs/melonjs/audio/resumeTrack.html +++ b/docs/docs/melonjs/audio/resumeTrack.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/seek.html b/docs/docs/melonjs/audio/seek.html index eabb1dc77c..6bb7033217 100644 --- a/docs/docs/melonjs/audio/seek.html +++ b/docs/docs/melonjs/audio/seek.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/setVolume.html b/docs/docs/melonjs/audio/setVolume.html index 68c6bc8aaa..7c53dfdbe3 100644 --- a/docs/docs/melonjs/audio/setVolume.html +++ b/docs/docs/melonjs/audio/setVolume.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/stop.html b/docs/docs/melonjs/audio/stop.html index 04f522a9ec..6bf5e7f125 100644 --- a/docs/docs/melonjs/audio/stop.html +++ b/docs/docs/melonjs/audio/stop.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/stopTrack.html b/docs/docs/melonjs/audio/stopTrack.html index aafc0e3f1c..8b35847d92 100644 --- a/docs/docs/melonjs/audio/stopTrack.html +++ b/docs/docs/melonjs/audio/stopTrack.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/unload.html b/docs/docs/melonjs/audio/unload.html index a63a1d479e..16c58bb8dc 100644 --- a/docs/docs/melonjs/audio/unload.html +++ b/docs/docs/melonjs/audio/unload.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/unloadAll.html b/docs/docs/melonjs/audio/unloadAll.html index 9c6e261790..4d0311a032 100644 --- a/docs/docs/melonjs/audio/unloadAll.html +++ b/docs/docs/melonjs/audio/unloadAll.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/unmute.html b/docs/docs/melonjs/audio/unmute.html index 4e446f63ac..2589a7cb0c 100644 --- a/docs/docs/melonjs/audio/unmute.html +++ b/docs/docs/melonjs/audio/unmute.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/audio/unmuteAll.html b/docs/docs/melonjs/audio/unmuteAll.html index 22f1b6725c..299a787db4 100644 --- a/docs/docs/melonjs/audio/unmuteAll.html +++ b/docs/docs/melonjs/audio/unmuteAll.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/boot.html b/docs/docs/melonjs/boot.html index 7021c946a6..78acfb2c6d 100644 --- a/docs/docs/melonjs/boot.html +++ b/docs/docs/melonjs/boot.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/collision.html b/docs/docs/melonjs/collision.html index 15a72cd9ac..db2018e3d7 100644 --- a/docs/docs/melonjs/collision.html +++ b/docs/docs/melonjs/collision.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/collision/types.html b/docs/docs/melonjs/collision/types.html index 3997a0b7ec..13ebd18a10 100644 --- a/docs/docs/melonjs/collision/types.html +++ b/docs/docs/melonjs/collision/types.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/consoleHeader.html b/docs/docs/melonjs/consoleHeader.html index f78b4b6a35..ffcea2c1a8 100644 --- a/docs/docs/melonjs/consoleHeader.html +++ b/docs/docs/melonjs/consoleHeader.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device.html b/docs/docs/melonjs/device.html index 3a14cd917f..6da63d1342 100644 --- a/docs/docs/melonjs/device.html +++ b/docs/docs/melonjs/device.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/enableSwipe.html b/docs/docs/melonjs/device/enableSwipe.html index 33617a9862..271293c670 100644 --- a/docs/docs/melonjs/device/enableSwipe.html +++ b/docs/docs/melonjs/device/enableSwipe.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/exitFullscreen.html b/docs/docs/melonjs/device/exitFullscreen.html index f5bd52dca9..fb9b6ae239 100644 --- a/docs/docs/melonjs/device/exitFullscreen.html +++ b/docs/docs/melonjs/device/exitFullscreen.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/focus.html b/docs/docs/melonjs/device/focus.html index c4d9cc2c33..bfadc36f3e 100644 --- a/docs/docs/melonjs/device/focus.html +++ b/docs/docs/melonjs/device/focus.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/getElement.html b/docs/docs/melonjs/device/getElement.html index ce0ff0c43a..e9072f8b81 100644 --- a/docs/docs/melonjs/device/getElement.html +++ b/docs/docs/melonjs/device/getElement.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/getElementBounds.html b/docs/docs/melonjs/device/getElementBounds.html index affd9465d6..8245834016 100644 --- a/docs/docs/melonjs/device/getElementBounds.html +++ b/docs/docs/melonjs/device/getElementBounds.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/getParentBounds.html b/docs/docs/melonjs/device/getParentBounds.html index 7b4ec5f568..be8e272cc5 100644 --- a/docs/docs/melonjs/device/getParentBounds.html +++ b/docs/docs/melonjs/device/getParentBounds.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/getParentElement.html b/docs/docs/melonjs/device/getParentElement.html index 2d97eabb05..75d7af6bc2 100644 --- a/docs/docs/melonjs/device/getParentElement.html +++ b/docs/docs/melonjs/device/getParentElement.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/getScreenOrientation.html b/docs/docs/melonjs/device/getScreenOrientation.html index ce524c7c67..0317323eb6 100644 --- a/docs/docs/melonjs/device/getScreenOrientation.html +++ b/docs/docs/melonjs/device/getScreenOrientation.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/getStorage.html b/docs/docs/melonjs/device/getStorage.html index 813c9628af..bb32818c93 100644 --- a/docs/docs/melonjs/device/getStorage.html +++ b/docs/docs/melonjs/device/getStorage.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/isFullscreen.html b/docs/docs/melonjs/device/isFullscreen.html index 9002971d67..a50a5eb411 100644 --- a/docs/docs/melonjs/device/isFullscreen.html +++ b/docs/docs/melonjs/device/isFullscreen.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/isLandscape.html b/docs/docs/melonjs/device/isLandscape.html index 23b706e7a0..c9a613ae57 100644 --- a/docs/docs/melonjs/device/isLandscape.html +++ b/docs/docs/melonjs/device/isLandscape.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/isPortrait.html b/docs/docs/melonjs/device/isPortrait.html index cda9989d36..6399c9e0ce 100644 --- a/docs/docs/melonjs/device/isPortrait.html +++ b/docs/docs/melonjs/device/isPortrait.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/isWebGLSupported.html b/docs/docs/melonjs/device/isWebGLSupported.html index 553cb4f6bf..e4f02f03bc 100644 --- a/docs/docs/melonjs/device/isWebGLSupported.html +++ b/docs/docs/melonjs/device/isWebGLSupported.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/lockOrientation.html b/docs/docs/melonjs/device/lockOrientation.html index 41a3f83620..44bbbe5b11 100644 --- a/docs/docs/melonjs/device/lockOrientation.html +++ b/docs/docs/melonjs/device/lockOrientation.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/onReady.html b/docs/docs/melonjs/device/onReady.html index 299fc8d14e..67918fb287 100644 --- a/docs/docs/melonjs/device/onReady.html +++ b/docs/docs/melonjs/device/onReady.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/platform.html b/docs/docs/melonjs/device/platform.html index c80272c5f6..ce703859d0 100644 --- a/docs/docs/melonjs/device/platform.html +++ b/docs/docs/melonjs/device/platform.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/requestFullscreen.html b/docs/docs/melonjs/device/requestFullscreen.html index 10dd25ab0c..cd27709feb 100644 --- a/docs/docs/melonjs/device/requestFullscreen.html +++ b/docs/docs/melonjs/device/requestFullscreen.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/unlockOrientation.html b/docs/docs/melonjs/device/unlockOrientation.html index f7dc1b5dfa..b0e33db828 100644 --- a/docs/docs/melonjs/device/unlockOrientation.html +++ b/docs/docs/melonjs/device/unlockOrientation.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/unwatchAccelerometer.html b/docs/docs/melonjs/device/unwatchAccelerometer.html index b6947ecf46..14dceee7e2 100644 --- a/docs/docs/melonjs/device/unwatchAccelerometer.html +++ b/docs/docs/melonjs/device/unwatchAccelerometer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/unwatchDeviceOrientation.html b/docs/docs/melonjs/device/unwatchDeviceOrientation.html index 3a714958a4..56b38bdfb9 100644 --- a/docs/docs/melonjs/device/unwatchDeviceOrientation.html +++ b/docs/docs/melonjs/device/unwatchDeviceOrientation.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/vibrate.html b/docs/docs/melonjs/device/vibrate.html index 2f0eafe89a..c05f970f54 100644 --- a/docs/docs/melonjs/device/vibrate.html +++ b/docs/docs/melonjs/device/vibrate.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/watchAccelerometer.html b/docs/docs/melonjs/device/watchAccelerometer.html index 7f7980655a..de2e1814a0 100644 --- a/docs/docs/melonjs/device/watchAccelerometer.html +++ b/docs/docs/melonjs/device/watchAccelerometer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/device/watchDeviceOrientation.html b/docs/docs/melonjs/device/watchDeviceOrientation.html index 75debc0735..a53b7d71cc 100644 --- a/docs/docs/melonjs/device/watchDeviceOrientation.html +++ b/docs/docs/melonjs/device/watchDeviceOrientation.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/event.html b/docs/docs/melonjs/event.html index 146368836b..6c6efa61ac 100644 --- a/docs/docs/melonjs/event.html +++ b/docs/docs/melonjs/event.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/event/emit.html b/docs/docs/melonjs/event/emit.html index ac1fb655bd..7cd1655c91 100644 --- a/docs/docs/melonjs/event/emit.html +++ b/docs/docs/melonjs/event/emit.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/event/off.html b/docs/docs/melonjs/event/off.html index 0dbdeb52e2..15662ad41e 100644 --- a/docs/docs/melonjs/event/off.html +++ b/docs/docs/melonjs/event/off.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/event/on.html b/docs/docs/melonjs/event/on.html index e218af0970..61426eeff7 100644 --- a/docs/docs/melonjs/event/on.html +++ b/docs/docs/melonjs/event/on.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/event/once.html b/docs/docs/melonjs/event/once.html index 3c74f66559..b5d2fbdf56 100644 --- a/docs/docs/melonjs/event/once.html +++ b/docs/docs/melonjs/event/once.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/game.html b/docs/docs/melonjs/game.html index 9436ac8200..c9fb0845fb 100644 --- a/docs/docs/melonjs/game.html +++ b/docs/docs/melonjs/game.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input.html b/docs/docs/melonjs/input.html index 77263038dc..6fbf3261b1 100644 --- a/docs/docs/melonjs/input.html +++ b/docs/docs/melonjs/input.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/GAMEPAD.html b/docs/docs/melonjs/input/GAMEPAD.html index ddf57666d6..e4f2fac6e9 100644 --- a/docs/docs/melonjs/input/GAMEPAD.html +++ b/docs/docs/melonjs/input/GAMEPAD.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/GAMEPAD/AXES.html b/docs/docs/melonjs/input/GAMEPAD/AXES.html index f2adcefad7..7c6d279ba5 100644 --- a/docs/docs/melonjs/input/GAMEPAD/AXES.html +++ b/docs/docs/melonjs/input/GAMEPAD/AXES.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/GAMEPAD/BUTTONS.html b/docs/docs/melonjs/input/GAMEPAD/BUTTONS.html index 612c94203c..f124c424b2 100644 --- a/docs/docs/melonjs/input/GAMEPAD/BUTTONS.html +++ b/docs/docs/melonjs/input/GAMEPAD/BUTTONS.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/KEY.html b/docs/docs/melonjs/input/KEY.html index f11ff3488f..7974e33ee7 100644 --- a/docs/docs/melonjs/input/KEY.html +++ b/docs/docs/melonjs/input/KEY.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/bindGamepad.html b/docs/docs/melonjs/input/bindGamepad.html index b427b18f81..188a425584 100644 --- a/docs/docs/melonjs/input/bindGamepad.html +++ b/docs/docs/melonjs/input/bindGamepad.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/bindKey.html b/docs/docs/melonjs/input/bindKey.html index 5ddbf6f1c2..1d436816ca 100644 --- a/docs/docs/melonjs/input/bindKey.html +++ b/docs/docs/melonjs/input/bindKey.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/bindPointer.html b/docs/docs/melonjs/input/bindPointer.html index 9b14699968..4b9b709d30 100644 --- a/docs/docs/melonjs/input/bindPointer.html +++ b/docs/docs/melonjs/input/bindPointer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/exitPointerLock.html b/docs/docs/melonjs/input/exitPointerLock.html index 3b056400ed..b9e3e7ccff 100644 --- a/docs/docs/melonjs/input/exitPointerLock.html +++ b/docs/docs/melonjs/input/exitPointerLock.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/getBindingKey.html b/docs/docs/melonjs/input/getBindingKey.html index e513fe3a36..631df0a832 100644 --- a/docs/docs/melonjs/input/getBindingKey.html +++ b/docs/docs/melonjs/input/getBindingKey.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/globalToLocal.html b/docs/docs/melonjs/input/globalToLocal.html index 5aabe96427..0ff1750cdb 100644 --- a/docs/docs/melonjs/input/globalToLocal.html +++ b/docs/docs/melonjs/input/globalToLocal.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/hasActiveEvents.html b/docs/docs/melonjs/input/hasActiveEvents.html index 6e892e3888..24a284beea 100644 --- a/docs/docs/melonjs/input/hasActiveEvents.html +++ b/docs/docs/melonjs/input/hasActiveEvents.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/hasRegisteredEvents.html b/docs/docs/melonjs/input/hasRegisteredEvents.html index 695e4df72e..dbb1e0983d 100644 --- a/docs/docs/melonjs/input/hasRegisteredEvents.html +++ b/docs/docs/melonjs/input/hasRegisteredEvents.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/isKeyPressed.html b/docs/docs/melonjs/input/isKeyPressed.html index 706365e34e..1233f6937c 100644 --- a/docs/docs/melonjs/input/isKeyPressed.html +++ b/docs/docs/melonjs/input/isKeyPressed.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/keyStatus.html b/docs/docs/melonjs/input/keyStatus.html index 95691af77d..c8f5192243 100644 --- a/docs/docs/melonjs/input/keyStatus.html +++ b/docs/docs/melonjs/input/keyStatus.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/registerPointerEvent.html b/docs/docs/melonjs/input/registerPointerEvent.html index 88f8aecd17..dbb27e7f4a 100644 --- a/docs/docs/melonjs/input/registerPointerEvent.html +++ b/docs/docs/melonjs/input/registerPointerEvent.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/releaseAllPointerEvents.html b/docs/docs/melonjs/input/releaseAllPointerEvents.html index aeece0997e..1462113dd5 100644 --- a/docs/docs/melonjs/input/releaseAllPointerEvents.html +++ b/docs/docs/melonjs/input/releaseAllPointerEvents.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/releasePointerEvent.html b/docs/docs/melonjs/input/releasePointerEvent.html index 45359b2f52..3171d81ffc 100644 --- a/docs/docs/melonjs/input/releasePointerEvent.html +++ b/docs/docs/melonjs/input/releasePointerEvent.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/requestPointerLock.html b/docs/docs/melonjs/input/requestPointerLock.html index 7313d692e4..a279c05f30 100644 --- a/docs/docs/melonjs/input/requestPointerLock.html +++ b/docs/docs/melonjs/input/requestPointerLock.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/setGamepadDeadzone.html b/docs/docs/melonjs/input/setGamepadDeadzone.html index e89e9f98fb..b212fd963c 100644 --- a/docs/docs/melonjs/input/setGamepadDeadzone.html +++ b/docs/docs/melonjs/input/setGamepadDeadzone.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/setTouchAction.html b/docs/docs/melonjs/input/setTouchAction.html index 7023030128..e3717b777a 100644 --- a/docs/docs/melonjs/input/setTouchAction.html +++ b/docs/docs/melonjs/input/setTouchAction.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/triggerKeyEvent.html b/docs/docs/melonjs/input/triggerKeyEvent.html index a863e21b28..e611388634 100644 --- a/docs/docs/melonjs/input/triggerKeyEvent.html +++ b/docs/docs/melonjs/input/triggerKeyEvent.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/unbindGamepad.html b/docs/docs/melonjs/input/unbindGamepad.html index eb39830edf..60b10c4a08 100644 --- a/docs/docs/melonjs/input/unbindGamepad.html +++ b/docs/docs/melonjs/input/unbindGamepad.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/unbindKey.html b/docs/docs/melonjs/input/unbindKey.html index a518413924..f28f07cf1d 100644 --- a/docs/docs/melonjs/input/unbindKey.html +++ b/docs/docs/melonjs/input/unbindKey.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/unbindPointer.html b/docs/docs/melonjs/input/unbindPointer.html index 7be3c71753..05d85aa27d 100644 --- a/docs/docs/melonjs/input/unbindPointer.html +++ b/docs/docs/melonjs/input/unbindPointer.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/input/unlockKey.html b/docs/docs/melonjs/input/unlockKey.html index 5a354fa0b9..334984e8ee 100644 --- a/docs/docs/melonjs/input/unlockKey.html +++ b/docs/docs/melonjs/input/unlockKey.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/level.html b/docs/docs/melonjs/level.html index 0fd4d3eb99..09697803a4 100644 --- a/docs/docs/melonjs/level.html +++ b/docs/docs/melonjs/level.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader.html b/docs/docs/melonjs/loader.html index bedeaf7df8..ed41fefe01 100644 --- a/docs/docs/melonjs/loader.html +++ b/docs/docs/melonjs/loader.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/Asset.html b/docs/docs/melonjs/loader/Asset.html index 5b4e82b641..b1332c94b9 100644 --- a/docs/docs/melonjs/loader/Asset.html +++ b/docs/docs/melonjs/loader/Asset.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/getBinary.html b/docs/docs/melonjs/loader/getBinary.html index a5140bc6e0..aa2dd45550 100644 --- a/docs/docs/melonjs/loader/getBinary.html +++ b/docs/docs/melonjs/loader/getBinary.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/getImage.html b/docs/docs/melonjs/loader/getImage.html index e3f7531251..fc8eef58f3 100644 --- a/docs/docs/melonjs/loader/getImage.html +++ b/docs/docs/melonjs/loader/getImage.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/getJSON.html b/docs/docs/melonjs/loader/getJSON.html index aea7b4111e..82b2716c3f 100644 --- a/docs/docs/melonjs/loader/getJSON.html +++ b/docs/docs/melonjs/loader/getJSON.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/getTMX.html b/docs/docs/melonjs/loader/getTMX.html index 961a3c5243..2dc859b33d 100644 --- a/docs/docs/melonjs/loader/getTMX.html +++ b/docs/docs/melonjs/loader/getTMX.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/load.html b/docs/docs/melonjs/loader/load.html index 6f8db27973..6cb462eeeb 100644 --- a/docs/docs/melonjs/loader/load.html +++ b/docs/docs/melonjs/loader/load.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/preload.html b/docs/docs/melonjs/loader/preload.html index 2bb72b820f..b687374886 100644 --- a/docs/docs/melonjs/loader/preload.html +++ b/docs/docs/melonjs/loader/preload.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/reload.html b/docs/docs/melonjs/loader/reload.html index 6f9b886300..c423d9a14b 100644 --- a/docs/docs/melonjs/loader/reload.html +++ b/docs/docs/melonjs/loader/reload.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/setBaseURL.html b/docs/docs/melonjs/loader/setBaseURL.html index 98d8e58c5e..6d7e89f2dd 100644 --- a/docs/docs/melonjs/loader/setBaseURL.html +++ b/docs/docs/melonjs/loader/setBaseURL.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/setParser.html b/docs/docs/melonjs/loader/setParser.html index c34f938ec8..a34b6b8b97 100644 --- a/docs/docs/melonjs/loader/setParser.html +++ b/docs/docs/melonjs/loader/setParser.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/unload.html b/docs/docs/melonjs/loader/unload.html index 257be16c6d..d18815f9c9 100644 --- a/docs/docs/melonjs/loader/unload.html +++ b/docs/docs/melonjs/loader/unload.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/loader/unloadAll.html b/docs/docs/melonjs/loader/unloadAll.html index b918f2cff6..a2618fd190 100644 --- a/docs/docs/melonjs/loader/unloadAll.html +++ b/docs/docs/melonjs/loader/unloadAll.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/onresize.html b/docs/docs/melonjs/onresize.html index 007ff93d0d..caf82dec3c 100644 --- a/docs/docs/melonjs/onresize.html +++ b/docs/docs/melonjs/onresize.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/plugin.html b/docs/docs/melonjs/plugin.html index f97f23955f..afc6481b25 100644 --- a/docs/docs/melonjs/plugin.html +++ b/docs/docs/melonjs/plugin.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/plugin/Base.html b/docs/docs/melonjs/plugin/Base.html index efd9f937b1..b1c361f031 100644 --- a/docs/docs/melonjs/plugin/Base.html +++ b/docs/docs/melonjs/plugin/Base.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/plugin/BasePlugin.html b/docs/docs/melonjs/plugin/BasePlugin.html index f5d993a590..e5cc8561ce 100644 --- a/docs/docs/melonjs/plugin/BasePlugin.html +++ b/docs/docs/melonjs/plugin/BasePlugin.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/plugin/get.html b/docs/docs/melonjs/plugin/get.html index 6a83728c6f..b934a58666 100644 --- a/docs/docs/melonjs/plugin/get.html +++ b/docs/docs/melonjs/plugin/get.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/plugin/patch.html b/docs/docs/melonjs/plugin/patch.html index 493bca197c..d855198c5e 100644 --- a/docs/docs/melonjs/plugin/patch.html +++ b/docs/docs/melonjs/plugin/patch.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/plugin/register.html b/docs/docs/melonjs/plugin/register.html index d5cb2ecc75..3157c521d9 100644 --- a/docs/docs/melonjs/plugin/register.html +++ b/docs/docs/melonjs/plugin/register.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/pool.html b/docs/docs/melonjs/pool.html index 6a26bf631d..a363ad7b0a 100644 --- a/docs/docs/melonjs/pool.html +++ b/docs/docs/melonjs/pool.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/save.html b/docs/docs/melonjs/save.html index 7b534733cd..a15dbacc4e 100644 --- a/docs/docs/melonjs/save.html +++ b/docs/docs/melonjs/save.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/scale.html b/docs/docs/melonjs/scale.html index f051683b87..514bf26219 100644 --- a/docs/docs/melonjs/scale.html +++ b/docs/docs/melonjs/scale.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/application/application.js.html b/docs/docs/melonjs/src/application/application.js.html index 9596697a8b..a2e9d5d9db 100644 --- a/docs/docs/melonjs/src/application/application.js.html +++ b/docs/docs/melonjs/src/application/application.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/application/header.js.html b/docs/docs/melonjs/src/application/header.js.html index d218ce9d01..a35d847a62 100644 --- a/docs/docs/melonjs/src/application/header.js.html +++ b/docs/docs/melonjs/src/application/header.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/application/resize.js.html b/docs/docs/melonjs/src/application/resize.js.html index b53ea615ff..3f39457104 100644 --- a/docs/docs/melonjs/src/application/resize.js.html +++ b/docs/docs/melonjs/src/application/resize.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/application/settings.js.html b/docs/docs/melonjs/src/application/settings.js.html index a3dcec6ea2..a2d334e55a 100644 --- a/docs/docs/melonjs/src/application/settings.js.html +++ b/docs/docs/melonjs/src/application/settings.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/audio/audio.js.html b/docs/docs/melonjs/src/audio/audio.js.html index ff0eb1a022..48b183e513 100644 --- a/docs/docs/melonjs/src/audio/audio.js.html +++ b/docs/docs/melonjs/src/audio/audio.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/camera/camera2d.js.html b/docs/docs/melonjs/src/camera/camera2d.js.html index 4f5a3c98b3..5c60bd5896 100644 --- a/docs/docs/melonjs/src/camera/camera2d.js.html +++ b/docs/docs/melonjs/src/camera/camera2d.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/const.js.html b/docs/docs/melonjs/src/const.js.html index 76fa71bd89..a17ad80501 100644 --- a/docs/docs/melonjs/src/const.js.html +++ b/docs/docs/melonjs/src/const.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/geometries/ellipse.js.html b/docs/docs/melonjs/src/geometries/ellipse.js.html index 9c43039d31..afec4e6535 100644 --- a/docs/docs/melonjs/src/geometries/ellipse.js.html +++ b/docs/docs/melonjs/src/geometries/ellipse.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/geometries/line.js.html b/docs/docs/melonjs/src/geometries/line.js.html index 635c58a867..963c2c5b53 100644 --- a/docs/docs/melonjs/src/geometries/line.js.html +++ b/docs/docs/melonjs/src/geometries/line.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/geometries/path2d.js.html b/docs/docs/melonjs/src/geometries/path2d.js.html index 2f3cde9cdf..ea12d37970 100644 --- a/docs/docs/melonjs/src/geometries/path2d.js.html +++ b/docs/docs/melonjs/src/geometries/path2d.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/geometries/point.js.html b/docs/docs/melonjs/src/geometries/point.js.html index d0c22b8c6d..cf58b2f6fd 100644 --- a/docs/docs/melonjs/src/geometries/point.js.html +++ b/docs/docs/melonjs/src/geometries/point.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/geometries/poly.js.html b/docs/docs/melonjs/src/geometries/poly.js.html index 308d812273..a2e16d26a5 100644 --- a/docs/docs/melonjs/src/geometries/poly.js.html +++ b/docs/docs/melonjs/src/geometries/poly.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/geometries/rectangle.js.html b/docs/docs/melonjs/src/geometries/rectangle.js.html index c1a575d020..758ed93ff5 100644 --- a/docs/docs/melonjs/src/geometries/rectangle.js.html +++ b/docs/docs/melonjs/src/geometries/rectangle.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/geometries/roundrect.js.html b/docs/docs/melonjs/src/geometries/roundrect.js.html index 7485be90c0..403fc93eff 100644 --- a/docs/docs/melonjs/src/geometries/roundrect.js.html +++ b/docs/docs/melonjs/src/geometries/roundrect.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/index.js.html b/docs/docs/melonjs/src/index.js.html index 5f9ba65f8a..7268ac5c65 100644 --- a/docs/docs/melonjs/src/index.js.html +++ b/docs/docs/melonjs/src/index.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/input/gamepad.js.html b/docs/docs/melonjs/src/input/gamepad.js.html index 38f8f39b3d..1ab9ce99d4 100644 --- a/docs/docs/melonjs/src/input/gamepad.js.html +++ b/docs/docs/melonjs/src/input/gamepad.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/input/input.js.html b/docs/docs/melonjs/src/input/input.js.html index 7512f69346..1fe1560834 100644 --- a/docs/docs/melonjs/src/input/input.js.html +++ b/docs/docs/melonjs/src/input/input.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/input/keyboard.js.html b/docs/docs/melonjs/src/input/keyboard.js.html index ee7430056c..aa1b540f94 100644 --- a/docs/docs/melonjs/src/input/keyboard.js.html +++ b/docs/docs/melonjs/src/input/keyboard.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/input/pointer.js.html b/docs/docs/melonjs/src/input/pointer.js.html index 8c4785c77c..abba8d3a91 100644 --- a/docs/docs/melonjs/src/input/pointer.js.html +++ b/docs/docs/melonjs/src/input/pointer.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/input/pointerevent.js.html b/docs/docs/melonjs/src/input/pointerevent.js.html index 980ad0afdc..27d43076f9 100644 --- a/docs/docs/melonjs/src/input/pointerevent.js.html +++ b/docs/docs/melonjs/src/input/pointerevent.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/lang/console.js.html b/docs/docs/melonjs/src/lang/console.js.html index 1d6f2f1239..7506ab35a8 100644 --- a/docs/docs/melonjs/src/lang/console.js.html +++ b/docs/docs/melonjs/src/lang/console.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/lang/deprecated.js.html b/docs/docs/melonjs/src/lang/deprecated.js.html index dc32d9cf6b..2df129e2a6 100644 --- a/docs/docs/melonjs/src/lang/deprecated.js.html +++ b/docs/docs/melonjs/src/lang/deprecated.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/level.js.html b/docs/docs/melonjs/src/level/level.js.html index d35871eb32..71a3556bdc 100644 --- a/docs/docs/melonjs/src/level/level.js.html +++ b/docs/docs/melonjs/src/level/level.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/TMXGroup.js.html b/docs/docs/melonjs/src/level/tiled/TMXGroup.js.html index 31c6e47669..32fea69635 100644 --- a/docs/docs/melonjs/src/level/tiled/TMXGroup.js.html +++ b/docs/docs/melonjs/src/level/tiled/TMXGroup.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/TMXLayer.js.html b/docs/docs/melonjs/src/level/tiled/TMXLayer.js.html index 42e23d110b..d68330ae27 100644 --- a/docs/docs/melonjs/src/level/tiled/TMXLayer.js.html +++ b/docs/docs/melonjs/src/level/tiled/TMXLayer.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/TMXObject.js.html b/docs/docs/melonjs/src/level/tiled/TMXObject.js.html index d2c5eb1351..70ebc88867 100644 --- a/docs/docs/melonjs/src/level/tiled/TMXObject.js.html +++ b/docs/docs/melonjs/src/level/tiled/TMXObject.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/TMXTile.js.html b/docs/docs/melonjs/src/level/tiled/TMXTile.js.html index d0b9f7cedb..ae43af48a8 100644 --- a/docs/docs/melonjs/src/level/tiled/TMXTile.js.html +++ b/docs/docs/melonjs/src/level/tiled/TMXTile.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/TMXTileMap.js.html b/docs/docs/melonjs/src/level/tiled/TMXTileMap.js.html index a6fdf1e11b..a6bc6f49a6 100644 --- a/docs/docs/melonjs/src/level/tiled/TMXTileMap.js.html +++ b/docs/docs/melonjs/src/level/tiled/TMXTileMap.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/TMXTileset.js.html b/docs/docs/melonjs/src/level/tiled/TMXTileset.js.html index c15c1887ac..9ea93a7c03 100644 --- a/docs/docs/melonjs/src/level/tiled/TMXTileset.js.html +++ b/docs/docs/melonjs/src/level/tiled/TMXTileset.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/TMXTilesetGroup.js.html b/docs/docs/melonjs/src/level/tiled/TMXTilesetGroup.js.html index 7e11af4249..c7dbf1e8b0 100644 --- a/docs/docs/melonjs/src/level/tiled/TMXTilesetGroup.js.html +++ b/docs/docs/melonjs/src/level/tiled/TMXTilesetGroup.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/TMXUtils.js.html b/docs/docs/melonjs/src/level/tiled/TMXUtils.js.html index 442f62dafc..0dbe598a3d 100644 --- a/docs/docs/melonjs/src/level/tiled/TMXUtils.js.html +++ b/docs/docs/melonjs/src/level/tiled/TMXUtils.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/constants.js.html b/docs/docs/melonjs/src/level/tiled/constants.js.html index 527a3bed8e..325e80aa4d 100644 --- a/docs/docs/melonjs/src/level/tiled/constants.js.html +++ b/docs/docs/melonjs/src/level/tiled/constants.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/renderer/TMXHexagonalRenderer.js.html b/docs/docs/melonjs/src/level/tiled/renderer/TMXHexagonalRenderer.js.html index ad858c1068..dacd578e59 100644 --- a/docs/docs/melonjs/src/level/tiled/renderer/TMXHexagonalRenderer.js.html +++ b/docs/docs/melonjs/src/level/tiled/renderer/TMXHexagonalRenderer.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/renderer/TMXIsometricRenderer.js.html b/docs/docs/melonjs/src/level/tiled/renderer/TMXIsometricRenderer.js.html index ef6248cafc..cc2ac8c657 100644 --- a/docs/docs/melonjs/src/level/tiled/renderer/TMXIsometricRenderer.js.html +++ b/docs/docs/melonjs/src/level/tiled/renderer/TMXIsometricRenderer.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/renderer/TMXOrthogonalRenderer.js.html b/docs/docs/melonjs/src/level/tiled/renderer/TMXOrthogonalRenderer.js.html index aabdc3240a..ceecec9853 100644 --- a/docs/docs/melonjs/src/level/tiled/renderer/TMXOrthogonalRenderer.js.html +++ b/docs/docs/melonjs/src/level/tiled/renderer/TMXOrthogonalRenderer.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/renderer/TMXRenderer.js.html b/docs/docs/melonjs/src/level/tiled/renderer/TMXRenderer.js.html index 90dd78bc6b..120123b4cd 100644 --- a/docs/docs/melonjs/src/level/tiled/renderer/TMXRenderer.js.html +++ b/docs/docs/melonjs/src/level/tiled/renderer/TMXRenderer.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/renderer/TMXStaggeredRenderer.js.html b/docs/docs/melonjs/src/level/tiled/renderer/TMXStaggeredRenderer.js.html index c42bfc65bd..a6fab801e8 100644 --- a/docs/docs/melonjs/src/level/tiled/renderer/TMXStaggeredRenderer.js.html +++ b/docs/docs/melonjs/src/level/tiled/renderer/TMXStaggeredRenderer.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/level/tiled/renderer/autodetect.js.html b/docs/docs/melonjs/src/level/tiled/renderer/autodetect.js.html index 113c13f88a..d79e1c7e23 100644 --- a/docs/docs/melonjs/src/level/tiled/renderer/autodetect.js.html +++ b/docs/docs/melonjs/src/level/tiled/renderer/autodetect.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/cache.js.html b/docs/docs/melonjs/src/loader/cache.js.html index 699f05853d..87233b67ed 100644 --- a/docs/docs/melonjs/src/loader/cache.js.html +++ b/docs/docs/melonjs/src/loader/cache.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/loader.js.html b/docs/docs/melonjs/src/loader/loader.js.html index a30a35e108..166e8ea7e5 100644 --- a/docs/docs/melonjs/src/loader/loader.js.html +++ b/docs/docs/melonjs/src/loader/loader.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/loadingscreen.js.html b/docs/docs/melonjs/src/loader/loadingscreen.js.html index adf81d9978..25414c163a 100644 --- a/docs/docs/melonjs/src/loader/loadingscreen.js.html +++ b/docs/docs/melonjs/src/loader/loadingscreen.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/parsers/binary.js.html b/docs/docs/melonjs/src/loader/parsers/binary.js.html index e6ec0597f5..f65d4c91d6 100644 --- a/docs/docs/melonjs/src/loader/parsers/binary.js.html +++ b/docs/docs/melonjs/src/loader/parsers/binary.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/parsers/fontface.js.html b/docs/docs/melonjs/src/loader/parsers/fontface.js.html index 9b090a0e60..ca0e55e46e 100644 --- a/docs/docs/melonjs/src/loader/parsers/fontface.js.html +++ b/docs/docs/melonjs/src/loader/parsers/fontface.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/parsers/image.js.html b/docs/docs/melonjs/src/loader/parsers/image.js.html index f82e69b94d..3b4de96a1a 100644 --- a/docs/docs/melonjs/src/loader/parsers/image.js.html +++ b/docs/docs/melonjs/src/loader/parsers/image.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/parsers/json.js.html b/docs/docs/melonjs/src/loader/parsers/json.js.html index ba28fa2ae9..649b0a14ef 100644 --- a/docs/docs/melonjs/src/loader/parsers/json.js.html +++ b/docs/docs/melonjs/src/loader/parsers/json.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/parsers/script.js.html b/docs/docs/melonjs/src/loader/parsers/script.js.html index 7676804ac4..822429b6e8 100644 --- a/docs/docs/melonjs/src/loader/parsers/script.js.html +++ b/docs/docs/melonjs/src/loader/parsers/script.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/parsers/tmx.js.html b/docs/docs/melonjs/src/loader/parsers/tmx.js.html index 778edfea91..4bfba73b4e 100644 --- a/docs/docs/melonjs/src/loader/parsers/tmx.js.html +++ b/docs/docs/melonjs/src/loader/parsers/tmx.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/loader/settings.js.html b/docs/docs/melonjs/src/loader/settings.js.html index d48c5bb5b0..98b6aea700 100644 --- a/docs/docs/melonjs/src/loader/settings.js.html +++ b/docs/docs/melonjs/src/loader/settings.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/math/color.js.html b/docs/docs/melonjs/src/math/color.js.html index addb501836..e01b698bdd 100644 --- a/docs/docs/melonjs/src/math/color.js.html +++ b/docs/docs/melonjs/src/math/color.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/math/math.js.html b/docs/docs/melonjs/src/math/math.js.html index 6cd74b584a..77657efda1 100644 --- a/docs/docs/melonjs/src/math/math.js.html +++ b/docs/docs/melonjs/src/math/math.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/math/matrix2.js.html b/docs/docs/melonjs/src/math/matrix2.js.html index dc69a8b52a..f3b6bcd858 100644 --- a/docs/docs/melonjs/src/math/matrix2.js.html +++ b/docs/docs/melonjs/src/math/matrix2.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/math/matrix3.js.html b/docs/docs/melonjs/src/math/matrix3.js.html index cbe758b608..3cf8d85fbd 100644 --- a/docs/docs/melonjs/src/math/matrix3.js.html +++ b/docs/docs/melonjs/src/math/matrix3.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/math/observable_vector2.js.html b/docs/docs/melonjs/src/math/observable_vector2.js.html index 53a987281a..8827c240b5 100644 --- a/docs/docs/melonjs/src/math/observable_vector2.js.html +++ b/docs/docs/melonjs/src/math/observable_vector2.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/math/observable_vector3.js.html b/docs/docs/melonjs/src/math/observable_vector3.js.html index df2c24d5ed..56108af02e 100644 --- a/docs/docs/melonjs/src/math/observable_vector3.js.html +++ b/docs/docs/melonjs/src/math/observable_vector3.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/math/vector2.js.html b/docs/docs/melonjs/src/math/vector2.js.html index 211968dc44..9e6377f0c2 100644 --- a/docs/docs/melonjs/src/math/vector2.js.html +++ b/docs/docs/melonjs/src/math/vector2.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/math/vector3.js.html b/docs/docs/melonjs/src/math/vector3.js.html index 51abd2fb74..4d20012cd1 100644 --- a/docs/docs/melonjs/src/math/vector3.js.html +++ b/docs/docs/melonjs/src/math/vector3.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/particles/emitter.js.html b/docs/docs/melonjs/src/particles/emitter.js.html index 0e8d5c60bc..6a6f419097 100644 --- a/docs/docs/melonjs/src/particles/emitter.js.html +++ b/docs/docs/melonjs/src/particles/emitter.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/particles/particle.js.html b/docs/docs/melonjs/src/particles/particle.js.html index dfcb8cc863..3628c733d8 100644 --- a/docs/docs/melonjs/src/particles/particle.js.html +++ b/docs/docs/melonjs/src/particles/particle.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/particles/settings.js.html b/docs/docs/melonjs/src/particles/settings.js.html index 3090b2d9a7..91179bfd9c 100644 --- a/docs/docs/melonjs/src/particles/settings.js.html +++ b/docs/docs/melonjs/src/particles/settings.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/physics/body.js.html b/docs/docs/melonjs/src/physics/body.js.html index d49ac71bf4..1c1668967c 100644 --- a/docs/docs/melonjs/src/physics/body.js.html +++ b/docs/docs/melonjs/src/physics/body.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/physics/bounds.js.html b/docs/docs/melonjs/src/physics/bounds.js.html index a577dd593a..a054687a3f 100644 --- a/docs/docs/melonjs/src/physics/bounds.js.html +++ b/docs/docs/melonjs/src/physics/bounds.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/physics/collision.js.html b/docs/docs/melonjs/src/physics/collision.js.html index e28b439788..fff820eac3 100644 --- a/docs/docs/melonjs/src/physics/collision.js.html +++ b/docs/docs/melonjs/src/physics/collision.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/physics/detector.js.html b/docs/docs/melonjs/src/physics/detector.js.html index 75d89dc780..2e4f160d87 100644 --- a/docs/docs/melonjs/src/physics/detector.js.html +++ b/docs/docs/melonjs/src/physics/detector.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/physics/quadtree.js.html b/docs/docs/melonjs/src/physics/quadtree.js.html index 3c31b582ad..0a40db7131 100644 --- a/docs/docs/melonjs/src/physics/quadtree.js.html +++ b/docs/docs/melonjs/src/physics/quadtree.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/physics/response.js.html b/docs/docs/melonjs/src/physics/response.js.html index d0950d560e..fd03f86864 100644 --- a/docs/docs/melonjs/src/physics/response.js.html +++ b/docs/docs/melonjs/src/physics/response.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/physics/sat.js.html b/docs/docs/melonjs/src/physics/sat.js.html index da11dfbfaa..8287b1137d 100644 --- a/docs/docs/melonjs/src/physics/sat.js.html +++ b/docs/docs/melonjs/src/physics/sat.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/physics/world.js.html b/docs/docs/melonjs/src/physics/world.js.html index 787cd69a77..8e68558ae2 100644 --- a/docs/docs/melonjs/src/physics/world.js.html +++ b/docs/docs/melonjs/src/physics/world.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/plugin/plugin.js.html b/docs/docs/melonjs/src/plugin/plugin.js.html index fccdbd6fce..2fcdfa33a0 100644 --- a/docs/docs/melonjs/src/plugin/plugin.js.html +++ b/docs/docs/melonjs/src/plugin/plugin.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/polyfill/console.js.html b/docs/docs/melonjs/src/polyfill/console.js.html index f563ce9e83..d9182c16c7 100644 --- a/docs/docs/melonjs/src/polyfill/console.js.html +++ b/docs/docs/melonjs/src/polyfill/console.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/polyfill/index.js.html b/docs/docs/melonjs/src/polyfill/index.js.html index 54b10e6d22..30a2c74f0e 100644 --- a/docs/docs/melonjs/src/polyfill/index.js.html +++ b/docs/docs/melonjs/src/polyfill/index.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/polyfill/roundrect.js.html b/docs/docs/melonjs/src/polyfill/roundrect.js.html index d271ad2e20..30b4f1fad3 100644 --- a/docs/docs/melonjs/src/polyfill/roundrect.js.html +++ b/docs/docs/melonjs/src/polyfill/roundrect.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/renderable/collectable.js.html b/docs/docs/melonjs/src/renderable/collectable.js.html index e59676610d..db4d82ea1c 100644 --- a/docs/docs/melonjs/src/renderable/collectable.js.html +++ b/docs/docs/melonjs/src/renderable/collectable.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/renderable/colorlayer.js.html b/docs/docs/melonjs/src/renderable/colorlayer.js.html index 977d8f82ab..31ec00e062 100644 --- a/docs/docs/melonjs/src/renderable/colorlayer.js.html +++ b/docs/docs/melonjs/src/renderable/colorlayer.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/renderable/container.js.html b/docs/docs/melonjs/src/renderable/container.js.html index 96ab876290..820811b2e8 100644 --- a/docs/docs/melonjs/src/renderable/container.js.html +++ b/docs/docs/melonjs/src/renderable/container.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/renderable/draggable.js.html b/docs/docs/melonjs/src/renderable/draggable.js.html index 5c77510893..da3849bd57 100644 --- a/docs/docs/melonjs/src/renderable/draggable.js.html +++ b/docs/docs/melonjs/src/renderable/draggable.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/renderable/dragndrop.js.html b/docs/docs/melonjs/src/renderable/dragndrop.js.html index eb7e7ce8bb..2d4416103d 100644 --- a/docs/docs/melonjs/src/renderable/dragndrop.js.html +++ b/docs/docs/melonjs/src/renderable/dragndrop.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/renderable/entity/entity.js.html b/docs/docs/melonjs/src/renderable/entity/entity.js.html index 775f2bffe7..6d59ec096f 100644 --- a/docs/docs/melonjs/src/renderable/entity/entity.js.html +++ b/docs/docs/melonjs/src/renderable/entity/entity.js.html @@ -1,5 +1,5 @@ - + diff --git a/docs/docs/melonjs/src/renderable/imagelayer.js.html b/docs/docs/melonjs/src/renderable/imagelayer.js.html index 805b9dceb9..ad5c7517a4 100644 --- a/docs/docs/melonjs/src/renderable/imagelayer.js.html +++ b/docs/docs/melonjs/src/renderable/imagelayer.js.html @@ -1,5 +1,5 @@ - + @@ -1192,6 +1192,10 @@ 280 +
                            • + 281 +
                            • +
                            import { renderer } from "./../video/video.js";
                             import * as event from "./../system/event.js";
                            @@ -1319,14 +1323,12 @@
                                     event.on(event.VIEWPORT_ONCHANGE, this.updateLayer, this);
                                     event.on(event.VIEWPORT_ONRESIZE, this.resize, this);
                                     // force a first refresh when the level is loaded
                            -        event.once(event.LEVEL_LOADED, () => {
                            -            this.updateLayer(game.viewport.pos);
                            -        });
                            +        event.on(event.LEVEL_LOADED, this.updateLayer, this);
                                     // in case the level is not added to the root container,
                                     // the onActivateEvent call happens after the LEVEL_LOADED event
                                     // so we need to force a first update
                                     if (this.ancestor.root !== true) {
                            -            this.updateLayer(game.viewport.pos);
                            +            this.updateLayer();
                                     }
                                 }
                             
                            @@ -1354,10 +1356,12 @@
                                  * updateLayer function
                                  * @ignore
                                  */
                            -    updateLayer(vpos) {
                            +    updateLayer() {
                                     const rx = this.ratio.x,
                                         ry = this.ratio.y;
                             
                            +        const viewport = game.viewport;
                            +
                                     if (rx === 0 && ry === 0) {
                                         // static image
                                         return;
                            @@ -1365,8 +1369,8 @@
                             
                                     const width = this.width,
                                         height = this.height,
                            -            bw = game.viewport.bounds.width,
                            -            bh = game.viewport.bounds.height,
                            +            bw = viewport.bounds.width,
                            +            bh = viewport.bounds.height,
                                         ax = this.anchorPoint.x,
                                         ay = this.anchorPoint.y,
                             
                            @@ -1376,8 +1380,8 @@
                                          * See https://github.com/melonjs/melonJS/issues/741#issuecomment-138431532
                                          * for a thorough description of how this works.
                                          */
                            -            x = ax * (rx - 1) * (bw - game.viewport.width) + this.offset.x - rx * vpos.x,
                            -            y = ay * (ry - 1) * (bh - game.viewport.height) + this.offset.y - ry * vpos.y;
                            +            x = ax * (rx - 1) * (bw - viewport.width) + this.offset.x - rx * viewport.pos.x,
                            +            y = ay * (ry - 1) * (bh - viewport.height) + this.offset.y - ry * viewport.pos.y;
                             
                             
                                     // Repeat horizontally; start drawing from left boundary
                            @@ -1458,6 +1462,7 @@
                                     // cancel all event subscriptions
                                     event.off(event.VIEWPORT_ONCHANGE, this.updateLayer);
                                     event.off(event.VIEWPORT_ONRESIZE, this.resize);
                            +        event.off(event.LEVEL_LOADED, this.updateLayer);
                                 }
                             
                                 /**
                            diff --git a/docs/docs/melonjs/src/renderable/light2d.js.html b/docs/docs/melonjs/src/renderable/light2d.js.html
                            index d31b890add..89a9204081 100644
                            --- a/docs/docs/melonjs/src/renderable/light2d.js.html
                            +++ b/docs/docs/melonjs/src/renderable/light2d.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/nineslicesprite.js.html b/docs/docs/melonjs/src/renderable/nineslicesprite.js.html
                            index e8443af975..21e3da5543 100644
                            --- a/docs/docs/melonjs/src/renderable/nineslicesprite.js.html
                            +++ b/docs/docs/melonjs/src/renderable/nineslicesprite.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/renderable.js.html b/docs/docs/melonjs/src/renderable/renderable.js.html
                            index 8a4f001347..0a51f66617 100644
                            --- a/docs/docs/melonjs/src/renderable/renderable.js.html
                            +++ b/docs/docs/melonjs/src/renderable/renderable.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            @@ -3360,6 +3360,78 @@
                                         822
                                       
                                     
                            +          
                          • + 823 +
                          • + +
                          • + 824 +
                          • + +
                          • + 825 +
                          • + +
                          • + 826 +
                          • + +
                          • + 827 +
                          • + +
                          • + 828 +
                          • + +
                          • + 829 +
                          • + +
                          • + 830 +
                          • + +
                          • + 831 +
                          • + +
                          • + 832 +
                          • + +
                          • + 833 +
                          • + +
                          • + 834 +
                          • + +
                          • + 835 +
                          • + +
                          • + 836 +
                          • + +
                          • + 837 +
                          • + +
                          • + 838 +
                          • + +
                          • + 839 +
                          • + +
                          • + 840 +
                          • +
                            import ObservableVector2d from "./../math/observable_vector2.js";
                             import ObservableVector3d from "./../math/observable_vector3.js";
                            @@ -3621,6 +3693,9 @@
                                     // viewport flag
                                     this._inViewport = false;
                             
                            +        // cache value for the parentApp
                            +        this._parentApp = undefined;
                            +
                                     // renderable cache tint value used by the getter/setter
                                     this._tint = pool.pull("Color", 255, 255, 255, 1.0);
                             
                            @@ -3628,6 +3703,20 @@
                                     this.setOpacity(1.0);
                                 }
                             
                            +    /**
                            +     * returns the parent application (or game) to which this renderable is attached to
                            +     * @return {Application} the parent application or undefined if not attached to any container/app
                            +     */
                            +    get parentApp() {
                            +        if (typeof this._parentApp === "undefined") {
                            +            if (typeof this.ancestor !== "undefined" && typeof this.ancestor.getRootAncestor === "function") {
                            +                // the `app` property is only defined in the world "root" container
                            +                this._parentApp = this.ancestor.getRootAncestor().app;
                            +            }
                            +        }
                            +        return this._parentApp;
                            +    }
                            +
                                 /**
                                  * Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container
                                  * @see Renderable#floating
                            @@ -4153,6 +4242,7 @@
                                     }
                             
                                     this.ancestor = undefined;
                            +        this._parentApp = undefined;
                             
                                     // destroy the physic body if defined and is a builtin body object
                                     if ((typeof this.body !== "undefined") && (typeof this.body.destroy === "function")) {
                            diff --git a/docs/docs/melonjs/src/renderable/sprite.js.html b/docs/docs/melonjs/src/renderable/sprite.js.html
                            index 390d908b0e..bfbfe4c3fa 100644
                            --- a/docs/docs/melonjs/src/renderable/sprite.js.html
                            +++ b/docs/docs/melonjs/src/renderable/sprite.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/text/bitmaptext.js.html b/docs/docs/melonjs/src/renderable/text/bitmaptext.js.html
                            index 9a1edcf6e6..e168651834 100644
                            --- a/docs/docs/melonjs/src/renderable/text/bitmaptext.js.html
                            +++ b/docs/docs/melonjs/src/renderable/text/bitmaptext.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/text/bitmaptextdata.js.html b/docs/docs/melonjs/src/renderable/text/bitmaptextdata.js.html
                            index 51af967a5c..b7f9f3baab 100644
                            --- a/docs/docs/melonjs/src/renderable/text/bitmaptextdata.js.html
                            +++ b/docs/docs/melonjs/src/renderable/text/bitmaptextdata.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/text/glyph.js.html b/docs/docs/melonjs/src/renderable/text/glyph.js.html
                            index 33901f5168..1a2f3db3d1 100644
                            --- a/docs/docs/melonjs/src/renderable/text/glyph.js.html
                            +++ b/docs/docs/melonjs/src/renderable/text/glyph.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/text/text.js.html b/docs/docs/melonjs/src/renderable/text/text.js.html
                            index 63623f650e..aa97515a99 100644
                            --- a/docs/docs/melonjs/src/renderable/text/text.js.html
                            +++ b/docs/docs/melonjs/src/renderable/text/text.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/text/textmetrics.js.html b/docs/docs/melonjs/src/renderable/text/textmetrics.js.html
                            index 80aaa386ab..d644525116 100644
                            --- a/docs/docs/melonjs/src/renderable/text/textmetrics.js.html
                            +++ b/docs/docs/melonjs/src/renderable/text/textmetrics.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/text/textstyle.js.html b/docs/docs/melonjs/src/renderable/text/textstyle.js.html
                            index d78e365584..c2d8bfc5bc 100644
                            --- a/docs/docs/melonjs/src/renderable/text/textstyle.js.html
                            +++ b/docs/docs/melonjs/src/renderable/text/textstyle.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/trigger.js.html b/docs/docs/melonjs/src/renderable/trigger.js.html
                            index 7d75cfa327..76388648a7 100644
                            --- a/docs/docs/melonjs/src/renderable/trigger.js.html
                            +++ b/docs/docs/melonjs/src/renderable/trigger.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/ui/uibaseelement.js.html b/docs/docs/melonjs/src/renderable/ui/uibaseelement.js.html
                            index 66f573fbf4..c063ff4c21 100644
                            --- a/docs/docs/melonjs/src/renderable/ui/uibaseelement.js.html
                            +++ b/docs/docs/melonjs/src/renderable/ui/uibaseelement.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/ui/uispriteelement.js.html b/docs/docs/melonjs/src/renderable/ui/uispriteelement.js.html
                            index 5c3a4b1f5f..193b16b38e 100644
                            --- a/docs/docs/melonjs/src/renderable/ui/uispriteelement.js.html
                            +++ b/docs/docs/melonjs/src/renderable/ui/uispriteelement.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/renderable/ui/uitextbutton.js.html b/docs/docs/melonjs/src/renderable/ui/uitextbutton.js.html
                            index 84f5065aae..35f03397b6 100644
                            --- a/docs/docs/melonjs/src/renderable/ui/uitextbutton.js.html
                            +++ b/docs/docs/melonjs/src/renderable/ui/uitextbutton.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/state/stage.js.html b/docs/docs/melonjs/src/state/stage.js.html
                            index 687b10601b..2e59f2ba1f 100644
                            --- a/docs/docs/melonjs/src/state/stage.js.html
                            +++ b/docs/docs/melonjs/src/state/stage.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/state/state.js.html b/docs/docs/melonjs/src/state/state.js.html
                            index 410134942b..2346101309 100644
                            --- a/docs/docs/melonjs/src/state/state.js.html
                            +++ b/docs/docs/melonjs/src/state/state.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/system/device.js.html b/docs/docs/melonjs/src/system/device.js.html
                            index f4f8975205..8ac0a4ede3 100644
                            --- a/docs/docs/melonjs/src/system/device.js.html
                            +++ b/docs/docs/melonjs/src/system/device.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/system/dom.js.html b/docs/docs/melonjs/src/system/dom.js.html
                            index 9155357b1c..d5ae05d853 100644
                            --- a/docs/docs/melonjs/src/system/dom.js.html
                            +++ b/docs/docs/melonjs/src/system/dom.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/system/event.js.html b/docs/docs/melonjs/src/system/event.js.html
                            index 0e8c76afb6..b787e5f3cf 100644
                            --- a/docs/docs/melonjs/src/system/event.js.html
                            +++ b/docs/docs/melonjs/src/system/event.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/system/platform.js.html b/docs/docs/melonjs/src/system/platform.js.html
                            index d625160539..8a78227689 100644
                            --- a/docs/docs/melonjs/src/system/platform.js.html
                            +++ b/docs/docs/melonjs/src/system/platform.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/system/pooling.js.html b/docs/docs/melonjs/src/system/pooling.js.html
                            index b33c522c1d..263ca57da7 100644
                            --- a/docs/docs/melonjs/src/system/pooling.js.html
                            +++ b/docs/docs/melonjs/src/system/pooling.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/system/save.js.html b/docs/docs/melonjs/src/system/save.js.html
                            index 26fbab8050..050fd4e516 100644
                            --- a/docs/docs/melonjs/src/system/save.js.html
                            +++ b/docs/docs/melonjs/src/system/save.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/system/timer.js.html b/docs/docs/melonjs/src/system/timer.js.html
                            index b2c97e6628..df8e2071eb 100644
                            --- a/docs/docs/melonjs/src/system/timer.js.html
                            +++ b/docs/docs/melonjs/src/system/timer.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/tweens/easing.js.html b/docs/docs/melonjs/src/tweens/easing.js.html
                            index 894bc7ea6a..984cd11dca 100644
                            --- a/docs/docs/melonjs/src/tweens/easing.js.html
                            +++ b/docs/docs/melonjs/src/tweens/easing.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/tweens/interpolation.js.html b/docs/docs/melonjs/src/tweens/interpolation.js.html
                            index 18dfd01472..d5b2047c7f 100644
                            --- a/docs/docs/melonjs/src/tweens/interpolation.js.html
                            +++ b/docs/docs/melonjs/src/tweens/interpolation.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/tweens/tween.js.html b/docs/docs/melonjs/src/tweens/tween.js.html
                            index 29a09f6786..fd5b55fe2b 100644
                            --- a/docs/docs/melonjs/src/tweens/tween.js.html
                            +++ b/docs/docs/melonjs/src/tweens/tween.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/utils/agent.js.html b/docs/docs/melonjs/src/utils/agent.js.html
                            index f04905706b..6e38631a38 100644
                            --- a/docs/docs/melonjs/src/utils/agent.js.html
                            +++ b/docs/docs/melonjs/src/utils/agent.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/utils/array.js.html b/docs/docs/melonjs/src/utils/array.js.html
                            index 2713473f92..bdef5618cf 100644
                            --- a/docs/docs/melonjs/src/utils/array.js.html
                            +++ b/docs/docs/melonjs/src/utils/array.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/utils/file.js.html b/docs/docs/melonjs/src/utils/file.js.html
                            index 3004344ed7..734e87eeea 100644
                            --- a/docs/docs/melonjs/src/utils/file.js.html
                            +++ b/docs/docs/melonjs/src/utils/file.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/utils/function.js.html b/docs/docs/melonjs/src/utils/function.js.html
                            index e0f90a9dad..ff4d301334 100644
                            --- a/docs/docs/melonjs/src/utils/function.js.html
                            +++ b/docs/docs/melonjs/src/utils/function.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/utils/string.js.html b/docs/docs/melonjs/src/utils/string.js.html
                            index 92c29c3dec..a10e0d57a7 100644
                            --- a/docs/docs/melonjs/src/utils/string.js.html
                            +++ b/docs/docs/melonjs/src/utils/string.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/utils/utils.js.html b/docs/docs/melonjs/src/utils/utils.js.html
                            index 75a177e488..101c934c11 100644
                            --- a/docs/docs/melonjs/src/utils/utils.js.html
                            +++ b/docs/docs/melonjs/src/utils/utils.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/canvas/canvas_renderer.js.html b/docs/docs/melonjs/src/video/canvas/canvas_renderer.js.html
                            index 3bd9b35f20..c1ac4d2616 100644
                            --- a/docs/docs/melonjs/src/video/canvas/canvas_renderer.js.html
                            +++ b/docs/docs/melonjs/src/video/canvas/canvas_renderer.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/renderer.js.html b/docs/docs/melonjs/src/video/renderer.js.html
                            index 0b7f1ddba0..2c34cad039 100644
                            --- a/docs/docs/melonjs/src/video/renderer.js.html
                            +++ b/docs/docs/melonjs/src/video/renderer.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/texture/atlas.js.html b/docs/docs/melonjs/src/video/texture/atlas.js.html
                            index 7a1cdb5394..13583b27ec 100644
                            --- a/docs/docs/melonjs/src/video/texture/atlas.js.html
                            +++ b/docs/docs/melonjs/src/video/texture/atlas.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/texture/cache.js.html b/docs/docs/melonjs/src/video/texture/cache.js.html
                            index 37dcabb6eb..e585f724e6 100644
                            --- a/docs/docs/melonjs/src/video/texture/cache.js.html
                            +++ b/docs/docs/melonjs/src/video/texture/cache.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/texture/canvas_texture.js.html b/docs/docs/melonjs/src/video/texture/canvas_texture.js.html
                            index 586aed7ecb..87d5417779 100644
                            --- a/docs/docs/melonjs/src/video/texture/canvas_texture.js.html
                            +++ b/docs/docs/melonjs/src/video/texture/canvas_texture.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/utils/autodetect.js.html b/docs/docs/melonjs/src/video/utils/autodetect.js.html
                            index f68e5bae56..1385fbb808 100644
                            --- a/docs/docs/melonjs/src/video/utils/autodetect.js.html
                            +++ b/docs/docs/melonjs/src/video/utils/autodetect.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/video.js.html b/docs/docs/melonjs/src/video/video.js.html
                            index 3cdeae36be..4a9dc9f0bb 100644
                            --- a/docs/docs/melonjs/src/video/video.js.html
                            +++ b/docs/docs/melonjs/src/video/video.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/buffer/vertex.js.html b/docs/docs/melonjs/src/video/webgl/buffer/vertex.js.html
                            index 2bf5777e89..fb225f7acc 100644
                            --- a/docs/docs/melonjs/src/video/webgl/buffer/vertex.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/buffer/vertex.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/compositors/compositor.js.html b/docs/docs/melonjs/src/video/webgl/compositors/compositor.js.html
                            index 2f68aba564..9ae6efadfe 100644
                            --- a/docs/docs/melonjs/src/video/webgl/compositors/compositor.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/compositors/compositor.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/compositors/primitive_compositor.js.html b/docs/docs/melonjs/src/video/webgl/compositors/primitive_compositor.js.html
                            index bc1ac46bc4..850089afde 100644
                            --- a/docs/docs/melonjs/src/video/webgl/compositors/primitive_compositor.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/compositors/primitive_compositor.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/compositors/quad_compositor.js.html b/docs/docs/melonjs/src/video/webgl/compositors/quad_compositor.js.html
                            index 78980e600e..3f6dfca98b 100644
                            --- a/docs/docs/melonjs/src/video/webgl/compositors/quad_compositor.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/compositors/quad_compositor.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/glshader.js.html b/docs/docs/melonjs/src/video/webgl/glshader.js.html
                            index c61ac34433..8f8febd5a1 100644
                            --- a/docs/docs/melonjs/src/video/webgl/glshader.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/glshader.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/utils/attributes.js.html b/docs/docs/melonjs/src/video/webgl/utils/attributes.js.html
                            index c740b578a3..89f0847579 100644
                            --- a/docs/docs/melonjs/src/video/webgl/utils/attributes.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/utils/attributes.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/utils/precision.js.html b/docs/docs/melonjs/src/video/webgl/utils/precision.js.html
                            index 1658494bff..c0197adf34 100644
                            --- a/docs/docs/melonjs/src/video/webgl/utils/precision.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/utils/precision.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/utils/program.js.html b/docs/docs/melonjs/src/video/webgl/utils/program.js.html
                            index bbcf24c82f..18463b49ea 100644
                            --- a/docs/docs/melonjs/src/video/webgl/utils/program.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/utils/program.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/utils/string.js.html b/docs/docs/melonjs/src/video/webgl/utils/string.js.html
                            index b212aa19b0..7c58249317 100644
                            --- a/docs/docs/melonjs/src/video/webgl/utils/string.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/utils/string.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/utils/uniforms.js.html b/docs/docs/melonjs/src/video/webgl/utils/uniforms.js.html
                            index 9c7a4a7ac0..946b27d115 100644
                            --- a/docs/docs/melonjs/src/video/webgl/utils/uniforms.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/utils/uniforms.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/src/video/webgl/webgl_renderer.js.html b/docs/docs/melonjs/src/video/webgl/webgl_renderer.js.html
                            index 252227625d..f32097168e 100644
                            --- a/docs/docs/melonjs/src/video/webgl/webgl_renderer.js.html
                            +++ b/docs/docs/melonjs/src/video/webgl/webgl_renderer.js.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/state.html b/docs/docs/melonjs/state.html
                            index 28a096663c..809577b91b 100644
                            --- a/docs/docs/melonjs/state.html
                            +++ b/docs/docs/melonjs/state.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/timer.html b/docs/docs/melonjs/timer.html
                            index d131298cc4..7669db5cef 100644
                            --- a/docs/docs/melonjs/timer.html
                            +++ b/docs/docs/melonjs/timer.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils.html b/docs/docs/melonjs/utils.html
                            index 6f6203c007..9ab22192cb 100644
                            --- a/docs/docs/melonjs/utils.html
                            +++ b/docs/docs/melonjs/utils.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/agent.html b/docs/docs/melonjs/utils/agent.html
                            index f22a14a13e..bc1f5abe17 100644
                            --- a/docs/docs/melonjs/utils/agent.html
                            +++ b/docs/docs/melonjs/utils/agent.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/agent/prefixed.html b/docs/docs/melonjs/utils/agent/prefixed.html
                            index 6c31691667..472a65e98f 100644
                            --- a/docs/docs/melonjs/utils/agent/prefixed.html
                            +++ b/docs/docs/melonjs/utils/agent/prefixed.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/agent/setPrefixed.html b/docs/docs/melonjs/utils/agent/setPrefixed.html
                            index 1e1a9c790c..0d6b4776d3 100644
                            --- a/docs/docs/melonjs/utils/agent/setPrefixed.html
                            +++ b/docs/docs/melonjs/utils/agent/setPrefixed.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/array.html b/docs/docs/melonjs/utils/array.html
                            index 8b1af1d5a6..de36fb91f4 100644
                            --- a/docs/docs/melonjs/utils/array.html
                            +++ b/docs/docs/melonjs/utils/array.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/array/random.html b/docs/docs/melonjs/utils/array/random.html
                            index 97d1353970..01e1b8035f 100644
                            --- a/docs/docs/melonjs/utils/array/random.html
                            +++ b/docs/docs/melonjs/utils/array/random.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/array/remove.html b/docs/docs/melonjs/utils/array/remove.html
                            index 9df7799ac1..9643a0c13b 100644
                            --- a/docs/docs/melonjs/utils/array/remove.html
                            +++ b/docs/docs/melonjs/utils/array/remove.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/array/weightedRandom.html b/docs/docs/melonjs/utils/array/weightedRandom.html
                            index 231ac2e729..18850ff289 100644
                            --- a/docs/docs/melonjs/utils/array/weightedRandom.html
                            +++ b/docs/docs/melonjs/utils/array/weightedRandom.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/checkVersion.html b/docs/docs/melonjs/utils/checkVersion.html
                            index b1404f1de2..5992cc44f3 100644
                            --- a/docs/docs/melonjs/utils/checkVersion.html
                            +++ b/docs/docs/melonjs/utils/checkVersion.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/file.html b/docs/docs/melonjs/utils/file.html
                            index c2d8078a30..544d5d8306 100644
                            --- a/docs/docs/melonjs/utils/file.html
                            +++ b/docs/docs/melonjs/utils/file.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/file/getBasename.html b/docs/docs/melonjs/utils/file/getBasename.html
                            index f7c99d07ff..cf1e79502c 100644
                            --- a/docs/docs/melonjs/utils/file/getBasename.html
                            +++ b/docs/docs/melonjs/utils/file/getBasename.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/file/getExtension.html b/docs/docs/melonjs/utils/file/getExtension.html
                            index d68039ee04..0e170b9a7e 100644
                            --- a/docs/docs/melonjs/utils/file/getExtension.html
                            +++ b/docs/docs/melonjs/utils/file/getExtension.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/file/getPath.html b/docs/docs/melonjs/utils/file/getPath.html
                            index f3c5067ced..e104542b8b 100644
                            --- a/docs/docs/melonjs/utils/file/getPath.html
                            +++ b/docs/docs/melonjs/utils/file/getPath.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/function.html b/docs/docs/melonjs/utils/function.html
                            index bfe8fa41c9..95f7f7d410 100644
                            --- a/docs/docs/melonjs/utils/function.html
                            +++ b/docs/docs/melonjs/utils/function.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/function/defer.html b/docs/docs/melonjs/utils/function/defer.html
                            index a031c2d6c3..af5b08b82d 100644
                            --- a/docs/docs/melonjs/utils/function/defer.html
                            +++ b/docs/docs/melonjs/utils/function/defer.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/function/throttle.html b/docs/docs/melonjs/utils/function/throttle.html
                            index af170f120b..b590d9d3e5 100644
                            --- a/docs/docs/melonjs/utils/function/throttle.html
                            +++ b/docs/docs/melonjs/utils/function/throttle.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/getUriFragment.html b/docs/docs/melonjs/utils/getUriFragment.html
                            index 28c017c442..b4e8d61c75 100644
                            --- a/docs/docs/melonjs/utils/getUriFragment.html
                            +++ b/docs/docs/melonjs/utils/getUriFragment.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/string.html b/docs/docs/melonjs/utils/string.html
                            index 40c85010f5..5ed6c259b7 100644
                            --- a/docs/docs/melonjs/utils/string.html
                            +++ b/docs/docs/melonjs/utils/string.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/string/capitalize.html b/docs/docs/melonjs/utils/string/capitalize.html
                            index c1fdceebae..c58ed5a8ea 100644
                            --- a/docs/docs/melonjs/utils/string/capitalize.html
                            +++ b/docs/docs/melonjs/utils/string/capitalize.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/string/isBoolean.html b/docs/docs/melonjs/utils/string/isBoolean.html
                            index 16c56f1a54..b0870d4b8c 100644
                            --- a/docs/docs/melonjs/utils/string/isBoolean.html
                            +++ b/docs/docs/melonjs/utils/string/isBoolean.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/string/isDataUrl.html b/docs/docs/melonjs/utils/string/isDataUrl.html
                            index 672e61faea..5994c253db 100644
                            --- a/docs/docs/melonjs/utils/string/isDataUrl.html
                            +++ b/docs/docs/melonjs/utils/string/isDataUrl.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/string/isNumeric.html b/docs/docs/melonjs/utils/string/isNumeric.html
                            index a756f7dc7c..2ed02fa6ab 100644
                            --- a/docs/docs/melonjs/utils/string/isNumeric.html
                            +++ b/docs/docs/melonjs/utils/string/isNumeric.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/utils/string/toHex.html b/docs/docs/melonjs/utils/string/toHex.html
                            index fd4fe203a6..ff659f16d8 100644
                            --- a/docs/docs/melonjs/utils/string/toHex.html
                            +++ b/docs/docs/melonjs/utils/string/toHex.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/video.html b/docs/docs/melonjs/video.html
                            index 2ce7015cf6..45e204c3fd 100644
                            --- a/docs/docs/melonjs/video.html
                            +++ b/docs/docs/melonjs/video.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/video/createCanvas.html b/docs/docs/melonjs/video/createCanvas.html
                            index 5721850cec..4bbd010342 100644
                            --- a/docs/docs/melonjs/video/createCanvas.html
                            +++ b/docs/docs/melonjs/video/createCanvas.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/video/getParent.html b/docs/docs/melonjs/video/getParent.html
                            index 4a99429c35..8316d054fc 100644
                            --- a/docs/docs/melonjs/video/getParent.html
                            +++ b/docs/docs/melonjs/video/getParent.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/video/init.html b/docs/docs/melonjs/video/init.html
                            index 5c044f15de..fdb1925a0a 100644
                            --- a/docs/docs/melonjs/video/init.html
                            +++ b/docs/docs/melonjs/video/init.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/melonjs/warning.html b/docs/docs/melonjs/warning.html
                            index eb4e356495..1a98856c59 100644
                            --- a/docs/docs/melonjs/warning.html
                            +++ b/docs/docs/melonjs/warning.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/docs/settings.html b/docs/docs/settings.html
                            index a894351664..fcd216f6c7 100644
                            --- a/docs/docs/settings.html
                            +++ b/docs/docs/settings.html
                            @@ -1,5 +1,5 @@
                             
                            -
                            +
                             
                             
                               
                            diff --git a/docs/melonjs.module.js b/docs/melonjs.module.js
                            new file mode 100644
                            index 0000000000..f859cd857c
                            --- /dev/null
                            +++ b/docs/melonjs.module.js
                            @@ -0,0 +1,38872 @@
                            +/*!
                            + * melonJS Game Engine - v15.15.0
                            + * http://www.melonjs.org
                            + * melonjs is licensed under the MIT License.
                            + * http://www.opensource.org/licenses/mit-license
                            + * @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
                            + */
                            +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
                            +
                            +function getDefaultExportFromCjs (x) {
                            +	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
                            +}
                            +
                            +function getDefaultExportFromNamespaceIfPresent (n) {
                            +	return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
                            +}
                            +
                            +function getDefaultExportFromNamespaceIfNotNamed (n) {
                            +	return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
                            +}
                            +
                            +function getAugmentedNamespace(n) {
                            +  if (n.__esModule) return n;
                            +  var f = n.default;
                            +	if (typeof f == "function") {
                            +		var a = function a () {
                            +			if (this instanceof a) {
                            +        return Reflect.construct(f, arguments, this.constructor);
                            +			}
                            +			return f.apply(this, arguments);
                            +		};
                            +		a.prototype = f.prototype;
                            +  } else a = {};
                            +  Object.defineProperty(a, '__esModule', {value: true});
                            +	Object.keys(n).forEach(function (k) {
                            +		var d = Object.getOwnPropertyDescriptor(n, k);
                            +		Object.defineProperty(a, k, d.get ? d : {
                            +			enumerable: true,
                            +			get: function () {
                            +				return n[k];
                            +			}
                            +		});
                            +	});
                            +	return a;
                            +}
                            +
                            +var esnext_globalThis = {};
                            +
                            +var es_globalThis = {};
                            +
                            +'use strict';
                            +var check = function (it) {
                            +  return it && it.Math === Math && it;
                            +};
                            +
                            +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
                            +var global$e =
                            +  // eslint-disable-next-line es/no-global-this -- safe
                            +  check(typeof globalThis == 'object' && globalThis) ||
                            +  check(typeof window == 'object' && window) ||
                            +  // eslint-disable-next-line no-restricted-globals -- safe
                            +  check(typeof self == 'object' && self) ||
                            +  check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
                            +  check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
                            +  // eslint-disable-next-line no-new-func -- fallback
                            +  (function () { return this; })() || Function('return this')();
                            +
                            +var global$f = /*@__PURE__*/getDefaultExportFromCjs(global$e);
                            +
                            +var objectGetOwnPropertyDescriptor = {};
                            +
                            +'use strict';
                            +var fails$9 = function (exec) {
                            +  try {
                            +    return !!exec();
                            +  } catch (error) {
                            +    return true;
                            +  }
                            +};
                            +
                            +var fails$a = /*@__PURE__*/getDefaultExportFromCjs(fails$9);
                            +
                            +'use strict';
                            +var fails$8 = fails$9;
                            +
                            +// Detect IE8's incomplete defineProperty implementation
                            +var descriptors = !fails$8(function () {
                            +  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
                            +  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
                            +});
                            +
                            +var descriptors$1 = /*@__PURE__*/getDefaultExportFromCjs(descriptors);
                            +
                            +'use strict';
                            +var fails$7 = fails$9;
                            +
                            +var functionBindNative = !fails$7(function () {
                            +  // eslint-disable-next-line es/no-function-prototype-bind -- safe
                            +  var test = (function () { /* empty */ }).bind();
                            +  // eslint-disable-next-line no-prototype-builtins -- safe
                            +  return typeof test != 'function' || test.hasOwnProperty('prototype');
                            +});
                            +
                            +var functionBindNative$1 = /*@__PURE__*/getDefaultExportFromCjs(functionBindNative);
                            +
                            +'use strict';
                            +var NATIVE_BIND$1 = functionBindNative;
                            +
                            +var call$4 = Function.prototype.call;
                            +
                            +var functionCall = NATIVE_BIND$1 ? call$4.bind(call$4) : function () {
                            +  return call$4.apply(call$4, arguments);
                            +};
                            +
                            +var functionCall$1 = /*@__PURE__*/getDefaultExportFromCjs(functionCall);
                            +
                            +var objectPropertyIsEnumerable = {};
                            +
                            +'use strict';
                            +var $propertyIsEnumerable = {}.propertyIsEnumerable;
                            +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
                            +var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
                            +
                            +// Nashorn ~ JDK8 bug
                            +var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
                            +
                            +// `Object.prototype.propertyIsEnumerable` method implementation
                            +// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
                            +var f$4 = objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
                            +  var descriptor = getOwnPropertyDescriptor$1(this, V);
                            +  return !!descriptor && descriptor.enumerable;
                            +} : $propertyIsEnumerable;
                            +
                            +'use strict';
                            +var createPropertyDescriptor$2 = function (bitmap, value) {
                            +  return {
                            +    enumerable: !(bitmap & 1),
                            +    configurable: !(bitmap & 2),
                            +    writable: !(bitmap & 4),
                            +    value: value
                            +  };
                            +};
                            +
                            +var createPropertyDescriptor$3 = /*@__PURE__*/getDefaultExportFromCjs(createPropertyDescriptor$2);
                            +
                            +'use strict';
                            +var NATIVE_BIND = functionBindNative;
                            +
                            +var FunctionPrototype$1 = Function.prototype;
                            +var call$3 = FunctionPrototype$1.call;
                            +var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$3, call$3);
                            +
                            +var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
                            +  return function () {
                            +    return call$3.apply(fn, arguments);
                            +  };
                            +};
                            +
                            +var functionUncurryThis$1 = /*@__PURE__*/getDefaultExportFromCjs(functionUncurryThis);
                            +
                            +'use strict';
                            +var uncurryThis$a = functionUncurryThis;
                            +
                            +var toString$5 = uncurryThis$a({}.toString);
                            +var stringSlice$1 = uncurryThis$a(''.slice);
                            +
                            +var classofRaw$1 = function (it) {
                            +  return stringSlice$1(toString$5(it), 8, -1);
                            +};
                            +
                            +var classofRaw$2 = /*@__PURE__*/getDefaultExportFromCjs(classofRaw$1);
                            +
                            +'use strict';
                            +var uncurryThis$9 = functionUncurryThis;
                            +var fails$6 = fails$9;
                            +var classof$3 = classofRaw$1;
                            +
                            +var $Object$3 = Object;
                            +var split = uncurryThis$9(''.split);
                            +
                            +// fallback for non-array-like ES3 and non-enumerable old V8 strings
                            +var indexedObject = fails$6(function () {
                            +  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
                            +  // eslint-disable-next-line no-prototype-builtins -- safe
                            +  return !$Object$3('z').propertyIsEnumerable(0);
                            +}) ? function (it) {
                            +  return classof$3(it) === 'String' ? split(it, '') : $Object$3(it);
                            +} : $Object$3;
                            +
                            +var indexedObject$1 = /*@__PURE__*/getDefaultExportFromCjs(indexedObject);
                            +
                            +'use strict';
                            +// we can't use just `it == null` since of `document.all` special case
                            +// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
                            +var isNullOrUndefined$2 = function (it) {
                            +  return it === null || it === undefined;
                            +};
                            +
                            +var isNullOrUndefined$3 = /*@__PURE__*/getDefaultExportFromCjs(isNullOrUndefined$2);
                            +
                            +'use strict';
                            +var isNullOrUndefined$1 = isNullOrUndefined$2;
                            +
                            +var $TypeError$5 = TypeError;
                            +
                            +// `RequireObjectCoercible` abstract operation
                            +// https://tc39.es/ecma262/#sec-requireobjectcoercible
                            +var requireObjectCoercible$3 = function (it) {
                            +  if (isNullOrUndefined$1(it)) throw new $TypeError$5("Can't call method on " + it);
                            +  return it;
                            +};
                            +
                            +var requireObjectCoercible$4 = /*@__PURE__*/getDefaultExportFromCjs(requireObjectCoercible$3);
                            +
                            +'use strict';
                            +// toObject with fallback for non-array-like ES3 strings
                            +var IndexedObject = indexedObject;
                            +var requireObjectCoercible$2 = requireObjectCoercible$3;
                            +
                            +var toIndexedObject$3 = function (it) {
                            +  return IndexedObject(requireObjectCoercible$2(it));
                            +};
                            +
                            +var toIndexedObject$4 = /*@__PURE__*/getDefaultExportFromCjs(toIndexedObject$3);
                            +
                            +'use strict';
                            +var documentAll$2 = typeof document == 'object' && document.all;
                            +
                            +// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
                            +// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
                            +var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
                            +
                            +var documentAll_1 = {
                            +  all: documentAll$2,
                            +  IS_HTMLDDA: IS_HTMLDDA
                            +};
                            +
                            +var documentAll$3 = /*@__PURE__*/getDefaultExportFromCjs(documentAll_1);
                            +
                            +'use strict';
                            +var $documentAll$1 = documentAll_1;
                            +
                            +var documentAll$1 = $documentAll$1.all;
                            +
                            +// `IsCallable` abstract operation
                            +// https://tc39.es/ecma262/#sec-iscallable
                            +var isCallable$b = $documentAll$1.IS_HTMLDDA ? function (argument) {
                            +  return typeof argument == 'function' || argument === documentAll$1;
                            +} : function (argument) {
                            +  return typeof argument == 'function';
                            +};
                            +
                            +var isCallable$c = /*@__PURE__*/getDefaultExportFromCjs(isCallable$b);
                            +
                            +'use strict';
                            +var isCallable$a = isCallable$b;
                            +var $documentAll = documentAll_1;
                            +
                            +var documentAll = $documentAll.all;
                            +
                            +var isObject$5 = $documentAll.IS_HTMLDDA ? function (it) {
                            +  return typeof it == 'object' ? it !== null : isCallable$a(it) || it === documentAll;
                            +} : function (it) {
                            +  return typeof it == 'object' ? it !== null : isCallable$a(it);
                            +};
                            +
                            +var isObject$6 = /*@__PURE__*/getDefaultExportFromCjs(isObject$5);
                            +
                            +'use strict';
                            +var global$d = global$e;
                            +var isCallable$9 = isCallable$b;
                            +
                            +var aFunction = function (argument) {
                            +  return isCallable$9(argument) ? argument : undefined;
                            +};
                            +
                            +var getBuiltIn$2 = function (namespace, method) {
                            +  return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
                            +};
                            +
                            +var getBuiltIn$3 = /*@__PURE__*/getDefaultExportFromCjs(getBuiltIn$2);
                            +
                            +'use strict';
                            +var uncurryThis$8 = functionUncurryThis;
                            +
                            +var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
                            +
                            +var objectIsPrototypeOf$1 = /*@__PURE__*/getDefaultExportFromCjs(objectIsPrototypeOf);
                            +
                            +'use strict';
                            +var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
                            +
                            +var engineUserAgent$1 = /*@__PURE__*/getDefaultExportFromCjs(engineUserAgent);
                            +
                            +'use strict';
                            +var global$c = global$e;
                            +var userAgent = engineUserAgent;
                            +
                            +var process = global$c.process;
                            +var Deno = global$c.Deno;
                            +var versions = process && process.versions || Deno && Deno.version;
                            +var v8 = versions && versions.v8;
                            +var match, version$1;
                            +
                            +if (v8) {
                            +  match = v8.split('.');
                            +  // in old Chrome, versions of V8 isn't V8 = Chrome / 10
                            +  // but their correct versions are not interesting for us
                            +  version$1 = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
                            +}
                            +
                            +// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
                            +// so check `userAgent` even if `.v8` exists, but 0
                            +if (!version$1 && userAgent) {
                            +  match = userAgent.match(/Edge\/(\d+)/);
                            +  if (!match || match[1] >= 74) {
                            +    match = userAgent.match(/Chrome\/(\d+)/);
                            +    if (match) version$1 = +match[1];
                            +  }
                            +}
                            +
                            +var engineV8Version = version$1;
                            +
                            +var engineV8Version$1 = /*@__PURE__*/getDefaultExportFromCjs(engineV8Version);
                            +
                            +'use strict';
                            +/* eslint-disable es/no-symbol -- required for testing */
                            +var V8_VERSION = engineV8Version;
                            +var fails$5 = fails$9;
                            +var global$b = global$e;
                            +
                            +var $String$4 = global$b.String;
                            +
                            +// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
                            +var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
                            +  var symbol = Symbol('symbol detection');
                            +  // Chrome 38 Symbol has incorrect toString conversion
                            +  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
                            +  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
                            +  // of course, fail.
                            +  return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
                            +    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
                            +    !Symbol.sham && V8_VERSION && V8_VERSION < 41;
                            +});
                            +
                            +var symbolConstructorDetection$1 = /*@__PURE__*/getDefaultExportFromCjs(symbolConstructorDetection);
                            +
                            +'use strict';
                            +/* eslint-disable es/no-symbol -- required for testing */
                            +var NATIVE_SYMBOL$1 = symbolConstructorDetection;
                            +
                            +var useSymbolAsUid = NATIVE_SYMBOL$1
                            +  && !Symbol.sham
                            +  && typeof Symbol.iterator == 'symbol';
                            +
                            +var useSymbolAsUid$1 = /*@__PURE__*/getDefaultExportFromCjs(useSymbolAsUid);
                            +
                            +'use strict';
                            +var getBuiltIn$1 = getBuiltIn$2;
                            +var isCallable$8 = isCallable$b;
                            +var isPrototypeOf = objectIsPrototypeOf;
                            +var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
                            +
                            +var $Object$2 = Object;
                            +
                            +var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
                            +  return typeof it == 'symbol';
                            +} : function (it) {
                            +  var $Symbol = getBuiltIn$1('Symbol');
                            +  return isCallable$8($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
                            +};
                            +
                            +var isSymbol$3 = /*@__PURE__*/getDefaultExportFromCjs(isSymbol$2);
                            +
                            +'use strict';
                            +var $String$3 = String;
                            +
                            +var tryToString$1 = function (argument) {
                            +  try {
                            +    return $String$3(argument);
                            +  } catch (error) {
                            +    return 'Object';
                            +  }
                            +};
                            +
                            +var tryToString$2 = /*@__PURE__*/getDefaultExportFromCjs(tryToString$1);
                            +
                            +'use strict';
                            +var isCallable$7 = isCallable$b;
                            +var tryToString = tryToString$1;
                            +
                            +var $TypeError$4 = TypeError;
                            +
                            +// `Assert: IsCallable(argument) is true`
                            +var aCallable$1 = function (argument) {
                            +  if (isCallable$7(argument)) return argument;
                            +  throw new $TypeError$4(tryToString(argument) + ' is not a function');
                            +};
                            +
                            +var aCallable$2 = /*@__PURE__*/getDefaultExportFromCjs(aCallable$1);
                            +
                            +'use strict';
                            +var aCallable = aCallable$1;
                            +var isNullOrUndefined = isNullOrUndefined$2;
                            +
                            +// `GetMethod` abstract operation
                            +// https://tc39.es/ecma262/#sec-getmethod
                            +var getMethod$1 = function (V, P) {
                            +  var func = V[P];
                            +  return isNullOrUndefined(func) ? undefined : aCallable(func);
                            +};
                            +
                            +var getMethod$2 = /*@__PURE__*/getDefaultExportFromCjs(getMethod$1);
                            +
                            +'use strict';
                            +var call$2 = functionCall;
                            +var isCallable$6 = isCallable$b;
                            +var isObject$4 = isObject$5;
                            +
                            +var $TypeError$3 = TypeError;
                            +
                            +// `OrdinaryToPrimitive` abstract operation
                            +// https://tc39.es/ecma262/#sec-ordinarytoprimitive
                            +var ordinaryToPrimitive$1 = function (input, pref) {
                            +  var fn, val;
                            +  if (pref === 'string' && isCallable$6(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
                            +  if (isCallable$6(fn = input.valueOf) && !isObject$4(val = call$2(fn, input))) return val;
                            +  if (pref !== 'string' && isCallable$6(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
                            +  throw new $TypeError$3("Can't convert object to primitive value");
                            +};
                            +
                            +var ordinaryToPrimitive$2 = /*@__PURE__*/getDefaultExportFromCjs(ordinaryToPrimitive$1);
                            +
                            +var shared$5 = {exports: {}};
                            +
                            +'use strict';
                            +var isPure = false;
                            +
                            +var isPure$1 = /*@__PURE__*/getDefaultExportFromCjs(isPure);
                            +
                            +'use strict';
                            +var global$a = global$e;
                            +
                            +// eslint-disable-next-line es/no-object-defineproperty -- safe
                            +var defineProperty$1 = Object.defineProperty;
                            +
                            +var defineGlobalProperty$3 = function (key, value) {
                            +  try {
                            +    defineProperty$1(global$a, key, { value: value, configurable: true, writable: true });
                            +  } catch (error) {
                            +    global$a[key] = value;
                            +  } return value;
                            +};
                            +
                            +var defineGlobalProperty$4 = /*@__PURE__*/getDefaultExportFromCjs(defineGlobalProperty$3);
                            +
                            +'use strict';
                            +var global$9 = global$e;
                            +var defineGlobalProperty$2 = defineGlobalProperty$3;
                            +
                            +var SHARED = '__core-js_shared__';
                            +var store$3 = global$9[SHARED] || defineGlobalProperty$2(SHARED, {});
                            +
                            +var sharedStore = store$3;
                            +
                            +var sharedStore$1 = /*@__PURE__*/getDefaultExportFromCjs(sharedStore);
                            +
                            +var shared$3 = shared$5.exports;
                            +
                            +'use strict';
                            +var IS_PURE = isPure;
                            +var store$2 = sharedStore;
                            +
                            +(shared$5.exports = function (key, value) {
                            +  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
                            +})('versions', []).push({
                            +  version: '3.33.3',
                            +  mode: IS_PURE ? 'pure' : 'global',
                            +  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
                            +  license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
                            +  source: 'https://github.com/zloirock/core-js'
                            +});
                            +
                            +var sharedExports = shared$5.exports;
                            +var shared$4 = /*@__PURE__*/getDefaultExportFromCjs(sharedExports);
                            +
                            +'use strict';
                            +var requireObjectCoercible$1 = requireObjectCoercible$3;
                            +
                            +var $Object$1 = Object;
                            +
                            +// `ToObject` abstract operation
                            +// https://tc39.es/ecma262/#sec-toobject
                            +var toObject$1 = function (argument) {
                            +  return $Object$1(requireObjectCoercible$1(argument));
                            +};
                            +
                            +var toObject$2 = /*@__PURE__*/getDefaultExportFromCjs(toObject$1);
                            +
                            +'use strict';
                            +var uncurryThis$7 = functionUncurryThis;
                            +var toObject = toObject$1;
                            +
                            +var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
                            +
                            +// `HasOwnProperty` abstract operation
                            +// https://tc39.es/ecma262/#sec-hasownproperty
                            +// eslint-disable-next-line es/no-object-hasown -- safe
                            +var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
                            +  return hasOwnProperty(toObject(it), key);
                            +};
                            +
                            +var hasOwnProperty$1 = /*@__PURE__*/getDefaultExportFromCjs(hasOwnProperty_1);
                            +
                            +'use strict';
                            +var uncurryThis$6 = functionUncurryThis;
                            +
                            +var id = 0;
                            +var postfix = Math.random();
                            +var toString$4 = uncurryThis$6(1.0.toString);
                            +
                            +var uid$2 = function (key) {
                            +  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
                            +};
                            +
                            +var uid$3 = /*@__PURE__*/getDefaultExportFromCjs(uid$2);
                            +
                            +'use strict';
                            +var global$8 = global$e;
                            +var shared$2 = sharedExports;
                            +var hasOwn$6 = hasOwnProperty_1;
                            +var uid$1 = uid$2;
                            +var NATIVE_SYMBOL = symbolConstructorDetection;
                            +var USE_SYMBOL_AS_UID = useSymbolAsUid;
                            +
                            +var Symbol$1 = global$8.Symbol;
                            +var WellKnownSymbolsStore = shared$2('wks');
                            +var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
                            +
                            +var wellKnownSymbol$3 = function (name) {
                            +  if (!hasOwn$6(WellKnownSymbolsStore, name)) {
                            +    WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)
                            +      ? Symbol$1[name]
                            +      : createWellKnownSymbol('Symbol.' + name);
                            +  } return WellKnownSymbolsStore[name];
                            +};
                            +
                            +var wellKnownSymbol$4 = /*@__PURE__*/getDefaultExportFromCjs(wellKnownSymbol$3);
                            +
                            +'use strict';
                            +var call$1 = functionCall;
                            +var isObject$3 = isObject$5;
                            +var isSymbol$1 = isSymbol$2;
                            +var getMethod = getMethod$1;
                            +var ordinaryToPrimitive = ordinaryToPrimitive$1;
                            +var wellKnownSymbol$2 = wellKnownSymbol$3;
                            +
                            +var $TypeError$2 = TypeError;
                            +var TO_PRIMITIVE = wellKnownSymbol$2('toPrimitive');
                            +
                            +// `ToPrimitive` abstract operation
                            +// https://tc39.es/ecma262/#sec-toprimitive
                            +var toPrimitive$1 = function (input, pref) {
                            +  if (!isObject$3(input) || isSymbol$1(input)) return input;
                            +  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
                            +  var result;
                            +  if (exoticToPrim) {
                            +    if (pref === undefined) pref = 'default';
                            +    result = call$1(exoticToPrim, input, pref);
                            +    if (!isObject$3(result) || isSymbol$1(result)) return result;
                            +    throw new $TypeError$2("Can't convert object to primitive value");
                            +  }
                            +  if (pref === undefined) pref = 'number';
                            +  return ordinaryToPrimitive(input, pref);
                            +};
                            +
                            +var toPrimitive$2 = /*@__PURE__*/getDefaultExportFromCjs(toPrimitive$1);
                            +
                            +'use strict';
                            +var toPrimitive = toPrimitive$1;
                            +var isSymbol = isSymbol$2;
                            +
                            +// `ToPropertyKey` abstract operation
                            +// https://tc39.es/ecma262/#sec-topropertykey
                            +var toPropertyKey$2 = function (argument) {
                            +  var key = toPrimitive(argument, 'string');
                            +  return isSymbol(key) ? key : key + '';
                            +};
                            +
                            +var toPropertyKey$3 = /*@__PURE__*/getDefaultExportFromCjs(toPropertyKey$2);
                            +
                            +'use strict';
                            +var global$7 = global$e;
                            +var isObject$2 = isObject$5;
                            +
                            +var document$1 = global$7.document;
                            +// typeof document.createElement is 'object' in old IE
                            +var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
                            +
                            +var documentCreateElement = function (it) {
                            +  return EXISTS$1 ? document$1.createElement(it) : {};
                            +};
                            +
                            +var documentCreateElement$1 = /*@__PURE__*/getDefaultExportFromCjs(documentCreateElement);
                            +
                            +'use strict';
                            +var DESCRIPTORS$6 = descriptors;
                            +var fails$4 = fails$9;
                            +var createElement = documentCreateElement;
                            +
                            +// Thanks to IE8 for its funny defineProperty
                            +var ie8DomDefine = !DESCRIPTORS$6 && !fails$4(function () {
                            +  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
                            +  return Object.defineProperty(createElement('div'), 'a', {
                            +    get: function () { return 7; }
                            +  }).a !== 7;
                            +});
                            +
                            +var ie8DomDefine$1 = /*@__PURE__*/getDefaultExportFromCjs(ie8DomDefine);
                            +
                            +'use strict';
                            +var DESCRIPTORS$5 = descriptors;
                            +var call = functionCall;
                            +var propertyIsEnumerableModule = objectPropertyIsEnumerable;
                            +var createPropertyDescriptor$1 = createPropertyDescriptor$2;
                            +var toIndexedObject$2 = toIndexedObject$3;
                            +var toPropertyKey$1 = toPropertyKey$2;
                            +var hasOwn$5 = hasOwnProperty_1;
                            +var IE8_DOM_DEFINE$1 = ie8DomDefine;
                            +
                            +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
                            +var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
                            +
                            +// `Object.getOwnPropertyDescriptor` method
                            +// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
                            +var f$3 = objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
                            +  O = toIndexedObject$2(O);
                            +  P = toPropertyKey$1(P);
                            +  if (IE8_DOM_DEFINE$1) try {
                            +    return $getOwnPropertyDescriptor$1(O, P);
                            +  } catch (error) { /* empty */ }
                            +  if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
                            +};
                            +
                            +var objectDefineProperty = {};
                            +
                            +'use strict';
                            +var DESCRIPTORS$4 = descriptors;
                            +var fails$3 = fails$9;
                            +
                            +// V8 ~ Chrome 36-
                            +// https://bugs.chromium.org/p/v8/issues/detail?id=3334
                            +var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$3(function () {
                            +  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
                            +  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
                            +    value: 42,
                            +    writable: false
                            +  }).prototype !== 42;
                            +});
                            +
                            +var v8PrototypeDefineBug$1 = /*@__PURE__*/getDefaultExportFromCjs(v8PrototypeDefineBug);
                            +
                            +'use strict';
                            +var isObject$1 = isObject$5;
                            +
                            +var $String$2 = String;
                            +var $TypeError$1 = TypeError;
                            +
                            +// `Assert: Type(argument) is Object`
                            +var anObject$2 = function (argument) {
                            +  if (isObject$1(argument)) return argument;
                            +  throw new $TypeError$1($String$2(argument) + ' is not an object');
                            +};
                            +
                            +var anObject$3 = /*@__PURE__*/getDefaultExportFromCjs(anObject$2);
                            +
                            +'use strict';
                            +var DESCRIPTORS$3 = descriptors;
                            +var IE8_DOM_DEFINE = ie8DomDefine;
                            +var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
                            +var anObject$1 = anObject$2;
                            +var toPropertyKey = toPropertyKey$2;
                            +
                            +var $TypeError = TypeError;
                            +// eslint-disable-next-line es/no-object-defineproperty -- safe
                            +var $defineProperty = Object.defineProperty;
                            +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
                            +var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
                            +var ENUMERABLE = 'enumerable';
                            +var CONFIGURABLE$1 = 'configurable';
                            +var WRITABLE = 'writable';
                            +
                            +// `Object.defineProperty` method
                            +// https://tc39.es/ecma262/#sec-object.defineproperty
                            +var f$2 = objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
                            +  anObject$1(O);
                            +  P = toPropertyKey(P);
                            +  anObject$1(Attributes);
                            +  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
                            +    var current = $getOwnPropertyDescriptor(O, P);
                            +    if (current && current[WRITABLE]) {
                            +      O[P] = Attributes.value;
                            +      Attributes = {
                            +        configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
                            +        enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
                            +        writable: false
                            +      };
                            +    }
                            +  } return $defineProperty(O, P, Attributes);
                            +} : $defineProperty : function defineProperty(O, P, Attributes) {
                            +  anObject$1(O);
                            +  P = toPropertyKey(P);
                            +  anObject$1(Attributes);
                            +  if (IE8_DOM_DEFINE) try {
                            +    return $defineProperty(O, P, Attributes);
                            +  } catch (error) { /* empty */ }
                            +  if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
                            +  if ('value' in Attributes) O[P] = Attributes.value;
                            +  return O;
                            +};
                            +
                            +'use strict';
                            +var DESCRIPTORS$2 = descriptors;
                            +var definePropertyModule$2 = objectDefineProperty;
                            +var createPropertyDescriptor = createPropertyDescriptor$2;
                            +
                            +var createNonEnumerableProperty$2 = DESCRIPTORS$2 ? function (object, key, value) {
                            +  return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
                            +} : function (object, key, value) {
                            +  object[key] = value;
                            +  return object;
                            +};
                            +
                            +var createNonEnumerableProperty$3 = /*@__PURE__*/getDefaultExportFromCjs(createNonEnumerableProperty$2);
                            +
                            +var makeBuiltIn$3 = {exports: {}};
                            +
                            +'use strict';
                            +var DESCRIPTORS$1 = descriptors;
                            +var hasOwn$4 = hasOwnProperty_1;
                            +
                            +var FunctionPrototype = Function.prototype;
                            +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
                            +var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
                            +
                            +var EXISTS = hasOwn$4(FunctionPrototype, 'name');
                            +// additional protection from minified / mangled / dropped function names
                            +var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
                            +var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype, 'name').configurable));
                            +
                            +var functionName = {
                            +  EXISTS: EXISTS,
                            +  PROPER: PROPER,
                            +  CONFIGURABLE: CONFIGURABLE
                            +};
                            +
                            +var functionName$1 = /*@__PURE__*/getDefaultExportFromCjs(functionName);
                            +
                            +'use strict';
                            +var uncurryThis$5 = functionUncurryThis;
                            +var isCallable$5 = isCallable$b;
                            +var store$1 = sharedStore;
                            +
                            +var functionToString = uncurryThis$5(Function.toString);
                            +
                            +// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
                            +if (!isCallable$5(store$1.inspectSource)) {
                            +  store$1.inspectSource = function (it) {
                            +    return functionToString(it);
                            +  };
                            +}
                            +
                            +var inspectSource$1 = store$1.inspectSource;
                            +
                            +var inspectSource$2 = /*@__PURE__*/getDefaultExportFromCjs(inspectSource$1);
                            +
                            +'use strict';
                            +var global$6 = global$e;
                            +var isCallable$4 = isCallable$b;
                            +
                            +var WeakMap$1 = global$6.WeakMap;
                            +
                            +var weakMapBasicDetection = isCallable$4(WeakMap$1) && /native code/.test(String(WeakMap$1));
                            +
                            +var weakMapBasicDetection$1 = /*@__PURE__*/getDefaultExportFromCjs(weakMapBasicDetection);
                            +
                            +'use strict';
                            +var shared$1 = sharedExports;
                            +var uid = uid$2;
                            +
                            +var keys = shared$1('keys');
                            +
                            +var sharedKey$1 = function (key) {
                            +  return keys[key] || (keys[key] = uid(key));
                            +};
                            +
                            +var sharedKey$2 = /*@__PURE__*/getDefaultExportFromCjs(sharedKey$1);
                            +
                            +'use strict';
                            +var hiddenKeys$3 = {};
                            +
                            +var hiddenKeys$4 = /*@__PURE__*/getDefaultExportFromCjs(hiddenKeys$3);
                            +
                            +'use strict';
                            +var NATIVE_WEAK_MAP = weakMapBasicDetection;
                            +var global$5 = global$e;
                            +var isObject = isObject$5;
                            +var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
                            +var hasOwn$3 = hasOwnProperty_1;
                            +var shared = sharedStore;
                            +var sharedKey = sharedKey$1;
                            +var hiddenKeys$2 = hiddenKeys$3;
                            +
                            +var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
                            +var TypeError$1 = global$5.TypeError;
                            +var WeakMap = global$5.WeakMap;
                            +var set, get$1, has;
                            +
                            +var enforce = function (it) {
                            +  return has(it) ? get$1(it) : set(it, {});
                            +};
                            +
                            +var getterFor = function (TYPE) {
                            +  return function (it) {
                            +    var state;
                            +    if (!isObject(it) || (state = get$1(it)).type !== TYPE) {
                            +      throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
                            +    } return state;
                            +  };
                            +};
                            +
                            +if (NATIVE_WEAK_MAP || shared.state) {
                            +  var store = shared.state || (shared.state = new WeakMap());
                            +  /* eslint-disable no-self-assign -- prototype methods protection */
                            +  store.get = store.get;
                            +  store.has = store.has;
                            +  store.set = store.set;
                            +  /* eslint-enable no-self-assign -- prototype methods protection */
                            +  set = function (it, metadata) {
                            +    if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
                            +    metadata.facade = it;
                            +    store.set(it, metadata);
                            +    return metadata;
                            +  };
                            +  get$1 = function (it) {
                            +    return store.get(it) || {};
                            +  };
                            +  has = function (it) {
                            +    return store.has(it);
                            +  };
                            +} else {
                            +  var STATE = sharedKey('state');
                            +  hiddenKeys$2[STATE] = true;
                            +  set = function (it, metadata) {
                            +    if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
                            +    metadata.facade = it;
                            +    createNonEnumerableProperty$1(it, STATE, metadata);
                            +    return metadata;
                            +  };
                            +  get$1 = function (it) {
                            +    return hasOwn$3(it, STATE) ? it[STATE] : {};
                            +  };
                            +  has = function (it) {
                            +    return hasOwn$3(it, STATE);
                            +  };
                            +}
                            +
                            +var internalState = {
                            +  set: set,
                            +  get: get$1,
                            +  has: has,
                            +  enforce: enforce,
                            +  getterFor: getterFor
                            +};
                            +
                            +var internalState$1 = /*@__PURE__*/getDefaultExportFromCjs(internalState);
                            +
                            +var makeBuiltIn_1 = makeBuiltIn$3.exports;
                            +
                            +'use strict';
                            +var uncurryThis$4 = functionUncurryThis;
                            +var fails$2 = fails$9;
                            +var isCallable$3 = isCallable$b;
                            +var hasOwn$2 = hasOwnProperty_1;
                            +var DESCRIPTORS = descriptors;
                            +var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
                            +var inspectSource = inspectSource$1;
                            +var InternalStateModule = internalState;
                            +
                            +var enforceInternalState = InternalStateModule.enforce;
                            +var getInternalState = InternalStateModule.get;
                            +var $String$1 = String;
                            +// eslint-disable-next-line es/no-object-defineproperty -- safe
                            +var defineProperty = Object.defineProperty;
                            +var stringSlice = uncurryThis$4(''.slice);
                            +var replace$1 = uncurryThis$4(''.replace);
                            +var join = uncurryThis$4([].join);
                            +
                            +var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails$2(function () {
                            +  return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
                            +});
                            +
                            +var TEMPLATE = String(String).split('String');
                            +
                            +var makeBuiltIn$1 = makeBuiltIn$3.exports = function (value, name, options) {
                            +  if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
                            +    name = '[' + replace$1($String$1(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
                            +  }
                            +  if (options && options.getter) name = 'get ' + name;
                            +  if (options && options.setter) name = 'set ' + name;
                            +  if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
                            +    if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
                            +    else value.name = name;
                            +  }
                            +  if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
                            +    defineProperty(value, 'length', { value: options.arity });
                            +  }
                            +  try {
                            +    if (options && hasOwn$2(options, 'constructor') && options.constructor) {
                            +      if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
                            +    // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
                            +    } else if (value.prototype) value.prototype = undefined;
                            +  } catch (error) { /* empty */ }
                            +  var state = enforceInternalState(value);
                            +  if (!hasOwn$2(state, 'source')) {
                            +    state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
                            +  } return value;
                            +};
                            +
                            +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
                            +// eslint-disable-next-line no-extend-native -- required
                            +Function.prototype.toString = makeBuiltIn$1(function toString() {
                            +  return isCallable$3(this) && getInternalState(this).source || inspectSource(this);
                            +}, 'toString');
                            +
                            +var makeBuiltInExports = makeBuiltIn$3.exports;
                            +var makeBuiltIn$2 = /*@__PURE__*/getDefaultExportFromCjs(makeBuiltInExports);
                            +
                            +'use strict';
                            +var isCallable$2 = isCallable$b;
                            +var definePropertyModule$1 = objectDefineProperty;
                            +var makeBuiltIn = makeBuiltInExports;
                            +var defineGlobalProperty$1 = defineGlobalProperty$3;
                            +
                            +var defineBuiltIn$1 = function (O, key, value, options) {
                            +  if (!options) options = {};
                            +  var simple = options.enumerable;
                            +  var name = options.name !== undefined ? options.name : key;
                            +  if (isCallable$2(value)) makeBuiltIn(value, name, options);
                            +  if (options.global) {
                            +    if (simple) O[key] = value;
                            +    else defineGlobalProperty$1(key, value);
                            +  } else {
                            +    try {
                            +      if (!options.unsafe) delete O[key];
                            +      else if (O[key]) simple = true;
                            +    } catch (error) { /* empty */ }
                            +    if (simple) O[key] = value;
                            +    else definePropertyModule$1.f(O, key, {
                            +      value: value,
                            +      enumerable: false,
                            +      configurable: !options.nonConfigurable,
                            +      writable: !options.nonWritable
                            +    });
                            +  } return O;
                            +};
                            +
                            +var defineBuiltIn$2 = /*@__PURE__*/getDefaultExportFromCjs(defineBuiltIn$1);
                            +
                            +var objectGetOwnPropertyNames = {};
                            +
                            +'use strict';
                            +var ceil = Math.ceil;
                            +var floor = Math.floor;
                            +
                            +// `Math.trunc` method
                            +// https://tc39.es/ecma262/#sec-math.trunc
                            +// eslint-disable-next-line es/no-math-trunc -- safe
                            +var mathTrunc = Math.trunc || function trunc(x) {
                            +  var n = +x;
                            +  return (n > 0 ? floor : ceil)(n);
                            +};
                            +
                            +var mathTrunc$1 = /*@__PURE__*/getDefaultExportFromCjs(mathTrunc);
                            +
                            +'use strict';
                            +var trunc = mathTrunc;
                            +
                            +// `ToIntegerOrInfinity` abstract operation
                            +// https://tc39.es/ecma262/#sec-tointegerorinfinity
                            +var toIntegerOrInfinity$2 = function (argument) {
                            +  var number = +argument;
                            +  // eslint-disable-next-line no-self-compare -- NaN check
                            +  return number !== number || number === 0 ? 0 : trunc(number);
                            +};
                            +
                            +var toIntegerOrInfinity$3 = /*@__PURE__*/getDefaultExportFromCjs(toIntegerOrInfinity$2);
                            +
                            +'use strict';
                            +var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
                            +
                            +var max = Math.max;
                            +var min$1 = Math.min;
                            +
                            +// Helper for a popular repeating case of the spec:
                            +// Let integer be ? ToInteger(index).
                            +// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
                            +var toAbsoluteIndex$1 = function (index, length) {
                            +  var integer = toIntegerOrInfinity$1(index);
                            +  return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
                            +};
                            +
                            +var toAbsoluteIndex$2 = /*@__PURE__*/getDefaultExportFromCjs(toAbsoluteIndex$1);
                            +
                            +'use strict';
                            +var toIntegerOrInfinity = toIntegerOrInfinity$2;
                            +
                            +var min = Math.min;
                            +
                            +// `ToLength` abstract operation
                            +// https://tc39.es/ecma262/#sec-tolength
                            +var toLength$1 = function (argument) {
                            +  return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
                            +};
                            +
                            +var toLength$2 = /*@__PURE__*/getDefaultExportFromCjs(toLength$1);
                            +
                            +'use strict';
                            +var toLength = toLength$1;
                            +
                            +// `LengthOfArrayLike` abstract operation
                            +// https://tc39.es/ecma262/#sec-lengthofarraylike
                            +var lengthOfArrayLike$1 = function (obj) {
                            +  return toLength(obj.length);
                            +};
                            +
                            +var lengthOfArrayLike$2 = /*@__PURE__*/getDefaultExportFromCjs(lengthOfArrayLike$1);
                            +
                            +'use strict';
                            +var toIndexedObject$1 = toIndexedObject$3;
                            +var toAbsoluteIndex = toAbsoluteIndex$1;
                            +var lengthOfArrayLike = lengthOfArrayLike$1;
                            +
                            +// `Array.prototype.{ indexOf, includes }` methods implementation
                            +var createMethod$1 = function (IS_INCLUDES) {
                            +  return function ($this, el, fromIndex) {
                            +    var O = toIndexedObject$1($this);
                            +    var length = lengthOfArrayLike(O);
                            +    var index = toAbsoluteIndex(fromIndex, length);
                            +    var value;
                            +    // Array#includes uses SameValueZero equality algorithm
                            +    // eslint-disable-next-line no-self-compare -- NaN check
                            +    if (IS_INCLUDES && el !== el) while (length > index) {
                            +      value = O[index++];
                            +      // eslint-disable-next-line no-self-compare -- NaN check
                            +      if (value !== value) return true;
                            +    // Array#indexOf ignores holes, Array#includes - not
                            +    } else for (;length > index; index++) {
                            +      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
                            +    } return !IS_INCLUDES && -1;
                            +  };
                            +};
                            +
                            +var arrayIncludes = {
                            +  // `Array.prototype.includes` method
                            +  // https://tc39.es/ecma262/#sec-array.prototype.includes
                            +  includes: createMethod$1(true),
                            +  // `Array.prototype.indexOf` method
                            +  // https://tc39.es/ecma262/#sec-array.prototype.indexof
                            +  indexOf: createMethod$1(false)
                            +};
                            +
                            +var arrayIncludes$1 = /*@__PURE__*/getDefaultExportFromCjs(arrayIncludes);
                            +
                            +'use strict';
                            +var uncurryThis$3 = functionUncurryThis;
                            +var hasOwn$1 = hasOwnProperty_1;
                            +var toIndexedObject = toIndexedObject$3;
                            +var indexOf = arrayIncludes.indexOf;
                            +var hiddenKeys$1 = hiddenKeys$3;
                            +
                            +var push = uncurryThis$3([].push);
                            +
                            +var objectKeysInternal = function (object, names) {
                            +  var O = toIndexedObject(object);
                            +  var i = 0;
                            +  var result = [];
                            +  var key;
                            +  for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
                            +  // Don't enum bug & hidden keys
                            +  while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
                            +    ~indexOf(result, key) || push(result, key);
                            +  }
                            +  return result;
                            +};
                            +
                            +var objectKeysInternal$1 = /*@__PURE__*/getDefaultExportFromCjs(objectKeysInternal);
                            +
                            +'use strict';
                            +// IE8- don't enum bug keys
                            +var enumBugKeys$1 = [
                            +  'constructor',
                            +  'hasOwnProperty',
                            +  'isPrototypeOf',
                            +  'propertyIsEnumerable',
                            +  'toLocaleString',
                            +  'toString',
                            +  'valueOf'
                            +];
                            +
                            +var enumBugKeys$2 = /*@__PURE__*/getDefaultExportFromCjs(enumBugKeys$1);
                            +
                            +'use strict';
                            +var internalObjectKeys = objectKeysInternal;
                            +var enumBugKeys = enumBugKeys$1;
                            +
                            +var hiddenKeys = enumBugKeys.concat('length', 'prototype');
                            +
                            +// `Object.getOwnPropertyNames` method
                            +// https://tc39.es/ecma262/#sec-object.getownpropertynames
                            +// eslint-disable-next-line es/no-object-getownpropertynames -- safe
                            +var f$1 = objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
                            +  return internalObjectKeys(O, hiddenKeys);
                            +};
                            +
                            +var objectGetOwnPropertySymbols = {};
                            +
                            +'use strict';
                            +// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
                            +var f = objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
                            +
                            +'use strict';
                            +var getBuiltIn = getBuiltIn$2;
                            +var uncurryThis$2 = functionUncurryThis;
                            +var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
                            +var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
                            +var anObject = anObject$2;
                            +
                            +var concat = uncurryThis$2([].concat);
                            +
                            +// all object keys, includes non-enumerable and symbols
                            +var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
                            +  var keys = getOwnPropertyNamesModule.f(anObject(it));
                            +  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
                            +  return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
                            +};
                            +
                            +var ownKeys$2 = /*@__PURE__*/getDefaultExportFromCjs(ownKeys$1);
                            +
                            +'use strict';
                            +var hasOwn = hasOwnProperty_1;
                            +var ownKeys = ownKeys$1;
                            +var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
                            +var definePropertyModule = objectDefineProperty;
                            +
                            +var copyConstructorProperties$1 = function (target, source, exceptions) {
                            +  var keys = ownKeys(source);
                            +  var defineProperty = definePropertyModule.f;
                            +  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
                            +  for (var i = 0; i < keys.length; i++) {
                            +    var key = keys[i];
                            +    if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
                            +      defineProperty(target, key, getOwnPropertyDescriptor(source, key));
                            +    }
                            +  }
                            +};
                            +
                            +var copyConstructorProperties$2 = /*@__PURE__*/getDefaultExportFromCjs(copyConstructorProperties$1);
                            +
                            +'use strict';
                            +var fails$1 = fails$9;
                            +var isCallable$1 = isCallable$b;
                            +
                            +var replacement = /#|\.prototype\./;
                            +
                            +var isForced$1 = function (feature, detection) {
                            +  var value = data$1[normalize$1(feature)];
                            +  return value === POLYFILL ? true
                            +    : value === NATIVE ? false
                            +    : isCallable$1(detection) ? fails$1(detection)
                            +    : !!detection;
                            +};
                            +
                            +var normalize$1 = isForced$1.normalize = function (string) {
                            +  return String(string).replace(replacement, '.').toLowerCase();
                            +};
                            +
                            +var data$1 = isForced$1.data = {};
                            +var NATIVE = isForced$1.NATIVE = 'N';
                            +var POLYFILL = isForced$1.POLYFILL = 'P';
                            +
                            +var isForced_1 = isForced$1;
                            +
                            +var isForced$2 = /*@__PURE__*/getDefaultExportFromCjs(isForced_1);
                            +
                            +'use strict';
                            +var global$4 = global$e;
                            +var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
                            +var createNonEnumerableProperty = createNonEnumerableProperty$2;
                            +var defineBuiltIn = defineBuiltIn$1;
                            +var defineGlobalProperty = defineGlobalProperty$3;
                            +var copyConstructorProperties = copyConstructorProperties$1;
                            +var isForced = isForced_1;
                            +
                            +/*
                            +  options.target         - name of the target object
                            +  options.global         - target is the global object
                            +  options.stat           - export as static methods of target
                            +  options.proto          - export as prototype methods of target
                            +  options.real           - real prototype method for the `pure` version
                            +  options.forced         - export even if the native feature is available
                            +  options.bind           - bind methods to the target, required for the `pure` version
                            +  options.wrap           - wrap constructors to preventing global pollution, required for the `pure` version
                            +  options.unsafe         - use the simple assignment of property instead of delete + defineProperty
                            +  options.sham           - add a flag to not completely full polyfills
                            +  options.enumerable     - export as enumerable property
                            +  options.dontCallGetSet - prevent calling a getter on target
                            +  options.name           - the .name of the function if it does not match the key
                            +*/
                            +var _export = function (options, source) {
                            +  var TARGET = options.target;
                            +  var GLOBAL = options.global;
                            +  var STATIC = options.stat;
                            +  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
                            +  if (GLOBAL) {
                            +    target = global$4;
                            +  } else if (STATIC) {
                            +    target = global$4[TARGET] || defineGlobalProperty(TARGET, {});
                            +  } else {
                            +    target = (global$4[TARGET] || {}).prototype;
                            +  }
                            +  if (target) for (key in source) {
                            +    sourceProperty = source[key];
                            +    if (options.dontCallGetSet) {
                            +      descriptor = getOwnPropertyDescriptor(target, key);
                            +      targetProperty = descriptor && descriptor.value;
                            +    } else targetProperty = target[key];
                            +    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
                            +    // contained in target
                            +    if (!FORCED && targetProperty !== undefined) {
                            +      if (typeof sourceProperty == typeof targetProperty) continue;
                            +      copyConstructorProperties(sourceProperty, targetProperty);
                            +    }
                            +    // add a flag to not completely full polyfills
                            +    if (options.sham || (targetProperty && targetProperty.sham)) {
                            +      createNonEnumerableProperty(sourceProperty, 'sham', true);
                            +    }
                            +    defineBuiltIn(target, key, sourceProperty, options);
                            +  }
                            +};
                            +
                            +var _export$1 = /*@__PURE__*/getDefaultExportFromCjs(_export);
                            +
                            +'use strict';
                            +var $$4 = _export;
                            +var global$3 = global$e;
                            +
                            +// `globalThis` object
                            +// https://tc39.es/ecma262/#sec-globalthis
                            +$$4({ global: true, forced: global$3.globalThis !== global$3 }, {
                            +  globalThis: global$3
                            +});
                            +
                            +'use strict';
                            +
                            +'use strict';
                            +// https://github.com/tc39/proposal-global
                            +
                            +var global$2 = global$e;
                            +
                            +var globalThis$1 = global$2;
                            +
                            +var globalThis$2 = /*@__PURE__*/getDefaultExportFromCjs(globalThis$1);
                            +
                            +var es_string_trimStart = {};
                            +
                            +var es_string_trimLeft = {};
                            +
                            +'use strict';
                            +var wellKnownSymbol$1 = wellKnownSymbol$3;
                            +
                            +var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
                            +var test = {};
                            +
                            +test[TO_STRING_TAG$1] = 'z';
                            +
                            +var toStringTagSupport = String(test) === '[object z]';
                            +
                            +var toStringTagSupport$1 = /*@__PURE__*/getDefaultExportFromCjs(toStringTagSupport);
                            +
                            +'use strict';
                            +var TO_STRING_TAG_SUPPORT = toStringTagSupport;
                            +var isCallable = isCallable$b;
                            +var classofRaw = classofRaw$1;
                            +var wellKnownSymbol = wellKnownSymbol$3;
                            +
                            +var TO_STRING_TAG = wellKnownSymbol('toStringTag');
                            +var $Object = Object;
                            +
                            +// ES3 wrong here
                            +var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
                            +
                            +// fallback for IE11 Script Access Denied error
                            +var tryGet = function (it, key) {
                            +  try {
                            +    return it[key];
                            +  } catch (error) { /* empty */ }
                            +};
                            +
                            +// getting tag from ES6+ `Object.prototype.toString`
                            +var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
                            +  var O, tag, result;
                            +  return it === undefined ? 'Undefined' : it === null ? 'Null'
                            +    // @@toStringTag case
                            +    : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
                            +    // builtinTag case
                            +    : CORRECT_ARGUMENTS ? classofRaw(O)
                            +    // ES3 arguments fallback
                            +    : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
                            +};
                            +
                            +var classof$2 = /*@__PURE__*/getDefaultExportFromCjs(classof$1);
                            +
                            +'use strict';
                            +var classof = classof$1;
                            +
                            +var $String = String;
                            +
                            +var toString$2 = function (argument) {
                            +  if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
                            +  return $String(argument);
                            +};
                            +
                            +var toString$3 = /*@__PURE__*/getDefaultExportFromCjs(toString$2);
                            +
                            +'use strict';
                            +// a string of all valid unicode whitespaces
                            +var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
                            +  '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
                            +
                            +var whitespaces$3 = /*@__PURE__*/getDefaultExportFromCjs(whitespaces$2);
                            +
                            +'use strict';
                            +var uncurryThis$1 = functionUncurryThis;
                            +var requireObjectCoercible = requireObjectCoercible$3;
                            +var toString$1 = toString$2;
                            +var whitespaces$1 = whitespaces$2;
                            +
                            +var replace = uncurryThis$1(''.replace);
                            +var ltrim = RegExp('^[' + whitespaces$1 + ']+');
                            +var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
                            +
                            +// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
                            +var createMethod = function (TYPE) {
                            +  return function ($this) {
                            +    var string = toString$1(requireObjectCoercible($this));
                            +    if (TYPE & 1) string = replace(string, ltrim, '');
                            +    if (TYPE & 2) string = replace(string, rtrim, '$1');
                            +    return string;
                            +  };
                            +};
                            +
                            +var stringTrim = {
                            +  // `String.prototype.{ trimLeft, trimStart }` methods
                            +  // https://tc39.es/ecma262/#sec-string.prototype.trimstart
                            +  start: createMethod(1),
                            +  // `String.prototype.{ trimRight, trimEnd }` methods
                            +  // https://tc39.es/ecma262/#sec-string.prototype.trimend
                            +  end: createMethod(2),
                            +  // `String.prototype.trim` method
                            +  // https://tc39.es/ecma262/#sec-string.prototype.trim
                            +  trim: createMethod(3)
                            +};
                            +
                            +var stringTrim$1 = /*@__PURE__*/getDefaultExportFromCjs(stringTrim);
                            +
                            +'use strict';
                            +var PROPER_FUNCTION_NAME = functionName.PROPER;
                            +var fails = fails$9;
                            +var whitespaces = whitespaces$2;
                            +
                            +var non = '\u200B\u0085\u180E';
                            +
                            +// check that a method works with the correct list
                            +// of whitespaces and has a correct name
                            +var stringTrimForced = function (METHOD_NAME) {
                            +  return fails(function () {
                            +    return !!whitespaces[METHOD_NAME]()
                            +      || non[METHOD_NAME]() !== non
                            +      || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
                            +  });
                            +};
                            +
                            +var stringTrimForced$1 = /*@__PURE__*/getDefaultExportFromCjs(stringTrimForced);
                            +
                            +'use strict';
                            +var $trimStart = stringTrim.start;
                            +var forcedStringTrimMethod$1 = stringTrimForced;
                            +
                            +// `String.prototype.{ trimStart, trimLeft }` method
                            +// https://tc39.es/ecma262/#sec-string.prototype.trimstart
                            +// https://tc39.es/ecma262/#String.prototype.trimleft
                            +var stringTrimStart = forcedStringTrimMethod$1('trimStart') ? function trimStart() {
                            +  return $trimStart(this);
                            +// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
                            +} : ''.trimStart;
                            +
                            +var stringTrimStart$1 = /*@__PURE__*/getDefaultExportFromCjs(stringTrimStart);
                            +
                            +'use strict';
                            +var $$3 = _export;
                            +var trimStart$3 = stringTrimStart;
                            +
                            +// `String.prototype.trimLeft` method
                            +// https://tc39.es/ecma262/#sec-string.prototype.trimleft
                            +// eslint-disable-next-line es/no-string-prototype-trimleft-trimright -- safe
                            +$$3({ target: 'String', proto: true, name: 'trimStart', forced: ''.trimLeft !== trimStart$3 }, {
                            +  trimLeft: trimStart$3
                            +});
                            +
                            +'use strict';
                            +// TODO: Remove this line from `core-js@4`
                            +
                            +var $$2 = _export;
                            +var trimStart$2 = stringTrimStart;
                            +
                            +// `String.prototype.trimStart` method
                            +// https://tc39.es/ecma262/#sec-string.prototype.trimstart
                            +// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
                            +$$2({ target: 'String', proto: true, name: 'trimStart', forced: ''.trimStart !== trimStart$2 }, {
                            +  trimStart: trimStart$2
                            +});
                            +
                            +'use strict';
                            +var global$1 = global$e;
                            +var uncurryThis = functionUncurryThis;
                            +
                            +var entryUnbind$2 = function (CONSTRUCTOR, METHOD) {
                            +  return uncurryThis(global$1[CONSTRUCTOR].prototype[METHOD]);
                            +};
                            +
                            +var entryUnbind$3 = /*@__PURE__*/getDefaultExportFromCjs(entryUnbind$2);
                            +
                            +'use strict';
                            +
                            +var entryUnbind$1 = entryUnbind$2;
                            +
                            +var trimStart = entryUnbind$1('String', 'trimLeft');
                            +
                            +var trimStart$1 = /*@__PURE__*/getDefaultExportFromCjs(trimStart);
                            +
                            +var es_string_trimEnd = {};
                            +
                            +var es_string_trimRight = {};
                            +
                            +'use strict';
                            +var $trimEnd = stringTrim.end;
                            +var forcedStringTrimMethod = stringTrimForced;
                            +
                            +// `String.prototype.{ trimEnd, trimRight }` method
                            +// https://tc39.es/ecma262/#sec-string.prototype.trimend
                            +// https://tc39.es/ecma262/#String.prototype.trimright
                            +var stringTrimEnd = forcedStringTrimMethod('trimEnd') ? function trimEnd() {
                            +  return $trimEnd(this);
                            +// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
                            +} : ''.trimEnd;
                            +
                            +var stringTrimEnd$1 = /*@__PURE__*/getDefaultExportFromCjs(stringTrimEnd);
                            +
                            +'use strict';
                            +var $$1 = _export;
                            +var trimEnd$3 = stringTrimEnd;
                            +
                            +// `String.prototype.trimRight` method
                            +// https://tc39.es/ecma262/#sec-string.prototype.trimend
                            +// eslint-disable-next-line es/no-string-prototype-trimleft-trimright -- safe
                            +$$1({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimRight !== trimEnd$3 }, {
                            +  trimRight: trimEnd$3
                            +});
                            +
                            +'use strict';
                            +// TODO: Remove this line from `core-js@4`
                            +
                            +var $ = _export;
                            +var trimEnd$2 = stringTrimEnd;
                            +
                            +// `String.prototype.trimEnd` method
                            +// https://tc39.es/ecma262/#sec-string.prototype.trimend
                            +// eslint-disable-next-line es/no-string-prototype-trimstart-trimend -- safe
                            +$({ target: 'String', proto: true, name: 'trimEnd', forced: ''.trimEnd !== trimEnd$2 }, {
                            +  trimEnd: trimEnd$2
                            +});
                            +
                            +'use strict';
                            +
                            +var entryUnbind = entryUnbind$2;
                            +
                            +var trimEnd = entryUnbind('String', 'trimRight');
                            +
                            +var trimEnd$1 = /*@__PURE__*/getDefaultExportFromCjs(trimEnd);
                            +
                            +if (typeof globalThis !== "undefined") {
                            +    if (typeof globalThis.console === "undefined") {
                            +        globalThis.console = {};
                            +        globalThis.console.log = function() {};
                            +        globalThis.console.assert = function() {};
                            +        globalThis.console.warn = function() {};
                            +        globalThis.console.error = function() {
                            +            alert(Array.prototype.slice.call(arguments).join(", "));
                            +        };
                            +    }
                            +}
                            +
                            +/*
                            + * based on https://www.npmjs.com/package/canvas-roundrect-polyfill
                            + * @version 0.0.1
                            + */
                            +(() => {
                            +
                            +    "use strict";
                            +
                            +    /** @ignore */
                            +    function roundRect(x, y, w, h, radii) {
                            +
                            +        if (!([x, y, w, h].every((input) => Number.isFinite(input)))) {
                            +
                            +            return;
                            +
                            +        }
                            +
                            +        radii = parseRadiiArgument(radii);
                            +
                            +        let upperLeft, upperRight, lowerRight, lowerLeft;
                            +
                            +        if (radii.length === 4) {
                            +
                            +            upperLeft = toCornerPoint(radii[0]);
                            +            upperRight = toCornerPoint(radii[1]);
                            +            lowerRight = toCornerPoint(radii[2]);
                            +            lowerLeft = toCornerPoint(radii[3]);
                            +
                            +        } else if (radii.length === 3) {
                            +
                            +            upperLeft = toCornerPoint(radii[0]);
                            +            upperRight = toCornerPoint(radii[1]);
                            +            lowerLeft = toCornerPoint(radii[1]);
                            +            lowerRight = toCornerPoint(radii[2]);
                            +
                            +        } else if (radii.length === 2) {
                            +
                            +            upperLeft = toCornerPoint(radii[0]);
                            +            lowerRight = toCornerPoint(radii[0]);
                            +            upperRight = toCornerPoint(radii[1]);
                            +            lowerLeft = toCornerPoint(radii[1]);
                            +
                            +        } else if (radii.length === 1) {
                            +
                            +            upperLeft = toCornerPoint(radii[0]);
                            +            upperRight = toCornerPoint(radii[0]);
                            +            lowerRight = toCornerPoint(radii[0]);
                            +            lowerLeft = toCornerPoint(radii[0]);
                            +
                            +        } else {
                            +
                            +            throw new Error(radii.length + " is not a valid size for radii sequence.");
                            +
                            +        }
                            +
                            +        const corners = [upperLeft, upperRight, lowerRight, lowerLeft];
                            +        const negativeCorner = corners.find(({x, y}) => x < 0 || y < 0);
                            +        //const negativeValue = negativeCorner?.x < 0 ? negativeCorner.x : negativeCorner?.y
                            +
                            +        if (corners.some(({x, y}) => !Number.isFinite(x) || !Number.isFinite(y))) {
                            +
                            +            return;
                            +
                            +        }
                            +
                            +        if (negativeCorner) {
                            +
                            +            throw new Error("Radius value " + negativeCorner + " is negative.");
                            +
                            +        }
                            +
                            +        fixOverlappingCorners(corners);
                            +
                            +        if (w < 0 && h < 0) {
                            +
                            +            this.moveTo(x - upperLeft.x, y);
                            +            this.ellipse(x + w + upperRight.x, y - upperRight.y, upperRight.x, upperRight.y, 0, -Math.PI * 1.5, -Math.PI);
                            +            this.ellipse(x + w + lowerRight.x, y + h + lowerRight.y, lowerRight.x, lowerRight.y, 0, -Math.PI, -Math.PI / 2);
                            +            this.ellipse(x - lowerLeft.x, y + h + lowerLeft.y, lowerLeft.x, lowerLeft.y, 0, -Math.PI / 2, 0);
                            +            this.ellipse(x - upperLeft.x, y - upperLeft.y, upperLeft.x, upperLeft.y, 0, 0, -Math.PI / 2);
                            +
                            +        } else if (w < 0) {
                            +
                            +            this.moveTo(x - upperLeft.x, y);
                            +            this.ellipse(x + w + upperRight.x, y + upperRight.y, upperRight.x, upperRight.y, 0, -Math.PI / 2, -Math.PI, 1);
                            +            this.ellipse(x + w + lowerRight.x, y + h - lowerRight.y, lowerRight.x, lowerRight.y, 0, -Math.PI, -Math.PI * 1.5, 1);
                            +            this.ellipse(x - lowerLeft.x, y + h - lowerLeft.y, lowerLeft.x, lowerLeft.y, 0, Math.PI / 2, 0, 1);
                            +            this.ellipse(x - upperLeft.x, y + upperLeft.y, upperLeft.x, upperLeft.y, 0, 0, -Math.PI / 2, 1);
                            +
                            +        } else if (h < 0) {
                            +
                            +            this.moveTo(x + upperLeft.x, y);
                            +            this.ellipse(x + w - upperRight.x, y - upperRight.y, upperRight.x, upperRight.y, 0, Math.PI / 2, 0, 1);
                            +            this.ellipse(x + w - lowerRight.x, y + h + lowerRight.y, lowerRight.x, lowerRight.y, 0, 0, -Math.PI / 2, 1);
                            +            this.ellipse(x + lowerLeft.x, y + h + lowerLeft.y, lowerLeft.x, lowerLeft.y, 0, -Math.PI / 2, -Math.PI, 1);
                            +            this.ellipse(x + upperLeft.x, y - upperLeft.y, upperLeft.x, upperLeft.y, 0, -Math.PI, -Math.PI * 1.5, 1);
                            +
                            +        } else {
                            +
                            +            this.moveTo(x + upperLeft.x, y);
                            +            this.ellipse(x + w - upperRight.x, y + upperRight.y, upperRight.x, upperRight.y, 0, -Math.PI / 2, 0);
                            +            this.ellipse(x + w - lowerRight.x, y + h - lowerRight.y, lowerRight.x, lowerRight.y, 0, 0, Math.PI / 2);
                            +            this.ellipse(x + lowerLeft.x, y + h - lowerLeft.y, lowerLeft.x, lowerLeft.y, 0, Math.PI / 2, Math.PI);
                            +            this.ellipse(x + upperLeft.x, y + upperLeft.y, upperLeft.x, upperLeft.y, 0, Math.PI, Math.PI * 1.5);
                            +
                            +        }
                            +
                            +        this.closePath();
                            +        this.moveTo(x, y);
                            +
                            +        /** @ignore */
                            +        function toDOMPointInit(value) {
                            +
                            +            const {x, y, z, w} = value;
                            +            return {x, y, z, w};
                            +
                            +        }
                            +
                            +        /** @ignore */
                            +        function parseRadiiArgument(value) {
                            +
                            +            // https://webidl.spec.whatwg.org/#es-union
                            +            // with 'optional (unrestricted double or DOMPointInit
                            +            //   or sequence<(unrestricted double or DOMPointInit)>) radii = 0'
                            +            const type = typeof value;
                            +
                            +            if (type === "undefined" || value === null) {
                            +
                            +                return [0];
                            +
                            +            }
                            +            if (type === "function") {
                            +
                            +                return [NaN];
                            +
                            +            }
                            +            if (type === "object") {
                            +
                            +                if (typeof value[Symbol.iterator] === "function") {
                            +
                            +                    return [...value].map((elem) => {
                            +                        // https://webidl.spec.whatwg.org/#es-union
                            +                        // with '(unrestricted double or DOMPointInit)'
                            +                        const elemType = typeof elem;
                            +                        if (elemType === "undefined" || elem === null) {
                            +                            return 0;
                            +                        }
                            +                        if (elemType === "function") {
                            +                            return NaN;
                            +                        }
                            +                        if (elemType === "object") {
                            +                            return toDOMPointInit(elem);
                            +                        }
                            +                        return toUnrestrictedNumber(elem);
                            +                    });
                            +
                            +                }
                            +
                            +                return [toDOMPointInit(value)];
                            +
                            +            }
                            +
                            +            return [toUnrestrictedNumber(value)];
                            +
                            +        }
                            +
                            +        /** @ignore */
                            +        function toUnrestrictedNumber(value) {
                            +
                            +            return +value;
                            +
                            +        }
                            +
                            +        /** @ignore */
                            +        function toCornerPoint(value) {
                            +
                            +            const asNumber = toUnrestrictedNumber(value);
                            +            if (Number.isFinite(asNumber)) {
                            +
                            +                return {
                            +                    x: asNumber,
                            +                    y: asNumber
                            +                };
                            +
                            +            }
                            +            if (Object(value) === value) {
                            +
                            +                return {
                            +                    x: toUnrestrictedNumber(value.x || 0),
                            +                    y: toUnrestrictedNumber(value.y || 0)
                            +                };
                            +
                            +            }
                            +
                            +            return {
                            +                x: NaN,
                            +                y: NaN
                            +            };
                            +
                            +        }
                            +
                            +        /** @ignore */
                            +        function fixOverlappingCorners(corners) {
                            +            const [upperLeft, upperRight, lowerRight, lowerLeft] = corners;
                            +            const factors = [
                            +                Math.abs(w) / (upperLeft.x + upperRight.x),
                            +                Math.abs(h) / (upperRight.y + lowerRight.y),
                            +                Math.abs(w) / (lowerRight.x + lowerLeft.x),
                            +                Math.abs(h) / (upperLeft.y + lowerLeft.y)
                            +            ];
                            +            const minFactor = Math.min(...factors);
                            +            if (minFactor <= 1) {
                            +                corners.forEach((radii) => {
                            +                    radii.x *= minFactor;
                            +                    radii.y *= minFactor;
                            +                });
                            +            }
                            +        }
                            +    }
                            +
                            +    if (globalThis.CanvasRenderingContext2D) {
                            +        if (typeof globalThis.Path2D.prototype.roundRect === "undefined") {
                            +            globalThis.Path2D.prototype.roundRect = roundRect;
                            +        }
                            +    }
                            +    if (globalThis.CanvasRenderingContext2D) {
                            +        if (typeof globalThis.CanvasRenderingContext2D.prototype.roundRect === "undefined") {
                            +            globalThis.CanvasRenderingContext2D.prototype.roundRect = roundRect;
                            +        }
                            +    }
                            +    if (globalThis.OffscreenCanvasRenderingContext2D) {
                            +        if (typeof globalThis.OffscreenCanvasRenderingContext2D.prototype.roundRect === "undefined") {
                            +            globalThis.OffscreenCanvasRenderingContext2D.prototype.roundRect = roundRect;
                            +        }
                            +    }
                            +
                            +})();
                            +
                            +// https://github.com/melonjs/melonJS/issues/1092
                            +
                            +/**
                            + * a collection of math utility functions
                            + * @namespace Math
                            + */
                            +
                            +/**
                            + * constant to convert from degrees to radians
                            + * @public
                            + * @type {number}
                            + * @name DEG_TO_RAD
                            + * @memberof Math
                            + */
                            +const DEG_TO_RAD = Math.PI / 180.0;
                            +
                            +/**
                            + * constant to convert from radians to degrees
                            + * @public
                            + * @type {number}
                            + * @name RAD_TO_DEG
                            + * @memberof Math
                            + */
                            +const RAD_TO_DEG = 180.0 / Math.PI;
                            +
                            +/**
                            + * constant equals to 2 times pi
                            + * @public
                            + * @type {number}
                            + * @name TAU
                            + * @memberof Math
                            + */
                            +const TAU = Math.PI * 2;
                            +
                            +/**
                            + * constant equals to half pi
                            + * @public
                            + * @type {number}
                            + * @name ETA
                            + * @memberof Math
                            + */
                            +const ETA = Math.PI * 0.5;
                            +
                            +/**
                            + * the difference between 1 and the smallest floating point number greater than 1
                            + * @public
                            + * @type {number}
                            + * @name EPSILON
                            + * @memberof Math
                            + */
                            +const EPSILON = 0.000001;
                            +
                            +/**
                            + * returns true if the given value is a power of two
                            + * @public
                            + * @memberof Math
                            + * @name isPowerOfTwo
                            + * @param {number} val
                            + * @returns {boolean}
                            + */
                            +function isPowerOfTwo(val) {
                            +    return (val & (val - 1)) === 0;
                            +}
                            +
                            +/**
                            + * returns the next power of two for the given value
                            + * @public
                            + * @memberof Math
                            + * @name nextPowerOfTwo
                            + * @param {number} val
                            + * @returns {boolean}
                            + */
                            +function nextPowerOfTwo(val) {
                            +    val --;
                            +    val |= val >> 1;
                            +    val |= val >> 2;
                            +    val |= val >> 4;
                            +    val |= val >> 8;
                            +    val |= val >> 16;
                            +    val ++;
                            +    return val;
                            +}
                            +
                            +/**
                            + * Converts an angle in degrees to an angle in radians
                            + * @public
                            + * @memberof Math
                            + * @name degToRad
                            + * @param {number} angle - angle in degrees
                            + * @returns {number} corresponding angle in radians
                            + * @example
                            + * // convert a specific angle
                            + * me.Math.degToRad(60); // return 1.0471...
                            + */
                            +function degToRad(angle) {
                            +    return angle * DEG_TO_RAD;
                            +}
                            +
                            +/**
                            + * Converts an angle in radians to an angle in degrees.
                            + * @public
                            + * @memberof Math
                            + * @name radToDeg
                            + * @param {number} radians - angle in radians
                            + * @returns {number} corresponding angle in degrees
                            + * @example
                            + * // convert a specific angle
                            + * me.Math.radToDeg(1.0471975511965976); // return 60
                            + */
                            +function radToDeg(radians) {
                            +    return radians * RAD_TO_DEG;
                            +}
                            +
                            +/**
                            + * clamp the given value
                            + * @public
                            + * @memberof Math
                            + * @name clamp
                            + * @param {number} val - the value to clamp
                            + * @param {number} low - lower limit
                            + * @param {number} high - higher limit
                            + * @returns {number} clamped value
                            + */
                            +function clamp(val, low, high) {
                            +    return val < low ? low : val > high ? high : +val;
                            +}
                            +
                            +/**
                            + * return a random integer between min (included) and max (excluded)
                            + * @public
                            + * @memberof Math
                            + * @name random
                            + * @param {number} min - minimum value.
                            + * @param {number} max - maximum value.
                            + * @returns {number} random value
                            + * @example
                            + * // Print a random number; one of 5, 6, 7, 8, 9
                            + * console.log(me.Math.random(5, 10) );
                            + */
                            +function random$1(min, max) {
                            +    return (~~(Math.random() * (max - min)) + min);
                            +}
                            +
                            +/**
                            + * return a random float between min, max (exclusive)
                            + * @public
                            + * @memberof Math
                            + * @name randomFloat
                            + * @param {number} min - minimum value.
                            + * @param {number} max - maximum value.
                            + * @returns {number} random value
                            + * @example
                            + * // Print a random number; one of 5, 6, 7, 8, 9
                            + * console.log(me.Math.randomFloat(5, 10) );
                            + */
                            +function randomFloat(min, max) {
                            +    return (Math.random() * (max - min)) + min;
                            +}
                            +
                            +/**
                            + * return a weighted random between min, max (exclusive)
                            + * @public
                            + * @memberof Math
                            + * @name weightedRandom
                            + * @param {number} min - minimum value.
                            + * @param {number} max - maximum value.
                            + * @returns {number} random value
                            + * @example
                            + * // Print a random number; one of 5, 6, 7, 8, 9
                            + * console.log(me.Math.weightedRandom(5, 10) );
                            + */
                            +function weightedRandom$1(min, max) {
                            +    return (~~(Math.pow(Math.random(), 2) * (max - min)) + min);
                            +}
                            +
                            +/**
                            + * round a value to the specified number of digit
                            + * @public
                            + * @memberof Math
                            + * @name round
                            + * @param {number} num - value to be rounded.
                            + * @param {number} [dec=0] - number of decimal digit to be rounded to.
                            + * @returns {number} rounded value
                            + * @example
                            + * // round a specific value to 2 digits
                            + * me.Math.round(10.33333, 2); // return 10.33
                            + */
                            +function round(num, dec = 0) {
                            +    // if only one argument use the object value
                            +    const powres = Math.pow(10, dec);
                            +    return (~~(0.5 + num * powres) / powres);
                            +}
                            +
                            +/**
                            + * check if the given value is close to the expected one
                            + * @public
                            + * @memberof Math
                            + * @name toBeCloseTo
                            + * @param {number} expected - value to be compared with.
                            + * @param {number} actual - actual value to compare
                            + * @param {number} [precision=2] - float precision for the comparison
                            + * @returns {boolean} if close to
                            + * @example
                            + * // test if the given value is close to 10
                            + * if (me.Math.toBeCloseTo(10, value)) {
                            + *     // do something
                            + * }
                            + */
                            +function toBeCloseTo(expected, actual, precision = 2) {
                            +    return Math.abs(expected - actual) < (Math.pow(10, -precision) / 2);
                            +}
                            +
                            +var math = {
                            +	__proto__: null,
                            +	DEG_TO_RAD: DEG_TO_RAD,
                            +	EPSILON: EPSILON,
                            +	ETA: ETA,
                            +	RAD_TO_DEG: RAD_TO_DEG,
                            +	TAU: TAU,
                            +	clamp: clamp,
                            +	degToRad: degToRad,
                            +	isPowerOfTwo: isPowerOfTwo,
                            +	nextPowerOfTwo: nextPowerOfTwo,
                            +	radToDeg: radToDeg,
                            +	random: random$1,
                            +	randomFloat: randomFloat,
                            +	round: round,
                            +	toBeCloseTo: toBeCloseTo,
                            +	weightedRandom: weightedRandom$1
                            +};
                            +
                            +/**
                            + * @classdesc
                            + * Object pooling - a technique that might speed up your game if used properly.
                            + * If some of your classes will be instantiated and removed a lot at a time, it is a + * good idea to add the class to this object pool. A separate pool for that class + * will be created, which will reuse objects of the class. That way they won't be instantiated + * each time you need a new one (slowing your game), but stored into that pool and taking one + * already instantiated when you need it.

                            + * This technique is also used by the engine to instantiate objects defined in the map, + * which means, that on level loading the engine will try to instantiate every object + * found in the map, based on the user defined name in each Object Properties
                            + *
                            + * @see {@link pool} the default global instance of ObjectPool + */ +class ObjectPool { + + constructor() { + this.objectClass = {}; + this.instance_counter = 0; + } + + /** + * register an object to the pool.
                            + * Pooling must be set to true if more than one such objects will be created.
                            + * (Note: for an object to be poolable, it must implements a `onResetEvent` method) + * @param {string} className - as defined in the Name field of the Object Properties (in Tiled) + * @param {object} classObj - corresponding Class to be instantiated + * @param {boolean} [recycling=false] - enables object recycling for the specified class + * @example + * // implement CherryEntity + * class Cherry extends Sprite { + * onResetEvent() { + * // reset object mutable properties + * this.lifeBar = 100; + * } + * }; + * // add our users defined entities in the object pool and enable object recycling + * me.pool.register("cherrysprite", Cherry, true); + */ + register(className, classObj, recycling = false) { + if (typeof (classObj) !== "undefined") { + this.objectClass[className] = { + "class" : classObj, + "pool" : (recycling ? [] : undefined) + }; + } else { + throw new Error("Cannot register object '" + className + "', invalid class"); + } + } + + /** + * Pull a new instance of the requested object (if added into the object pool) + * @param {string} name - as used in {@link pool.register} + * @param {object} [...arguments] - arguments to be passed when instantiating/reinitializing the object + * @returns {object} the instance of the requested object + * @example + * me.pool.register("bullet", BulletEntity, true); + * me.pool.register("enemy", EnemyEntity, true); + * // ... + * // when we need to manually create a new bullet: + * let bullet = me.pool.pull("bullet", x, y, direction); + * // ... + * // params aren't a fixed number + * // when we need new enemy we can add more params, that the object construct requires: + * let enemy = me.pool.pull("enemy", x, y, direction, speed, power, life); + * // ... + * // when we want to destroy existing object, the remove + * // function will ensure the object can then be reallocated later + * me.game.world.removeChild(enemy); + * me.game.world.removeChild(bullet); + */ + pull(name, ...args) { + let className = this.objectClass[name]; + if (className) { + let proto = className["class"], + poolArray = className.pool, + obj; + + if (poolArray && ((obj = poolArray.pop()))) { + // poolable object must implement a `onResetEvent` method + obj.onResetEvent.apply(obj, args); + this.instance_counter--; + } else { + // create a new instance + obj = new (proto.bind.apply(proto, [ proto, ...args ]))(); + if (poolArray) { + obj.className = name; + } + } + return obj; + } + throw new Error("Cannot instantiate object of type '" + name + "'"); + } + + /** + * purge the object pool from any inactive object
                            + * Object pooling must be enabled for this function to work
                            + * note: this will trigger the garbage collector + */ + purge() { + for (let className in this.objectClass) { + if (this.objectClass[className]) { + this.objectClass[className].pool = []; + } + } + this.instance_counter = 0; + } + + /** + * Push back an object instance into the object pool
                            + * Object pooling for the object class must be enabled, + * and object must have been instantiated using {@link pool#pull}, + * otherwise this function won't work + * @throws will throw an error if the object cannot be recycled + * @param {object} obj - instance to be recycled + * @param {boolean} [throwOnError=true] - throw an exception if the object cannot be recycled + * @returns {boolean} true if the object was successfully recycled in the object pool + */ + push(obj, throwOnError = true) { + if (!this.poolable(obj)) { + if (throwOnError === true ) { + throw new Error("me.pool: object " + obj + " cannot be recycled"); + } else { + return false; + } + } + + // store back the object instance for later recycling + this.objectClass[obj.className].pool.push(obj); + this.instance_counter++; + + return true; + } + + /** + * Check if an object with the provided name is registered + * @param {string} name - of the registered object class + * @returns {boolean} true if the classname is registered + */ + exists(name) { + return name in this.objectClass; + } + + /** + * Check if an object is poolable + * (was properly registered with the recycling feature enable) + * @see register + * @param {object} obj - object to be checked + * @returns {boolean} true if the object is poolable + * @example + * if (!me.pool.poolable(myCherryEntity)) { + * // object was not properly registered + * } + */ + poolable(obj) { + let className = obj.className; + return (typeof className !== "undefined") && + (typeof obj.onResetEvent === "function") && + (className in this.objectClass) && + (typeof this.objectClass[className].pool !== "undefined"); + + } + + /** + * returns the amount of object instance currently in the pool + * @returns {number} amount of object instance + */ + getInstanceCount() { + return this.instance_counter; + } +} + +let pool = new ObjectPool(); + +// convert a give color component to it hexadecimal value +const charLookup = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; + +function toHex$1(component) { + return charLookup[(component & 0xF0) >> 4] + charLookup[component & 0x0F]; +} + +function hue2rgb(p, q, t) { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1/6) return p + (q - p) * 6 * t; + if (t < 1/2) return q; + if (t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; +} + +const rgbaRx = /^rgba?\((\d+), ?(\d+), ?(\d+)(, ?([\d\.]+))?\)$/; +const hex3Rx = /^#([\da-fA-F])([\da-fA-F])([\da-fA-F])$/; +const hex4Rx = /^#([\da-fA-F])([\da-fA-F])([\da-fA-F])([\da-fA-F])$/; +const hex6Rx = /^#([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})$/; +const hex8Rx = /^#([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})$/; + +let cssToRGB = new Map(); + +[ + // CSS1 + [ "black", [ 0, 0, 0 ] ], + [ "silver", [ 192, 192, 129 ] ], + [ "gray", [ 128, 128, 128 ] ], + [ "white", [ 255, 255, 255 ] ], + [ "maroon", [ 128, 0, 0 ] ], + [ "red", [ 255, 0, 0 ] ], + [ "purple", [ 128, 0, 128 ] ], + [ "fuchsia", [ 255, 0, 255 ] ], + [ "green", [ 0, 128, 0 ] ], + [ "lime", [ 0, 255, 0 ] ], + [ "olive", [ 128, 128, 0 ] ], + [ "yellow", [ 255, 255, 0 ] ], + [ "navy", [ 0, 0, 128 ] ], + [ "blue", [ 0, 0, 255 ] ], + [ "teal", [ 0, 128, 128 ] ], + [ "aqua", [ 0, 255, 255 ] ], + + // CSS2 + [ "orange", [ 255, 165, 0 ] ], + + // CSS3 + [ "aliceblue", [ 240, 248, 245 ] ], + [ "antiquewhite", [ 250, 235, 215 ] ], + [ "aquamarine", [ 127, 255, 212 ] ], + [ "azure", [ 240, 255, 255 ] ], + [ "beige", [ 245, 245, 220 ] ], + [ "bisque", [ 255, 228, 196 ] ], + [ "blanchedalmond", [ 255, 235, 205 ] ], + [ "blueviolet", [ 138, 43, 226 ] ], + [ "brown", [ 165, 42, 42 ] ], + [ "burlywood", [ 222, 184, 35 ] ], + [ "cadetblue", [ 95, 158, 160 ] ], + [ "chartreuse", [ 127, 255, 0 ] ], + [ "chocolate", [ 210, 105, 30 ] ], + [ "coral", [ 255, 127, 80 ] ], + [ "cornflowerblue", [ 100, 149, 237 ] ], + [ "cornsilk", [ 255, 248, 220 ] ], + [ "crimson", [ 220, 20, 60 ] ], + [ "darkblue", [ 0, 0, 139 ] ], + [ "darkcyan", [ 0, 139, 139 ] ], + [ "darkgoldenrod", [ 184, 134, 11 ] ], + [ "darkgray[*]", [ 169, 169, 169 ] ], + [ "darkgreen", [ 0, 100, 0 ] ], + [ "darkgrey[*]", [ 169, 169, 169 ] ], + [ "darkkhaki", [ 189, 183, 107 ] ], + [ "darkmagenta", [ 139, 0, 139 ] ], + [ "darkolivegreen", [ 85, 107, 47 ] ], + [ "darkorange", [ 255, 140, 0 ] ], + [ "darkorchid", [ 153, 50, 204 ] ], + [ "darkred", [ 139, 0, 0 ] ], + [ "darksalmon", [ 233, 150, 122 ] ], + [ "darkseagreen", [ 143, 188, 143 ] ], + [ "darkslateblue", [ 72, 61, 139 ] ], + [ "darkslategray", [ 47, 79, 79 ] ], + [ "darkslategrey", [ 47, 79, 79 ] ], + [ "darkturquoise", [ 0, 206, 209 ] ], + [ "darkviolet", [ 148, 0, 211 ] ], + [ "deeppink", [ 255, 20, 147 ] ], + [ "deepskyblue", [ 0, 191, 255 ] ], + [ "dimgray", [ 105, 105, 105 ] ], + [ "dimgrey", [ 105, 105, 105 ] ], + [ "dodgerblue", [ 30, 144, 255 ] ], + [ "firebrick", [ 178, 34, 34 ] ], + [ "floralwhite", [ 255, 250, 240 ] ], + [ "forestgreen", [ 34, 139, 34 ] ], + [ "gainsboro", [ 220, 220, 220 ] ], + [ "ghostwhite", [ 248, 248, 255 ] ], + [ "gold", [ 255, 215, 0 ] ], + [ "goldenrod", [ 218, 165, 32 ] ], + [ "greenyellow", [ 173, 255, 47 ] ], + [ "grey", [ 128, 128, 128 ] ], + [ "honeydew", [ 240, 255, 240 ] ], + [ "hotpink", [ 255, 105, 180 ] ], + [ "indianred", [ 205, 92, 92 ] ], + [ "indigo", [ 75, 0, 130 ] ], + [ "ivory", [ 255, 255, 240 ] ], + [ "khaki", [ 240, 230, 140 ] ], + [ "lavender", [ 230, 230, 250 ] ], + [ "lavenderblush", [ 255, 240, 245 ] ], + [ "lawngreen", [ 124, 252, 0 ] ], + [ "lemonchiffon", [ 255, 250, 205 ] ], + [ "lightblue", [ 173, 216, 230 ] ], + [ "lightcoral", [ 240, 128, 128 ] ], + [ "lightcyan", [ 224, 255, 255 ] ], + [ "lightgoldenrodyellow", [ 250, 250, 210 ] ], + [ "lightgray", [ 211, 211, 211 ] ], + [ "lightgreen", [ 144, 238, 144 ] ], + [ "lightgrey", [ 211, 211, 211 ] ], + [ "lightpink", [ 255, 182, 193 ] ], + [ "lightsalmon", [ 255, 160, 122 ] ], + [ "lightseagreen", [ 32, 178, 170 ] ], + [ "lightskyblue", [ 135, 206, 250 ] ], + [ "lightslategray", [ 119, 136, 153 ] ], + [ "lightslategrey", [ 119, 136, 153 ] ], + [ "lightsteelblue", [ 176, 196, 222 ] ], + [ "lightyellow", [ 255, 255, 224 ] ], + [ "limegreen", [ 50, 205, 50 ] ], + [ "linen", [ 250, 240, 230 ] ], + [ "mediumaquamarine", [ 102, 205, 170 ] ], + [ "mediumblue", [ 0, 0, 205 ] ], + [ "mediumorchid", [ 186, 85, 211 ] ], + [ "mediumpurple", [ 147, 112, 219 ] ], + [ "mediumseagreen", [ 60, 179, 113 ] ], + [ "mediumslateblue", [ 123, 104, 238 ] ], + [ "mediumspringgreen", [ 0, 250, 154 ] ], + [ "mediumturquoise", [ 72, 209, 204 ] ], + [ "mediumvioletred", [ 199, 21, 133 ] ], + [ "midnightblue", [ 25, 25, 112 ] ], + [ "mintcream", [ 245, 255, 250 ] ], + [ "mistyrose", [ 255, 228, 225 ] ], + [ "moccasin", [ 255, 228, 181 ] ], + [ "navajowhite", [ 255, 222, 173 ] ], + [ "oldlace", [ 253, 245, 230 ] ], + [ "olivedrab", [ 107, 142, 35 ] ], + [ "orangered", [ 255, 69, 0 ] ], + [ "orchid", [ 218, 112, 214 ] ], + [ "palegoldenrod", [ 238, 232, 170 ] ], + [ "palegreen", [ 152, 251, 152 ] ], + [ "paleturquoise", [ 175, 238, 238 ] ], + [ "palevioletred", [ 219, 112, 147 ] ], + [ "papayawhip", [ 255, 239, 213 ] ], + [ "peachpuff", [ 255, 218, 185 ] ], + [ "peru", [ 205, 133, 63 ] ], + [ "pink", [ 255, 192, 203 ] ], + [ "plum", [ 221, 160, 221 ] ], + [ "powderblue", [ 176, 224, 230 ] ], + [ "rosybrown", [ 188, 143, 143 ] ], + [ "royalblue", [ 65, 105, 225 ] ], + [ "saddlebrown", [ 139, 69, 19 ] ], + [ "salmon", [ 250, 128, 114 ] ], + [ "sandybrown", [ 244, 164, 96 ] ], + [ "seagreen", [ 46, 139, 87 ] ], + [ "seashell", [ 255, 245, 238 ] ], + [ "sienna", [ 160, 82, 45 ] ], + [ "skyblue", [ 135, 206, 235 ] ], + [ "slateblue", [ 106, 90, 205 ] ], + [ "slategray", [ 112, 128, 144 ] ], + [ "slategrey", [ 112, 128, 144 ] ], + [ "snow", [ 255, 250, 250 ] ], + [ "springgreen", [ 0, 255, 127 ] ], + [ "steelblue", [ 70, 130, 180 ] ], + [ "tan", [ 210, 180, 140 ] ], + [ "thistle", [ 216, 191, 216 ] ], + [ "tomato", [ 255, 99, 71 ] ], + [ "turquoise", [ 64, 224, 208 ] ], + [ "violet", [ 238, 130, 238 ] ], + [ "wheat", [ 245, 222, 179 ] ], + [ "whitesmoke", [ 245, 245, 245 ] ], + [ "yellowgreen", [ 154, 205, 50 ] ] +].forEach((value) => { + cssToRGB.set(value[0], value[1]); +}); + +/** + * @classdesc + * A color manipulation object. + */ +class Color { + + /** + * @param {number} [r=0] - red component [0 .. 255] + * @param {number} [g=0] - green component [0 .. 255] + * @param {number} [b=0] - blue component [0 .. 255] + * @param {number} [alpha=1.0] - alpha value [0.0 .. 1.0] + */ + constructor(r = 0, g = 0, b = 0, alpha = 1.0) { + this.onResetEvent(r, g, b, alpha); + } + + /** + * @ignore + */ + onResetEvent(r = 0, g = 0, b = 0, alpha = 1.0) { + if (typeof this.glArray === "undefined") { + // Color components in a Float32Array suitable for WebGL + this.glArray = new Float32Array([ 0.0, 0.0, 0.0, 1.0 ]); + } + this.setColor(r, g, b, alpha); + } + + /** + * Color Red Component [0 .. 255] + * @type {number} + */ + get r() { + return ~~(this.glArray[0] * 255); + } + + set r(value) { + this.glArray[0] = clamp(~~value || 0, 0, 255) / 255.0; + } + + + /** + * Color Green Component [0 .. 255] + * @type {number} + */ + get g() { + return ~~(this.glArray[1] * 255); + } + + set g(value) { + this.glArray[1] = clamp(~~value || 0, 0, 255) / 255.0; + } + + + /** + * Color Blue Component [0 .. 255] + * @type {number} + */ + get b() { + return ~~(this.glArray[2] * 255); + } + set b(value) { + this.glArray[2] = clamp(~~value || 0, 0, 255) / 255.0; + } + + /** + * Color Alpha Component [0.0 .. 1.0] + * @type {number} + */ + get alpha() { + return this.glArray[3]; + } + + set alpha(value = 1.0) { + this.glArray[3] = clamp(+value, 0, 1.0); + } + + /** + * Set this color to the specified value. + * @param {number} r - red component [0 .. 255] + * @param {number} g - green component [0 .. 255] + * @param {number} b - blue component [0 .. 255] + * @param {number} [alpha=1.0] - alpha value [0.0 .. 1.0] + * @returns {Color} Reference to this object for method chaining + */ + setColor(r, g, b, alpha = 1.0) { + this.r = r; + this.g = g; + this.b = b; + this.alpha = alpha; + return this; + } + + /** + * set this color to the specified normalized float values + * @param {number} r - red component [0.0 .. 1.0] + * @param {number} g - green component [0.0 .. 1.0] + * @param {number} b - blue component [0.0 .. 1.0] + * @param {number} [alpha=1.0] - alpha value [0.0 .. 1.0] + * @returns {Color} Reference to this object for method chaining + */ + setFloat(r, g, b, alpha = 1.0) { + const a = this.glArray; + a[0] = clamp(+r, 0, 1.0); + a[1] = clamp(+g, 0, 1.0); + a[2] = clamp(+b, 0, 1.0); + a[3] = clamp(+alpha, 0, 1.0); + return this; + } + + /** + * set this color to the specified HSV value + * @param {number} h - hue (a value from 0 to 1) + * @param {number} s - saturation (a value from 0 to 1) + * @param {number} v - value (a value from 0 to 1) + * @returns {Color} Reference to this object for method chaining + */ + setHSV(h, s, v) { + let r, g, b; + + let i = Math.floor(h * 6); + let f = h * 6 - i; + let p = v * (1 - s); + let q = v * (1 - f * s); + let t = v * (1 - (1 - f) * s); + + switch (i % 6) { + case 0: r = v, g = t, b = p; break; + case 1: r = q, g = v, b = p; break; + case 2: r = p, g = v, b = t; break; + case 3: r = p, g = q, b = v; break; + case 4: r = t, g = p, b = v; break; + case 5: r = v, g = p, b = q; break; + } + return this.setColor(r * 255, g * 255, b * 255); + } + + /** + * set this color to the specified HSL value + * @param {number} h - hue (a value from 0 to 1) + * @param {number} s - saturation (a value from 0 to 1) + * @param {number} l - lightness (a value from 0 to 1) + * @returns {Color} Reference to this object for method chaining + */ + setHSL(h, s, l) { + let r, g, b; + + if (s === 0) { + r = g = b = l; // achromatic + } else { + let q = l < 0.5 ? l * (1 + s) : l + s - l * s; + let p = 2 * l - q; + + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + + return this.setColor(r * 255, g * 255, b * 255); + } + + /** + * Create a new copy of this color object. + * @returns {Color} Reference to the newly cloned object + */ + clone() { + return pool.pull("Color").copy(this); + } + + /** + * Copy a color object or CSS color into this one. + * @param {Color|string} color + * @returns {Color} Reference to this object for method chaining + */ + copy(color) { + if (typeof color === "string") { + return this.parseCSS(color); + } else { + this.glArray.set(color.glArray); + return this; + } + } + + /** + * Blend this color with the given one using addition. + * @param {Color} color + * @returns {Color} Reference to this object for method chaining + */ + add(color) { + this.glArray[0] = clamp(this.glArray[0] + color.glArray[0], 0, 1); + this.glArray[1] = clamp(this.glArray[1] + color.glArray[1], 0, 1); + this.glArray[2] = clamp(this.glArray[2] + color.glArray[2], 0, 1); + this.glArray[3] = (this.glArray[3] + color.glArray[3]) / 2; + + return this; + } + + /** + * Darken this color value by 0..1 + * @param {number} scale + * @returns {Color} Reference to this object for method chaining + */ + darken(scale) { + scale = clamp(scale, 0, 1); + this.glArray[0] *= scale; + this.glArray[1] *= scale; + this.glArray[2] *= scale; + + return this; + } + + /** + * Linearly interpolate between this color and the given one. + * @param {Color} color + * @param {number} alpha - with alpha = 0 being this color, and alpha = 1 being the given one. + * @returns {Color} Reference to this object for method chaining + */ + lerp(color, alpha) { + alpha = clamp(alpha, 0, 1); + this.glArray[0] += (color.glArray[0] - this.glArray[0]) * alpha; + this.glArray[1] += (color.glArray[1] - this.glArray[1]) * alpha; + this.glArray[2] += (color.glArray[2] - this.glArray[2]) * alpha; + + return this; + } + + /** + * Lighten this color value by 0..1 + * @param {number} scale + * @returns {Color} Reference to this object for method chaining + */ + lighten(scale) { + scale = clamp(scale, 0, 1); + this.glArray[0] = clamp(this.glArray[0] + (1 - this.glArray[0]) * scale, 0, 1); + this.glArray[1] = clamp(this.glArray[1] + (1 - this.glArray[1]) * scale, 0, 1); + this.glArray[2] = clamp(this.glArray[2] + (1 - this.glArray[2]) * scale, 0, 1); + + return this; + } + + /** + * Generate random r,g,b values for this color object + * @param {number} [min=0] - minimum value for the random range + * @param {number} [max=255] - maxmium value for the random range + * @returns {Color} Reference to this object for method chaining + */ + random(min = 0, max = 255) { + if (min < 0) { + min = 0; + } + if (max > 255) { + max = 255; + } + + return this.setColor( + random$1(min, max), + random$1(min, max), + random$1(min, max), + this.alpha + ); + } + + /** + * Return true if the r,g,b,a values of this color are equal with the + * given one. + * @param {Color} color + * @returns {boolean} + */ + equals(color) { + return ( + (this.glArray[0] === color.glArray[0]) && + (this.glArray[1] === color.glArray[1]) && + (this.glArray[2] === color.glArray[2]) && + (this.glArray[3] === color.glArray[3]) + ); + } + + /** + * Parse a CSS color string and set this color to the corresponding + * r,g,b values + * @param {string} cssColor + * @returns {Color} Reference to this object for method chaining + */ + parseCSS(cssColor) { + // TODO : Memoize this function by caching its input + + if (cssToRGB.has(cssColor)) { + return this.setColor.apply(this, cssToRGB.get(cssColor)); + } + + return this.parseRGB(cssColor); + } + + /** + * Parse an RGB or RGBA CSS color string + * @param {string} rgbColor + * @returns {Color} Reference to this object for method chaining + */ + parseRGB(rgbColor) { + // TODO : Memoize this function by caching its input + + let match = rgbaRx.exec(rgbColor); + if (match) { + return this.setColor(+match[1], +match[2], +match[3], +match[5]); + } + + return this.parseHex(rgbColor); + } + + /** + * Parse a Hex color ("#RGB", "#RGBA" or "#RRGGBB", "#RRGGBBAA" format) and set this color to + * the corresponding r,g,b,a values + * @param {string} hexColor + * @param {boolean} [argb = false] - true if format is #ARGB, or #AARRGGBB (as opposed to #RGBA or #RGGBBAA) + * @returns {Color} Reference to this object for method chaining + */ + parseHex(hexColor, argb = false) { + // TODO : Memoize this function by caching its input + + let match; + if ((match = hex8Rx.exec(hexColor))) { + // #AARRGGBB or #RRGGBBAA + return this.setColor( + parseInt(match[argb === false ? 1 : 2], 16), // r + parseInt(match[argb === false ? 2 : 3], 16), // g + parseInt(match[argb === false ? 3 : 4], 16), // b + (clamp(parseInt(match[argb === false ? 4 : 1], 16), 0, 255) / 255.0).toFixed(1) // a + ); + } + + if ((match = hex6Rx.exec(hexColor))) { + // #RRGGBB + return this.setColor( + parseInt(match[1], 16), + parseInt(match[2], 16), + parseInt(match[3], 16) + ); + } + + if ((match = hex4Rx.exec(hexColor))) { + // #ARGB or #RGBA + let r = match[argb === false ? 1 : 2]; + let g = match[argb === false ? 2 : 3]; + let b = match[argb === false ? 3 : 4]; + let a = match[argb === false ? 4 : 1]; + return this.setColor( + parseInt(r + r, 16), // r + parseInt(g + g, 16), // g + parseInt(b + b, 16), // b + (clamp(parseInt(a + a, 16), 0, 255) / 255.0).toFixed(1) // a + ); + } + + if ((match = hex3Rx.exec(hexColor))) { + // #RGB + return this.setColor( + parseInt(match[1] + match[1], 16), + parseInt(match[2] + match[2], 16), + parseInt(match[3] + match[3], 16) + ); + } + + throw new Error( + "invalid parameter: " + hexColor + ); + } + + /** + * Pack this color RGB components into a Uint32 ARGB representation + * @param {number} [alpha=1.0] - alpha value [0.0 .. 1.0] + * @returns {number} + */ + toUint32(alpha = 1.0) { + const a = this.glArray; + + const ur = (a[0] * 255) >> 0; + const ug = (a[1] * 255) >> 0; + const ub = (a[2] * 255) >> 0; + + return (((alpha * 255) >> 0) << 24) | (ur << 16) | (ug << 8) | ub; + } + + /** + * return an Float Array representation of this object + * @returns {Float32Array} + */ + toArray() { + return this.glArray; + } + + + /** + * return the color in "#RRGGBB" format + * @returns {string} + */ + toHex() { + // TODO : Memoize this function by caching its result until any of + // the r,g,b,a values are changed + + return "#" + toHex$1(this.r) + toHex$1(this.g) + toHex$1(this.b); + } + + /** + * Get the color in "#RRGGBBAA" format + * @returns {string} + */ + toHex8(alpha = this.alpha) { + // TODO : Memoize this function by caching its result until any of + // the r,g,b,a values are changed + + return "#" + toHex$1(this.r) + toHex$1(this.g) + toHex$1(this.b) + toHex$1(alpha * 255); + } + + /** + * Get the color in "rgb(R,G,B)" format + * @returns {string} + */ + toRGB() { + // TODO : Memoize this function by caching its result until any of + // the r,g,b,a values are changed + + return "rgb(" + + this.r + "," + + this.g + "," + + this.b + + ")"; + } + + /** + * Get the color in "rgba(R,G,B,A)" format + * @param {number} [alpha=1.0] - alpha value [0.0 .. 1.0] + * @returns {string} + */ + toRGBA(alpha = this.alpha) { + // TODO : Memoize this function by caching its result until any of + // the r,g,b,a values are changed + + return "rgba(" + + this.r + "," + + this.g + "," + + this.b + "," + + alpha + + ")"; + } +} + +/** + * @classdesc + * a generic 2D Vector Object + */ +class Vector2d { + /** + * @param {number} [x=0] - x value of the vector + * @param {number} [y=0] - y value of the vector + */ + constructor(x = 0, y = 0) { + this.onResetEvent(x, y); + } + + /** + * @param {number} [x=0] - x value of the vector + * @param {number} [y=0] - y value of the vector + * @ignore + */ + onResetEvent(x = 0, y = 0) { + /** + * x value of the vector + * @type {number} + */ + this.x = x; + /** + * y value of the vector + * @type {number} + */ + this.y = y; + } + + /** + * @param {number} [x=0] - x value of the vector + * @param {number} [y=0] - y value of the vector + * @ignore + */ + _set(x, y) { + this.x = x; + this.y = y; + return this; + } + + /** + * set the Vector x and y properties to the given values + * @param {number} x + * @param {number} y + * @returns {Vector2d} Reference to this object for method chaining + */ + set(x, y) { + if (x !== +x || y !== +y) { + throw new Error( + "invalid x,y parameters (not a number)" + ); + } + return this._set(x, y); + } + + /** + * set the Vector x and y properties to 0 + * @returns {Vector2d} Reference to this object for method chaining + */ + setZero() { + return this.set(0, 0); + } + + /** + * set the Vector x and y properties using the passed vector + * @param {Vector2d} v + * @returns {Vector2d} Reference to this object for method chaining + */ + setV(v) { + return this._set(v.x, v.y); + } + + /** + * Add the passed vector to this vector + * @param {Vector2d} v + * @returns {Vector2d} Reference to this object for method chaining + */ + add(v) { + return this._set(this.x + v.x, this.y + v.y); + } + + /** + * Substract the passed vector to this vector + * @param {Vector2d} v + * @returns {Vector2d} Reference to this object for method chaining + */ + sub(v) { + return this._set(this.x - v.x, this.y - v.y); + } + + /** + * Multiply this vector values by the given scalar + * @param {number} x + * @param {number} [y=x] + * @returns {Vector2d} Reference to this object for method chaining + */ + scale(x, y = x) { + return this._set(this.x * x, this.y * y); + } + + /** + * Convert this vector into isometric coordinate space + * @returns {Vector2d} Reference to this object for method chaining + */ + toIso() { + return this._set(this.x - this.y, (this.x + this.y) * 0.5); + } + + /** + * Convert this vector into 2d coordinate space + * @returns {Vector2d} Reference to this object for method chaining + */ + to2d() { + return this._set(this.y + this.x / 2, this.y - this.x / 2); + } + + /** + * Multiply this vector values by the passed vector + * @param {Vector2d} v + * @returns {Vector2d} Reference to this object for method chaining + */ + scaleV(v) { + return this._set(this.x * v.x, this.y * v.y); + } + + /** + * Divide this vector values by the passed value + * @param {number} n - the value to divide the vector by + * @returns {Vector2d} Reference to this object for method chaining + */ + div(n) { + return this._set(this.x / n, this.y / n); + } + + /** + * Update this vector values to absolute values + * @returns {Vector2d} Reference to this object for method chaining + */ + abs() { + return this._set((this.x < 0) ? -this.x : this.x, (this.y < 0) ? -this.y : this.y); + } + + /** + * Clamp the vector value within the specified value range + * @param {number} low + * @param {number} high + * @returns {Vector2d} new me.Vector2d + */ + clamp(low, high) { + return new Vector2d(clamp(this.x, low, high), clamp(this.y, low, high)); + } + + /** + * Clamp this vector value within the specified value range + * @param {number} low + * @param {number} high + * @returns {Vector2d} Reference to this object for method chaining + */ + clampSelf(low, high) { + return this._set(clamp(this.x, low, high), clamp(this.y, low, high)); + } + + /** + * Update this vector with the minimum value between this and the passed vector + * @param {Vector2d} v + * @returns {Vector2d} Reference to this object for method chaining + */ + minV(v) { + return this._set((this.x < v.x) ? this.x : v.x, (this.y < v.y) ? this.y : v.y); + } + + /** + * Update this vector with the maximum value between this and the passed vector + * @param {Vector2d} v + * @returns {Vector2d} Reference to this object for method chaining + */ + maxV(v) { + return this._set((this.x > v.x) ? this.x : v.x, (this.y > v.y) ? this.y : v.y); + } + + /** + * Floor the vector values + * @returns {Vector2d} new me.Vector2d + */ + floor() { + return new Vector2d(Math.floor(this.x), Math.floor(this.y)); + } + + /** + * Floor this vector values + * @returns {Vector2d} Reference to this object for method chaining + */ + floorSelf() { + return this._set(Math.floor(this.x), Math.floor(this.y)); + } + + /** + * Ceil the vector values + * @returns {Vector2d} new me.Vector2d + */ + ceil() { + return new Vector2d(Math.ceil(this.x), Math.ceil(this.y)); + } + + /** + * Ceil this vector values + * @returns {Vector2d} Reference to this object for method chaining + */ + ceilSelf() { + return this._set(Math.ceil(this.x), Math.ceil(this.y)); + } + + /** + * Negate the vector values + * @returns {Vector2d} new me.Vector2d + */ + negate() { + return new Vector2d(-this.x, -this.y); + } + + /** + * Negate this vector values + * @returns {Vector2d} Reference to this object for method chaining + */ + negateSelf() { + return this._set(-this.x, -this.y); + } + + /** + * Copy the x,y values of the passed vector to this one + * @param {Vector2d} v + * @returns {Vector2d} Reference to this object for method chaining + */ + copy(v) { + return this._set(v.x, v.y); + } + + /** + * return true if this vector is equal to the given values or vector + * @param {number|Vector2d|ObservableVector2d} x + * @param {number} [y] + * @returns {boolean} + */ + equals() { + let _x, _y; + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + return ((this.x === _x) && (this.y === _y)); + } + + /** + * normalize this vector (scale the vector so that its magnitude is 1) + * @returns {Vector2d} Reference to this object for method chaining + */ + normalize() { + return this.div(this.length() || 1); + } + + /** + * change this vector to be perpendicular to what it was before.
                            + * (Effectively rotates it 90 degrees in a clockwise direction) + * @returns {Vector2d} Reference to this object for method chaining + */ + perp() { + return this._set(this.y, -this.x); + } + + /** + * Rotate this vector (counter-clockwise) by the specified angle (in radians). + * @param {number} angle - The angle to rotate (in radians) + * @param {Vector2d|ObservableVector2d} [v] - an optional point to rotate around + * @returns {Vector2d} Reference to this object for method chaining + */ + rotate(angle, v) { + let cx = 0; + let cy = 0; + + if (typeof v === "object") { + cx = v.x; + cy = v.y; + } + + let x = this.x - cx; + let y = this.y - cy; + + let c = Math.cos(angle); + let s = Math.sin(angle); + + return this._set(x * c - y * s + cx, x * s + y * c + cy); + } + + /** + * return the dot product of this vector and the passed one + * @param {Vector2d} v + * @returns {number} The dot product. + */ + dot(v) { + return this.x * v.x + this.y * v.y; + } + + /** + * return the cross product of this vector and the passed one + * @param {Vector2d} v + * @returns {number} The cross product. + */ + cross(v) { + return this.x * v.y - this.y * v.x; + } + + /** + * return the square length of this vector + * @returns {number} The length^2 of this vector. + */ + length2() { + return this.dot(this); + } + + /** + * return the length (magnitude) of this vector + * @returns {number} the length of this vector + */ + length() { + return Math.sqrt(this.length2()); + } + + /** + * Linearly interpolate between this vector and the given one. + * @param {Vector2d} v + * @param {number} alpha - distance along the line (alpha = 0 will be this vector, and alpha = 1 will be the given one). + * @returns {Vector2d} Reference to this object for method chaining + */ + lerp(v, alpha) { + this.x += ( v.x - this.x ) * alpha; + this.y += ( v.y - this.y ) * alpha; + return this; + } + + /** + * interpolate the position of this vector towards the given one by the given maximum step. + * @param {Vector2d} target + * @param {number} step - the maximum step per iteration (Negative values will push the vector away from the target) + * @returns {Vector2d} Reference to this object for method chaining + */ + moveTowards(target, step) { + let angle = Math.atan2(target.y - this.y, target.x - this.x); + + let distance = this.distance(target); + + if (distance === 0 || (step >= 0 && distance <= step * step)) { + return target; + } + + this.x += Math.cos(angle) * step; + this.y += Math.sin(angle) * step; + + return this; + } + + /** + * return the distance between this vector and the passed one + * @param {Vector2d} v + * @returns {number} + */ + distance(v) { + let dx = this.x - v.x, dy = this.y - v.y; + return Math.sqrt(dx * dx + dy * dy); + } + + /** + * return the angle between this vector and the passed one + * @param {Vector2d} v + * @returns {number} angle in radians + */ + angle(v) { + return Math.acos(clamp(this.dot(v) / (this.length() * v.length()), -1, 1)); + } + + /** + * project this vector on to another vector. + * @param {Vector2d} v - The vector to project onto. + * @returns {Vector2d} Reference to this object for method chaining + */ + project(v) { + return this.scale(this.dot(v) / v.length2()); + } + + /** + * Project this vector onto a vector of unit length.
                            + * This is slightly more efficient than `project` when dealing with unit vectors. + * @param {Vector2d} v - The unit vector to project onto. + * @returns {Vector2d} Reference to this object for method chaining + */ + projectN(v) { + return this.scale(this.dot(v)); + } + + /** + * return a clone copy of this vector + * @returns {Vector2d} new me.Vector2d + */ + clone() { + return pool.pull("Vector2d", this.x, this.y); + } + + /** + * convert the object to a string representation + * @returns {string} + */ + toString() { + return "x:" + this.x + ",y:" + this.y; + } +} + +/** + * @classdesc + * a generic 3D Vector Object + */ +class Vector3d { + /** + * @param {number} [x=0] - x value of the vector + * @param {number} [y=0] - y value of the vector + * @param {number} [z=0] - z value of the vector + */ + constructor(x = 0, y = 0, z = 0) { + this.onResetEvent(x, y, z); + } + + /** + * @param {number} [x=0] + * @param {number} [y=0] + * @param {number} [z=0] + * @ignore + */ + onResetEvent(x = 0, y = 0, z = 0) { + /** + * x value of the vector + * @type {number} + */ + this.x = x; + + /** + * y value of the vector + * @type {number} + */ + this.y = y; + + /** + * z value of the vector + * @type {number} + */ + this.z = z; + } + + /** + * @param {number} x + * @param {number} y + * @param {number} [z=0] + * @ignore + */ + _set(x, y, z = 0) { + this.x = x; + this.y = y; + this.z = z; + return this; + } + + /** + * set the Vector x and y properties to the given values + * @param {number} x + * @param {number} y + * @param {number} [z=0] + * @returns {Vector3d} Reference to this object for method chaining + */ + set(x, y, z) { + if (x !== +x || y !== +y || (typeof z !== "undefined" && z !== +z)) { + throw new Error( + "invalid x, y, z parameters (not a number)" + ); + } + return this._set(x, y, z); + } + + /** + * set the Vector x and y properties to 0 + * @returns {Vector3d} Reference to this object for method chaining + */ + setZero() { + return this.set(0, 0, 0); + } + + /** + * set the Vector x and y properties using the passed vector + * @param {Vector2d|Vector3d} v + * @returns {Vector3d} Reference to this object for method chaining + */ + setV(v) { + return this._set(v.x, v.y, v.z); + } + + /** + * Add the passed vector to this vector + * @param {Vector2d|Vector3d} v + * @returns {Vector3d} Reference to this object for method chaining + */ + add(v) { + return this._set(this.x + v.x, this.y + v.y, this.z + (v.z || 0)); + } + + /** + * Substract the passed vector to this vector + * @param {Vector2d|Vector3d} v + * @returns {Vector3d} Reference to this object for method chaining + */ + sub(v) { + return this._set(this.x - v.x, this.y - v.y, this.z - (v.z || 0)); + } + + /** + * Multiply this vector values by the given scalar + * @param {number} x + * @param {number} [y=x] + * @param {number} [z=1] + * @returns {Vector3d} Reference to this object for method chaining + */ + scale(x, y = x, z = 1) { + return this._set(this.x * x, this.y * y, this.z * z); + } + + /** + * Multiply this vector values by the passed vector + * @param {Vector2d|Vector3d} v + * @returns {Vector3d} Reference to this object for method chaining + */ + scaleV(v) { + return this.scale(v.x, v.y, v.z); + } + + /** + * Convert this vector into isometric coordinate space + * @returns {Vector3d} Reference to this object for method chaining + */ + toIso() { + return this._set(this.x - this.y, (this.x + this.y) * 0.5, this.z); + } + + /** + * Convert this vector into 2d coordinate space + * @returns {Vector3d} Reference to this object for method chaining + */ + to2d() { + return this._set(this.y + this.x / 2, this.y - this.x / 2, this.z); + } + + /** + * Divide this vector values by the passed value + * @param {number} n - the value to divide the vector by + * @returns {Vector3d} Reference to this object for method chaining + */ + div(n) { + return this._set(this.x / n, this.y / n, this.z / n); + } + + /** + * Update this vector values to absolute values + * @returns {Vector3d} Reference to this object for method chaining + */ + abs() { + return this._set((this.x < 0) ? -this.x : this.x, (this.y < 0) ? -this.y : this.y, (this.z < 0) ? -this.z : this.z); + } + + /** + * Clamp the vector value within the specified value range + * @param {number} low + * @param {number} high + * @returns {Vector3d} new me.Vector3d + */ + clamp(low, high) { + return new Vector3d(clamp(this.x, low, high), clamp(this.y, low, high), clamp(this.z, low, high)); + } + + /** + * Clamp this vector value within the specified value range + * @param {number} low + * @param {number} high + * @returns {Vector3d} Reference to this object for method chaining + */ + clampSelf(low, high) { + return this._set(clamp(this.x, low, high), clamp(this.y, low, high), clamp(this.z, low, high)); + } + + /** + * Update this vector with the minimum value between this and the passed vector + * @param {Vector2d|Vector3d} v + * @returns {Vector3d} Reference to this object for method chaining + */ + minV(v) { + let _vz = v.z || 0; + return this._set((this.x < v.x) ? this.x : v.x, (this.y < v.y) ? this.y : v.y, (this.z < _vz) ? this.z : _vz); + } + + /** + * Update this vector with the maximum value between this and the passed vector + * @param {Vector2d|Vector3d} v + * @returns {Vector3d} Reference to this object for method chaining + */ + maxV(v) { + let _vz = v.z || 0; + return this._set((this.x > v.x) ? this.x : v.x, (this.y > v.y) ? this.y : v.y, (this.z > _vz) ? this.z : _vz); + } + + /** + * Floor the vector values + * @returns {Vector3d} new me.Vector3d + */ + floor() { + return new Vector3d(Math.floor(this.x), Math.floor(this.y), Math.floor(this.z)); + } + + /** + * Floor this vector values + * @returns {Vector3d} Reference to this object for method chaining + */ + floorSelf() { + return this._set(Math.floor(this.x), Math.floor(this.y), Math.floor(this.z)); + } + + /** + * Ceil the vector values + * @returns {Vector3d} new me.Vector3d + */ + ceil() { + return new Vector3d(Math.ceil(this.x), Math.ceil(this.y), Math.ceil(this.z)); + } + + /** + * Ceil this vector values + * @returns {Vector3d} Reference to this object for method chaining + */ + ceilSelf() { + return this._set(Math.ceil(this.x), Math.ceil(this.y), Math.ceil(this.z)); + } + + /** + * Negate the vector values + * @returns {Vector3d} new me.Vector3d + */ + negate() { + return new Vector3d(-this.x, -this.y, -this.z); + } + + /** + * Negate this vector values + * @returns {Vector3d} Reference to this object for method chaining + */ + negateSelf() { + return this._set(-this.x, -this.y, -this.z); + } + + /** + * Copy the components of the given vector into this one + * @param {Vector2d|Vector3d} v + * @returns {Vector3d} Reference to this object for method chaining + */ + copy(v) { + return this._set(v.x, v.y, v.z || 0); + } + + /** + * return true if this vector is equal to the given values or vector + * @param {number|Vector2d|ObservableVector2d|Vector3d|ObservableVector3d} x + * @param {number} [y] + * @param {number} [z] + * @returns {boolean} + */ + equals() { + let _x, _y, _z; + if (arguments.length >= 2) { + // x, y, z + _x = arguments[0]; + _y = arguments[1]; + _z = arguments[2]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + _z = arguments[0].z; + } + + if (typeof _z === "undefined") { + _z = this.z; + } + + return ((this.x === _x) && (this.y === _y) && (this.z === _z)); + } + + /** + * normalize this vector (scale the vector so that its magnitude is 1) + * @returns {Vector3d} Reference to this object for method chaining + */ + normalize() { + return this.div(this.length() || 1); + } + + /** + * change this vector to be perpendicular to what it was before.
                            + * (Effectively rotates it 90 degrees in a clockwise direction around the z axis) + * @returns {Vector3d} Reference to this object for method chaining + */ + perp() { + return this._set(this.y, -this.x, this.z); + } + + /** + * Rotate this vector (counter-clockwise) by the specified angle (in radians) around the z axis + * @param {number} angle - The angle to rotate (in radians) + * @param {Vector2d|ObservableVector2d} [v] - an optional point to rotate around (on the same z axis) + * @returns {Vector3d} Reference to this object for method chaining + */ + rotate(angle, v) { + let cx = 0; + let cy = 0; + + if (typeof v === "object") { + cx = v.x; + cy = v.y; + } + + // TODO also rotate on the z axis if the given vector is a 3d one + let x = this.x - cx; + let y = this.y - cy; + + let c = Math.cos(angle); + let s = Math.sin(angle); + + return this._set(x * c - y * s + cx, x * s + y * c + cy, this.z); + } + + /** + * return the dot product of this vector and the passed one + * @param {Vector2d|Vector3d} v + * @returns {number} The dot product. + */ + dot(v) { + return this.x * v.x + this.y * v.y + this.z * (typeof(v.z) !== "undefined" ? v.z : this.z); + } + + /** + * calculate the cross product of this vector and the passed one + * @param {Vector3d} v + * @returns {Vector3d} Reference to this object for method chaining + */ + cross(v) { + let ax = this.x, ay = this.y, az = this.z; + let bx = v.x, by = v.y, bz = v.z; + + this.x = ay * bz - az * by; + this.y = az * bx - ax * bz; + this.z = ax * by - ay * bx; + + return this; + } + + /** + * return the square length of this vector + * @returns {number} The length^2 of this vector. + */ + length2() { + return this.dot(this); + } + + /** + * return the length (magnitude) of this vector + * @returns {number} the length of this vector + */ + length() { + return Math.sqrt(this.length2()); + } + + /** + * Linearly interpolate between this vector and the given one. + * @param {Vector3d} v + * @param {number} alpha - distance along the line (alpha = 0 will be this vector, and alpha = 1 will be the given one). + * @returns {Vector3d} Reference to this object for method chaining + */ + lerp(v, alpha) { + this.x += ( v.x - this.x ) * alpha; + this.y += ( v.y - this.y ) * alpha; + this.z += ( v.z - this.z ) * alpha; + return this; + } + + /** + * interpolate the position of this vector on the x and y axis towards the given one by the given maximum step. + * @param {Vector2d|Vector3d} target + * @param {number} step - the maximum step per iteration (Negative values will push the vector away from the target) + * @returns {Vector3d} Reference to this object for method chaining + */ + moveTowards(target, step) { + let angle = Math.atan2(target.y - this.y, target.x - this.x); + + let dx = this.x - target.x; + let dy = this.y - target.y; + + let distance = Math.sqrt(dx * dx + dy * dy); + + if (distance === 0 || (step >= 0 && distance <= step * step)) { + return target; + } + + this.x += Math.cos(angle) * step; + this.y += Math.sin(angle) * step; + + return this; + } + + /** + * return the distance between this vector and the passed one + * @param {Vector2d|Vector3d} v + * @returns {number} + */ + distance(v) { + let dx = this.x - v.x; + let dy = this.y - v.y; + let dz = this.z - (v.z || 0); + return Math.sqrt(dx * dx + dy * dy + dz * dz); + } + + /** + * return the angle between this vector and the passed one + * @param {Vector2d|Vector3d} v + * @returns {number} angle in radians + */ + angle(v) { + return Math.acos(clamp(this.dot(v) / (this.length() * v.length()), -1, 1)); + } + + /** + * project this vector on to another vector. + * @param {Vector2d|Vector3d} v - The vector to project onto. + * @returns {Vector3d} Reference to this object for method chaining + */ + project(v) { + let ratio = this.dot(v) / v.length2(); + return this.scale(ratio, ratio, ratio); + } + + /** + * Project this vector onto a vector of unit length.
                            + * This is slightly more efficient than `project` when dealing with unit vectors. + * @param {Vector2d|Vector3d} v - The unit vector to project onto. + * @returns {Vector3d} Reference to this object for method chaining + */ + projectN(v) { + let ratio = this.dot(v) / v.length2(); + return this.scale(ratio, ratio, ratio); + } + + /** + * return a clone copy of this vector + * @returns {Vector3d} new me.Vector3d + */ + clone() { + return pool.pull("Vector3d", this.x, this.y, this.z); + } + + /** + * convert the object to a string representation + * @returns {string} + */ + toString() { + return "x:" + this.x + ",y:" + this.y + ",z:" + this.z; + } +} + +/** + * @classdesc + * A Vector2d object that provide notification by executing the given callback when the vector is changed. + * @augments Vector2d + */ +class ObservableVector2d extends Vector2d { + /** + * @param {number} x - x value of the vector + * @param {number} y - y value of the vector + * @param {object} settings - additional required parameters + * @param {Function} settings.onUpdate - the callback to be executed when the vector is changed + * @param {Function} [settings.scope] - the value to use as this when calling onUpdate + */ + constructor(x = 0, y = 0, settings) { + super(x, y); + if (typeof(settings) === "undefined") { + throw new Error( + "undefined `onUpdate` callback" + ); + } + this.setCallback(settings.onUpdate, settings.scope); + } + + /** + * @ignore + */ + onResetEvent(x = 0, y = 0, settings) { + // init is call by the constructor and does not trigger the cb + this.setMuted(x, y); + if (typeof settings !== "undefined") { + this.setCallback(settings.onUpdate, settings.scope); + } + } + + /** + * x value of the vector + * @public + * @type {number} + * @name x + * @memberof ObservableVector2d + */ + + get x() { + return this._x; + } + + set x(value) { + let ret = this.onUpdate.call(this.scope, value, this._y, this._x, this._y); + if (ret && "x" in ret) { + this._x = ret.x; + } else { + this._x = value; + } + } + + + /** + * y value of the vector + * @public + * @type {number} + * @name y + * @memberof ObservableVector2d + */ + + get y() { + return this._y; + } + + set y(value) { + let ret = this.onUpdate.call(this.scope, this._x, value, this._x, this._y); + if (ret && "y" in ret) { + this._y = ret.y; + } else { + this._y = value; + } + } + + /** @ignore */ + _set(x, y) { + let ret = this.onUpdate.call(this.scope, x, y, this._x, this._y); + if (ret && "x" in ret && "y" in ret) { + this._x = ret.x; + this._y = ret.y; + } else { + this._x = x; + this._y = y; + } + return this; + } + + /** + * set the vector value without triggering the callback + * @name setMuted + * @memberof ObservableVector2d + * @param {number} x - x value of the vector + * @param {number} y - y value of the vector + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + setMuted(x, y) { + this._x = x; + this._y = y; + return this; + } + + /** + * set the callback to be executed when the vector is changed + * @name setCallback + * @memberof ObservableVector2d + * @param {Function} fn - callback + * @param {Function} [scope=null] - scope + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + setCallback(fn, scope = null) { + if (typeof(fn) !== "function") { + throw new Error( + "invalid `onUpdate` callback" + ); + } + this.onUpdate = fn; + this.scope = scope; + return this; + } + + /** + * Add the passed vector to this vector + * @name add + * @memberof ObservableVector2d + * @param {ObservableVector2d} v + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + add(v) { + return this._set(this._x + v.x, this._y + v.y); + } + + /** + * Substract the passed vector to this vector + * @name sub + * @memberof ObservableVector2d + * @param {ObservableVector2d} v + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + sub(v) { + return this._set(this._x - v.x, this._y - v.y); + } + + /** + * Multiply this vector values by the given scalar + * @name scale + * @memberof ObservableVector2d + * @param {number} x + * @param {number} [y=x] + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + scale(x, y = x) { + return this._set(this._x * x, this._y * y); + } + + /** + * Multiply this vector values by the passed vector + * @name scaleV + * @memberof ObservableVector2d + * @param {ObservableVector2d} v + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + scaleV(v) { + return this._set(this._x * v.x, this._y * v.y); + } + + /** + * Divide this vector values by the passed value + * @name div + * @memberof ObservableVector2d + * @param {number} n - the value to divide the vector by + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + div(n) { + return this._set(this._x / n, this._y / n); + } + + /** + * Update this vector values to absolute values + * @name abs + * @memberof ObservableVector2d + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + abs() { + return this._set((this._x < 0) ? -this._x : this._x, (this._y < 0) ? -this._y : this._y); + } + + /** + * Clamp the vector value within the specified value range + * @name clamp + * @memberof ObservableVector2d + * @param {number} low + * @param {number} high + * @returns {ObservableVector2d} new me.ObservableVector2d + */ + clamp(low, high) { + return new ObservableVector2d(clamp(this.x, low, high), clamp(this.y, low, high), {onUpdate: this.onUpdate, scope: this.scope}); + } + + /** + * Clamp this vector value within the specified value range + * @name clampSelf + * @memberof ObservableVector2d + * @param {number} low + * @param {number} high + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + clampSelf(low, high) { + return this._set(clamp(this._x, low, high), clamp(this._y, low, high)); + } + + /** + * Update this vector with the minimum value between this and the passed vector + * @name minV + * @memberof ObservableVector2d + * @param {ObservableVector2d} v + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + minV(v) { + return this._set((this._x < v.x) ? this._x : v.x, (this._y < v.y) ? this._y : v.y); + } + + /** + * Update this vector with the maximum value between this and the passed vector + * @name maxV + * @memberof ObservableVector2d + * @param {ObservableVector2d} v + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + maxV(v) { + return this._set((this._x > v.x) ? this._x : v.x, (this._y > v.y) ? this._y : v.y); + } + + /** + * Floor the vector values + * @name floor + * @memberof ObservableVector2d + * @returns {ObservableVector2d} new me.ObservableVector2d + */ + floor() { + return new ObservableVector2d(Math.floor(this._x), Math.floor(this._y), {onUpdate: this.onUpdate, scope: this.scope}); + } + + /** + * Floor this vector values + * @name floorSelf + * @memberof ObservableVector2d + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + floorSelf() { + return this._set(Math.floor(this._x), Math.floor(this._y)); + } + + /** + * Ceil the vector values + * @name ceil + * @memberof ObservableVector2d + * @returns {ObservableVector2d} new me.ObservableVector2d + */ + ceil() { + return new ObservableVector2d(Math.ceil(this._x), Math.ceil(this._y), {onUpdate: this.onUpdate, scope: this.scope}); + } + + /** + * Ceil this vector values + * @name ceilSelf + * @memberof ObservableVector2d + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + ceilSelf() { + return this._set(Math.ceil(this._x), Math.ceil(this._y)); + } + + /** + * Negate the vector values + * @name negate + * @memberof ObservableVector2d + * @returns {ObservableVector2d} new me.ObservableVector2d + */ + negate() { + return new ObservableVector2d(-this._x, -this._y, {onUpdate: this.onUpdate, scope: this.scope}); + } + + /** + * Negate this vector values + * @name negateSelf + * @memberof ObservableVector2d + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + negateSelf() { + return this._set(-this._x, -this._y); + } + + /** + * Copy the x,y values of the passed vector to this one + * @name copy + * @memberof ObservableVector2d + * @param {ObservableVector2d} v + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + copy(v) { + return this._set(v.x, v.y); + } + + /** + * return true if the two vectors are the same + * @name equals + * @memberof ObservableVector2d + * @param {ObservableVector2d} v + * @returns {boolean} + */ + equals(v) { + return ((this._x === v.x) && (this._y === v.y)); + } + + /** + * change this vector to be perpendicular to what it was before.
                            + * (Effectively rotates it 90 degrees in a clockwise direction) + * @name perp + * @memberof ObservableVector2d + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + perp() { + return this._set(this._y, -this._x); + } + + /** + * Rotate this vector (counter-clockwise) by the specified angle (in radians). + * @name rotate + * @memberof ObservableVector2d + * @param {number} angle - The angle to rotate (in radians) + * @param {Vector2d|ObservableVector2d} [v] - an optional point to rotate around + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + rotate(angle, v) { + let cx = 0; + let cy = 0; + + if (typeof v === "object") { + cx = v.x; + cy = v.y; + } + + let x = this._x - cx; + let y = this._y - cy; + + let c = Math.cos(angle); + let s = Math.sin(angle); + + return this._set(x * c - y * s + cx, x * s + y * c + cy); + } + + /** + * return the dot product of this vector and the passed one + * @name dot + * @memberof ObservableVector2d + * @param {Vector2d|ObservableVector2d} v + * @returns {number} The dot product. + */ + dot(v) { + return this._x * v.x + this._y * v.y; + } + + /** + * return the cross product of this vector and the passed one + * @name cross + * @memberof ObservableVector2d + * @param {Vector2d|ObservableVector2d} v + * @returns {number} The cross product. + */ + cross(v) { + return this._x * v.y - this._y * v.x; + } + + /** + * Linearly interpolate between this vector and the given one. + * @name lerp + * @memberof ObservableVector2d + * @param {Vector2d|ObservableVector2d} v + * @param {number} alpha - distance along the line (alpha = 0 will be this vector, and alpha = 1 will be the given one). + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + lerp(v, alpha) { + return this._set( + this._x + ( v.x - this._x ) * alpha, + this._y + ( v.y - this._y ) * alpha + ); + } + + /** + * interpolate the position of this vector towards the given one while nsure that the distance never exceeds the given step. + * @name moveTowards + * @memberof ObservableVector2d + * @param {Vector2d|ObservableVector2d} target + * @param {number} step - the maximum step per iteration (Negative values will push the vector away from the target) + * @returns {ObservableVector2d} Reference to this object for method chaining + */ + moveTowards(target, step) { + let angle = Math.atan2(target.y - this._y, target.x - this._x); + + let distance = this.distance(target); + + if (distance === 0 || (step >= 0 && distance <= step * step)) { + return target; + } + + this._x += Math.cos(angle) * step; + this._y += Math.sin(angle) * step; + + return this; + } + + /** + * return the distance between this vector and the passed one + * @name distance + * @memberof ObservableVector2d + * @param {ObservableVector2d} v + * @returns {number} + */ + distance(v) { + return Math.sqrt((this._x - v.x) * (this._x - v.x) + (this._y - v.y) * (this._y - v.y)); + } + + /** + * return a clone copy of this vector + * @name clone + * @memberof ObservableVector2d + * @returns {ObservableVector2d} new me.ObservableVector2d + */ + clone() { + return pool.pull("ObservableVector2d", this._x, this._y, {onUpdate: this.onUpdate, scope: this.scope}); + } + + /** + * return a `me.Vector2d` copy of this `me.ObservableVector2d` object + * @name toVector2d + * @memberof ObservableVector2d + * @returns {Vector2d} new me.Vector2d + */ + toVector2d() { + return pool.pull("Vector2d", this._x, this._y); + } + + /** + * convert the object to a string representation + * @name toString + * @memberof ObservableVector2d + * @returns {string} + */ + toString() { + return "x:" + this._x + ",y:" + this._y; + } +} + +/** + * @classdesc + * A Vector3d object that provide notification by executing the given callback when the vector is changed. + * @augments Vector3d + */ +class ObservableVector3d extends Vector3d { + /** + * @param {number} x - x value of the vector + * @param {number} y - y value of the vector + * @param {number} z - z value of the vector + * @param {object} settings - additional required parameters + * @param {Function} settings.onUpdate - the callback to be executed when the vector is changed + * @param {object} [settings.scope] - the value to use as this when calling onUpdate + */ + constructor(x = 0, y = 0, z = 0, settings) { + super(x, y, z); + if (typeof(settings) === "undefined") { + throw new Error( + "undefined `onUpdate` callback" + ); + } + this.setCallback(settings.onUpdate, settings.scope); + } + + /** + * @ignore + */ + onResetEvent(x = 0, y = 0, z = 0, settings) { + // init is call by the constructor and does not trigger the cb + this.setMuted(x, y, z); + if (typeof settings !== "undefined") { + this.setCallback(settings.onUpdate, settings.scope); + } + return this; + } + + /** + * x value of the vector + * @public + * @type {number} + * @name x + * @memberof ObservableVector3d + */ + + get x() { + return this._x; + } + + set x(value) { + let ret = this.onUpdate.call(this.scope, value, this._y, this._z, this._x, this._y, this._z); + if (ret && "x" in ret) { + this._x = ret.x; + } else { + this._x = value; + } + } + + /** + * y value of the vector + * @public + * @type {number} + * @name y + * @memberof ObservableVector3d + */ + + get y() { + return this._y; + } + + set y(value) { + let ret = this.onUpdate.call(this.scope, this._x, value, this._z, this._x, this._y, this._z); + if (ret && "y" in ret) { + this._y = ret.y; + } else { + this._y = value; + } + } + + + /** + * z value of the vector + * @public + * @type {number} + * @name z + * @memberof ObservableVector3d + */ + + + get z() { + return this._z; + } + + set z(value) { + let ret = this.onUpdate.call(this.scope, this._x, this._y, value, this._x, this._y, this._z); + if (ret && "z" in ret) { + this._z = ret.z; + } else { + this._z = value; + } + } + + /** + * @ignore + */ + _set(x, y, z) { + let ret = this.onUpdate.call(this.scope, x, y, z, this._x, this._y, this._z); + if (ret && "x" in ret && "y" in ret && "z" in ret) { + this._x = ret.x; + this._y = ret.y; + this._z = ret.z; + } else { + this._x = x; + this._y = y; + this._z = z || 0; + } + return this; + } + + /** + * set the vector value without triggering the callback + * @name setMuted + * @memberof ObservableVector3d + * @param {number} x - x value of the vector + * @param {number} y - y value of the vector + * @param {number} [z=0] - z value of the vector + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + setMuted(x, y, z) { + this._x = x; + this._y = y; + this._z = z || 0; + return this; + } + + /** + * set the callback to be executed when the vector is changed + * @name setCallback + * @memberof ObservableVector3d + * @param {Function} fn - callback + * @param {Function} [scope=null] - scope + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + setCallback(fn, scope = null) { + if (typeof(fn) !== "function") { + throw new Error( + "invalid `onUpdate` callback" + ); + } + this.onUpdate = fn; + this.scope = scope; + return this; + } + + /** + * Add the passed vector to this vector + * @name add + * @memberof ObservableVector3d + * @param {Vector2d|Vector3d|ObservableVector2d|ObservableVector3d} v + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + add(v) { + return this._set(this._x + v.x, this._y + v.y, this._z + (v.z || 0)); + } + + /** + * Substract the passed vector to this vector + * @name sub + * @memberof ObservableVector3d + * @param {Vector2d|Vector3d|ObservableVector2d|ObservableVector3d} v + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + sub(v) { + return this._set(this._x - v.x, this._y - v.y, this._z - (v.z || 0)); + } + + /** + * Multiply this vector values by the given scalar + * @name scale + * @memberof ObservableVector3d + * @param {number} x + * @param {number} [y=x] + * @param {number} [z=1] + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + scale(x, y = x, z = 1) { + return this._set(this._x * x, this._y * y, this._z * z); + } + + /** + * Multiply this vector values by the passed vector + * @name scaleV + * @memberof ObservableVector3d + * @param {Vector2d|Vector3d|ObservableVector2d|ObservableVector3d} v + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + scaleV(v) { + return this._set(this._x * v.x, this._y * v.y, this._z * (v.z || 1)); + } + + /** + * Divide this vector values by the passed value + * @name div + * @memberof ObservableVector3d + * @param {number} n - the value to divide the vector by + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + div(n) { + return this._set(this._x / n, this._y / n, this._z / n); + } + + /** + * Update this vector values to absolute values + * @name abs + * @memberof ObservableVector3d + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + abs() { + return this._set( + (this._x < 0) ? -this._x : this._x, + (this._y < 0) ? -this._y : this._y, + (this._Z < 0) ? -this._z : this._z + ); + } + + /** + * Clamp the vector value within the specified value range + * @name clamp + * @memberof ObservableVector3d + * @param {number} low + * @param {number} high + * @returns {ObservableVector3d} new me.ObservableVector3d + */ + clamp(low, high) { + return new ObservableVector3d( + clamp(this._x, low, high), + clamp(this._y, low, high), + clamp(this._z, low, high), + {onUpdate: this.onUpdate, scope: this.scope} + ); + } + + /** + * Clamp this vector value within the specified value range + * @name clampSelf + * @memberof ObservableVector3d + * @param {number} low + * @param {number} high + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + clampSelf(low, high) { + return this._set( + clamp(this._x, low, high), + clamp(this._y, low, high), + clamp(this._z, low, high) + ); + } + + /** + * Update this vector with the minimum value between this and the passed vector + * @name minV + * @memberof ObservableVector3d + * @param {Vector2d|Vector3d|ObservableVector2d|ObservableVector3d} v + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + minV(v) { + let _vz = v.z || 0; + return this._set( + (this._x < v.x) ? this._x : v.x, + (this._y < v.y) ? this._y : v.y, + (this._z < _vz) ? this._z : _vz + ); + } + + /** + * Update this vector with the maximum value between this and the passed vector + * @name maxV + * @memberof ObservableVector3d + * @param {Vector2d|Vector3d|ObservableVector2d|ObservableVector3d} v + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + maxV(v) { + let _vz = v.z || 0; + return this._set( + (this._x > v.x) ? this._x : v.x, + (this._y > v.y) ? this._y : v.y, + (this._z > _vz) ? this._z : _vz + ); + } + + /** + * Floor the vector values + * @name floor + * @memberof ObservableVector3d + * @returns {ObservableVector3d} new me.ObservableVector3d + */ + floor() { + return new ObservableVector3d( + Math.floor(this._x), + Math.floor(this._y), + Math.floor(this._z), + {onUpdate: this.onUpdate, scope: this.scope} + ); + } + + /** + * Floor this vector values + * @name floorSelf + * @memberof ObservableVector3d + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + floorSelf() { + return this._set(Math.floor(this._x), Math.floor(this._y), Math.floor(this._z)); + } + + /** + * Ceil the vector values + * @name ceil + * @memberof ObservableVector3d + * @returns {ObservableVector3d} new me.ObservableVector3d + */ + ceil() { + return new ObservableVector3d( + Math.ceil(this._x), + Math.ceil(this._y), + Math.ceil(this._z), + {onUpdate: this.onUpdate, scope: this.scope} + ); + } + + /** + * Ceil this vector values + * @name ceilSelf + * @memberof ObservableVector3d + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + ceilSelf() { + return this._set(Math.ceil(this._x), Math.ceil(this._y), Math.ceil(this._z)); + } + + /** + * Negate the vector values + * @name negate + * @memberof ObservableVector3d + * @returns {ObservableVector3d} new me.ObservableVector3d + */ + negate() { + return new ObservableVector3d( + -this._x, + -this._y, + -this._z, + {onUpdate: this.onUpdate, scope: this.scope} + ); + } + + /** + * Negate this vector values + * @name negateSelf + * @memberof ObservableVector3d + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + negateSelf() { + return this._set(-this._x, -this._y, -this._z); + } + + /** + * Copy the components of the given vector into this one + * @name copy + * @memberof ObservableVector3d + * @param {Vector2d|Vector3d|ObservableVector2d|ObservableVector3d} v + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + copy(v) { + return this._set(v.x, v.y, v.z || 0); + } + + /** + * return true if the two vectors are the same + * @name equals + * @memberof ObservableVector3d + * @param {Vector2d|Vector3d|ObservableVector2d|ObservableVector3d} v + * @returns {boolean} + */ + equals(v) { + return ((this._x === v.x) && (this._y === v.y) && (this._z === (v.z || this._z))); + } + + /** + * change this vector to be perpendicular to what it was before.
                            + * (Effectively rotates it 90 degrees in a clockwise direction) + * @name perp + * @memberof ObservableVector3d + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + perp() { + return this._set(this._y, -this._x, this._z); + } + + /** + * Rotate this vector (counter-clockwise) by the specified angle (in radians). + * @name rotate + * @memberof ObservableVector3d + * @param {number} angle - The angle to rotate (in radians) + * @param {Vector2d|ObservableVector2d} [v] - an optional point to rotate around (on the same z axis) + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + rotate(angle, v) { + let cx = 0; + let cy = 0; + + if (typeof v === "object") { + cx = v.x; + cy = v.y; + } + + // TODO also rotate on the z axis if the given vector is a 3d one + let x = this.x - cx; + let y = this.y - cy; + + let c = Math.cos(angle); + let s = Math.sin(angle); + + return this._set(x * c - y * s + cx, x * s + y * c + cy, this.z); + } + + /** + * return the dot product of this vector and the passed one + * @name dot + * @memberof ObservableVector3d + * @param {Vector2d|Vector3d|ObservableVector2d|ObservableVector3d} v + * @returns {number} The dot product. + */ + dot(v) { + return this._x * v.x + this._y * v.y + this._z * (v.z || 1); + } + + /** + * calculate the cross product of this vector and the passed one + * @name cross + * @memberof ObservableVector3d + * @param {Vector3d|ObservableVector3d} v + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + cross(v) { + let ax = this._x, ay = this._y, az = this._z; + let bx = v.x, by = v.y, bz = v.z; + + return this._set( + ay * bz - az * by, + az * bx - ax * bz, + ax * by - ay * bx + ); + } + + /** + * Linearly interpolate between this vector and the given one. + * @name lerp + * @memberof ObservableVector3d + * @param {Vector3d|ObservableVector3d} v + * @param {number} alpha - distance along the line (alpha = 0 will be this vector, and alpha = 1 will be the given one). + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + lerp(v, alpha) { + return this._set( + this._x + ( v.x - this._x ) * alpha, + this._y + ( v.y - this._y ) * alpha, + this._z + ( v.z - this._z ) * alpha + ); + } + + /** + * interpolate the position of this vector on the x and y axis towards the given one while ensure that the distance never exceeds the given step. + * @name moveTowards + * @memberof ObservableVector3d + * @param {Vector2d|ObservableVector2d|Vector3d|ObservableVector3d} target + * @param {number} step - the maximum step per iteration (Negative values will push the vector away from the target) + * @returns {ObservableVector3d} Reference to this object for method chaining + */ + moveTowards(target, step) { + let angle = Math.atan2(target.y - this._y, target.x - this._x); + + let dx = this._x - target.x; + let dy = this._y - target.y; + + let distance = Math.sqrt(dx * dx + dy * dy); + + if (distance === 0 || (step >= 0 && distance <= step * step)) { + return target; + } + + return this._set( + this._x + Math.cos(angle) * step, + this._y + Math.sin(angle) * step, + this._z + ); + } + + /** + * return the distance between this vector and the passed one + * @name distance + * @memberof ObservableVector3d + * @param {Vector2d|Vector3d|ObservableVector2d|ObservableVector3d} v + * @returns {number} + */ + distance(v) { + let dx = this._x - v.x; + let dy = this._y - v.y; + let dz = this._z - (v.z || 0); + return Math.sqrt(dx * dx + dy * dy + dz * dz); + } + + /** + * return a clone copy of this vector + * @name clone + * @memberof ObservableVector3d + * @returns {ObservableVector3d} new me.ObservableVector3d + */ + clone() { + return pool.pull("ObservableVector3d", + this._x, + this._y, + this._z, + {onUpdate: this.onUpdate} + ); + } + + /** + * return a `me.Vector3d` copy of this `me.ObservableVector3d` object + * @name toVector3d + * @memberof ObservableVector3d + * @returns {Vector3d} new me.Vector3d + */ + toVector3d() { + return pool.pull("Vector3d", this._x, this._y, this._z); + } + + /** + * convert the object to a string representation + * @name toString + * @memberof ObservableVector3d + * @returns {string} + */ + toString() { + return "x:" + this._x + ",y:" + this._y + ",z:" + this._z; + } +} + +/** + * @classdesc + * a Matrix2d Object.
                            + * the identity matrix and parameters position :
                            + * + */ +class Matrix2d { + /** + * @param {(Matrix2d|Matrix3d|...number)} args - an instance of me.Matrix2d or me.Matrix3d to copy from, or individual matrix components (See {@link Matrix2d.setTransform}). If not arguments are given, the matrix will be set to Identity. + */ + constructor(...args) { + this.onResetEvent(...args); + } + + /** + * @ignore + */ + onResetEvent() { + const arg0 = arguments[0]; + const argLen = arguments.length; + + if (typeof this.val === "undefined") { + this.val = new Float32Array(9); + } + + if (argLen === 1) { + // matrix2d or matrix3d + if (arg0.val.length === 9) { + this.copy(arg0); + } else if (arg0.val.length === 16) { + this.fromMat3d(arguments[0]); + } else { + throw new Error("invalid Matrix2d constructor parameter"); + } + } else if (arguments.length >= 6) { + // individual components + this.setTransform.apply(this, arguments); + } else { + // invalid or no arguments + this.identity(); + } + } + + /** + * tx component of the matrix + * @type {number} + * @see Matrix2d.translate + */ + get tx() { + return this.val[6]; + } + + /** + * ty component of the matrix + * @type {number} + * @see Matrix2d.translate + */ + get ty() { + return this.val[7]; + } + + /** + * reset the transformation matrix to the identity matrix (no transformation).
                            + * the identity matrix and parameters position :
                            + * + * @returns {Matrix2d} Reference to this object for method chaining + */ + identity() { + this.setTransform( + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 + ); + return this; + } + + /** + * set the matrix to the specified value + * @param {number} a + * @param {number} b + * @param {number} c + * @param {number} d + * @param {number} e + * @param {number} f + * @param {number} [g=0] + * @param {number} [h=0] + * @param {number} [i=1] + * @returns {Matrix2d} Reference to this object for method chaining + */ + setTransform() { + let a = this.val; + + if (arguments.length === 9) { + a[0] = arguments[0]; // a - m00 + a[1] = arguments[1]; // b - m10 + a[2] = arguments[2]; // c - m20 + a[3] = arguments[3]; // d - m01 + a[4] = arguments[4]; // e - m11 + a[5] = arguments[5]; // f - m21 + a[6] = arguments[6]; // g - m02 + a[7] = arguments[7]; // h - m12 + a[8] = arguments[8]; // i - m22 + } else if (arguments.length === 6) { + a[0] = arguments[0]; // a + a[1] = arguments[2]; // c + a[2] = arguments[4]; // e + a[3] = arguments[1]; // b + a[4] = arguments[3]; // d + a[5] = arguments[5]; // f + a[6] = 0; // g + a[7] = 0; // h + a[8] = 1; // i + } + + return this; + } + + /** + * Multiplies the current transformation with the matrix described by the arguments of this method + * @param {number} a + * @param {number} b + * @param {number} c + * @param {number} d + * @param {number} e + * @param {number} f + * @returns {Matrix2d} Reference to this object for method chaining + */ + transform(a, b, c, d, e, f) { + let v = this.val, + a0 = v[0], + a1 = v[1], + a3 = v[3], + a4 = v[4], + + b0 = a, + b1 = b, + b3 = c, + b4 = d, + b6 = e, + b7 = f; + + v[0] = a0 * b0 + a3 * b1; + v[1] = a1 * b0 + a4 * b1; + v[3] = a0 * b3 + a3 * b4; + v[4] = a1 * b3 + a4 * b4; + v[6] += a0 * b6 + a3 * b7; + v[7] += a1 * b6 + a4 * b7; + + return this; + } + + /** + * Copies over the values from another me.Matrix2d. + * @param {Matrix2d} m - the matrix object to copy from + * @returns {Matrix2d} Reference to this object for method chaining + */ + copy(m) { + this.val.set(m.val); + return this; + } + + /** + * Copies over the upper-left 3x3 values from the given me.Matrix3d + * @param {Matrix3d} m - the matrix object to copy from + * @returns {Matrix2d} Reference to this object for method chaining + */ + fromMat3d(m) { + let b = m.val; + let a = this.val; + + a[0] = b[0]; + a[1] = b[1]; + a[2] = b[2]; + a[3] = b[4]; + a[4] = b[5]; + a[5] = b[6]; + a[6] = b[8]; + a[7] = b[9]; + a[8] = b[10]; + + return this; + } + + /** + * multiply both matrix + * @param {Matrix2d} m - the other matrix + * @returns {Matrix2d} Reference to this object for method chaining + */ + multiply(m) { + let b = m.val; + let a = this.val, + a0 = a[0], + a1 = a[1], + a3 = a[3], + a4 = a[4], + b0 = b[0], + b1 = b[1], + b3 = b[3], + b4 = b[4], + b6 = b[6], + b7 = b[7]; + + a[0] = a0 * b0 + a3 * b1; + a[1] = a1 * b0 + a4 * b1; + a[3] = a0 * b3 + a3 * b4; + a[4] = a1 * b3 + a4 * b4; + a[6] += a0 * b6 + a3 * b7; + a[7] += a1 * b6 + a4 * b7; + + return this; + } + + /** + * Transpose the value of this matrix. + * @returns {Matrix2d} Reference to this object for method chaining + */ + transpose() { + let a = this.val, + a1 = a[1], + a2 = a[2], + a5 = a[5]; + + a[1] = a[3]; + a[2] = a[6]; + a[3] = a1; + a[5] = a[7]; + a[6] = a2; + a[7] = a5; + + return this; + } + + /** + * invert this matrix, causing it to apply the opposite transformation. + * @returns {Matrix2d} Reference to this object for method chaining + */ + invert() { + let val = this.val; + + let a = val[ 0 ], b = val[ 1 ], c = val[ 2 ], + d = val[ 3 ], e = val[ 4 ], f = val[ 5 ], + g = val[ 6 ], h = val[ 7 ], i = val[ 8 ]; + + let ta = i * e - f * h, + td = f * g - i * d, + tg = h * d - e * g; + + let n = a * ta + b * td + c * tg; + + val[ 0 ] = ta / n; + val[ 1 ] = ( c * h - i * b ) / n; + val[ 2 ] = ( f * b - c * e ) / n; + + val[ 3 ] = td / n; + val[ 4 ] = ( i * a - c * g ) / n; + val[ 5 ] = ( c * d - f * a ) / n; + + val[ 6 ] = tg / n; + val[ 7 ] = ( b * g - h * a ) / n; + val[ 8 ] = ( e * a - b * d ) / n; + + return this; + } + + /** + * apply the current transform to the given 2d or 3d vector + * @param {Vector2d|Vector3d} v - the vector object to be transformed + * @returns {Vector2d|Vector3d} result vector object. + */ + apply(v) { + let a = this.val, + x = v.x, + y = v.y, + z = (typeof v.z !== "undefined") ? v.z : 1; + + v.x = x * a[0] + y * a[3] + z * a[6]; + v.y = x * a[1] + y * a[4] + z * a[7]; + + if (typeof v.z !== "undefined") { + v.z = x * a[2] + y * a[5] + z * a[8]; + } + + return v; + } + + /** + * apply the inverted current transform to the given 2d vector + * @param {Vector2d} v - the vector object to be transformed + * @returns {Vector2d} result vector object. + */ + applyInverse(v) { + let a = this.val, + x = v.x, + y = v.y; + + let invD = 1 / ((a[0] * a[4]) + (a[3] * -a[1])); + + v.x = (a[4] * invD * x) + (-a[3] * invD * y) + (((a[7] * a[3]) - (a[6] * a[4])) * invD); + v.y = (a[0] * invD * y) + (-a[1] * invD * x) + (((-a[7] * a[0]) + (a[6] * a[1])) * invD); + + return v; + } + + /** + * scale the matrix + * @param {number} x - a number representing the abscissa of the scaling vector. + * @param {number} [y=x] - a number representing the ordinate of the scaling vector. + * @returns {Matrix2d} Reference to this object for method chaining + */ + scale(x, y = x) { + let a = this.val; + + a[0] *= x; + a[1] *= x; + //a[2] *= x; // z axis remains unchanged for 2d scale operation + + a[3] *= y; + a[4] *= y; + //a[5] *= y; // w axis remains unchanged for 2d scale operation + + return this; + } + + /** + * adds a 2D scaling transformation. + * @param {Vector2d} v - scaling vector + * @returns {Matrix2d} Reference to this object for method chaining + */ + scaleV(v) { + return this.scale(v.x, v.y); + } + + /** + * specifies a 2D scale operation using the [sx, 1] scaling vector + * @param {number} x - x scaling vector + * @returns {Matrix2d} Reference to this object for method chaining + */ + scaleX(x) { + return this.scale(x, 1); + } + + /** + * specifies a 2D scale operation using the [1,sy] scaling vector + * @param {number} y - y scaling vector + * @returns {Matrix2d} Reference to this object for method chaining + */ + scaleY(y) { + return this.scale(1, y); + } + + /** + * rotate the matrix (counter-clockwise) by the specified angle (in radians). + * @param {number} angle - Rotation angle in radians. + * @returns {Matrix2d} Reference to this object for method chaining + */ + rotate(angle) { + if (angle !== 0) { + let a = this.val, + a00 = a[0], + a01 = a[1], + a02 = a[2], + a10 = a[3], + a11 = a[4], + a12 = a[5], + s = Math.sin(angle), + c = Math.cos(angle); + + a[0] = c * a00 + s * a10; + a[1] = c * a01 + s * a11; + a[2] = c * a02 + s * a12; + + a[3] = c * a10 - s * a00; + a[4] = c * a11 - s * a01; + a[5] = c * a12 - s * a02; + } + return this; + } + + /** + * translate the matrix position on the horizontal and vertical axis + * @param {number|Vector2d} x - the x coordindates or a vector to translate the matrix by + * @param {number} [y] - the y coordindates to translate the matrix by + * @returns {Matrix2d} Reference to this object for method chaining + */ + translate() { + let a = this.val; + let _x, _y; + + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + + a[6] += a[0] * _x + a[3] * _y; + a[7] += a[1] * _x + a[4] * _y; + + return this; + } + + /** + * returns true if the matrix is an identity matrix. + * @returns {boolean} + */ + isIdentity() { + let a = this.val; + + return ( + a[0] === 1 && + a[1] === 0 && + a[2] === 0 && + a[3] === 0 && + a[4] === 1 && + a[5] === 0 && + a[6] === 0 && + a[7] === 0 && + a[8] === 1 + ); + } + + /** + * return true if the two matrices are identical + * @param {Matrix2d} m - the other matrix + * @returns {boolean} true if both are equals + */ + equals(m) { + let b = m.val; + let a = this.val; + + return ( + (a[0] === b[0]) && + (a[1] === b[1]) && + (a[2] === b[2]) && + (a[3] === b[3]) && + (a[4] === b[4]) && + (a[5] === b[5]) && + (a[6] === b[6]) && + (a[7] === b[7]) && + (a[8] === b[8]) + ); + } + + /** + * Clone the Matrix + * @returns {Matrix2d} + */ + clone() { + return pool.pull("Matrix2d", this); + } + + /** + * return an array representation of this Matrix + * @returns {Float32Array} + */ + toArray() { + return this.val; + } + + /** + * convert the object to a string representation + * @returns {string} + */ + toString() { + let a = this.val; + + return "me.Matrix2d(" + + a[0] + ", " + a[1] + ", " + a[2] + ", " + + a[3] + ", " + a[4] + ", " + a[5] + ", " + + a[6] + ", " + a[7] + ", " + a[8] + + ")"; + } +} + +/** + * @classdesc + * a 4x4 Matrix3d Object + */ +class Matrix3d { + /** + * @param {(Matrix3d|...number)} args - An instance of me.Matrix3d to copy from, or individual Matrix components (See {@link Matrix3d.setTransform}). If not arguments are given, the matrix will be set to Identity. + */ + constructor(...args) { + this.onResetEvent(...args); + } + + /** + * @ignore + */ + onResetEvent() { + const arg0 = arguments[0]; + const argLen = arguments.length; + + if (typeof this.val === "undefined") { + this.val = new Float32Array(16); + } + + if (argLen === 1 && arg0.val.length === 16) { + // matrix3d + this.copy(arg0); + } else if (argLen === 16) { + // individual components + this.setTransform.apply(this, arguments); + } else { + // invalid or no arguments + this.identity(); + } + } + + /** + * tx component of the matrix + * @type {number} + */ + get tx() { + return this.val[12]; + } + + /** + * ty component of the matrix + * @type {number} + */ + get ty() { + return this.val[13]; + } + + /** + * ty component of the matrix + * @type {number} + */ + get tz() { + return this.val[14]; + } + + /** + * reset the transformation matrix to the identity matrix (no transformation).
                            + * the identity matrix and parameters position :
                            + * + * @returns {Matrix3d} Reference to this object for method chaining + */ + identity() { + return this.setTransform( + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ); + } + + /** + * set the matrix to the specified value + * @param {number} m00 + * @param {number} m01 + * @param {number} m02 + * @param {number} m03 + * @param {number} m10 + * @param {number} m11 + * @param {number} m12 + * @param {number} m13 + * @param {number} m20 + * @param {number} m21 + * @param {number} m22 + * @param {number} m23 + * @param {number} m30 + * @param {number} m31 + * @param {number} m32 + * @param {number} m33 + * @returns {Matrix3d} Reference to this object for method chaining + */ + setTransform(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) { + let a = this.val; + + a[0] = m00; + a[1] = m01; + a[2] = m02; + a[3] = m03; + a[4] = m10; + a[5] = m11; + a[6] = m12; + a[7] = m13; + a[8] = m20; + a[9] = m21; + a[10] = m22; + a[11] = m23; + a[12] = m30; + a[13] = m31; + a[14] = m32; + a[15] = m33; + + return this; + } + + /** + * Copies over the values from another me.Matrix3d. + * @param {Matrix3d} m - the matrix object to copy from + * @returns {Matrix3d} Reference to this object for method chaining + */ + copy(m) { + this.val.set(m.val); + return this; + } + + /** + * Copies over the upper-left 2x2 values from the given me.Matrix2d + * @param {Matrix2d} m - the matrix object to copy from + * @returns {Matrix2d} Reference to this object for method chaining + */ + fromMat2d(m) { + let b = m.val; + return this.setTransform( + b[0], b[3], b[6], 0, + b[1], b[4], b[7], 0, + b[2], b[5], b[8], 0, + 0, 0, 0, 1 + + ); + } + + /** + * multiply both matrix + * @param {Matrix3d} m - Other matrix + * @returns {Matrix3d} Reference to this object for method chaining + */ + multiply(m) { + let a = this.val; + let b = m.val; + + let a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; + let a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; + let a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; + let a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; + let b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3]; + + a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[4]; + b1 = b[5]; + b2 = b[6]; + b3 = b[7]; + + a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[8]; + b1 = b[9]; + b2 = b[10]; + b3 = b[11]; + + a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + b0 = b[12]; + b1 = b[13]; + b2 = b[14]; + b3 = b[15]; + + a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30; + a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31; + a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32; + a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33; + + return this; + } + + /** + * Transpose the value of this matrix. + * @returns {Matrix3d} Reference to this object for method chaining + */ + transpose() { + let a = this.val, + a01 = a[1], + a02 = a[2], + a03 = a[3], + a12 = a[6], + a13 = a[7], + a23 = a[11]; + + a[1] = a[4]; + a[2] = a[8]; + a[3] = a[12]; + a[4] = a01; + a[6] = a[9]; + a[7] = a[13]; + a[8] = a02; + a[9] = a12; + a[11] = a[14]; + a[12] = a03; + a[13] = a13; + a[14] = a23; + + return this; + } + + /** + * invert this matrix, causing it to apply the opposite transformation. + * @returns {Matrix3d} Reference to this object for method chaining + */ + invert() { + let a = this.val; + + let a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3]; + let a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7]; + let a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11]; + let a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; + + let b00 = a00 * a11 - a01 * a10; + let b01 = a00 * a12 - a02 * a10; + let b02 = a00 * a13 - a03 * a10; + let b03 = a01 * a12 - a02 * a11; + + let b04 = a01 * a13 - a03 * a11; + let b05 = a02 * a13 - a03 * a12; + let b06 = a20 * a31 - a21 * a30; + let b07 = a20 * a32 - a22 * a30; + + let b08 = a20 * a33 - a23 * a30; + let b09 = a21 * a32 - a22 * a31; + let b10 = a21 * a33 - a23 * a31; + let b11 = a22 * a33 - a23 * a32; + + // Calculate the determinant + let det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + + if (!det) + { + return null; + } + + det = 1 / det; + + a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det; + a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det; + a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det; + a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det; + a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det; + a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det; + a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det; + + return this; + } + + /** + * apply the current transform to the given 2d or 3d vector + * @param {Vector2d|Vector3d} v - the vector object to be transformed + * @returns {Vector2d|Vector3d} result vector object. + */ + apply(v) { + let a = this.val, + x = v.x, + y = v.y, + z = (typeof v.z !== "undefined") ? v.z : 1; + + let w = (a[3] * x + a[7] * y + a[11] * z + a[15]) || 1.0; + + v.x = (a[0] * x + a[4] * y + a[8] * z + a[12]) / w; + v.y = (a[1] * x + a[5] * y + a[9] * z + a[13]) / w; + + if (typeof v.z !== "undefined") { + v.z = (a[2] * x + a[6] * y + a[10] * z + a[14]) / w; + } + + return v; + } + + /** + * apply the inverted current transform to the given 2d or 3d vector + * @param {Vector2d|Vector3d} v - the vector object to be transformed + * @returns {Vector2d|Vector3d} result vector object. + */ + applyInverse(v) { + // invert the current matrix + let im = pool.pull("Matrix3d", this).invert(); + + // apply the inverted matrix + im.apply(v); + + pool.push(im); + + return v; + } + + /** + * generate an orthogonal projection matrix, with the result replacing the current matrix + *
                            + * @param {number} left - farthest left on the x-axis + * @param {number} right - farthest right on the x-axis + * @param {number} bottom - farthest down on the y-axis + * @param {number} top - farthest up on the y-axis + * @param {number} near - distance to the near clipping plane along the -Z axis + * @param {number} far - distance to the far clipping plane along the -Z axis + * @returns {Matrix3d} Reference to this object for method chaining + */ + ortho(left, right, bottom, top, near, far) { + let a = this.val; + let leftRight = 1.0 / (left - right); + let bottomTop = 1.0 / (bottom - top); + let nearFar = 1.0 / (near - far); + + a[0] = -2.0 * leftRight; + a[1] = 0.0; + a[2] = 0.0; + a[3] = 0.0; + a[4] = 0.0; + a[5] = -2.0 * bottomTop; + a[6] = 0.0; + a[7] = 0.0; + a[8] = 0.0; + a[9] = 0.0; + a[10] = 2.0 * nearFar; + a[11] = 0.0; + a[12] = (left + right) * leftRight; + a[13] = (top + bottom) * bottomTop; + a[14] = (far + near) * nearFar; + a[15] = 1.0; + + return this; + } + + /** + * scale the matrix + * @param {number} x - a number representing the abscissa of the scaling vector. + * @param {number} [y=x] - a number representing the ordinate of the scaling vector. + * @param {number} [z=0] - a number representing the depth vector + * @returns {Matrix3d} Reference to this object for method chaining + */ + scale(x, y = x, z = 0) { + let a = this.val; + + a[0] = a[0] * x; + a[1] = a[1] * x; + a[2] = a[2] * x; + a[3] = a[3] * x; + + a[4] = a[4] * y; + a[5] = a[5] * y; + a[6] = a[6] * y; + a[7] = a[7] * y; + + a[8] = a[8] * z; + a[9] = a[9] * z; + a[10] = a[10] * z; + a[11] = a[11] * z; + + return this; + } + + /** + * adds a 2D scaling transformation. + * @param {Vector2d|Vector3d} v - scaling vector + * @returns {Matrix3d} Reference to this object for method chaining + */ + scaleV(v) { + return this.scale(v.x, v.y, v.z); + } + + /** + * specifies a 2D scale operation using the [sx, 1] scaling vector + * @param {number} x - x scaling vector + * @returns {Matrix3d} Reference to this object for method chaining + */ + scaleX(x) { + return this.scale(x, 1); + } + + /** + * specifies a 2D scale operation using the [1,sy] scaling vector + * @param {number} y - y scaling vector + * @returns {Matrix3d} Reference to this object for method chaining + */ + scaleY(y) { + return this.scale(1, y); + } + + /** + * rotate this matrix (counter-clockwise) by the specified angle (in radians). + * @param {number} angle - Rotation angle in radians. + * @param {Vector3d} v - the axis to rotate around + * @returns {Matrix3d} Reference to this object for method chaining + */ + rotate(angle, v) { + if (angle !== 0) { + let a = this.val, + x = v.x, + y = v.y, + z = v.z; + + let len = Math.sqrt(x * x + y * y + z * z); + + let s, c, t; + let a00, a01, a02, a03; + let a10, a11, a12, a13; + let a20, a21, a22, a23; + let b00, b01, b02; + let b10, b11, b12; + let b20, b21, b22; + + if (len < EPSILON) { + return null; + } + + len = 1 / len; + x *= len; + y *= len; + z *= len; + + s = Math.sin(angle); + c = Math.cos(angle); + t = 1 - c; + + a00 = a[0]; + a01 = a[1]; + a02 = a[2]; + a03 = a[3]; + a10 = a[4]; + a11 = a[5]; + a12 = a[6]; + a13 = a[7]; + a20 = a[8]; + a21 = a[9]; + a22 = a[10]; + a23 = a[11]; + + // Construct the elements of the rotation matrix + b00 = x * x * t + c; + b01 = y * x * t + z * s; + b02 = z * x * t - y * s; + b10 = x * y * t - z * s; + b11 = y * y * t + c; + b12 = z * y * t + x * s; + b20 = x * z * t + y * s; + b21 = y * z * t - x * s; + b22 = z * z * t + c; + + // Perform rotation-specific matrix multiplication + a[0] = a00 * b00 + a10 * b01 + a20 * b02; + a[1] = a01 * b00 + a11 * b01 + a21 * b02; + a[2] = a02 * b00 + a12 * b01 + a22 * b02; + a[3] = a03 * b00 + a13 * b01 + a23 * b02; + a[4] = a00 * b10 + a10 * b11 + a20 * b12; + a[5] = a01 * b10 + a11 * b11 + a21 * b12; + a[6] = a02 * b10 + a12 * b11 + a22 * b12; + a[7] = a03 * b10 + a13 * b11 + a23 * b12; + a[8] = a00 * b20 + a10 * b21 + a20 * b22; + a[9] = a01 * b20 + a11 * b21 + a21 * b22; + a[10] = a02 * b20 + a12 * b21 + a22 * b22; + a[11] = a03 * b20 + a13 * b21 + a23 * b22; + } + return this; + } + + /** + * translate the matrix position using the given vector + * @param {number|Vector2d|Vector3d} x - a number representing the abscissa of the vector, or a vector object + * @param {number} [y] - a number representing the ordinate of the vector. + * @param {number} [z=0] - a number representing the depth of the vector + * @returns {Matrix3d} Reference to this object for method chaining + */ + translate() { + let a = this.val; + let _x, _y, _z; + + if (arguments.length > 1 ) { + // x, y (, z) + _x = arguments[0]; + _y = arguments[1]; + _z = typeof(arguments[2]) === "undefined" ? 0 : arguments[2]; + } else { + // 2d/3d vector + _x = arguments[0].x; + _y = arguments[0].y; + _z = typeof(arguments[0].z) === "undefined" ? 0 : arguments[0].z; + } + + a[12] = a[0] * _x + a[4] * _y + a[8] * _z + a[12]; + a[13] = a[1] * _x + a[5] * _y + a[9] * _z + a[13]; + a[14] = a[2] * _x + a[6] * _y + a[10] * _z + a[14]; + a[15] = a[3] * _x + a[7] * _y + a[11] * _z + a[15]; + + return this; + } + + /** + * returns true if the matrix is an identity matrix. + * @returns {boolean} + */ + isIdentity() { + let a = this.val; + + return ( + (a[0] === 1) && + (a[1] === 0) && + (a[2] === 0) && + (a[3] === 0) && + (a[4] === 0) && + (a[5] === 1) && + (a[6] === 0) && + (a[7] === 0) && + (a[8] === 0) && + (a[9] === 0) && + (a[10] === 1) && + (a[11] === 0) && + (a[12] === 0) && + (a[13] === 0) && + (a[14] === 0) && + (a[15] === 1) + ); + } + + /** + * return true if the two matrices are identical + * @param {Matrix3d} m - the other matrix + * @returns {boolean} true if both are equals + */ + equals(m) { + let b = m.val; + let a = this.val; + + return ( + (a[0] === b[0]) && + (a[1] === b[1]) && + (a[2] === b[2]) && + (a[3] === b[3]) && + (a[4] === b[4]) && + (a[5] === b[5]) && + (a[6] === b[6]) && + (a[7] === b[7]) && + (a[8] === b[8]) && + (a[9] === b[9]) && + (a[10] === b[10]) && + (a[11] === b[11]) && + (a[12] === b[12]) && + (a[13] === b[13]) && + (a[14] === b[14]) && + (a[15] === b[15]) + ); + } + + /** + * Clone the Matrix + * @returns {Matrix3d} + */ + clone() { + return pool.pull("Matrix3d", this); + } + + /** + * return an array representation of this Matrix + * @returns {Float32Array} + */ + toArray() { + return this.val; + } + + /** + * convert the object to a string representation + * @returns {string} + */ + toString() { + let a = this.val; + + return "me.Matrix3d(" + + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ", " + + a[8] + ", " + a[9] + ", " + a[10] + ", " + a[11] + ", " + + a[12] + ", " + a[13] + ", " + a[14] + ", " + a[15] + + ")"; + } +} + +var earcut$2 = {exports: {}}; + +var earcut_1 = earcut$2.exports; + +'use strict'; + +earcut$2.exports = earcut; +var _default = earcut$2.exports.default = earcut; + +function earcut(data, holeIndices, dim) { + + dim = dim || 2; + + var hasHoles = holeIndices && holeIndices.length, + outerLen = hasHoles ? holeIndices[0] * dim : data.length, + outerNode = linkedList(data, 0, outerLen, dim, true), + triangles = []; + + if (!outerNode || outerNode.next === outerNode.prev) return triangles; + + var minX, minY, maxX, maxY, x, y, invSize; + + if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim); + + // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox + if (data.length > 80 * dim) { + minX = maxX = data[0]; + minY = maxY = data[1]; + + for (var i = dim; i < outerLen; i += dim) { + x = data[i]; + y = data[i + 1]; + if (x < minX) minX = x; + if (y < minY) minY = y; + if (x > maxX) maxX = x; + if (y > maxY) maxY = y; + } + + // minX, minY and invSize are later used to transform coords into integers for z-order calculation + invSize = Math.max(maxX - minX, maxY - minY); + invSize = invSize !== 0 ? 32767 / invSize : 0; + } + + earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0); + + return triangles; +} + +// create a circular doubly linked list from polygon points in the specified winding order +function linkedList(data, start, end, dim, clockwise) { + var i, last; + + if (clockwise === (signedArea(data, start, end, dim) > 0)) { + for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last); + } else { + for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last); + } + + if (last && equals(last, last.next)) { + removeNode(last); + last = last.next; + } + + return last; +} + +// eliminate colinear or duplicate points +function filterPoints(start, end) { + if (!start) return start; + if (!end) end = start; + + var p = start, + again; + do { + again = false; + + if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) { + removeNode(p); + p = end = p.prev; + if (p === p.next) break; + again = true; + + } else { + p = p.next; + } + } while (again || p !== end); + + return end; +} + +// main ear slicing loop which triangulates a polygon (given as a linked list) +function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) { + if (!ear) return; + + // interlink polygon nodes in z-order + if (!pass && invSize) indexCurve(ear, minX, minY, invSize); + + var stop = ear, + prev, next; + + // iterate through ears, slicing them one by one + while (ear.prev !== ear.next) { + prev = ear.prev; + next = ear.next; + + if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) { + // cut off the triangle + triangles.push(prev.i / dim | 0); + triangles.push(ear.i / dim | 0); + triangles.push(next.i / dim | 0); + + removeNode(ear); + + // skipping the next vertex leads to less sliver triangles + ear = next.next; + stop = next.next; + + continue; + } + + ear = next; + + // if we looped through the whole remaining polygon and can't find any more ears + if (ear === stop) { + // try filtering points and slicing again + if (!pass) { + earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1); + + // if this didn't work, try curing all small self-intersections locally + } else if (pass === 1) { + ear = cureLocalIntersections(filterPoints(ear), triangles, dim); + earcutLinked(ear, triangles, dim, minX, minY, invSize, 2); + + // as a last resort, try splitting the remaining polygon into two + } else if (pass === 2) { + splitEarcut(ear, triangles, dim, minX, minY, invSize); + } + + break; + } + } +} + +// check whether a polygon node forms a valid ear with adjacent nodes +function isEar(ear) { + var a = ear.prev, + b = ear, + c = ear.next; + + if (area(a, b, c) >= 0) return false; // reflex, can't be an ear + + // now make sure we don't have other points inside the potential ear + var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y; + + // triangle bbox; min & max are calculated like this for speed + var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx), + y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy), + x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx), + y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy); + + var p = c.next; + while (p !== a) { + if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && + pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && + area(p.prev, p, p.next) >= 0) return false; + p = p.next; + } + + return true; +} + +function isEarHashed(ear, minX, minY, invSize) { + var a = ear.prev, + b = ear, + c = ear.next; + + if (area(a, b, c) >= 0) return false; // reflex, can't be an ear + + var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y; + + // triangle bbox; min & max are calculated like this for speed + var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx), + y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy), + x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx), + y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy); + + // z-order range for the current triangle bbox; + var minZ = zOrder(x0, y0, minX, minY, invSize), + maxZ = zOrder(x1, y1, minX, minY, invSize); + + var p = ear.prevZ, + n = ear.nextZ; + + // look for points inside the triangle in both directions + while (p && p.z >= minZ && n && n.z <= maxZ) { + if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && + pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false; + p = p.prevZ; + + if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && + pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false; + n = n.nextZ; + } + + // look for remaining points in decreasing z-order + while (p && p.z >= minZ) { + if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && + pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false; + p = p.prevZ; + } + + // look for remaining points in increasing z-order + while (n && n.z <= maxZ) { + if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && + pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false; + n = n.nextZ; + } + + return true; +} + +// go through all polygon nodes and cure small local self-intersections +function cureLocalIntersections(start, triangles, dim) { + var p = start; + do { + var a = p.prev, + b = p.next.next; + + if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) { + + triangles.push(a.i / dim | 0); + triangles.push(p.i / dim | 0); + triangles.push(b.i / dim | 0); + + // remove two nodes involved + removeNode(p); + removeNode(p.next); + + p = start = b; + } + p = p.next; + } while (p !== start); + + return filterPoints(p); +} + +// try splitting polygon into two and triangulate them independently +function splitEarcut(start, triangles, dim, minX, minY, invSize) { + // look for a valid diagonal that divides the polygon into two + var a = start; + do { + var b = a.next.next; + while (b !== a.prev) { + if (a.i !== b.i && isValidDiagonal(a, b)) { + // split the polygon in two by the diagonal + var c = splitPolygon(a, b); + + // filter colinear points around the cuts + a = filterPoints(a, a.next); + c = filterPoints(c, c.next); + + // run earcut on each half + earcutLinked(a, triangles, dim, minX, minY, invSize, 0); + earcutLinked(c, triangles, dim, minX, minY, invSize, 0); + return; + } + b = b.next; + } + a = a.next; + } while (a !== start); +} + +// link every hole into the outer loop, producing a single-ring polygon without holes +function eliminateHoles(data, holeIndices, outerNode, dim) { + var queue = [], + i, len, start, end, list; + + for (i = 0, len = holeIndices.length; i < len; i++) { + start = holeIndices[i] * dim; + end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; + list = linkedList(data, start, end, dim, false); + if (list === list.next) list.steiner = true; + queue.push(getLeftmost(list)); + } + + queue.sort(compareX); + + // process holes from left to right + for (i = 0; i < queue.length; i++) { + outerNode = eliminateHole(queue[i], outerNode); + } + + return outerNode; +} + +function compareX(a, b) { + return a.x - b.x; +} + +// find a bridge between vertices that connects hole with an outer ring and and link it +function eliminateHole(hole, outerNode) { + var bridge = findHoleBridge(hole, outerNode); + if (!bridge) { + return outerNode; + } + + var bridgeReverse = splitPolygon(bridge, hole); + + // filter collinear points around the cuts + filterPoints(bridgeReverse, bridgeReverse.next); + return filterPoints(bridge, bridge.next); +} + +// David Eberly's algorithm for finding a bridge between hole and outer polygon +function findHoleBridge(hole, outerNode) { + var p = outerNode, + hx = hole.x, + hy = hole.y, + qx = -Infinity, + m; + + // find a segment intersected by a ray from the hole's leftmost point to the left; + // segment's endpoint with lesser x will be potential connection point + do { + if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) { + var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y); + if (x <= hx && x > qx) { + qx = x; + m = p.x < p.next.x ? p : p.next; + if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint + } + } + p = p.next; + } while (p !== outerNode); + + if (!m) return null; + + // look for points inside the triangle of hole point, segment intersection and endpoint; + // if there are no points found, we have a valid connection; + // otherwise choose the point of the minimum angle with the ray as connection point + + var stop = m, + mx = m.x, + my = m.y, + tanMin = Infinity, + tan; + + p = m; + + do { + if (hx >= p.x && p.x >= mx && hx !== p.x && + pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) { + + tan = Math.abs(hy - p.y) / (hx - p.x); // tangential + + if (locallyInside(p, hole) && + (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) { + m = p; + tanMin = tan; + } + } + + p = p.next; + } while (p !== stop); + + return m; +} + +// whether sector in vertex m contains sector in vertex p in the same coordinates +function sectorContainsSector(m, p) { + return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0; +} + +// interlink polygon nodes in z-order +function indexCurve(start, minX, minY, invSize) { + var p = start; + do { + if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize); + p.prevZ = p.prev; + p.nextZ = p.next; + p = p.next; + } while (p !== start); + + p.prevZ.nextZ = null; + p.prevZ = null; + + sortLinked(p); +} + +// Simon Tatham's linked list merge sort algorithm +// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html +function sortLinked(list) { + var i, p, q, e, tail, numMerges, pSize, qSize, + inSize = 1; + + do { + p = list; + list = null; + tail = null; + numMerges = 0; + + while (p) { + numMerges++; + q = p; + pSize = 0; + for (i = 0; i < inSize; i++) { + pSize++; + q = q.nextZ; + if (!q) break; + } + qSize = inSize; + + while (pSize > 0 || (qSize > 0 && q)) { + + if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) { + e = p; + p = p.nextZ; + pSize--; + } else { + e = q; + q = q.nextZ; + qSize--; + } + + if (tail) tail.nextZ = e; + else list = e; + + e.prevZ = tail; + tail = e; + } + + p = q; + } + + tail.nextZ = null; + inSize *= 2; + + } while (numMerges > 1); + + return list; +} + +// z-order of a point given coords and inverse of the longer side of data bbox +function zOrder(x, y, minX, minY, invSize) { + // coords are transformed into non-negative 15-bit integer range + x = (x - minX) * invSize | 0; + y = (y - minY) * invSize | 0; + + x = (x | (x << 8)) & 0x00FF00FF; + x = (x | (x << 4)) & 0x0F0F0F0F; + x = (x | (x << 2)) & 0x33333333; + x = (x | (x << 1)) & 0x55555555; + + y = (y | (y << 8)) & 0x00FF00FF; + y = (y | (y << 4)) & 0x0F0F0F0F; + y = (y | (y << 2)) & 0x33333333; + y = (y | (y << 1)) & 0x55555555; + + return x | (y << 1); +} + +// find the leftmost node of a polygon ring +function getLeftmost(start) { + var p = start, + leftmost = start; + do { + if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p; + p = p.next; + } while (p !== start); + + return leftmost; +} + +// check if a point lies within a convex triangle +function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) { + return (cx - px) * (ay - py) >= (ax - px) * (cy - py) && + (ax - px) * (by - py) >= (bx - px) * (ay - py) && + (bx - px) * (cy - py) >= (cx - px) * (by - py); +} + +// check if a diagonal between two polygon nodes is valid (lies in polygon interior) +function isValidDiagonal(a, b) { + return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges + (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible + (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors + equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case +} + +// signed area of a triangle +function area(p, q, r) { + return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); +} + +// check if two points are equal +function equals(p1, p2) { + return p1.x === p2.x && p1.y === p2.y; +} + +// check if two segments intersect +function intersects(p1, q1, p2, q2) { + var o1 = sign(area(p1, q1, p2)); + var o2 = sign(area(p1, q1, q2)); + var o3 = sign(area(p2, q2, p1)); + var o4 = sign(area(p2, q2, q1)); + + if (o1 !== o2 && o3 !== o4) return true; // general case + + if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 + if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 + if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 + if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 + + return false; +} + +// for collinear points p, q, r, check if point q lies on segment pr +function onSegment(p, q, r) { + return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y); +} + +function sign(num) { + return num > 0 ? 1 : num < 0 ? -1 : 0; +} + +// check if a polygon diagonal intersects any polygon segments +function intersectsPolygon(a, b) { + var p = a; + do { + if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && + intersects(p, p.next, a, b)) return true; + p = p.next; + } while (p !== a); + + return false; +} + +// check if a polygon diagonal is locally inside the polygon +function locallyInside(a, b) { + return area(a.prev, a, a.next) < 0 ? + area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : + area(a, b, a.prev) < 0 || area(a, a.next, b) < 0; +} + +// check if the middle point of a polygon diagonal is inside the polygon +function middleInside(a, b) { + var p = a, + inside = false, + px = (a.x + b.x) / 2, + py = (a.y + b.y) / 2; + do { + if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y && + (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x)) + inside = !inside; + p = p.next; + } while (p !== a); + + return inside; +} + +// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two; +// if one belongs to the outer ring and another to a hole, it merges it into a single ring +function splitPolygon(a, b) { + var a2 = new Node$1(a.i, a.x, a.y), + b2 = new Node$1(b.i, b.x, b.y), + an = a.next, + bp = b.prev; + + a.next = b; + b.prev = a; + + a2.next = an; + an.prev = a2; + + b2.next = a2; + a2.prev = b2; + + bp.next = b2; + b2.prev = bp; + + return b2; +} + +// create a node and optionally link it with previous one (in a circular doubly linked list) +function insertNode(i, x, y, last) { + var p = new Node$1(i, x, y); + + if (!last) { + p.prev = p; + p.next = p; + + } else { + p.next = last.next; + p.prev = last; + last.next.prev = p; + last.next = p; + } + return p; +} + +function removeNode(p) { + p.next.prev = p.prev; + p.prev.next = p.next; + + if (p.prevZ) p.prevZ.nextZ = p.nextZ; + if (p.nextZ) p.nextZ.prevZ = p.prevZ; +} + +function Node$1(i, x, y) { + // vertex index in coordinates array + this.i = i; + + // vertex coordinates + this.x = x; + this.y = y; + + // previous and next vertex nodes in a polygon ring + this.prev = null; + this.next = null; + + // z-order curve value + this.z = 0; + + // previous and next nodes in z-order + this.prevZ = null; + this.nextZ = null; + + // indicates whether this is a steiner point + this.steiner = false; +} + +// return a percentage difference between the polygon area and its triangulation area; +// used to verify correctness of triangulation +earcut.deviation = function (data, holeIndices, dim, triangles) { + var hasHoles = holeIndices && holeIndices.length; + var outerLen = hasHoles ? holeIndices[0] * dim : data.length; + + var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim)); + if (hasHoles) { + for (var i = 0, len = holeIndices.length; i < len; i++) { + var start = holeIndices[i] * dim; + var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; + polygonArea -= Math.abs(signedArea(data, start, end, dim)); + } + } + + var trianglesArea = 0; + for (i = 0; i < triangles.length; i += 3) { + var a = triangles[i] * dim; + var b = triangles[i + 1] * dim; + var c = triangles[i + 2] * dim; + trianglesArea += Math.abs( + (data[a] - data[c]) * (data[b + 1] - data[a + 1]) - + (data[a] - data[b]) * (data[c + 1] - data[a + 1])); + } + + return polygonArea === 0 && trianglesArea === 0 ? 0 : + Math.abs((trianglesArea - polygonArea) / polygonArea); +}; + +function signedArea(data, start, end, dim) { + var sum = 0; + for (var i = start, j = end - dim; i < end; i += dim) { + sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]); + j = i; + } + return sum; +} + +// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts +earcut.flatten = function (data) { + var dim = data[0][0].length, + result = {vertices: [], holes: [], dimensions: dim}, + holeIndex = 0; + + for (var i = 0; i < data.length; i++) { + for (var j = 0; j < data[i].length; j++) { + for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]); + } + if (i > 0) { + holeIndex += data[i - 1].length; + result.holes.push(holeIndex); + } + } + return result; +}; + +var earcutExports = earcut$2.exports; +var earcut$1 = /*@__PURE__*/getDefaultExportFromCjs(earcutExports); + +/** + * @classdesc + * a polygon Object.
                            + * Please do note that melonJS implements a simple Axis-Aligned Boxes collision algorithm, which requires all polygons used for collision to be convex with all vertices defined with clockwise winding. + * A polygon is convex when all line segments connecting two points in the interior do not cross any edge of the polygon + * (which means that all angles are less than 180 degrees), as described here below :
                            + *

                            + * A polygon's `winding` is clockwise if its vertices (points) are declared turning to the right. The image above shows COUNTERCLOCKWISE winding. + */ +class Polygon { + /** + * @param {number} [x=0] - origin point of the Polygon + * @param {number} [y=0] - origin point of the Polygon + * @param {Vector2d[]} points - array of vector defining the Polygon + */ + constructor(x = 0, y = 0, points) { + /** + * origin point of the Polygon + * @type {Vector2d} + */ + this.pos = pool.pull("Vector2d"); + + /** + * Array of points defining the Polygon
                            + * Note: If you manually change `points`, you **must** call `recalc`afterwards so that the changes get applied correctly. + * @type {Vector2d[]} + */ + this.points = []; + + /** + * The edges here are the direction of the `n`th edge of the polygon, relative to + * the `n`th point. If you want to draw a given edge from the edge value, you must + * first translate to the position of the starting point. + * @ignore + */ + this.edges = []; + + /** + * a list of indices for all vertices composing this polygon (@see earcut) + * @ignore + */ + this.indices = []; + + /** + * The normals here are the direction of the normal for the `n`th edge of the polygon, relative + * to the position of the `n`th point. If you want to draw an edge normal, you must first + * translate to the position of the starting point. + * @ignore + */ + this.normals = []; + + // The bounding rectangle for this shape + this._bounds; + + /** + * the shape type (used internally) + * @type {string} + * @default "Polygon" + */ + this.type = "Polygon"; + this.setShape(x, y, points); + } + + /** @ignore */ + onResetEvent(x, y, points) { + this.setShape(x, y, points); + } + + /** + * set new value to the Polygon + * @param {number} x - position of the Polygon + * @param {number} y - position of the Polygon + * @param {Vector2d[]|number[]} points - array of vector or vertice defining the Polygon + * @returns {Polygon} this instance for objecf chaining + */ + setShape(x, y, points) { + this.pos.set(x, y); + this.setVertices(points); + return this; + } + + /** + * set the vertices defining this Polygon + * @param {Vector2d[]} vertices - array of vector or vertice defining the Polygon + * @returns {Polygon} this instance for objecf chaining + */ + setVertices(vertices) { + if (!Array.isArray(vertices)) { + return this; + } + + if (typeof vertices[0] === "object") { + if (typeof vertices[0].setV === "function") { + // array of Vector2d + this.points = vertices; + } else { + // array of {x,y} objects + this.points.length = 0; // fix potential memory leak + vertices.forEach((vertice) => { + this.points.push(pool.pull("Vector2d", vertice.x, vertice.y)); + }); + } + } else { + // it's a flat array of numbers + let verticesLength = vertices.length; + this.points.length = 0; // fix potential memory leak + for (let p = 0; p < verticesLength; p += 2) { + this.points.push(pool.pull("Vector2d", vertices[p], vertices[p + 1])); + } + } + + this.recalc(); + this.updateBounds(); + return this; + } + + /** + * apply the given transformation matrix to this Polygon + * @param {Matrix2d} m - the transformation matrix + * @returns {Polygon} Reference to this object for method chaining + */ + transform(m) { + let points = this.points; + let len = points.length; + for (let i = 0; i < len; i++) { + m.apply(points[i]); + } + this.recalc(); + this.updateBounds(); + return this; + } + + /** + * apply an isometric projection to this shape + * @returns {Polygon} Reference to this object for method chaining + */ + toIso() { + return this.rotate(Math.PI / 4).scale(Math.SQRT2, Math.SQRT1_2); + } + + /** + * apply a 2d projection to this shapen + * @returns {Polygon} Reference to this object for method chaining + */ + to2d() { + return this.scale(Math.SQRT1_2, Math.SQRT2).rotate(-Math.PI / 4); + } + + /** + * Rotate this Polygon (counter-clockwise) by the specified angle (in radians). + * @param {number} angle - The angle to rotate (in radians) + * @param {Vector2d|ObservableVector2d} [v] - an optional point to rotate around + * @returns {Polygon} Reference to this object for method chaining + */ + rotate(angle, v) { + if (angle !== 0) { + let points = this.points; + let len = points.length; + for (let i = 0; i < len; i++) { + points[i].rotate(angle, v); + } + this.recalc(); + this.updateBounds(); + } + return this; + } + + /** + * Scale this Polygon by the given scalar. + * @param {number} x + * @param {number} [y=x] + * @returns {Polygon} Reference to this object for method chaining + */ + scale(x, y = x) { + let points = this.points; + let len = points.length; + for (let i = 0; i < len; i++) { + points[i].scale(x, y); + } + this.recalc(); + this.updateBounds(); + return this; + } + + /** + * Scale this Polygon by the given vector + * @param {Vector2d} v + * @returns {Polygon} Reference to this object for method chaining + */ + scaleV(v) { + return this.scale(v.x, v.y); + } + + /** + * Computes the calculated collision polygon. + * This **must** be called if the `points` array, `angle`, or `offset` is modified manually. + * @returns {Polygon} Reference to this object for method chaining + */ + recalc() { + let edges = this.edges; + let normals = this.normals; + let indices = this.indices; + + // Copy the original points array and apply the offset/angle + let points = this.points; + let len = points.length; + + if (len < 3) { + throw new Error("Requires at least 3 points"); + } + + // Calculate the edges/normals + for (let i = 0; i < len; i++) { + let edge = edges[i]; + if (typeof edge === "undefined") { + edge = edges[i] = pool.pull("Vector2d"); + } + edge.copy(points[(i + 1) % len]).sub(points[i]); + + let normal = normals[i]; + if (typeof normal === "undefined") { + normal = normals[i] = pool.pull("Vector2d"); + } + normal.copy(edge).perp().normalize(); + } + + // Release any existing Vector2d objects back to the pool + for (let i = len; i < edges.length; i++) { + pool.push(edges[i]); + pool.push(normals[i]); + } + + // trunc array + edges.length = len; + normals.length = len; + + // do not do anything here, indices will be computed by + // getIndices if array is empty upon function call + indices.length = 0; + + return this; + } + + + /** + * returns a list of indices for all triangles defined in this polygon + * @returns {Array.} an array of vertex indices for all triangles forming this polygon. + */ + getIndices() { + if (this.indices.length === 0) { + this.indices = earcut$1(this.points.flatMap(p => [p.x, p.y])); + } + return this.indices; + } + + /** + * Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order). + * @returns {boolean} true if the vertices are convex, false if not, null if not computable + */ + isConvex() { + // http://paulbourke.net/geometry/polygonmesh/ + // Copyright (c) Paul Bourke (use permitted) + + let flag = 0, + vertices = this.points, + n = vertices.length; + + if (n < 3) { + return null; + } + + for (let i = 0; i < n; i++) { + let j = (i + 1) % n; + let k = (i + 2) % n; + let z = (vertices[j].x - vertices[i].x) * (vertices[k].y - vertices[j].y); + z -= (vertices[j].y - vertices[i].y) * (vertices[k].x - vertices[j].x); + + if (z < 0) { + flag |= 1; + } else if (z > 0) { + flag |= 2; + } + + if (flag === 3) { + return false; + } + } + + if (flag !== 0) { + return true; + } else { + return null; + } + } + + /** + * translate the Polygon by the specified offset + * @param {number|Vector2d} x - x offset or a vector point to translate by + * @param {number} [y] - y offset + * @returns {Polygon} Reference to this object for method chaining + * @example + * polygon.translate(10, 10); + * // or + * polygon.translate(myVector2d); + */ + translate() { + let _x, _y; + + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + + this.pos.x += _x; + this.pos.y += _y; + this.getBounds().translate(_x, _y); + + return this; + } + + /** + * Shifts the Polygon to the given position vector. + * @param {number|Vector2d} x - x coordinate or a vector point to shift to + * @param {number} [y] + * @example + * polygon.shift(10, 10); + * // or + * polygon.shift(myVector2d); + */ + shift() { + let _x, _y; + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + this.pos.x = _x; + this.pos.y = _y; + this.updateBounds(); + } + + /** + * Returns true if the polygon contains the given point.
                            + * (Note: it is highly recommended to first do a hit test on the corresponding
                            + * bounding rect, as the function can be highly consuming with complex shapes) + * @param {number|Vector2d} x - x coordinate or a vector point to check + * @param {number} [y] - y coordinate + * @returns {boolean} True if the polygon contain the point, otherwise false + * @example + * if (polygon.contains(10, 10)) { + * // do something + * } + * // or + * if (polygon.contains(myVector2d)) { + * // do something + * } + */ + contains() { + let _x, _y; + + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + + let intersects = false; + let posx = this.pos.x, posy = this.pos.y; + let points = this.points; + let len = points.length; + + //http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html + for (let i = 0, j = len - 1; i < len; j = i++) { + const iy = points[i].y + posy, ix = points[i].x + posx, + jy = points[j].y + posy, jx = points[j].x + posx; + if (((iy > _y) !== (jy > _y)) && (_x < (jx - ix) * (_y - iy) / (jy - iy) + ix)) { + intersects = !intersects; + } + } + return intersects; + } + + /** + * returns the bounding box for this shape, the smallest Rectangle object completely containing this shape. + * @returns {Bounds} this shape bounding box Rectangle object + */ + getBounds() { + if (typeof this._bounds === "undefined") { + this._bounds = pool.pull("Bounds"); + } + return this._bounds; + } + + /** + * update the bounding box for this shape. + * @returns {Bounds} this shape bounding box Rectangle object + */ + updateBounds() { + let bounds = this.getBounds(); + + bounds.update(this.points); + bounds.translate(this.pos); + + return bounds; + } + + /** + * clone this Polygon + * @returns {Polygon} new Polygon + */ + clone() { + let copy = []; + this.points.forEach((point) => { + copy.push(point.clone()); + }); + return new Polygon(this.pos.x, this.pos.y, copy); + } +} + +/** + * @classdesc + * a line segment Object + * @augments Polygon + * @param {number} x - origin point of the Line + * @param {number} y - origin point of the Line + * @param {Vector2d[]} points - array of vectors defining the Line + */ + +class Line extends Polygon { + + /** + * Returns true if the Line contains the given point + * @param {number|Vector2d} x - x coordinate or a vector point to check + * @param {number} [y] - y coordinate + * @returns {boolean} true if contains + * @example + * if (line.contains(10, 10)) { + * // do something + * } + * // or + * if (line.contains(myVector2d)) { + * // do something + * } + */ + contains() { + let _x, _y; + + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + + // translate the given coordinates, + // rather than creating temp translated vectors + _x -= this.pos.x; // Cx + _y -= this.pos.y; // Cy + let start = this.points[0]; // Ax/Ay + let end = this.points[1]; // Bx/By + + //(Cy - Ay) * (Bx - Ax) = (By - Ay) * (Cx - Ax) + return (_y - start.y) * (end.x - start.x) === (end.y - start.y) * (_x - start.x); + } + + /** + * Computes the calculated collision edges and normals. + * This **must** be called if the `points` array, `angle`, or `offset` is modified manually. + * @returns {Line} this instance for objecf chaining + */ + recalc() { + let edges = this.edges; + let normals = this.normals; + let indices = this.indices; + + // Copy the original points array and apply the offset/angle + let points = this.points; + + if (points.length !== 2) { + throw new Error("Requires exactly 2 points"); + } + + // Calculate the edges/normals + if (edges[0] === undefined) { + edges[0] = pool.pull("Vector2d"); + } + edges[0].copy(points[1]).sub(points[0]); + if (normals[0] === undefined) { + normals[0] = pool.pull("Vector2d"); + } + normals[0].copy(edges[0]).perp().normalize(); + + // do not do anything here, indices will be computed by + // toIndices if array is empty upon function call + indices.length = 0; + + return this; + } + + /** + * clone this line segment + * @returns {Line} new Line + */ + clone() { + let copy = []; + this.points.forEach((point) => { + copy.push(point.clone()); + }); + return new Line(this.pos.x, this.pos.y, copy); + } + +} + +/** + * @classdesc + * an ellipse Object + */ +class Ellipse { + /** + * @param {number} x - the center x coordinate of the ellipse + * @param {number} y - the center y coordinate of the ellipse + * @param {number} w - width (diameter) of the ellipse + * @param {number} h - height (diameter) of the ellipse + */ + constructor(x, y, w, h) { + /** + * the center coordinates of the ellipse + * @public + * @type {Vector2d} + */ + this.pos = pool.pull("Vector2d"); + + /** + * The bounding rectangle for this shape + * @private + */ + this._bounds = undefined; + + /** + * Maximum radius of the ellipse + * @public + * @type {number} + */ + this.radius = NaN; + + /** + * Pre-scaled radius vector for ellipse + * @public + * @type {Vector2d} + */ + this.radiusV = pool.pull("Vector2d"); + + /** + * Radius squared, for pythagorean theorom + * @public + * @type {Vector2d} + */ + this.radiusSq = pool.pull("Vector2d"); + + /** + * x/y scaling ratio for ellipse + * @public + * @type {Vector2d} + */ + this.ratio = pool.pull("Vector2d"); + + /** + * the shape type (used internally) + * @type {string} + * @default "Ellipse" + */ + this.type = "Ellipse"; + this.setShape(x, y, w, h); + } + + /** @ignore */ + onResetEvent(x, y, w, h) { + this.setShape(x, y, w, h); + } + + /** + * set new value to the Ellipse shape + * @param {number} x - the center x coordinate of the ellipse + * @param {number} y - the center y coordinate of the ellipse + * @param {number} w - width (diameter) of the ellipse + * @param {number} h - height (diameter) of the ellipse + * @returns {Ellipse} this instance for objecf chaining + */ + setShape(x, y, w, h) { + const hW = w / 2; + const hH = h / 2; + const radius = Math.max(hW, hH); + const r = radius * radius; + + this.pos.set(x, y); + this.radius = radius; + this.ratio.set(hW / radius, hH / radius); + this.radiusV.set(radius, radius).scaleV(this.ratio); + this.radiusSq.set(r, r).scaleV(this.ratio); + + let bounds = this.getBounds(); + // update the corresponding bounds + bounds.setMinMax(x, y, x + w, x + h); + // elipse position is the center of the cirble, bounds position are top left + bounds.translate(-this.radiusV.x, -this.radiusV.y); + + return this; + } + + /** + * Rotate this Ellipse (counter-clockwise) by the specified angle (in radians). + * @param {number} angle - The angle to rotate (in radians) + * @param {Vector2d|ObservableVector2d} [v] - an optional point to rotate around + * @returns {Ellipse} Reference to this object for method chaining + */ + rotate(angle, v) { + let bounds = this.getBounds(); + // TODO : only works for circle + this.pos.rotate(angle, v); + bounds.shift(this.pos); + bounds.translate(-this.radiusV.x, -this.radiusV.y); + return this; + } + + /** + * Scale this Ellipse by the specified scalar. + * @param {number} x - the scale factor along the x-axis + * @param {number} [y=x] - the scale factor along the y-axis + * @returns {Ellipse} Reference to this object for method chaining + */ + scale(x, y = x) { + return this.setShape( + this.pos.x, + this.pos.y, + this.radiusV.x * 2 * x, + this.radiusV.y * 2 * y + ); + } + + /** + * Scale this Ellipse by the specified vector. + * @param {Vector2d} v + * @returns {Ellipse} Reference to this object for method chaining + */ + scaleV(v) { + return this.scale(v.x, v.y); + } + + /** + * apply the given transformation matrix to this ellipse + * @param {Matrix2d} matrix - the transformation matrix + * @returns {Polygon} Reference to this object for method chaining + */ + transform(matrix) { // eslint-disable-line no-unused-vars + // TODO + return this; + } + + /** + * translate the circle/ellipse by the specified offset + * @param {number|Vector2d} x - x coordinate or a vector point to translate by + * @param {number} [y] - y offset + * @returns {Ellipse} this ellipse + * @example + * ellipse.translate(10, 10); + * // or + * ellipse.translate(myVector2d); + */ + translate() { + let _x, _y; + + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + + this.pos.x += _x; + this.pos.y += _y; + this.getBounds().translate(_x, _y); + + return this; + } + + /** + * check if this circle/ellipse contains the specified point + * @param {number|Vector2d} x - x coordinate or a vector point to check + * @param {number} [y] - y coordinate + * @returns {boolean} true if contains + * @example + * if (circle.contains(10, 10)) { + * // do something + * } + * // or + * if (circle.contains(myVector2d)) { + * // do something + * } + */ + contains() { + let _x, _y; + + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + + // Make position relative to object center point. + _x -= this.pos.x; + _y -= this.pos.y; + // Pythagorean theorem. + return ( + ((_x * _x) / this.radiusSq.x) + + ((_y * _y) / this.radiusSq.y) + ) <= 1.0; + } + + /** + * returns the bounding box for this shape, the smallest Rectangle object completely containing this shape. + * @returns {Bounds} this shape bounding box Rectangle object + */ + getBounds() { + if (typeof this._bounds === "undefined") { + this._bounds = pool.pull("Bounds"); + } + return this._bounds; + } + + /** + * clone this Ellipse + * @returns {Ellipse} new Ellipse + */ + clone() { + return new Ellipse( + this.pos.x, + this.pos.y, + this.radiusV.x * 2, + this.radiusV.y * 2 + ); + } +} + +/** + * @classdesc + * represents a point in a 2d space + */ +class Point { + constructor(x = 0, y = 0) { + /** + * the position of the point on the horizontal axis + * @type {number} + * @default 0 + */ + this.x = x; + + /** + * the position of the point on the vertical axis + * @type {number} + * @default 0 + */ + this.y = y; + + /** + * the shape type (used internally) + * @type {string} + * @default "Point" + */ + this.type = "Point"; + } + + /** @ignore */ + onResetEvent(x = 0, y = 0) { + this.set(x, y); + } + + /** + * set the Point x and y properties to the given values + * @param {number} x + * @param {number} y + * @returns {Point} Reference to this object for method chaining + */ + set(x = 0, y = 0) { + this.x = x; + this.y = y; + return this; + } + + /** + * return true if this point is equal to the given point + * @param {number|Point|Vector2d} x + * @param {number} [y] + * @returns {boolean} + */ + equals() { + let _x, _y; + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // point + _x = arguments[0].x; + _y = arguments[0].y; + } + return ((this.x === _x) && (this.y === _y)); + } + + /** + * clone this Point + * @returns {Point} new Point + */ + clone() { + return new Point(this.x, this.y); + } +} + +/** + * @classdesc + * a rectangle Object + * @augments Polygon + */ +class Rect extends Polygon { + /** + * @param {number} x - position of the Rectangle + * @param {number} y - position of the Rectangle + * @param {number} w - width of the rectangle + * @param {number} h - height of the rectangle + */ + constructor(x, y, w, h) { + // parent constructor + super(x, y, [ + pool.pull("Vector2d", 0, 0), // 0, 0 + pool.pull("Vector2d", w, 0), // 1, 0 + pool.pull("Vector2d", w, h), // 1, 1 + pool.pull("Vector2d", 0, h) // 0, 1 + ]); + + /** + * the shape type (used internally) + * @type {string} + * @default "Rectangle" + */ + this.type = "Rectangle"; + } + + /** @ignore */ + onResetEvent(x, y, w, h) { + this.setShape(x, y, w, h); + } + + /** + * set new value to the rectangle shape + * @param {number} x - position of the Rectangle + * @param {number} y - position of the Rectangle + * @param {number|Vector2d[]} w - width of the rectangle, or an array of vector defining the rectangle + * @param {number} [h] - height of the rectangle, if a numeral width parameter is specified + * @returns {Rect} this rectangle + */ + setShape(x, y, w, h) { + let points = w; // assume w is an array by default + + this.pos.set(x, y); + + if (arguments.length === 4) { + points = this.points; + points[0].set(0, 0); // 0, 0 + points[1].set(w, 0); // 1, 0 + points[2].set(w, h); // 1, 1 + points[3].set(0, h); // 0, 1 + } + + this.setVertices(points); + return this; + } + + + /** + * left coordinate of the Rectangle + * @type {number} + */ + get left() { + return this.pos.x; + } + + /** + * right coordinate of the Rectangle + * @type {number} + */ + get right() { + let w = this.width; + return (this.left + w) || w; + } + + /** + * top coordinate of the Rectangle + * @type {number} + */ + get top() { + return this.pos.y; + } + + /** + * bottom coordinate of the Rectangle + * @type {number} + */ + get bottom() { + let h = this.height; + return (this.top + h) || h; + } + + /** + * width of the Rectangle + * @type {number} + */ + get width() { + return this.points[2].x; + } + set width(value) { + this.points[1].x = this.points[2].x = value; + this.recalc(); + this.updateBounds(); + } + + /** + * height of the Rectangle + * @type {number} + */ + get height() { + return this.points[2].y; + } + set height(value) { + this.points[2].y = this.points[3].y = value; + this.recalc(); + this.updateBounds(); + } + + /** + * absolute center of this rectangle on the horizontal axis + * @type {number} + */ + get centerX() { + if (isFinite(this.width)) { + return this.left + (this.width / 2); + } else { + return this.width; + } + } + set centerX (value) { + this.pos.x = value - (this.width / 2); + this.recalc(); + this.updateBounds(); + } + + /** + * absolute center of this rectangle on the vertical axis + * @type {number} + */ + get centerY() { + if (isFinite(this.height)) { + return this.top + (this.height / 2); + } else { + return this.height; + } + } + set centerY(value) { + this.pos.y = value - (this.height / 2); + this.recalc(); + this.updateBounds(); + } + + /** + * center the rectangle position around the given coordinates + * @param {number} x - the x coordinate around which to center this rectangle + * @param {number} y - the y coordinate around which to center this rectangle + * @returns {Rect} this rectangle + */ + centerOn(x, y) { + this.centerX = x; + this.centerY = y; + return this; + } + + /** + * resize the rectangle + * @param {number} w - new width of the rectangle + * @param {number} h - new height of the rectangle + * @returns {Rect} this rectangle + */ + resize(w, h) { + this.width = w; + this.height = h; + return this; + } + + /** + * scale the rectangle + * @param {number} x - a number representing the abscissa of the scaling vector. + * @param {number} [y=x] - a number representing the ordinate of the scaling vector. + * @returns {Rect} this rectangle + */ + scale(x, y = x) { + this.width *= x; + this.height *= y; + return this; + } + + /** + * clone this rectangle + * @returns {Rect} new rectangle + */ + clone() { + return new Rect(this.left, this.top, this.width, this.height); + } + + /** + * copy the position and size of the given rectangle into this one + * @param {Rect} rect - Source rectangle + * @returns {Rect} new rectangle + */ + copy(rect) { + return this.setShape(rect.left, rect.top, rect.width, rect.height); + } + + /** + * merge this rectangle with another one + * @param {Rect} rect - other rectangle to union with + * @returns {Rect} the union(ed) rectangle + */ + union(rect) { + let x1 = Math.min(this.left, rect.left); + let y1 = Math.min(this.top, rect.top); + + this.resize( + Math.max(this.right, rect.right) - x1, + Math.max(this.bottom, rect.bottom) - y1 + ); + + this.pos.set(x1, y1); + + return this; + } + + /** + * check if this rectangle is intersecting with the specified one + * @param {Rect} rect + * @returns {boolean} true if overlaps + */ + overlaps(rect) { + return ( + this.left < rect.right && + rect.left < this.right && + this.top < rect.bottom && + rect.top < this.bottom + ); + } + + /** + * Returns true if the rectangle contains the given point or rectangle + * @param {number|Vector2d|Rect} x - x coordinate or a vector point, or a rectangle to test + * @param {number} [y] - y coordinate + * @returns {boolean} True if the rectangle contain the given point or rectangle, otherwise false + * @example + * if (rect.contains(10, 10)) { + * // do something + * } + * // or + * if (rect.contains(myVector2d)) { + * // do something + * } + * if (rect.contains(myRect)) { + * // do something + * } + */ + contains() { + let arg0 = arguments[0]; + let _x1, _x2, _y1, _y2; + if (arguments.length === 2) { + // x, y + _x1 = _x2 = arg0; + _y1 = _y2 = arguments[1]; + } else { + // only Rect based objects define a top and bottom properties + if (typeof arg0.bottom === "number") { + // me.Rect + _x1 = arg0.left; + _x2 = arg0.right; + _y1 = arg0.top; + _y2 = arg0.bottom; + } else { + // vector + _x1 = _x2 = arg0.x; + _y1 = _y2 = arg0.y; + } + } + return ( + _x1 >= this.left && + _x2 <= this.right && + _y1 >= this.top && + _y2 <= this.bottom + ); + } + + /** + * check if this rectangle is identical to the specified one + * @param {Rect} rect + * @returns {boolean} true if equals + */ + equals(rect) { + return ( + rect.left === this.left && + rect.right === this.right && + rect.top === this.top && + rect.bottom === this.bottom + ); + } + + /** + * determines whether all coordinates of this rectangle are finite numbers. + * @returns {boolean} false if all coordinates are positive or negative Infinity or NaN; otherwise, true. + */ + isFinite() { + return (isFinite(this.left) && isFinite(this.top) && isFinite(this.width) && isFinite(this.height)); + } + + /** + * Returns a polygon whose edges are the same as this box. + * @returns {Polygon} a new Polygon that represents this rectangle. + */ + toPolygon() { + return pool.pull("Polygon", + this.left, this.top, this.points + ); + } +} + +// https://developer.chrome.com/blog/canvas2d/#round-rect + +/** + * @classdesc + * a rectangle object with rounded corners + * @augments Rect + */ +class RoundRect extends Rect { + /** + * @param {number} x - position of the rounded rectangle + * @param {number} y - position of the rounded rectangle + * @param {number} width - the rectangle width + * @param {number} height - the rectangle height + * @param {number} [radius=20] - the radius of the rounded corner + */ + constructor(x, y, width, height, radius = 20) { + // parent constructor + super(x, y, width, height); + + /** + * the shape type (used internally) + * @type {string} + * @default "RoundRect" + */ + this.type = "RoundRect"; + + // set the corner radius + this.radius = radius; + } + + /** @ignore */ + onResetEvent(x, y, w, h, radius) { + super.setShape(x, y, w, h); + this.radius = radius; + } + + + /** + * the radius of the rounded corner + * @type {number} + * @default 20 + */ + get radius() { + return this._radius; + } + set radius(value) { + // verify the rectangle is at least as wide and tall as the rounded corners. + if (this.width < 2 * value) { + value = this.width / 2; + } + if (this.height < 2 * value) { + value = this.height / 2; + } + this._radius = value; + } + + /** + * copy the position, size and radius of the given rounded rectangle into this one + * @param {RoundRect} rrect - source rounded rectangle + * @returns {RoundRect} new rectangle + */ + copy(rrect) { + super.setShape(rrect.pos.x, rrect.pos.y, rrect.width, rrect.height); + this.radius = rrect.radius; + return this; + } + + /** + * Returns true if the rounded rectangle contains the given point or rectangle + * @param {number|Vector2d|Rect} x - x coordinate or a vector point, or a Rect to test + * @param {number} [y] - y coordinate + * @returns {boolean} True if the rounded rectangle contain the given point or rectangle, otherwise false + * @example + * if (rect.contains(10, 10)) { + * // do something + * } + * // or + * if (rect.contains(myVector2d)) { + * // do something + * } + * if (rect.contains(myRect)) { + * // do something + * } + */ + contains() { + let arg0 = arguments[0]; + let _x, _y; + if (arguments.length === 2) { + // x, y + _x = arg0; + _y = arguments[1]; + } else { + if ((typeof arg0.radius === "undefined") && (typeof arg0.bottom === "number")) { + // it's a rect + return super.contains(arg0); + } else { + // else a vector or point + _x = arg0.x; + _y = arg0.y; + } + } + + // check whether point is outside the bounding box + if (_x < this.left || _x >= this.right || _y < this.top || _y >= this.bottom) { + return false; // outside bounding box + } + + // check whether point is within the bounding box minus radius + if ((_x >= this.left + this.radius && _x <= this.right - this.radius) || (_y >= this.top + this.radius && _y <= this.bottom - this.radius)) { + return true; + } + + // check whether point is in one of the rounded corner areas + let tx, ty; + const radiusX = Math.max(0, Math.min(this.radius, this.width / 2)); + const radiusY = Math.max(0, Math.min(this.radius, this.height / 2)); + + if (_x < this.left + radiusX && _y < this.top + radiusY) { + tx = _x - this.left - radiusX; + ty = _y - this.top - radiusY; + } else if (_x > this.right - radiusX && _y < this.top + radiusY) { + tx = _x - this.right + radiusX; + ty = _y - this.top - radiusY; + } else if (_x > this.right - radiusX && _y > this.bottom - radiusY) { + tx = _x - this.right + radiusX; + ty = _y - this.bottom + radiusY; + } else if (_x < this.left + radiusX && _y > this.bottom - radiusY) { + tx = _x - this.left - radiusX; + ty = _y - this.bottom + radiusY; + } else { + return false; // inside and not within the rounded corner area + } + + // Pythagorean theorem. + return ((tx * tx) + (ty * ty) <= (radiusX * radiusY)); + } + + /** + * check if this RoundRect is identical to the specified one + * @param {RoundRect} rrect + * @returns {boolean} true if equals + */ + equals(rrect) { + return super.equals(rrect) && this.radius === rrect.radius; + } + + /** + * clone this RoundRect + * @returns {RoundRect} new RoundRect + */ + clone() { + return new RoundRect(this.pos.x, this.pos.y, this.width, this.height, this.radius); + } +} + +/** + * a collection of array utility functions + * @namespace utils.array + */ + +/** + * Remove the specified object from the given Array + * @public + * @memberof utils.array + * @name remove + * @param {Array.} arr - array from which to remove an object + * @param {object} obj - to be removed + * @returns {Array.} the modified Array + * let arr = [ "foo", "bar", "baz" ]; + * // remove "foo" from the array + * me.utils.array.remove(arr, "foo"); + */ +function remove(arr, obj) { + let i = Array.prototype.indexOf.call(arr, obj); + if (i !== -1) { + Array.prototype.splice.call(arr, i, 1); + } + return arr; +} + +/** + * return a random array element + * @public + * @memberof utils.array + * @name random + * @param {Array.} arr - array to pick a element + * @returns {any} random member of array + * @example + * // Select a random array element + * let arr = [ "foo", "bar", "baz" ]; + * console.log(me.utils.array.random(arr)); + */ +function random(arr) { + return arr[random$1(0, arr.length)]; +} + +/** + * return a weighted random array element, favoring the earlier entries + * @public + * @memberof utils.array + * @name weightedRandom + * @param {Array.} arr - array to pick a element + * @returns {any} random member of array + */ +function weightedRandom(arr) { + return arr[weightedRandom$1(0, arr.length)]; +} + +var array$1 = { + __proto__: null, + random: random, + remove: remove, + weightedRandom: weightedRandom +}; + +/* + * A QuadTree implementation in JavaScript, a 2d spatial subdivision algorithm. + * Based on the QuadTree Library by Timo Hausmann and released under the MIT license + * https://github.com/timohausmann/quadtree-js/ +**/ + +/** + * a pool of `QuadTree` objects + * @ignore + */ +let QT_ARRAY = []; + +/** + * will pop a quadtree object from the array + * or create a new one if the array is empty + * @ignore + */ +function QT_ARRAY_POP(world, bounds, max_objects = 4, max_levels = 4, level = 0) { + if (QT_ARRAY.length > 0) { + let _qt = QT_ARRAY.pop(); + _qt.world = world; + _qt.bounds = bounds; + _qt.max_objects = max_objects; + _qt.max_levels = max_levels; + _qt.level = level; + return _qt; + } else { + return new QuadTree(world, bounds, max_objects, max_levels, level); + } +} + +/** + * Push back a quadtree back into the array + * @ignore + */ +function QT_ARRAY_PUSH(qt) { + QT_ARRAY.push(qt); +} + +/** + * a temporary vector object to be reused + * @ignore + */ +let QT_VECTOR = new Vector2d(); + +/** + * @classdesc + * a QuadTree implementation in JavaScript, a 2d spatial subdivision algorithm. + * @see game.world.broadphase + */ +class QuadTree { + /** + * @param {World} world - the physic world this QuadTree belongs to + * @param {Bounds} bounds - bounds of the node + * @param {number} [max_objects=4] - max objects a node can hold before splitting into 4 subnodes + * @param {number} [max_levels=4] - total max levels inside root Quadtree + * @param {number} [level] - deepth level, required for subnodes + */ + constructor(world, bounds, max_objects = 4, max_levels = 4, level = 0) { + + this.world = world; + this.bounds = bounds; + + this.max_objects = max_objects; + this.max_levels = max_levels; + + this.level = level; + + this.objects = []; + this.nodes = []; + } + + /* + * Split the node into 4 subnodes + */ + split() { + let nextLevel = this.level + 1, + subWidth = this.bounds.width / 2, + subHeight = this.bounds.height / 2, + left = this.bounds.left, + top = this.bounds.top; + + //top right node + this.nodes[0] = QT_ARRAY_POP( + this.world, + { + left : left + subWidth, + top : top, + width : subWidth, + height : subHeight + }, + this.max_objects, + this.max_levels, + nextLevel + ); + + //top left node + this.nodes[1] = QT_ARRAY_POP( + this.world, + { + left : left, + top: top, + width : subWidth, + height : subHeight + }, + this.max_objects, + this.max_levels, + nextLevel + ); + + //bottom left node + this.nodes[2] = QT_ARRAY_POP( + this.world, + { + left : left, + top : top + subHeight, + width : subWidth, + height : subHeight + }, + this.max_objects, + this.max_levels, + nextLevel + ); + + //bottom right node + this.nodes[3] = QT_ARRAY_POP( + this.world, + { + left : left + subWidth, + top : top + subHeight, + width : subWidth, + height : subHeight + }, + this.max_objects, + this.max_levels, + nextLevel + ); + } + + /* + * Determine which node the object belongs to + * @param {Rect} rect bounds of the area to be checked + * @returns Integer index of the subnode (0-3), or -1 if rect cannot completely fit within a subnode and is part of the parent node + */ + getIndex(item) { + let pos; + let bounds = item.getBounds(); + + // use game world coordinates for floating items + if (item.isFloating === true) { + pos = this.world.app.viewport.localToWorld(bounds.left, bounds.top, QT_VECTOR); + } else { + pos = QT_VECTOR.set(item.left, item.top); + } + + let index = -1, + rx = pos.x, + ry = pos.y, + rw = bounds.width, + rh = bounds.height, + verticalMidpoint = this.bounds.left + (this.bounds.width / 2), + horizontalMidpoint = this.bounds.top + (this.bounds.height / 2), + //rect can completely fit within the top quadrants + topQuadrant = (ry < horizontalMidpoint && ry + rh < horizontalMidpoint), + //rect can completely fit within the bottom quadrants + bottomQuadrant = (ry > horizontalMidpoint); + + //rect can completely fit within the left quadrants + if (rx < verticalMidpoint && rx + rw < verticalMidpoint) { + if (topQuadrant) { + index = 1; + } else if (bottomQuadrant) { + index = 2; + } + } else if (rx > verticalMidpoint) { + //rect can completely fit within the right quadrants + if (topQuadrant) { + index = 0; + } else if (bottomQuadrant) { + index = 3; + } + } + + return index; + } + + /** + * Insert the given object container into the node. + * @name insertContainer + * @memberof QuadTree + * @param {Container} container - group of objects to be added + */ + insertContainer(container) { + const children = container.children; + const childrenLength = children.length; + for (let i = childrenLength, child; i--, (child = children[i]);) { + if (child.isKinematic !== true) { + if (typeof child.addChild === "function") { + if (child.name !== "rootContainer") { + this.insert(child); + } + // recursivly insert all childs + this.insertContainer(child); + } else { + // only insert object with a bounding box + // Probably redundant with `isKinematic` + if (typeof (child.getBounds) === "function") { + this.insert(child); + } + } + } + } + } + + /** + * Insert the given object into the node. If the node + * exceeds the capacity, it will split and add all + * objects to their corresponding subnodes. + * @name insert + * @memberof QuadTree + * @param {object} item - object to be added + */ + insert(item) { + let index = -1; + + //if we have subnodes ... + if (this.nodes.length > 0) { + index = this.getIndex(item); + + if (index !== -1) { + this.nodes[index].insert(item); + return; + } + } + + this.objects.push(item); + + if (this.objects.length > this.max_objects && this.level < this.max_levels) { + + //split if we don't already have subnodes + if (this.nodes.length === 0) { + this.split(); + } + + let i = 0; + + //add all objects to there corresponding subnodes + while (i < this.objects.length) { + + index = this.getIndex(this.objects[i]); + + if (index !== -1) { + this.nodes[index].insert(this.objects.splice(i, 1)[0]); + } else { + i = i + 1; + } + } + } + } + + /** + * Return all objects that could collide with the given object + * @name retrieve + * @memberof QuadTree + * @param {object} item - object to be checked against + * @param {object} [fn] - a sorting function for the returned array + * @returns {object[]} array with all detected objects + */ + retrieve(item, fn) { + let returnObjects = this.objects; + + //if we have subnodes ... + if (this.nodes.length > 0) { + + let index = this.getIndex(item); + + //if rect fits into a subnode .. + if (index !== -1) { + returnObjects = returnObjects.concat(this.nodes[index].retrieve(item)); + } else { + //if rect does not fit into a subnode, check it against all subnodes + for (let i = 0; i < this.nodes.length; i = i + 1) { + returnObjects = returnObjects.concat(this.nodes[i].retrieve(item)); + } + } + } + + if (typeof(fn) === "function") { + returnObjects.sort(fn); + } + + return returnObjects; + } + + /** + * Remove the given item from the quadtree. + * (this function won't recalculate the impacted node) + * @name remove + * @memberof QuadTree + * @param {object} item - object to be removed + * @returns {boolean} true if the item was found and removed. + */ + remove(item) { + let found = false; + + if (typeof (item.getBounds) === "undefined") { + // ignore object that cannot be added in the first place + return false; + } + + //if we have subnodes ... + if (this.nodes.length > 0) { + // determine to which node the item belongs to + let index = this.getIndex(item); + + if (index !== -1) { + found = remove(this.nodes[index], item); + // trim node if empty + if (found && this.nodes[index].isPrunable()) { + this.nodes.splice(index, 1); + } + } + } + + if (found === false) { + // try and remove the item from the list of items in this node + if (this.objects.indexOf(item) !== -1) { + remove(this.objects, item); + found = true; + } + } + + return found; + } + + /** + * return true if the node is prunable + * @name isPrunable + * @memberof QuadTree + * @returns {boolean} true if the node is prunable + */ + isPrunable() { + return !(this.hasChildren() || (this.objects.length > 0)); + } + + /** + * return true if the node has any children + * @name hasChildren + * @memberof QuadTree + * @returns {boolean} true if the node has any children + */ + hasChildren() { + for (let i = 0; i < this.nodes.length; i = i + 1) { + const subnode = this.nodes[i]; + if (subnode.length > 0 || subnode.objects.length > 0) { + return true; + } + } + return false; + } + + /** + * clear the quadtree + * @name clear + * @memberof QuadTree + * @param {Bounds} [bounds=this.bounds] - the bounds to be cleared + */ + clear(bounds) { + this.objects.length = 0; + + for (let i = 0; i < this.nodes.length; i++) { + this.nodes[i].clear(); + // recycle the quadTree object + QT_ARRAY_PUSH(this.nodes[i]); + } + // empty the array + this.nodes.length = 0; + + // resize the root bounds if required + if (typeof bounds !== "undefined") { + this.bounds.setMinMax(bounds.min.x, bounds.min.y, bounds.max.x, bounds.max.y); + } + } +} + +/** + * @classdesc + * a bound object contains methods for creating and manipulating axis-aligned bounding boxes (AABB). + */ +class Bounds { + /** + * @param {Vector2d[]|Point[]} [vertices] - an array of Vector2d or Point + */ + constructor(vertices) { + // @ignore + this._center = new Vector2d(); + this.onResetEvent(vertices); + + /** + * the object type (used internally) + * @type {string} + * @default "Bounds" + */ + this.type = "Bounds"; + } + + /** + * @ignore + */ + onResetEvent(vertices) { + if (typeof this.min === "undefined") { + this.min = { x: Infinity, y: Infinity }; + this.max = { x: -Infinity, y: -Infinity }; + } else { + this.clear(); + } + if (typeof vertices !== "undefined") { + this.update(vertices); + } + } + + /** + * reset the bound + */ + clear() { + this.setMinMax(Infinity, Infinity, -Infinity, -Infinity); + + } + + /** + * sets the bounds to the given min and max value + * @param {number} minX + * @param {number} minY + * @param {number} maxX + * @param {number} maxY + */ + setMinMax(minX, minY, maxX, maxY) { + this.min.x = minX; + this.min.y = minY; + + this.max.x = maxX; + this.max.y = maxY; + } + + /** + * x position of the bound + * @type {number} + */ + get x() { + return this.min.x; + } + + set x(value) { + let deltaX = this.max.x - this.min.x; + this.min.x = value; + this.max.x = value + deltaX; + } + + /** + * y position of the bounds + * @type {number} + */ + get y() { + return this.min.y; + } + + set y(value) { + let deltaY = this.max.y - this.min.y; + + this.min.y = value; + this.max.y = value + deltaY; + } + + /** + * width of the bounds + * @type {number} + */ + get width() { + return this.max.x - this.min.x; + } + + set width(value) { + this.max.x = this.min.x + value; + } + + /** + * width of the bounds + * @type {number} + */ + get height() { + return this.max.y - this.min.y; + } + + set height(value) { + this.max.y = this.min.y + value; + } + + /** + * left coordinate of the bound + * @type {number} + */ + get left() { + return this.min.x; + } + + /** + * right coordinate of the bound + * @type {number} + */ + get right() { + return this.max.x; + } + + /** + * top coordinate of the bound + * @type {number} + */ + get top() { + return this.min.y; + } + + /** + * bottom coordinate of the bound + * @type {number} + */ + get bottom() { + return this.max.y; + } + + /** + * center position of the bound on the x axis + * @type {number} + */ + get centerX() { + return this.min.x + (this.width / 2); + } + + /** + * center position of the bound on the y axis + * @type {number} + */ + get centerY() { + return this.min.y + (this.height / 2); + } + + /** + * return the center position of the bound + * @type {Vector2d} + */ + get center() { + return this._center.set(this.centerX, this.centerY); + } + + /** + * center the bounds position around the given coordinates + * @param {number} x - the x coordinate around which to center this bounds + * @param {number} y - the y coordinate around which to center this bounds + */ + centerOn(x, y) { + this.shift(x - this.width / 2, y - this.height / 2); + return this; + } + + /** + * Updates bounds using the given vertices + * @param {Vector2d[]|Point[]} vertices - an array of Vector2d or Point + */ + update(vertices) { + this.add(vertices, true); + } + + /** + * add the given vertices to the bounds definition. + * @param {Vector2d[]|Point[]} vertices - an array of Vector2d or Point + * @param {boolean} [clear=false] - either to reset the bounds before adding the new vertices + */ + add(vertices, clear = false) { + const verticeCount = vertices.length; + if (clear === true) { + this.clear(); + } + for (let i = 0; i < verticeCount; i++) { + const vertex = vertices[i]; + if (vertex.x > this.max.x) this.max.x = vertex.x; + if (vertex.x < this.min.x) this.min.x = vertex.x; + if (vertex.y > this.max.y) this.max.y = vertex.y; + if (vertex.y < this.min.y) this.min.y = vertex.y; + } + } + + /** + * add the given bounds to the bounds definition. + * @param {Bounds} bounds + * @param {boolean} [clear=false] - either to reset the bounds before adding the new vertices + */ + addBounds(bounds, clear = false) { + if (clear === true) { + this.max.x = bounds.max.x; + this.min.x = bounds.min.x; + this.max.y = bounds.max.y; + this.min.y = bounds.min.y; + } else { + if (bounds.max.x > this.max.x) this.max.x = bounds.max.x; + if (bounds.min.x < this.min.x) this.min.x = bounds.min.x; + if (bounds.max.y > this.max.y) this.max.y = bounds.max.y; + if (bounds.min.y < this.min.y) this.min.y = bounds.min.y; + } + } + + /** + * add the given point to the bounds definition. + * @param {Vector2d|Point} point - the vector or point to be added to the bounds + * @param {Matrix2d} [m] - an optional transform to apply to the given point (if the given point is a Vector2d) + */ + addPoint(point, m) { + if ((typeof m !== "undefined")) { + // only Vectors object have a rotate function + point = m.apply(point); + } + this.min.x = Math.min(this.min.x, point.x); + this.max.x = Math.max(this.max.x, point.x); + this.min.y = Math.min(this.min.y, point.y); + this.max.y = Math.max(this.max.y, point.y); + } + + /** + * add the given quad coordinates to this bound definition, multiplied by the given matrix + * @param {number} x0 - left X coordinates of the quad + * @param {number} y0 - top Y coordinates of the quad + * @param {number} x1 - right X coordinates of the quad + * @param {number} y1 - bottom y coordinates of the quad + * @param {Matrix2d} [m] - an optional transform to apply to the given frame coordinates + */ + addFrame(x0, y0, x1, y1, m) { + let v = pool.pull("Point"); + + this.addPoint(v.set(x0, y0), m); + this.addPoint(v.set(x1, y0), m); + this.addPoint(v.set(x0, y1), m); + this.addPoint(v.set(x1, y1), m); + + pool.push(v); + } + + /** + * Returns true if the bounds contains the given point. + * @param {number|Vector2d} x - x coordinate or a vector point to check + * @param {number} [y] - y coordinate + * @returns {boolean} True if the bounds contain the point, otherwise false + * @example + * if (bounds.contains(10, 10)) { + * // do something + * } + * // or + * if (bounds.contains(myVector2d)) { + * // do something + * } + */ + contains() { + let arg0 = arguments[0]; + let _x1, _x2, _y1, _y2; + if (arguments.length === 2) { + // x, y + _x1 = _x2 = arg0; + _y1 = _y2 = arguments[1]; + } else { + if (typeof arg0.max !== "undefined") { + // only bounds define min and max properties + _x1 = arg0.min.x; + _x2 = arg0.max.x; + _y1 = arg0.min.y; + _y2 = arg0.max.y; + } else { + // vector + _x1 = _x2 = arg0.x; + _y1 = _y2 = arg0.y; + } + } + + return _x1 >= this.min.x && _x2 <= this.max.x + && _y1 >= this.min.y && _y2 <= this.max.y; + } + + /** + * Returns true if the two bounds intersect. + * @param {Bounds|Rect} bounds + * @returns {boolean} True if the bounds overlap, otherwise false + */ + overlaps(bounds) { + return !(this.right < bounds.left || this.left > bounds.right || + this.bottom < bounds.top || this.top > bounds.bottom); + } + + /** + * determines whether all coordinates of this bounds are finite numbers. + * @returns {boolean} false if all coordinates are positive or negative Infinity or NaN; otherwise, true. + */ + isFinite() { + return (isFinite(this.min.x) && isFinite(this.max.x) && isFinite(this.min.y) && isFinite(this.max.y)); + } + + /** + * Translates the bounds by the given point + * @param {number|Vector2d} x - x coordinate or a vector point to translate by + * @param {number} [y] + * @example + * bounds.translate(10, 10); + * // or + * bounds.translate(myVector2d); + */ + translate() { + let _x, _y; + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + this.min.x += _x; + this.max.x += _x; + this.min.y += _y; + this.max.y += _y; + } + + /** + * Shifts the bounds to the given x, y position. + * @param {number|Vector2d} x - x coordinate or a vector point to shift to + * @param {number} [y] + * @example + * bounds.shift(10, 10); + * // or + * bounds.shift(myVector2d); + */ + shift() { + let _x, _y; + + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + + let deltaX = this.max.x - this.min.x, + deltaY = this.max.y - this.min.y; + + this.min.x = _x; + this.max.x = _x + deltaX; + this.min.y = _y; + this.max.y = _y + deltaY; + } + + /** + * clone this bounds + * @returns {Bounds} + */ + clone() { + let bounds = new Bounds(); + bounds.addBounds(this); + return bounds; + } + + /** + * Returns a polygon whose edges are the same as this bounds. + * @returns {Polygon} a new Polygon that represents this bounds. + */ + toPolygon () { + return pool.pull("Polygon", this.x, this.y, [ + pool.pull("Vector2d", 0, 0), + pool.pull("Vector2d", this.width, 0), + pool.pull("Vector2d", this.width, this.height), + pool.pull("Vector2d", 0, this.height) + ]); + } + +} + +/** + * Collision detection (and projection-based collision response) of 2D shapes.
                            + * Based on the Separating Axis Theorem and supports detecting collisions between simple Axis-Aligned Boxes, convex polygons and circles based shapes. + * @namespace collision + */ + +let collision = { + + /** + * The maximum number of children that a quadtree node can contain before it is split into sub-nodes. + * @name maxChildren + * @memberof collision + * @public + * @type {number} + * @default 8 + * @see game.world.broadphase + */ + maxChildren : 8, + + /** + * The maximum number of levels that the quadtree will create. + * @name maxDepth + * @memberof collision + * @public + * @type {number} + * @default 4 + * @see game.world.broadphase + */ + maxDepth : 4, + + /** + * Enum for collision type values. + * @property {number} NO_OBJECT to disable collision check + * @property {number} PLAYER_OBJECT playbable characters + * @property {number} NPC_OBJECT non playable characters + * @property {number} ENEMY_OBJECT enemies objects + * @property {number} COLLECTABLE_OBJECT collectable objects + * @property {number} ACTION_OBJECT e.g. doors + * @property {number} PROJECTILE_OBJECT e.g. missiles + * @property {number} WORLD_SHAPE e.g. walls; for map collision shapes + * @property {number} USER user-defined collision types (see example) + * @property {number} ALL_OBJECT all of the above (including user-defined types) + * @readonly + * @enum {number} + * @name types + * @memberof collision + * @see Body.setCollisionMask + * @see Body.collisionType + * @example + * // set the body collision type + * myEntity.body.collisionType = me.collision.types.PLAYER_OBJECT; + * + * // filter collision detection with collision shapes, enemies and collectables + * myEntity.body.setCollisionMask( + * me.collision.types.WORLD_SHAPE | + * me.collision.types.ENEMY_OBJECT | + * me.collision.types.COLLECTABLE_OBJECT + * ); + * + * // User-defined collision types are defined using BITWISE LEFT-SHIFT: + * game.collisionTypes = { + * LOCKED_DOOR : me.collision.types.USER << 0, + * OPEN_DOOR : me.collision.types.USER << 1, + * LOOT : me.collision.types.USER << 2, + * }; + * + * // Set collision type for a door entity + * myDoorEntity.body.collisionType = game.collisionTypes.LOCKED_DOOR; + * + * // Set collision mask for the player entity, so it collides with locked doors and loot + * myPlayerEntity.body.setCollisionMask( + * me.collision.types.ENEMY_OBJECT | + * me.collision.types.WORLD_SHAPE | + * game.collisionTypes.LOCKED_DOOR | + * game.collisionTypes.LOOT + * ); + */ + types : { + /** to disable collision check */ + NO_OBJECT : 0, + PLAYER_OBJECT : 1 << 0, + NPC_OBJECT : 1 << 1, + ENEMY_OBJECT : 1 << 2, + COLLECTABLE_OBJECT : 1 << 3, + ACTION_OBJECT : 1 << 4, // door, etc... + PROJECTILE_OBJECT : 1 << 5, // missiles, etc... + WORLD_SHAPE : 1 << 6, // walls, etc... + USER : 1 << 7, // user-defined types start here... + ALL_OBJECT : 0xFFFFFFFF // all objects + }, + + /** + * Checks for object colliding with the given line + * @name rayCast + * @memberof collision + * @public + * @param {Line} line - line to be tested for collision + * @param {Array.} [result] - a user defined array that will be populated with intersecting physic objects. + * @returns {Array.} an array of intersecting physic objects + * @example + * // define a line accross the viewport + * let ray = new me.Line( + * // absolute position of the line + * 0, 0, [ + * // starting point relative to the initial position + * new me.Vector2d(0, 0), + * // ending point + * new me.Vector2d(me.game.viewport.width, me.game.viewport.height) + * ]); + * + * // check for collition + * result = me.collision.rayCast(ray); + * + * if (result.length > 0) { + * // ... + * } + */ + rayCast(line, result) { return game.world.detector.rayCast(line, result); } +}; + +/** + * a collection of utility functions + * @namespace utils.function + */ + +/** + * Executes a function as soon as the interpreter is idle (stack empty). + * @public + * @memberof utils.function + * @name defer + * @param {Function} func - The function to be deferred. + * @param {object} thisArg - The value to be passed as the this parameter to the target function when the deferred function is called + * @param {...*} args - Optional additional arguments to carry for the function. + * @returns {number} id that can be used to clear the deferred function using + * clearTimeout + * @example + * // execute myFunc() when the stack is empty, + * // with the current context and [1, 2, 3] as parameter + * me.utils.function.defer(myFunc, this, 1, 2, 3); + */ +function defer(func, thisArg, ...args) { + return setTimeout(func.bind(thisArg), 0.01, ...args); +} + +/** + * returns a function that, when invoked will only be triggered at most once during a given window of time + * @public + * @memberof utils.function + * @name throttle + * @param {Function} fn - the function to be throttled. + * @param {number} delay - The delay in ms + * @param {no_trailing} no_trailing - disable the execution on the trailing edge + * @returns {Function} the function that will be throttled + */ +function throttle(fn, delay, no_trailing) { + let last = globalThis.performance.now(), deferTimer; + // `no_trailing` defaults to false. + if (typeof no_trailing !== "boolean") { + no_trailing = false; + } + return function () { + let now = globalThis.performance.now(); + let elasped = now - last; + let args = arguments; + if (elasped < delay) { + if (no_trailing === false) { + // hold on to it + clearTimeout(deferTimer); + deferTimer = setTimeout(() => { + last = now; + return fn.apply(null, args); + }, elasped); + } + } + else { + last = now; + return fn.apply(null, args); + } + }; +} + +var _function = { + __proto__: null, + defer: defer, + throttle: throttle +}; + +var eventemitter3$1 = {exports: {}}; + +var eventemitter3 = eventemitter3$1.exports; + +(function (module) { + 'use strict'; + + var has = Object.prototype.hasOwnProperty + , prefix = '~'; + + /** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @private + */ + function Events() {} + + // + // We try to not inherit from `Object.prototype`. In some engines creating an + // instance in this way is faster than calling `Object.create(null)` directly. + // If `Object.create(null)` is not supported we prefix the event names with a + // character to make sure that the built-in object properties are not + // overridden or used as an attack vector. + // + if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; + } + + /** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @private + */ + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + + /** + * Add a listener for a given event. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} once Specify if the listener is a one-time listener. + * @returns {EventEmitter} + * @private + */ + function addListener(emitter, event, fn, context, once) { + if (typeof fn !== 'function') { + throw new TypeError('The listener must be a function'); + } + + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; + + if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); + else emitter._events[evt] = [emitter._events[evt], listener]; + + return emitter; + } + + /** + * Clear event by name. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} evt The Event name. + * @private + */ + function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) emitter._events = new Events(); + else delete emitter._events[evt]; + } + + /** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ + function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; + } + + /** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @public + */ + EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; + }; + + /** + * Return the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Array} The registered listeners. + * @public + */ + EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event + , handlers = this._events[evt]; + + if (!handlers) return []; + if (handlers.fn) return [handlers.fn]; + + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + + return ee; + }; + + /** + * Return the number of listeners listening to a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Number} The number of listeners. + * @public + */ + EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event + , listeners = this._events[evt]; + + if (!listeners) return 0; + if (listeners.fn) return 1; + return listeners.length; + }; + + /** + * Calls each of the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public + */ + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; + }; + + /** + * Add a listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); + }; + + /** + * Add a one-time listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); + }; + + /** + * Remove the listeners of a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {*} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + clearEvent(this, evt); + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn && + (!once || listeners.once) && + (!context || listeners.context === context) + ) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn || + (once && !listeners[i].once) || + (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else clearEvent(this, evt); + } + + return this; + }; + + /** + * Remove all listeners, or those of the specified event. + * + * @param {(String|Symbol)} [event] The event name. + * @returns {EventEmitter} `this`. + * @public + */ + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; + }; + + // + // Alias methods names because people roll like that. + // + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + // + // Expose the prefix. + // + EventEmitter.prefixed = prefix; + + // + // Allow `EventEmitter` to be imported as module namespace. + // + EventEmitter.EventEmitter = EventEmitter; + + // + // Expose the module. + // + if ('undefined' !== 'object') { + module.exports = EventEmitter; + } +} (eventemitter3$1)); + +var eventemitter3Exports = eventemitter3$1.exports; +var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports); + +/** + * an event system based on nodeJS EventEmitter interface + * @namespace event + */ + +// internal instance of the event emiter +let eventEmitter = new EventEmitter(); + +/** + * event when the DOM is Ready is booting + * @public + * @constant + * @type {string} + * @name DOM_READY + * @memberof event + * @see event.on + */ +const DOM_READY = "dom_ready"; + +/** + * event when the system is booting + * @public + * @constant + * @type {string} + * @name BOOT + * @memberof event + * @see event.on + */ +const BOOT = "me.boot"; + +/** + * event generated when the system update the engine and the renderer by one step + * @public + * @constant + * @type {string} + * @name TICK + * @memberof event + * @see event.on + */ +const TICK = "me.tick"; + +/** + * event generated when the main browser or window is losing focus + * @public + * @constant + * @type {string} + * @name BLUR + * @memberof event + * @see event.on + */ +const BLUR = "me.blur"; + +/** + * event generated when the main browser or window is gaining back focus + * @public + * @constant + * @type {string} + * @name FOCUS + * @memberof event + * @see event.on + */ +const FOCUS = "me.focus"; + +/** + * event when the game is paused
                            + * Data passed : none
                            + * @public + * @constant + * @type {string} + * @name STATE_PAUSE + * @memberof event + * @see event.on + */ +const STATE_PAUSE = "me.state.onPause"; + +/** + * event for when the game is resumed
                            + * Data passed : {number} time in ms the game was paused + * @public + * @constant + * @type {string} + * @name STATE_RESUME + * @memberof event + * @see event.on + */ +const STATE_RESUME = "me.state.onResume"; + +/** + * event when the game is stopped
                            + * Data passed : none
                            + * @public + * @constant + * @type {string} + * @name STATE_STOP + * @memberof event + * @see event.on + */ +const STATE_STOP = "me.state.onStop"; + +/** + * event for when the game is restarted
                            + * Data passed : {number} time in ms the game was stopped + * @public + * @constant + * @type {string} + * @name STATE_RESTART + * @memberof event + * @see event.on + */ +const STATE_RESTART = "me.state.onRestart"; + +/** + * event for when the changing to a different stage + * @public + * @constant + * @type {string} + * @name STATE_CHANGE + * @memberof event + * @see event.on + */ +const STATE_CHANGE = "me.state.onChange"; + +/** + * event for when a stage is resetted + * @public + * @constant + * @type {string} + * @name STAGE_RESET + * @memberof event + * @see event.on +*/ +const STAGE_RESET = "me.stage.onReset"; + +/** + * event for when the video is initialized
                            + * Data passed : {Renderer} the renderer instance created + * @public + * @constant + * @type {string} + * @name VIDEO_INIT + * @memberof event + * @see video.init + * @see event.on + */ +const VIDEO_INIT = "me.video.onInit"; + +/** + * event for when the game manager is initialized
                            + * Data passed : none
                            + * @public + * @constant + * @type {string} + * @name GAME_INIT + * @memberof event + * @see event.on + */ +const GAME_INIT = "me.game.onInit"; + +/** + * event for when the game manager is resetted
                            + * Data passed : none
                            + * @public + * @constant + * @type {string} + * @name GAME_RESET + * @memberof event + * @see event.on + */ +const GAME_RESET = "me.game.onReset"; + +/** + * event for when the engine is about to start a new game loop + * Data passed : {number} time the current time stamp + * @public + * @constant + * @type {string} + * @name GAME_BEFORE_UPDATE + * @memberof event + * @see event.on + */ +const GAME_BEFORE_UPDATE = "me.game.beforeUpdate"; + +/** + * event for the end of the update loop + * Data passed : {number} time the current time stamp + * @public + * @constant + * @type {string} + * @name GAME_AFTER_UPDATE + * @memberof event + * @see event.on + */ +const GAME_AFTER_UPDATE = "me.game.afterUpdate"; + +/** + * Event for when the game is updated (will be impacted by frame skip, frame interpolation and pause/resume state)
                            + * Data passed : {number} time the current time stamp + * @public + * @constant + * @type {string} + * @name GAME_UPDATE + * @memberof event + * @see event.on + */ +const GAME_UPDATE = "me.game.onUpdate"; + +/** + * Event for the end of the draw loop + * Data passed : {number} time the current time stamp + * @public + * @constant + * @type {string} + * @name GAME_BEFORE_DRAW + * @memberof event + * @see event.on + */ +const GAME_BEFORE_DRAW = "me.game.beforeDraw"; + +/** + * Event for the start of the draw loop + * Data passed : {number} time the current time stamp + * @public + * @constant + * @type {string} + * @name GAME_AFTER_DRAW + * @memberof event + * @see event.on + */ +const GAME_AFTER_DRAW = "me.game.afterDraw"; + + +/** + * Event for when the physic world is updated + * Data passed : {number} time the current time stamp + * @public + * @constant + * @type {string} + * @name WORLD_STEP + * @memberof event + * @see event.on + */ +const WORLD_STEP = "me.world.step"; + +/** + * Event for when a level is loaded
                            + * Data passed : {string} Level Name + * @public + * @constant + * @type {string} + * @name LEVEL_LOADED + * @memberof event + * @see event.on + */ +const LEVEL_LOADED = "me.game.onLevelLoaded"; + +/** + * Event for when everything has loaded
                            + * Data passed : none
                            + * @public + * @constant + * @type {string} + * @name LOADER_COMPLETE + * @memberof event + * @see event.on + */ +const LOADER_COMPLETE = "me.loader.onload"; + +/** + * Event for displaying a load progress indicator
                            + * Data passed : {number} [0 .. 1], {Resource} resource object
                            + * @public + * @constant + * @type {string} + * @name LOADER_PROGRESS + * @memberof event + * @see event.on + */ +const LOADER_PROGRESS = "me.loader.onProgress"; + +/** + * Event for when an error occur during preloading
                            + * Data passed : {Resource} resource object
                            + * @public + * @constant + * @type {string} + * @name LOADER_ERROR + * @memberof event + * @see event.on + */ +const LOADER_ERROR = "me.loader.onError"; + +/** + * Event for pressing a binded key
                            + * Data passed : {string} user-defined action, {number} keyCode, + * {boolean} edge state
                            + * Edge-state is for detecting "locked" key bindings. When a locked key + * is pressed and held, the first event will have the third argument + * set true. Subsequent events will continue firing with the third + * argument set false. + * @public + * @constant + * @type {string} + * @name KEYDOWN + * @memberof event + * @see event.on + * @example + * me.input.bindKey(me.input.KEY.X, "jump", true); // Edge-triggered + * me.input.bindKey(me.input.KEY.Z, "shoot"); // Level-triggered + * me.event.on(me.event.KEYDOWN, (action, keyCode, edge) => { + * // Checking bound keys + * if (action === "jump") { + * if (edge) { + * this.doJump(); + * } + * + * // Make character fall slower when holding the jump key + * this.vel.y = this.body.gravity; + * } + * }); + */ +const KEYDOWN = "me.input.keydown"; + +/** + * Event for releasing a binded key
                            + * Data passed : {string} user-defined action, {number} keyCode + * @public + * @constant + * @type {string} + * @name KEYUP + * @memberof event + * @see event.on + * @example + * me.event.on(me.event.KEYUP, (action, keyCode) => { + * // Checking unbound keys + * if (keyCode == me.input.KEY.ESC) { + * if (me.state.isPaused()) { + * me.state.resume(); + * } + * else { + * me.state.pause(); + * } + * } + * }); + */ +const KEYUP = "me.input.keyup"; + +/** + * Event for when a gamepad is connected
                            + * Data passed : {object} gamepad object + * @public + * @constant + * @type {string} + * @name GAMEPAD_CONNECTED + * @memberof event + * @see event.on + */ +const GAMEPAD_CONNECTED = "gamepad.connected"; + +/** + * Event for when a gamepad is disconnected
                            + * Data passed : {object} gamepad object + * @public + * @constant + * @type {string} + * @name GAMEPAD_DISCONNECTED + * @memberof event + * @see event.on + */ +const GAMEPAD_DISCONNECTED = "gamepad.disconnected"; + +/** + * Event for when gamepad button/axis state is updated
                            + * Data passed : {number} index
                            + * Data passed : {string} type : "axes" or "buttons"
                            + * Data passed : {number} button
                            + * Data passed : {number} current.value
                            + * Data passed : {boolean} current.pressed + * @public + * @constant + * @type {string} + * @name GAMEPAD_UPDATE + * @memberof event + * @see event.on + */ +const GAMEPAD_UPDATE = "gamepad.update"; + +/** + * Event for pointermove events on the screen area
                            + * Data passed : {me.Pointer} a Pointer object + * @public + * @constant + * @type {string} + * @name POINTERMOVE + * @memberof event + * @see event.on + */ +const POINTERMOVE = "me.event.pointermove"; + +/** + * Event for onPointerLockChange event
                            + * Data passed : {boolean} pointer lock status (true/false) + * @public + * @constant + * @type {string} + * @name POINTERLOCKCHANGE + * @memberof event + * @see event.on + */ +const POINTERLOCKCHANGE = "me.event.pointerlockChange"; + +/** + * Event for dragstart events on a Draggable entity
                            + * Data passed: + * {object} the drag event
                            + * {object} the Draggable entity + * @public + * @constant + * @type {string} + * @name DRAGSTART + * @memberof event + * @see event.on + */ +const DRAGSTART = "me.game.dragstart"; + +/** + * Event for dragend events on a Draggable entity
                            + * Data passed: + * {object} the drag event
                            + * {object} the Draggable entity + * @public + * @constant + * @type {string} + * @name DRAGEND + * @memberof event + * @see event.on + */ +const DRAGEND = "me.game.dragend"; + +/** + * Event for when the (browser) window is resized
                            + * Data passed : {Event} Event object + * @public + * @constant + * @type {string} + * @name WINDOW_ONRESIZE + * @memberof event + * @see event.on + */ +const WINDOW_ONRESIZE = "globalThis.onresize"; + +/** + * Event for when the canvas is resized
                            + * (this usually follows a WINDOW_ONRESIZE event).
                            + * Data passed : {number} canvas width
                            + * Data passed : {number} canvas height + * @public + * @constant + * @type {string} + * @name CANVAS_ONRESIZE + * @memberof event + * @see event.on + */ +const CANVAS_ONRESIZE = "canvas.onresize"; + +/** + * Event for when the viewport is resized
                            + * (this usually follows a WINDOW_ONRESIZE event, when using the `flex` scaling mode is used and after the viewport was updated).
                            + * Data passed : {number} viewport width
                            + * Data passed : {number} viewport height
                            + * Data passed : {Camera2d} a reference to the camera viewport being resized + * @public + * @constant + * @type {string} + * @name VIEWPORT_ONRESIZE + * @memberof event + * @see event.on + */ +const VIEWPORT_ONRESIZE = "viewport.onresize"; + +/** + * Event for when the device is rotated
                            + * Data passed : {Event} Event object
                            + * @public + * @constant + * @type {string} + * @name WINDOW_ONORIENTATION_CHANGE + * @memberof event + * @see event.on + */ +const WINDOW_ONORIENTATION_CHANGE = "globalThis.orientationchange"; + +/** + * Event for when the (browser) window is scrolled
                            + * Data passed : {Event} Event object + * @public + * @constant + * @type {string} + * @name WINDOW_ONSCROLL + * @memberof event + * @see event.on + */ +const WINDOW_ONSCROLL = "globalThis.onscroll"; + +/** + * Event for when the viewport position is updated
                            + * Data passed : {me.Vector2d} viewport position vector + * @public + * @constant + * @type {string} + * @name VIEWPORT_ONCHANGE + * @memberof event + * @see event.on + */ +const VIEWPORT_ONCHANGE = "viewport.onchange"; + +/** + * Event for when the current context is lost
                            + * Data passed : {me.Renderer} the current renderer instance + * @public + * @constant + * @type {string} + * @name WEBGL_ONCONTEXT_LOST + * @memberof event + * @see event.on + */ +const ONCONTEXT_LOST = "renderer.contextlost"; + +/** + * Event for when the current context is restored
                            + * Data passed : {me.Renderer} the current renderer instance` + * @public + * @constant + * @type {string} + * @name ONCONTEXT_RESTORED + * @memberof event + * @see event.on + */ +const ONCONTEXT_RESTORED = "renderer.contextrestored"; + +/** + * calls each of the listeners registered for a given event. + * @function event.emit + * @param {string|symbol} eventName - The event name. + * @param {object} [...arguments] - arguments to be passed to all listeners + * @returns {boolean} true if the event had listeners, false otherwise. + * @example + * me.event.emit("event-name", a, b, c); + */ +function emit(eventName, ...args) { + return eventEmitter.emit(eventName, ...args); +} + +/** + * Add a listener for a given event. + * @function event.on + * @param {string|symbol} eventName - The event name. + * @param {Function} listener - The listener function. + * @param {*} [context=this] - The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + * @example + * me.event.on("event-name", myFunction, this); + */ +function on(eventName, listener, context) { + return eventEmitter.on(eventName, listener, context); +} + +/** + * Add a one-time listener for a given event. + * @function event.once + * @param {string|symbol} eventName - The event name. + * @param {Function} listener - The listener function. + * @param {*} [context=this] - The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + * @example + * me.event.once("event-name", myFunction, this); + */ +function once(eventName, listener, context) { + return eventEmitter.once(eventName, listener, context); +} + +/** + * remove the given listener for a given event. + * @function event.off + * @param {string|symbol} eventName - The event name. + * @param {Function} listener - The listener function. + * @returns {EventEmitter} `this`. + * @public + * @example + * me.event.off("event-name", myFunction); + */ +function off(eventName, listener) { + return eventEmitter.off(eventName, listener); +} + +var event = { + __proto__: null, + BLUR: BLUR, + BOOT: BOOT, + CANVAS_ONRESIZE: CANVAS_ONRESIZE, + DOM_READY: DOM_READY, + DRAGEND: DRAGEND, + DRAGSTART: DRAGSTART, + FOCUS: FOCUS, + GAMEPAD_CONNECTED: GAMEPAD_CONNECTED, + GAMEPAD_DISCONNECTED: GAMEPAD_DISCONNECTED, + GAMEPAD_UPDATE: GAMEPAD_UPDATE, + GAME_AFTER_DRAW: GAME_AFTER_DRAW, + GAME_AFTER_UPDATE: GAME_AFTER_UPDATE, + GAME_BEFORE_DRAW: GAME_BEFORE_DRAW, + GAME_BEFORE_UPDATE: GAME_BEFORE_UPDATE, + GAME_INIT: GAME_INIT, + GAME_RESET: GAME_RESET, + GAME_UPDATE: GAME_UPDATE, + KEYDOWN: KEYDOWN, + KEYUP: KEYUP, + LEVEL_LOADED: LEVEL_LOADED, + LOADER_COMPLETE: LOADER_COMPLETE, + LOADER_ERROR: LOADER_ERROR, + LOADER_PROGRESS: LOADER_PROGRESS, + ONCONTEXT_LOST: ONCONTEXT_LOST, + ONCONTEXT_RESTORED: ONCONTEXT_RESTORED, + POINTERLOCKCHANGE: POINTERLOCKCHANGE, + POINTERMOVE: POINTERMOVE, + STAGE_RESET: STAGE_RESET, + STATE_CHANGE: STATE_CHANGE, + STATE_PAUSE: STATE_PAUSE, + STATE_RESTART: STATE_RESTART, + STATE_RESUME: STATE_RESUME, + STATE_STOP: STATE_STOP, + TICK: TICK, + VIDEO_INIT: VIDEO_INIT, + VIEWPORT_ONCHANGE: VIEWPORT_ONCHANGE, + VIEWPORT_ONRESIZE: VIEWPORT_ONRESIZE, + WINDOW_ONORIENTATION_CHANGE: WINDOW_ONORIENTATION_CHANGE, + WINDOW_ONRESIZE: WINDOW_ONRESIZE, + WINDOW_ONSCROLL: WINDOW_ONSCROLL, + WORLD_STEP: WORLD_STEP, + emit: emit, + off: off, + on: on, + once: once +}; + +var howler$1 = {}; + +/*! + * howler.js v2.2.4 + * howlerjs.com + * + * (c) 2013-2020, James Simpson of GoldFire Studios + * goldfirestudios.com + * + * MIT License + */ + +(function (exports) { + (function() { + + 'use strict'; + + /** Global Methods **/ + /***************************************************************************/ + + /** + * Create the global controller. All contained methods and properties apply + * to all sounds that are currently playing or will be in the future. + */ + var HowlerGlobal = function() { + this.init(); + }; + HowlerGlobal.prototype = { + /** + * Initialize the global Howler object. + * @return {Howler} + */ + init: function() { + var self = this || Howler; + + // Create a global ID counter. + self._counter = 1000; + + // Pool of unlocked HTML5 Audio objects. + self._html5AudioPool = []; + self.html5PoolSize = 10; + + // Internal properties. + self._codecs = {}; + self._howls = []; + self._muted = false; + self._volume = 1; + self._canPlayEvent = 'canplaythrough'; + self._navigator = (typeof window !== 'undefined' && window.navigator) ? window.navigator : null; + + // Public properties. + self.masterGain = null; + self.noAudio = false; + self.usingWebAudio = true; + self.autoSuspend = true; + self.ctx = null; + + // Set to false to disable the auto audio unlocker. + self.autoUnlock = true; + + // Setup the various state values for global tracking. + self._setup(); + + return self; + }, + + /** + * Get/set the global volume for all sounds. + * @param {Float} vol Volume from 0.0 to 1.0. + * @return {Howler/Float} Returns self or current volume. + */ + volume: function(vol) { + var self = this || Howler; + vol = parseFloat(vol); + + // If we don't have an AudioContext created yet, run the setup. + if (!self.ctx) { + setupAudioContext(); + } + + if (typeof vol !== 'undefined' && vol >= 0 && vol <= 1) { + self._volume = vol; + + // Don't update any of the nodes if we are muted. + if (self._muted) { + return self; + } + + // When using Web Audio, we just need to adjust the master gain. + if (self.usingWebAudio) { + self.masterGain.gain.setValueAtTime(vol, Howler.ctx.currentTime); + } + + // Loop through and change volume for all HTML5 audio nodes. + for (var i=0; i=0; i--) { + self._howls[i].unload(); + } + + // Create a new AudioContext to make sure it is fully reset. + if (self.usingWebAudio && self.ctx && typeof self.ctx.close !== 'undefined') { + self.ctx.close(); + self.ctx = null; + setupAudioContext(); + } + + return self; + }, + + /** + * Check for codec support of specific extension. + * @param {String} ext Audio file extention. + * @return {Boolean} + */ + codecs: function(ext) { + return (this || Howler)._codecs[ext.replace(/^x-/, '')]; + }, + + /** + * Setup various state values for global tracking. + * @return {Howler} + */ + _setup: function() { + var self = this || Howler; + + // Keeps track of the suspend/resume state of the AudioContext. + self.state = self.ctx ? self.ctx.state || 'suspended' : 'suspended'; + + // Automatically begin the 30-second suspend process + self._autoSuspend(); + + // Check if audio is available. + if (!self.usingWebAudio) { + // No audio is available on this system if noAudio is set to true. + if (typeof Audio !== 'undefined') { + try { + var test = new Audio(); + + // Check if the canplaythrough event is available. + if (typeof test.oncanplaythrough === 'undefined') { + self._canPlayEvent = 'canplay'; + } + } catch(e) { + self.noAudio = true; + } + } else { + self.noAudio = true; + } + } + + // Test to make sure audio isn't disabled in Internet Explorer. + try { + var test = new Audio(); + if (test.muted) { + self.noAudio = true; + } + } catch (e) {} + + // Check for supported codecs. + if (!self.noAudio) { + self._setupCodecs(); + } + + return self; + }, + + /** + * Check for browser support for various codecs and cache the results. + * @return {Howler} + */ + _setupCodecs: function() { + var self = this || Howler; + var audioTest = null; + + // Must wrap in a try/catch because IE11 in server mode throws an error. + try { + audioTest = (typeof Audio !== 'undefined') ? new Audio() : null; + } catch (err) { + return self; + } + + if (!audioTest || typeof audioTest.canPlayType !== 'function') { + return self; + } + + var mpegTest = audioTest.canPlayType('audio/mpeg;').replace(/^no$/, ''); + + // Opera version <33 has mixed MP3 support, so we need to check for and block it. + var ua = self._navigator ? self._navigator.userAgent : ''; + var checkOpera = ua.match(/OPR\/(\d+)/g); + var isOldOpera = (checkOpera && parseInt(checkOpera[0].split('/')[1], 10) < 33); + var checkSafari = ua.indexOf('Safari') !== -1 && ua.indexOf('Chrome') === -1; + var safariVersion = ua.match(/Version\/(.*?) /); + var isOldSafari = (checkSafari && safariVersion && parseInt(safariVersion[1], 10) < 15); + + self._codecs = { + mp3: !!(!isOldOpera && (mpegTest || audioTest.canPlayType('audio/mp3;').replace(/^no$/, ''))), + mpeg: !!mpegTest, + opus: !!audioTest.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ''), + ogg: !!audioTest.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ''), + oga: !!audioTest.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ''), + wav: !!(audioTest.canPlayType('audio/wav; codecs="1"') || audioTest.canPlayType('audio/wav')).replace(/^no$/, ''), + aac: !!audioTest.canPlayType('audio/aac;').replace(/^no$/, ''), + caf: !!audioTest.canPlayType('audio/x-caf;').replace(/^no$/, ''), + m4a: !!(audioTest.canPlayType('audio/x-m4a;') || audioTest.canPlayType('audio/m4a;') || audioTest.canPlayType('audio/aac;')).replace(/^no$/, ''), + m4b: !!(audioTest.canPlayType('audio/x-m4b;') || audioTest.canPlayType('audio/m4b;') || audioTest.canPlayType('audio/aac;')).replace(/^no$/, ''), + mp4: !!(audioTest.canPlayType('audio/x-mp4;') || audioTest.canPlayType('audio/mp4;') || audioTest.canPlayType('audio/aac;')).replace(/^no$/, ''), + weba: !!(!isOldSafari && audioTest.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, '')), + webm: !!(!isOldSafari && audioTest.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, '')), + dolby: !!audioTest.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/, ''), + flac: !!(audioTest.canPlayType('audio/x-flac;') || audioTest.canPlayType('audio/flac;')).replace(/^no$/, '') + }; + + return self; + }, + + /** + * Some browsers/devices will only allow audio to be played after a user interaction. + * Attempt to automatically unlock audio on the first user interaction. + * Concept from: http://paulbakaus.com/tutorials/html5/web-audio-on-ios/ + * @return {Howler} + */ + _unlockAudio: function() { + var self = this || Howler; + + // Only run this if Web Audio is supported and it hasn't already been unlocked. + if (self._audioUnlocked || !self.ctx) { + return; + } + + self._audioUnlocked = false; + self.autoUnlock = false; + + // Some mobile devices/platforms have distortion issues when opening/closing tabs and/or web views. + // Bugs in the browser (especially Mobile Safari) can cause the sampleRate to change from 44100 to 48000. + // By calling Howler.unload(), we create a new AudioContext with the correct sampleRate. + if (!self._mobileUnloaded && self.ctx.sampleRate !== 44100) { + self._mobileUnloaded = true; + self.unload(); + } + + // Scratch buffer for enabling iOS to dispose of web audio buffers correctly, as per: + // http://stackoverflow.com/questions/24119684 + self._scratchBuffer = self.ctx.createBuffer(1, 1, 22050); + + // Call this method on touch start to create and play a buffer, + // then check if the audio actually played to determine if + // audio has now been unlocked on iOS, Android, etc. + var unlock = function(e) { + // Create a pool of unlocked HTML5 Audio objects that can + // be used for playing sounds without user interaction. HTML5 + // Audio objects must be individually unlocked, as opposed + // to the WebAudio API which only needs a single activation. + // This must occur before WebAudio setup or the source.onended + // event will not fire. + while (self._html5AudioPool.length < self.html5PoolSize) { + try { + var audioNode = new Audio(); + + // Mark this Audio object as unlocked to ensure it can get returned + // to the unlocked pool when released. + audioNode._unlocked = true; + + // Add the audio node to the pool. + self._releaseHtml5Audio(audioNode); + } catch (e) { + self.noAudio = true; + break; + } + } + + // Loop through any assigned audio nodes and unlock them. + for (var i=0; i= 55. + if (typeof self.ctx.resume === 'function') { + self.ctx.resume(); + } + + // Setup a timeout to check that we are unlocked on the next event loop. + source.onended = function() { + source.disconnect(0); + + // Update the unlocked state and prevent this check from happening again. + self._audioUnlocked = true; + + // Remove the touch start listener. + document.removeEventListener('touchstart', unlock, true); + document.removeEventListener('touchend', unlock, true); + document.removeEventListener('click', unlock, true); + document.removeEventListener('keydown', unlock, true); + + // Let all sounds know that audio has been unlocked. + for (var i=0; i 0 ? sound._seek : self._sprite[sprite][0] / 1000); + var duration = Math.max(0, ((self._sprite[sprite][0] + self._sprite[sprite][1]) / 1000) - seek); + var timeout = (duration * 1000) / Math.abs(sound._rate); + var start = self._sprite[sprite][0] / 1000; + var stop = (self._sprite[sprite][0] + self._sprite[sprite][1]) / 1000; + sound._sprite = sprite; + + // Mark the sound as ended instantly so that this async playback + // doesn't get grabbed by another call to play while this one waits to start. + sound._ended = false; + + // Update the parameters of the sound. + var setParams = function() { + sound._paused = false; + sound._seek = seek; + sound._start = start; + sound._stop = stop; + sound._loop = !!(sound._loop || self._sprite[sprite][2]); + }; + + // End the sound instantly if seek is at the end. + if (seek >= stop) { + self._ended(sound); + return; + } + + // Begin the actual playback. + var node = sound._node; + if (self._webAudio) { + // Fire this when the sound is ready to play to begin Web Audio playback. + var playWebAudio = function() { + self._playLock = false; + setParams(); + self._refreshBuffer(sound); + + // Setup the playback params. + var vol = (sound._muted || self._muted) ? 0 : sound._volume; + node.gain.setValueAtTime(vol, Howler.ctx.currentTime); + sound._playStart = Howler.ctx.currentTime; + + // Play the sound using the supported method. + if (typeof node.bufferSource.start === 'undefined') { + sound._loop ? node.bufferSource.noteGrainOn(0, seek, 86400) : node.bufferSource.noteGrainOn(0, seek, duration); + } else { + sound._loop ? node.bufferSource.start(0, seek, 86400) : node.bufferSource.start(0, seek, duration); + } + + // Start a new timer if none is present. + if (timeout !== Infinity) { + self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout); + } + + if (!internal) { + setTimeout(function() { + self._emit('play', sound._id); + self._loadQueue(); + }, 0); + } + }; + + if (Howler.state === 'running' && Howler.ctx.state !== 'interrupted') { + playWebAudio(); + } else { + self._playLock = true; + + // Wait for the audio context to resume before playing. + self.once('resume', playWebAudio); + + // Cancel the end timer. + self._clearTimer(sound._id); + } + } else { + // Fire this when the sound is ready to play to begin HTML5 Audio playback. + var playHtml5 = function() { + node.currentTime = seek; + node.muted = sound._muted || self._muted || Howler._muted || node.muted; + node.volume = sound._volume * Howler.volume(); + node.playbackRate = sound._rate; + + // Some browsers will throw an error if this is called without user interaction. + try { + var play = node.play(); + + // Support older browsers that don't support promises, and thus don't have this issue. + if (play && typeof Promise !== 'undefined' && (play instanceof Promise || typeof play.then === 'function')) { + // Implements a lock to prevent DOMException: The play() request was interrupted by a call to pause(). + self._playLock = true; + + // Set param values immediately. + setParams(); + + // Releases the lock and executes queued actions. + play + .then(function() { + self._playLock = false; + node._unlocked = true; + if (!internal) { + self._emit('play', sound._id); + } else { + self._loadQueue(); + } + }) + .catch(function() { + self._playLock = false; + self._emit('playerror', sound._id, 'Playback was unable to start. This is most commonly an issue ' + + 'on mobile devices and Chrome where playback was not within a user interaction.'); + + // Reset the ended and paused values. + sound._ended = true; + sound._paused = true; + }); + } else if (!internal) { + self._playLock = false; + setParams(); + self._emit('play', sound._id); + } + + // Setting rate before playing won't work in IE, so we set it again here. + node.playbackRate = sound._rate; + + // If the node is still paused, then we can assume there was a playback issue. + if (node.paused) { + self._emit('playerror', sound._id, 'Playback was unable to start. This is most commonly an issue ' + + 'on mobile devices and Chrome where playback was not within a user interaction.'); + return; + } + + // Setup the end timer on sprites or listen for the ended event. + if (sprite !== '__default' || sound._loop) { + self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout); + } else { + self._endTimers[sound._id] = function() { + // Fire ended on this audio node. + self._ended(sound); + + // Clear this listener. + node.removeEventListener('ended', self._endTimers[sound._id], false); + }; + node.addEventListener('ended', self._endTimers[sound._id], false); + } + } catch (err) { + self._emit('playerror', sound._id, err); + } + }; + + // If this is streaming audio, make sure the src is set and load again. + if (node.src === 'data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA') { + node.src = self._src; + node.load(); + } + + // Play immediately if ready, or wait for the 'canplaythrough'e vent. + var loadedNoReadyState = (window && window.ejecta) || (!node.readyState && Howler._navigator.isCocoonJS); + if (node.readyState >= 3 || loadedNoReadyState) { + playHtml5(); + } else { + self._playLock = true; + self._state = 'loading'; + + var listener = function() { + self._state = 'loaded'; + + // Begin playback. + playHtml5(); + + // Clear this listener. + node.removeEventListener(Howler._canPlayEvent, listener, false); + }; + node.addEventListener(Howler._canPlayEvent, listener, false); + + // Cancel the end timer. + self._clearTimer(sound._id); + } + } + + return sound._id; + }, + + /** + * Pause playback and save current position. + * @param {Number} id The sound ID (empty to pause all in group). + * @return {Howl} + */ + pause: function(id) { + var self = this; + + // If the sound hasn't loaded or a play() promise is pending, add it to the load queue to pause when capable. + if (self._state !== 'loaded' || self._playLock) { + self._queue.push({ + event: 'pause', + action: function() { + self.pause(id); + } + }); + + return self; + } + + // If no id is passed, get all ID's to be paused. + var ids = self._getSoundIds(id); + + for (var i=0; i Returns the group's volume value. + * volume(id) -> Returns the sound id's current volume. + * volume(vol) -> Sets the volume of all sounds in this Howl group. + * volume(vol, id) -> Sets the volume of passed sound id. + * @return {Howl/Number} Returns self or current volume. + */ + volume: function() { + var self = this; + var args = arguments; + var vol, id; + + // Determine the values based on arguments. + if (args.length === 0) { + // Return the value of the groups' volume. + return self._volume; + } else if (args.length === 1 || args.length === 2 && typeof args[1] === 'undefined') { + // First check if this is an ID, and if not, assume it is a new volume. + var ids = self._getSoundIds(); + var index = ids.indexOf(args[0]); + if (index >= 0) { + id = parseInt(args[0], 10); + } else { + vol = parseFloat(args[0]); + } + } else if (args.length >= 2) { + vol = parseFloat(args[0]); + id = parseInt(args[1], 10); + } + + // Update the volume or return the current volume. + var sound; + if (typeof vol !== 'undefined' && vol >= 0 && vol <= 1) { + // If the sound hasn't loaded, add it to the load queue to change volume when capable. + if (self._state !== 'loaded'|| self._playLock) { + self._queue.push({ + event: 'volume', + action: function() { + self.volume.apply(self, args); + } + }); + + return self; + } + + // Set the group volume. + if (typeof id === 'undefined') { + self._volume = vol; + } + + // Update one or all volumes. + id = self._getSoundIds(id); + for (var i=0; i 0) ? len / steps : len); + var lastTick = Date.now(); + + // Store the value being faded to. + sound._fadeTo = to; + + // Update the volume value on each interval tick. + sound._interval = setInterval(function() { + // Update the volume based on the time since the last tick. + var tick = (Date.now() - lastTick) / len; + lastTick = Date.now(); + vol += diff * tick; + + // Round to within 2 decimal points. + vol = Math.round(vol * 100) / 100; + + // Make sure the volume is in the right bounds. + if (diff < 0) { + vol = Math.max(to, vol); + } else { + vol = Math.min(to, vol); + } + + // Change the volume. + if (self._webAudio) { + sound._volume = vol; + } else { + self.volume(vol, sound._id, true); + } + + // Set the group's volume. + if (isGroup) { + self._volume = vol; + } + + // When the fade is complete, stop it and fire event. + if ((to < from && vol <= to) || (to > from && vol >= to)) { + clearInterval(sound._interval); + sound._interval = null; + sound._fadeTo = null; + self.volume(to, sound._id); + self._emit('fade', sound._id); + } + }, stepLen); + }, + + /** + * Internal method that stops the currently playing fade when + * a new fade starts, volume is changed or the sound is stopped. + * @param {Number} id The sound id. + * @return {Howl} + */ + _stopFade: function(id) { + var self = this; + var sound = self._soundById(id); + + if (sound && sound._interval) { + if (self._webAudio) { + sound._node.gain.cancelScheduledValues(Howler.ctx.currentTime); + } + + clearInterval(sound._interval); + sound._interval = null; + self.volume(sound._fadeTo, id); + sound._fadeTo = null; + self._emit('fade', id); + } + + return self; + }, + + /** + * Get/set the loop parameter on a sound. This method can optionally take 0, 1 or 2 arguments. + * loop() -> Returns the group's loop value. + * loop(id) -> Returns the sound id's loop value. + * loop(loop) -> Sets the loop value for all sounds in this Howl group. + * loop(loop, id) -> Sets the loop value of passed sound id. + * @return {Howl/Boolean} Returns self or current loop value. + */ + loop: function() { + var self = this; + var args = arguments; + var loop, id, sound; + + // Determine the values for loop and id. + if (args.length === 0) { + // Return the grou's loop value. + return self._loop; + } else if (args.length === 1) { + if (typeof args[0] === 'boolean') { + loop = args[0]; + self._loop = loop; + } else { + // Return this sound's loop value. + sound = self._soundById(parseInt(args[0], 10)); + return sound ? sound._loop : false; + } + } else if (args.length === 2) { + loop = args[0]; + id = parseInt(args[1], 10); + } + + // If no id is passed, get all ID's to be looped. + var ids = self._getSoundIds(id); + for (var i=0; i Returns the first sound node's current playback rate. + * rate(id) -> Returns the sound id's current playback rate. + * rate(rate) -> Sets the playback rate of all sounds in this Howl group. + * rate(rate, id) -> Sets the playback rate of passed sound id. + * @return {Howl/Number} Returns self or the current playback rate. + */ + rate: function() { + var self = this; + var args = arguments; + var rate, id; + + // Determine the values based on arguments. + if (args.length === 0) { + // We will simply return the current rate of the first node. + id = self._sounds[0]._id; + } else if (args.length === 1) { + // First check if this is an ID, and if not, assume it is a new rate value. + var ids = self._getSoundIds(); + var index = ids.indexOf(args[0]); + if (index >= 0) { + id = parseInt(args[0], 10); + } else { + rate = parseFloat(args[0]); + } + } else if (args.length === 2) { + rate = parseFloat(args[0]); + id = parseInt(args[1], 10); + } + + // Update the playback rate or return the current value. + var sound; + if (typeof rate === 'number') { + // If the sound hasn't loaded, add it to the load queue to change playback rate when capable. + if (self._state !== 'loaded' || self._playLock) { + self._queue.push({ + event: 'rate', + action: function() { + self.rate.apply(self, args); + } + }); + + return self; + } + + // Set the group rate. + if (typeof id === 'undefined') { + self._rate = rate; + } + + // Update one or all volumes. + id = self._getSoundIds(id); + for (var i=0; i Returns the first sound node's current seek position. + * seek(id) -> Returns the sound id's current seek position. + * seek(seek) -> Sets the seek position of the first sound node. + * seek(seek, id) -> Sets the seek position of passed sound id. + * @return {Howl/Number} Returns self or the current seek position. + */ + seek: function() { + var self = this; + var args = arguments; + var seek, id; + + // Determine the values based on arguments. + if (args.length === 0) { + // We will simply return the current position of the first node. + if (self._sounds.length) { + id = self._sounds[0]._id; + } + } else if (args.length === 1) { + // First check if this is an ID, and if not, assume it is a new seek position. + var ids = self._getSoundIds(); + var index = ids.indexOf(args[0]); + if (index >= 0) { + id = parseInt(args[0], 10); + } else if (self._sounds.length) { + id = self._sounds[0]._id; + seek = parseFloat(args[0]); + } + } else if (args.length === 2) { + seek = parseFloat(args[0]); + id = parseInt(args[1], 10); + } + + // If there is no ID, bail out. + if (typeof id === 'undefined') { + return 0; + } + + // If the sound hasn't loaded, add it to the load queue to seek when capable. + if (typeof seek === 'number' && (self._state !== 'loaded' || self._playLock)) { + self._queue.push({ + event: 'seek', + action: function() { + self.seek.apply(self, args); + } + }); + + return self; + } + + // Get the sound. + var sound = self._soundById(id); + + if (sound) { + if (typeof seek === 'number' && seek >= 0) { + // Pause the sound and update position for restarting playback. + var playing = self.playing(id); + if (playing) { + self.pause(id, true); + } + + // Move the position of the track and cancel timer. + sound._seek = seek; + sound._ended = false; + self._clearTimer(id); + + // Update the seek position for HTML5 Audio. + if (!self._webAudio && sound._node && !isNaN(sound._node.duration)) { + sound._node.currentTime = seek; + } + + // Seek and emit when ready. + var seekAndEmit = function() { + // Restart the playback if the sound was playing. + if (playing) { + self.play(id, true); + } + + self._emit('seek', id); + }; + + // Wait for the play lock to be unset before emitting (HTML5 Audio). + if (playing && !self._webAudio) { + var emitSeek = function() { + if (!self._playLock) { + seekAndEmit(); + } else { + setTimeout(emitSeek, 0); + } + }; + setTimeout(emitSeek, 0); + } else { + seekAndEmit(); + } + } else { + if (self._webAudio) { + var realTime = self.playing(id) ? Howler.ctx.currentTime - sound._playStart : 0; + var rateSeek = sound._rateSeek ? sound._rateSeek - sound._seek : 0; + return sound._seek + (rateSeek + realTime * Math.abs(sound._rate)); + } else { + return sound._node.currentTime; + } + } + } + + return self; + }, + + /** + * Check if a specific sound is currently playing or not (if id is provided), or check if at least one of the sounds in the group is playing or not. + * @param {Number} id The sound id to check. If none is passed, the whole sound group is checked. + * @return {Boolean} True if playing and false if not. + */ + playing: function(id) { + var self = this; + + // Check the passed sound ID (if any). + if (typeof id === 'number') { + var sound = self._soundById(id); + return sound ? !sound._paused : false; + } + + // Otherwise, loop through all sounds and check if any are playing. + for (var i=0; i= 0) { + Howler._howls.splice(index, 1); + } + + // Delete this sound from the cache (if no other Howl is using it). + var remCache = true; + for (i=0; i= 0) { + remCache = false; + break; + } + } + + if (cache && remCache) { + delete cache[self._src]; + } + + // Clear global errors. + Howler.noAudio = false; + + // Clear out `self`. + self._state = 'unloaded'; + self._sounds = []; + self = null; + + return null; + }, + + /** + * Listen to a custom event. + * @param {String} event Event name. + * @param {Function} fn Listener to call. + * @param {Number} id (optional) Only listen to events for this sound. + * @param {Number} once (INTERNAL) Marks event to fire only once. + * @return {Howl} + */ + on: function(event, fn, id, once) { + var self = this; + var events = self['_on' + event]; + + if (typeof fn === 'function') { + events.push(once ? {id: id, fn: fn, once: once} : {id: id, fn: fn}); + } + + return self; + }, + + /** + * Remove a custom event. Call without parameters to remove all events. + * @param {String} event Event name. + * @param {Function} fn Listener to remove. Leave empty to remove all. + * @param {Number} id (optional) Only remove events for this sound. + * @return {Howl} + */ + off: function(event, fn, id) { + var self = this; + var events = self['_on' + event]; + var i = 0; + + // Allow passing just an event and ID. + if (typeof fn === 'number') { + id = fn; + fn = null; + } + + if (fn || id) { + // Loop through event store and remove the passed function. + for (i=0; i=0; i--) { + // Only fire the listener if the correct ID is used. + if (!events[i].id || events[i].id === id || event === 'load') { + setTimeout(function(fn) { + fn.call(this, id, msg); + }.bind(self, events[i].fn), 0); + + // If this event was setup with `once`, remove it. + if (events[i].once) { + self.off(event, events[i].fn, events[i].id); + } + } + } + + // Pass the event type into load queue so that it can continue stepping. + self._loadQueue(event); + + return self; + }, + + /** + * Queue of actions initiated before the sound has loaded. + * These will be called in sequence, with the next only firing + * after the previous has finished executing (even if async like play). + * @return {Howl} + */ + _loadQueue: function(event) { + var self = this; + + if (self._queue.length > 0) { + var task = self._queue[0]; + + // Remove this task if a matching event was passed. + if (task.event === event) { + self._queue.shift(); + self._loadQueue(); + } + + // Run the task if no event type is passed. + if (!event) { + task.action(); + } + } + + return self; + }, + + /** + * Fired when playback ends at the end of the duration. + * @param {Sound} sound The sound object to work with. + * @return {Howl} + */ + _ended: function(sound) { + var self = this; + var sprite = sound._sprite; + + // If we are using IE and there was network latency we may be clipping + // audio before it completes playing. Lets check the node to make sure it + // believes it has completed, before ending the playback. + if (!self._webAudio && sound._node && !sound._node.paused && !sound._node.ended && sound._node.currentTime < sound._stop) { + setTimeout(self._ended.bind(self, sound), 100); + return self; + } + + // Should this sound loop? + var loop = !!(sound._loop || self._sprite[sprite][2]); + + // Fire the ended event. + self._emit('end', sound._id); + + // Restart the playback for HTML5 Audio loop. + if (!self._webAudio && loop) { + self.stop(sound._id, true).play(sound._id); + } + + // Restart this timer if on a Web Audio loop. + if (self._webAudio && loop) { + self._emit('play', sound._id); + sound._seek = sound._start || 0; + sound._rateSeek = 0; + sound._playStart = Howler.ctx.currentTime; + + var timeout = ((sound._stop - sound._start) * 1000) / Math.abs(sound._rate); + self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout); + } + + // Mark the node as paused. + if (self._webAudio && !loop) { + sound._paused = true; + sound._ended = true; + sound._seek = sound._start || 0; + sound._rateSeek = 0; + self._clearTimer(sound._id); + + // Clean up the buffer source. + self._cleanBuffer(sound._node); + + // Attempt to auto-suspend AudioContext if no sounds are still playing. + Howler._autoSuspend(); + } + + // When using a sprite, end the track. + if (!self._webAudio && !loop) { + self.stop(sound._id, true); + } + + return self; + }, + + /** + * Clear the end timer for a sound playback. + * @param {Number} id The sound ID. + * @return {Howl} + */ + _clearTimer: function(id) { + var self = this; + + if (self._endTimers[id]) { + // Clear the timeout or remove the ended listener. + if (typeof self._endTimers[id] !== 'function') { + clearTimeout(self._endTimers[id]); + } else { + var sound = self._soundById(id); + if (sound && sound._node) { + sound._node.removeEventListener('ended', self._endTimers[id], false); + } + } + + delete self._endTimers[id]; + } + + return self; + }, + + /** + * Return the sound identified by this ID, or return null. + * @param {Number} id Sound ID + * @return {Object} Sound object or null. + */ + _soundById: function(id) { + var self = this; + + // Loop through all sounds and find the one with this ID. + for (var i=0; i=0; i--) { + if (cnt <= limit) { + return; + } + + if (self._sounds[i]._ended) { + // Disconnect the audio source when using Web Audio. + if (self._webAudio && self._sounds[i]._node) { + self._sounds[i]._node.disconnect(0); + } + + // Remove sounds until we have the pool size. + self._sounds.splice(i, 1); + cnt--; + } + } + }, + + /** + * Get all ID's from the sounds pool. + * @param {Number} id Only return one ID if one is passed. + * @return {Array} Array of IDs. + */ + _getSoundIds: function(id) { + var self = this; + + if (typeof id === 'undefined') { + var ids = []; + for (var i=0; i= 0; + + if (!node.bufferSource) { + return self; + } + + if (Howler._scratchBuffer && node.bufferSource) { + node.bufferSource.onended = null; + node.bufferSource.disconnect(0); + if (isIOS) { + try { node.bufferSource.buffer = Howler._scratchBuffer; } catch(e) {} + } + } + node.bufferSource = null; + + return self; + }, + + /** + * Set the source to a 0-second silence to stop any downloading (except in IE). + * @param {Object} node Audio node to clear. + */ + _clearSound: function(node) { + var checkIE = /MSIE |Trident\//.test(Howler._navigator && Howler._navigator.userAgent); + if (!checkIE) { + node.src = 'data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA'; + } + } + }; + + /** Single Sound Methods **/ + /***************************************************************************/ + + /** + * Setup the sound object, which each node attached to a Howl group is contained in. + * @param {Object} howl The Howl parent group. + */ + var Sound = function(howl) { + this._parent = howl; + this.init(); + }; + Sound.prototype = { + /** + * Initialize a new Sound object. + * @return {Sound} + */ + init: function() { + var self = this; + var parent = self._parent; + + // Setup the default parameters. + self._muted = parent._muted; + self._loop = parent._loop; + self._volume = parent._volume; + self._rate = parent._rate; + self._seek = 0; + self._paused = true; + self._ended = true; + self._sprite = '__default'; + + // Generate a unique ID for this sound. + self._id = ++Howler._counter; + + // Add itself to the parent's pool. + parent._sounds.push(self); + + // Create the new node. + self.create(); + + return self; + }, + + /** + * Create and setup a new sound object, whether HTML5 Audio or Web Audio. + * @return {Sound} + */ + create: function() { + var self = this; + var parent = self._parent; + var volume = (Howler._muted || self._muted || self._parent._muted) ? 0 : self._volume; + + if (parent._webAudio) { + // Create the gain node for controlling volume (the source will connect to this). + self._node = (typeof Howler.ctx.createGain === 'undefined') ? Howler.ctx.createGainNode() : Howler.ctx.createGain(); + self._node.gain.setValueAtTime(volume, Howler.ctx.currentTime); + self._node.paused = true; + self._node.connect(Howler.masterGain); + } else if (!Howler.noAudio) { + // Get an unlocked Audio object from the pool. + self._node = Howler._obtainHtml5Audio(); + + // Listen for errors (http://dev.w3.org/html5/spec-author-view/spec.html#mediaerror). + self._errorFn = self._errorListener.bind(self); + self._node.addEventListener('error', self._errorFn, false); + + // Listen for 'canplaythrough' event to let us know the sound is ready. + self._loadFn = self._loadListener.bind(self); + self._node.addEventListener(Howler._canPlayEvent, self._loadFn, false); + + // Listen for the 'ended' event on the sound to account for edge-case where + // a finite sound has a duration of Infinity. + self._endFn = self._endListener.bind(self); + self._node.addEventListener('ended', self._endFn, false); + + // Setup the new audio node. + self._node.src = parent._src; + self._node.preload = parent._preload === true ? 'auto' : parent._preload; + self._node.volume = volume * Howler.volume(); + + // Begin loading the source. + self._node.load(); + } + + return self; + }, + + /** + * Reset the parameters of this sound to the original state (for recycle). + * @return {Sound} + */ + reset: function() { + var self = this; + var parent = self._parent; + + // Reset all of the parameters of this sound. + self._muted = parent._muted; + self._loop = parent._loop; + self._volume = parent._volume; + self._rate = parent._rate; + self._seek = 0; + self._rateSeek = 0; + self._paused = true; + self._ended = true; + self._sprite = '__default'; + + // Generate a new ID so that it isn't confused with the previous sound. + self._id = ++Howler._counter; + + return self; + }, + + /** + * HTML5 Audio error listener callback. + */ + _errorListener: function() { + var self = this; + + // Fire an error event and pass back the code. + self._parent._emit('loaderror', self._id, self._node.error ? self._node.error.code : 0); + + // Clear the event listener. + self._node.removeEventListener('error', self._errorFn, false); + }, + + /** + * HTML5 Audio canplaythrough listener callback. + */ + _loadListener: function() { + var self = this; + var parent = self._parent; + + // Round up the duration to account for the lower precision in HTML5 Audio. + parent._duration = Math.ceil(self._node.duration * 10) / 10; + + // Setup a sprite if none is defined. + if (Object.keys(parent._sprite).length === 0) { + parent._sprite = {__default: [0, parent._duration * 1000]}; + } + + if (parent._state !== 'loaded') { + parent._state = 'loaded'; + parent._emit('load'); + parent._loadQueue(); + } + + // Clear the event listener. + self._node.removeEventListener(Howler._canPlayEvent, self._loadFn, false); + }, + + /** + * HTML5 Audio ended listener callback. + */ + _endListener: function() { + var self = this; + var parent = self._parent; + + // Only handle the `ended`` event if the duration is Infinity. + if (parent._duration === Infinity) { + // Update the parent duration to match the real audio duration. + // Round up the duration to account for the lower precision in HTML5 Audio. + parent._duration = Math.ceil(self._node.duration * 10) / 10; + + // Update the sprite that corresponds to the real duration. + if (parent._sprite.__default[1] === Infinity) { + parent._sprite.__default[1] = parent._duration * 1000; + } + + // Run the regular ended method. + parent._ended(self); + } + + // Clear the event listener since the duration is now correct. + self._node.removeEventListener('ended', self._endFn, false); + } + }; + + /** Helper Methods **/ + /***************************************************************************/ + + var cache = {}; + + /** + * Buffer a sound from URL, Data URI or cache and decode to audio source (Web Audio API). + * @param {Howl} self + */ + var loadBuffer = function(self) { + var url = self._src; + + // Check if the buffer has already been cached and use it instead. + if (cache[url]) { + // Set the duration from the cache. + self._duration = cache[url].duration; + + // Load the sound into this Howl. + loadSound(self); + + return; + } + + if (/^data:[^;]+;base64,/.test(url)) { + // Decode the base64 data URI without XHR, since some browsers don't support it. + var data = atob(url.split(',')[1]); + var dataView = new Uint8Array(data.length); + for (var i=0; i 0) { + cache[self._src] = buffer; + loadSound(self, buffer); + } else { + error(); + } + }; + + // Decode the buffer into an audio source. + if (typeof Promise !== 'undefined' && Howler.ctx.decodeAudioData.length === 1) { + Howler.ctx.decodeAudioData(arraybuffer).then(success).catch(error); + } else { + Howler.ctx.decodeAudioData(arraybuffer, success, error); + } + }; + + /** + * Sound is now loaded, so finish setting everything up and fire the loaded event. + * @param {Howl} self + * @param {Object} buffer The decoded buffer sound source. + */ + var loadSound = function(self, buffer) { + // Set the duration. + if (buffer && !self._duration) { + self._duration = buffer.duration; + } + + // Setup a sprite if none is defined. + if (Object.keys(self._sprite).length === 0) { + self._sprite = {__default: [0, self._duration * 1000]}; + } + + // Fire the loaded event. + if (self._state !== 'loaded') { + self._state = 'loaded'; + self._emit('load'); + self._loadQueue(); + } + }; + + /** + * Setup the audio context when available, or switch to HTML5 Audio mode. + */ + var setupAudioContext = function() { + // If we have already detected that Web Audio isn't supported, don't run this step again. + if (!Howler.usingWebAudio) { + return; + } + + // Check if we are using Web Audio and setup the AudioContext if we are. + try { + if (typeof AudioContext !== 'undefined') { + Howler.ctx = new AudioContext(); + } else if (typeof webkitAudioContext !== 'undefined') { + Howler.ctx = new webkitAudioContext(); + } else { + Howler.usingWebAudio = false; + } + } catch(e) { + Howler.usingWebAudio = false; + } + + // If the audio context creation still failed, set using web audio to false. + if (!Howler.ctx) { + Howler.usingWebAudio = false; + } + + // Check if a webview is being used on iOS8 or earlier (rather than the browser). + // If it is, disable Web Audio as it causes crashing. + var iOS = (/iP(hone|od|ad)/.test(Howler._navigator && Howler._navigator.platform)); + var appVersion = Howler._navigator && Howler._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/); + var version = appVersion ? parseInt(appVersion[1], 10) : null; + if (iOS && version && version < 9) { + var safari = /safari/.test(Howler._navigator && Howler._navigator.userAgent.toLowerCase()); + if (Howler._navigator && !safari) { + Howler.usingWebAudio = false; + } + } + + // Create and expose the master GainNode when using Web Audio (useful for plugins or advanced usage). + if (Howler.usingWebAudio) { + Howler.masterGain = (typeof Howler.ctx.createGain === 'undefined') ? Howler.ctx.createGainNode() : Howler.ctx.createGain(); + Howler.masterGain.gain.setValueAtTime(Howler._muted ? 0 : Howler._volume, Howler.ctx.currentTime); + Howler.masterGain.connect(Howler.ctx.destination); + } + + // Re-run the setup on Howler. + Howler._setup(); + }; + + // Add support for AMD (Asynchronous Module Definition) libraries such as require.js. + if (typeof undefined === 'function' && undefined.amd) { + undefined([], function() { + return { + Howler: Howler, + Howl: Howl + }; + }); + } + + // Add support for CommonJS libraries such as browserify. + if ('object' !== 'undefined') { + exports.Howler = Howler; + exports.Howl = Howl; + } + + // Add to global in Node.js (for testing, etc). + if (typeof commonjsGlobal !== 'undefined') { + commonjsGlobal.HowlerGlobal = HowlerGlobal; + commonjsGlobal.Howler = Howler; + commonjsGlobal.Howl = Howl; + commonjsGlobal.Sound = Sound; + } else if (typeof window !== 'undefined') { // Define globally in case AMD is not available or unused. + window.HowlerGlobal = HowlerGlobal; + window.Howler = Howler; + window.Howl = Howl; + window.Sound = Sound; + } + })(); + + + /*! + * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported. + * + * howler.js v2.2.4 + * howlerjs.com + * + * (c) 2013-2020, James Simpson of GoldFire Studios + * goldfirestudios.com + * + * MIT License + */ + + (function() { + + 'use strict'; + + // Setup default properties. + HowlerGlobal.prototype._pos = [0, 0, 0]; + HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0]; + + /** Global Methods **/ + /***************************************************************************/ + + /** + * Helper method to update the stereo panning position of all current Howls. + * Future Howls will not use this value unless explicitly set. + * @param {Number} pan A value of -1.0 is all the way left and 1.0 is all the way right. + * @return {Howler/Number} Self or current stereo panning value. + */ + HowlerGlobal.prototype.stereo = function(pan) { + var self = this; + + // Stop right here if not using Web Audio. + if (!self.ctx || !self.ctx.listener) { + return self; + } + + // Loop through all Howls and update their stereo panning. + for (var i=self._howls.length-1; i>=0; i--) { + self._howls[i].stereo(pan); + } + + return self; + }; + + /** + * Get/set the position of the listener in 3D cartesian space. Sounds using + * 3D position will be relative to the listener's position. + * @param {Number} x The x-position of the listener. + * @param {Number} y The y-position of the listener. + * @param {Number} z The z-position of the listener. + * @return {Howler/Array} Self or current listener position. + */ + HowlerGlobal.prototype.pos = function(x, y, z) { + var self = this; + + // Stop right here if not using Web Audio. + if (!self.ctx || !self.ctx.listener) { + return self; + } + + // Set the defaults for optional 'y' & 'z'. + y = (typeof y !== 'number') ? self._pos[1] : y; + z = (typeof z !== 'number') ? self._pos[2] : z; + + if (typeof x === 'number') { + self._pos = [x, y, z]; + + if (typeof self.ctx.listener.positionX !== 'undefined') { + self.ctx.listener.positionX.setTargetAtTime(self._pos[0], Howler.ctx.currentTime, 0.1); + self.ctx.listener.positionY.setTargetAtTime(self._pos[1], Howler.ctx.currentTime, 0.1); + self.ctx.listener.positionZ.setTargetAtTime(self._pos[2], Howler.ctx.currentTime, 0.1); + } else { + self.ctx.listener.setPosition(self._pos[0], self._pos[1], self._pos[2]); + } + } else { + return self._pos; + } + + return self; + }; + + /** + * Get/set the direction the listener is pointing in the 3D cartesian space. + * A front and up vector must be provided. The front is the direction the + * face of the listener is pointing, and up is the direction the top of the + * listener is pointing. Thus, these values are expected to be at right angles + * from each other. + * @param {Number} x The x-orientation of the listener. + * @param {Number} y The y-orientation of the listener. + * @param {Number} z The z-orientation of the listener. + * @param {Number} xUp The x-orientation of the top of the listener. + * @param {Number} yUp The y-orientation of the top of the listener. + * @param {Number} zUp The z-orientation of the top of the listener. + * @return {Howler/Array} Returns self or the current orientation vectors. + */ + HowlerGlobal.prototype.orientation = function(x, y, z, xUp, yUp, zUp) { + var self = this; + + // Stop right here if not using Web Audio. + if (!self.ctx || !self.ctx.listener) { + return self; + } + + // Set the defaults for optional 'y' & 'z'. + var or = self._orientation; + y = (typeof y !== 'number') ? or[1] : y; + z = (typeof z !== 'number') ? or[2] : z; + xUp = (typeof xUp !== 'number') ? or[3] : xUp; + yUp = (typeof yUp !== 'number') ? or[4] : yUp; + zUp = (typeof zUp !== 'number') ? or[5] : zUp; + + if (typeof x === 'number') { + self._orientation = [x, y, z, xUp, yUp, zUp]; + + if (typeof self.ctx.listener.forwardX !== 'undefined') { + self.ctx.listener.forwardX.setTargetAtTime(x, Howler.ctx.currentTime, 0.1); + self.ctx.listener.forwardY.setTargetAtTime(y, Howler.ctx.currentTime, 0.1); + self.ctx.listener.forwardZ.setTargetAtTime(z, Howler.ctx.currentTime, 0.1); + self.ctx.listener.upX.setTargetAtTime(xUp, Howler.ctx.currentTime, 0.1); + self.ctx.listener.upY.setTargetAtTime(yUp, Howler.ctx.currentTime, 0.1); + self.ctx.listener.upZ.setTargetAtTime(zUp, Howler.ctx.currentTime, 0.1); + } else { + self.ctx.listener.setOrientation(x, y, z, xUp, yUp, zUp); + } + } else { + return or; + } + + return self; + }; + + /** Group Methods **/ + /***************************************************************************/ + + /** + * Add new properties to the core init. + * @param {Function} _super Core init method. + * @return {Howl} + */ + Howl.prototype.init = (function(_super) { + return function(o) { + var self = this; + + // Setup user-defined default properties. + self._orientation = o.orientation || [1, 0, 0]; + self._stereo = o.stereo || null; + self._pos = o.pos || null; + self._pannerAttr = { + coneInnerAngle: typeof o.coneInnerAngle !== 'undefined' ? o.coneInnerAngle : 360, + coneOuterAngle: typeof o.coneOuterAngle !== 'undefined' ? o.coneOuterAngle : 360, + coneOuterGain: typeof o.coneOuterGain !== 'undefined' ? o.coneOuterGain : 0, + distanceModel: typeof o.distanceModel !== 'undefined' ? o.distanceModel : 'inverse', + maxDistance: typeof o.maxDistance !== 'undefined' ? o.maxDistance : 10000, + panningModel: typeof o.panningModel !== 'undefined' ? o.panningModel : 'HRTF', + refDistance: typeof o.refDistance !== 'undefined' ? o.refDistance : 1, + rolloffFactor: typeof o.rolloffFactor !== 'undefined' ? o.rolloffFactor : 1 + }; + + // Setup event listeners. + self._onstereo = o.onstereo ? [{fn: o.onstereo}] : []; + self._onpos = o.onpos ? [{fn: o.onpos}] : []; + self._onorientation = o.onorientation ? [{fn: o.onorientation}] : []; + + // Complete initilization with howler.js core's init function. + return _super.call(this, o); + }; + })(Howl.prototype.init); + + /** + * Get/set the stereo panning of the audio source for this sound or all in the group. + * @param {Number} pan A value of -1.0 is all the way left and 1.0 is all the way right. + * @param {Number} id (optional) The sound ID. If none is passed, all in group will be updated. + * @return {Howl/Number} Returns self or the current stereo panning value. + */ + Howl.prototype.stereo = function(pan, id) { + var self = this; + + // Stop right here if not using Web Audio. + if (!self._webAudio) { + return self; + } + + // If the sound hasn't loaded, add it to the load queue to change stereo pan when capable. + if (self._state !== 'loaded') { + self._queue.push({ + event: 'stereo', + action: function() { + self.stereo(pan, id); + } + }); + + return self; + } + + // Check for PannerStereoNode support and fallback to PannerNode if it doesn't exist. + var pannerType = (typeof Howler.ctx.createStereoPanner === 'undefined') ? 'spatial' : 'stereo'; + + // Setup the group's stereo panning if no ID is passed. + if (typeof id === 'undefined') { + // Return the group's stereo panning if no parameters are passed. + if (typeof pan === 'number') { + self._stereo = pan; + self._pos = [pan, 0, 0]; + } else { + return self._stereo; + } + } + + // Change the streo panning of one or all sounds in group. + var ids = self._getSoundIds(id); + for (var i=0; i Returns the group's values. + * pannerAttr(id) -> Returns the sound id's values. + * pannerAttr(o) -> Set's the values of all sounds in this Howl group. + * pannerAttr(o, id) -> Set's the values of passed sound id. + * + * Attributes: + * coneInnerAngle - (360 by default) A parameter for directional audio sources, this is an angle, in degrees, + * inside of which there will be no volume reduction. + * coneOuterAngle - (360 by default) A parameter for directional audio sources, this is an angle, in degrees, + * outside of which the volume will be reduced to a constant value of `coneOuterGain`. + * coneOuterGain - (0 by default) A parameter for directional audio sources, this is the gain outside of the + * `coneOuterAngle`. It is a linear value in the range `[0, 1]`. + * distanceModel - ('inverse' by default) Determines algorithm used to reduce volume as audio moves away from + * listener. Can be `linear`, `inverse` or `exponential. + * maxDistance - (10000 by default) The maximum distance between source and listener, after which the volume + * will not be reduced any further. + * refDistance - (1 by default) A reference distance for reducing volume as source moves further from the listener. + * This is simply a variable of the distance model and has a different effect depending on which model + * is used and the scale of your coordinates. Generally, volume will be equal to 1 at this distance. + * rolloffFactor - (1 by default) How quickly the volume reduces as source moves from listener. This is simply a + * variable of the distance model and can be in the range of `[0, 1]` with `linear` and `[0, ∞]` + * with `inverse` and `exponential`. + * panningModel - ('HRTF' by default) Determines which spatialization algorithm is used to position audio. + * Can be `HRTF` or `equalpower`. + * + * @return {Howl/Object} Returns self or current panner attributes. + */ + Howl.prototype.pannerAttr = function() { + var self = this; + var args = arguments; + var o, id, sound; + + // Stop right here if not using Web Audio. + if (!self._webAudio) { + return self; + } + + // Determine the values based on arguments. + if (args.length === 0) { + // Return the group's panner attribute values. + return self._pannerAttr; + } else if (args.length === 1) { + if (typeof args[0] === 'object') { + o = args[0]; + + // Set the grou's panner attribute values. + if (typeof id === 'undefined') { + if (!o.pannerAttr) { + o.pannerAttr = { + coneInnerAngle: o.coneInnerAngle, + coneOuterAngle: o.coneOuterAngle, + coneOuterGain: o.coneOuterGain, + distanceModel: o.distanceModel, + maxDistance: o.maxDistance, + refDistance: o.refDistance, + rolloffFactor: o.rolloffFactor, + panningModel: o.panningModel + }; + } + + self._pannerAttr = { + coneInnerAngle: typeof o.pannerAttr.coneInnerAngle !== 'undefined' ? o.pannerAttr.coneInnerAngle : self._coneInnerAngle, + coneOuterAngle: typeof o.pannerAttr.coneOuterAngle !== 'undefined' ? o.pannerAttr.coneOuterAngle : self._coneOuterAngle, + coneOuterGain: typeof o.pannerAttr.coneOuterGain !== 'undefined' ? o.pannerAttr.coneOuterGain : self._coneOuterGain, + distanceModel: typeof o.pannerAttr.distanceModel !== 'undefined' ? o.pannerAttr.distanceModel : self._distanceModel, + maxDistance: typeof o.pannerAttr.maxDistance !== 'undefined' ? o.pannerAttr.maxDistance : self._maxDistance, + refDistance: typeof o.pannerAttr.refDistance !== 'undefined' ? o.pannerAttr.refDistance : self._refDistance, + rolloffFactor: typeof o.pannerAttr.rolloffFactor !== 'undefined' ? o.pannerAttr.rolloffFactor : self._rolloffFactor, + panningModel: typeof o.pannerAttr.panningModel !== 'undefined' ? o.pannerAttr.panningModel : self._panningModel + }; + } + } else { + // Return this sound's panner attribute values. + sound = self._soundById(parseInt(args[0], 10)); + return sound ? sound._pannerAttr : self._pannerAttr; + } + } else if (args.length === 2) { + o = args[0]; + id = parseInt(args[1], 10); + } + + // Update the values of the specified sounds. + var ids = self._getSoundIds(id); + for (var i=0; i + * @type {string} + * @name crossOrigin + * @default undefined + * @memberof loader + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes + * @example + * // allow for cross-origin texture loading in WebGL + * me.loader.crossOrigin = "anonymous"; + * + * // set all ressources to be loaded + * me.loader.preload(game.resources, () => this.loaded()); + */ +let crossOrigin; + +/** + * indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies, + * authorization headers or TLS client certificates. Setting withCredentials has no effect on same-site requests. + * @public + * @type {boolean} + * @name withCredentials + * @default false + * @memberof loader + * @see https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials + * @example + * // enable withCredentials + * me.loader.withCredentials = true; + * + * // set all ressources to be loaded + * me.loader.preload(game.resources, () => this.loaded()); + */ +let withCredentials = false; + +/** + * enable the nocache mechanism + * @ignore + */ +function setNocache(enable = false) { + nocache = enable ? "?" + ~~(Math.random() * 10000000) : ""; +} + +/** + * change the default baseURL for the given asset type.
                            + * (this will prepend the asset URL and must finish with a '/') + * @name setBaseURL + * @memberof loader + * @public + * @param {string} type - "*", "audio", binary", "image", "json", "js", "tmx", "tsx" + * @param {string} [url="./"] - default base URL + * @example + * // change the base URL relative address for audio assets + * me.loader.setBaseURL("audio", "data/audio/"); + * // change the base URL absolute address for all object types + * me.loader.setBaseURL("*", "http://myurl.com/") + */ +function setBaseURL(type, url) { + if (type !== "*") { + baseURL[type] = url; + } else { + // "wildcards" + baseURL["audio"] = url; + baseURL["binary"] = url; + baseURL["image"] = url; + baseURL["json"] = url; + baseURL["js"] = url; + baseURL["tmx"] = url; + baseURL["tsx"] = url; + // XXX ? + //baseURL["fontface"] = url; + } +} + +/** + * a collection of string utility functions + * @namespace utils.string + */ + +/** + * converts the first character of the given string to uppercase + * @public + * @memberof utils.string + * @name capitalize + * @param {string} str - the string to be capitalized + * @returns {string} the capitalized string + */ +function capitalize(str) { + return str.charAt(0).toUpperCase() + str.slice(1); +} + +/** + * returns true if the given string contains a numeric integer or float value + * @public + * @memberof utils.string + * @name isNumeric + * @param {string} str - the string to be tested + * @returns {boolean} true if string contains only digits + */ +function isNumeric(str) { + if (typeof str === "string") { + str = str.trim(); + } + return !isNaN(str) && /^[+-]?(\d+(\.\d+)?|\.\d+)$/.test(str); +} + +/** + * returns true if the given string contains a true or false + * @public + * @memberof utils.string + * @name isBoolean + * @param {string} str - the string to be tested + * @returns {boolean} true if the string is either true or false + */ +function isBoolean(str) { + const trimmed = str.trim(); + return (trimmed === "true") || (trimmed === "false"); +} + +/** + * convert a string to the corresponding hexadecimal value + * @public + * @memberof utils.string + * @name toHex + * @param {string} str - the string to be converted + * @returns {string} the converted hexadecimal value + */ +function toHex(str) { + let res = "", c = 0; + while (c < str.length) { + res += str.charCodeAt(c++).toString(16); + } + return res; +} + +/** + * returns true if the given string is a data url in the `data:[][;base64],` format. + * (this will not test the validity of the Data or Base64 encoding) + * @public + * @memberof utils.string + * @name isDataUrl + * @param {string} str - the string (url) to be tested + * @returns {boolean} true if the string is a data url + */ +function isDataUrl(str) { + return /^data:(.+);base64,(.+)$/.test(str); +} + +var string$1 = { + __proto__: null, + capitalize: capitalize, + isBoolean: isBoolean, + isDataUrl: isDataUrl, + isNumeric: isNumeric, + toHex: toHex +}; + +// external import + +/** + * @namespace audio + */ + +/** + * audio channel list + * @ignore + */ +let audioTracks = {}; + +/** + * current active track + * @ignore + */ +let current_track_id = null; + +/** + * error retry counter + * @ignore + */ +let retry_counter = 0; + +/** + * list of active audio formats + * @ignore + */ +let audioExts = []; + +/** + * event listener callback on load error + * @ignore + */ +let soundLoadError = function (sound_name, onerror_cb) { + // check the retry counter + if (retry_counter++ > 3) { + // something went wrong + let errmsg = "melonJS: failed loading " + sound_name; + if (stopOnAudioError === false) { + // disable audio + disable(); + // call error callback if defined + if (onerror_cb) { + onerror_cb(); + } + // warning + console.log(errmsg + ", disabling audio"); + } + else { + // throw an exception and stop everything ! + throw new Error(errmsg); + } + // else try loading again ! + } + else { + audioTracks[sound_name].load(); + } +}; + +/** + * Specify either to stop on audio loading error or not
                            + * if true, melonJS will throw an exception and stop loading
                            + * if false, melonJS will disable sounds and output a warning message + * in the console
                            + * @name stopOnAudioError + * @type {boolean} + * @default true + * @memberof audio + */ +let stopOnAudioError = true; + +/** + * Initialize and configure the audio support.
                            + * For a maximum browser coverage the recommendation is to use at least two of them, + * typically default to webm and then fallback to mp3 for the best balance of small filesize and high quality, + * webm has nearly full browser coverage with a great combination of compression and quality, and mp3 will fallback gracefully for other browsers. + * It is important to remember that melonJS selects the first compatible sound based on the list of extensions and given order passed here. + * So if you want webm to be used before mp3, you need to put the audio format in that order. + * @function audio.init + * @param {string} [format="mp3"] - audio format to prioritize ("mp3"|"mpeg"|"opus"|"ogg"|"oga"|"wav"|"aac"|"caf"|"m4a"|"m4b"|"mp4"|"weba"|"webm"|"dolby"|"flac") + * @returns {boolean} Indicates whether audio initialization was successful + * @example + * // initialize the "sound engine", giving "webm" as default desired audio format, and "mp3" as a fallback + * if (!me.audio.init("webm,mp3")) { + * alert("Sorry but your browser does not support html 5 audio !"); + * return; + * } + */ +function init$1(format = "mp3") { + // convert it into an array + audioExts = format.split(","); + + return !howler$1.Howler.noAudio; +} + +/** + * check if the given audio format is supported + * @function audio.hasFormat + * @param {"mp3"|"mpeg"|"opus"|"ogg"|"oga"|"wav"|"aac"|"caf"|"m4a"|"m4b"|"mp4"|"weba"|"webm"|"dolby"|"flac"} codec - the audio format to check for support + * @returns {boolean} return true if the given audio format is supported + */ +function hasFormat(codec) { + return hasAudio() && howler$1.Howler.codecs(codec); +} + +/** + * check if audio (HTML5 or WebAudio) is supported + * @function audio.hasAudio + * @returns {boolean} return true if audio (HTML5 or WebAudio) is supported + */ +function hasAudio() { + return !howler$1.Howler.noAudio; +} + +/** + * enable audio output
                            + * only useful if audio supported and previously disabled through + * @function audio.enable + * @see audio.disable + */ +function enable() { + unmuteAll(); +} + +/** + * disable audio output + * @function audio.disable + */ +function disable() { + muteAll(); +} + +/** + * Load an audio file + * @function audio.load + * @param {loader.Asset} sound + * @param {Function} [onloadcb] - function to be called when the resource is loaded + * @param {Function} [onerrorcb] - function to be called in case of error + * @returns {number} the amount of asset loaded (always 1 if successfull) + */ +function load$1(sound, onloadcb, onerrorcb) { + let urls = []; + if (audioExts.length === 0) { + throw new Error("target audio extension(s) should be set through me.audio.init() before calling the preloader."); + } + if (isDataUrl(sound.src) === true) { + urls.push(sound.src); + } else { + for (let i = 0; i < audioExts.length; i++) { + urls.push(sound.src + sound.name + "." + audioExts[i] + nocache); + } + } + + audioTracks[sound.name] = new howler$1.Howl({ + src : urls, + volume : howler$1.Howler.volume(), + html5 : sound.stream === true || sound.html5 === true, + xhrWithCredentials : withCredentials, + onloaderror() { + soundLoadError.call(this, sound.name, onerrorcb); + }, + onload() { + retry_counter = 0; + if (typeof onloadcb === "function") { + onloadcb(); + } + } + }); + + return 1; +} + +/** + * play the specified sound + * @function audio.play + * @param {string} sound_name - audio clip name - case sensitive + * @param {boolean} [loop=false] - loop audio + * @param {Function} [onend] - Function to call when sound instance ends playing. + * @param {number} [volume=default] - Float specifying volume (0.0 - 1.0 values accepted). + * @returns {number} the sound instance ID. + * @example + * // play the "cling" audio clip + * me.audio.play("cling"); + * // play & repeat the "engine" audio clip + * me.audio.play("engine", true); + * // play the "gameover_sfx" audio clip and call myFunc when finished + * me.audio.play("gameover_sfx", false, myFunc); + * // play the "gameover_sfx" audio clip with a lower volume level + * me.audio.play("gameover_sfx", false, null, 0.5); + */ +function play(sound_name, loop = false, onend, volume) { + let sound = audioTracks[sound_name]; + if (sound && typeof sound !== "undefined") { + let id = sound.play(); + if (typeof loop === "boolean") { + // arg[0] can take different types in howler 2.0 + sound.loop(loop, id); + } + sound.volume(typeof(volume) === "number" ? clamp(volume, 0.0, 1.0) : howler$1.Howler.volume(), id); + if (typeof(onend) === "function") { + if (loop === true) { + sound.on("end", onend, id); + } + else { + sound.once("end", onend, id); + } + } + return id; + } else { + throw new Error("audio clip " + sound_name + " does not exist"); + } +} + +/** + * Fade a currently playing sound between two volumee. + * @function audio.fade + * @param {string} sound_name - audio clip name - case sensitive + * @param {number} from - Volume to fade from (0.0 to 1.0). + * @param {number} to - Volume to fade to (0.0 to 1.0). + * @param {number} duration - Time in milliseconds to fade. + * @param {number} [id] - the sound instance ID. If none is passed, all sounds in group will fade. + */ +function fade(sound_name, from, to, duration, id) { + let sound = audioTracks[sound_name]; + if (sound && typeof sound !== "undefined") { + sound.fade(from, to, duration, id); + } else { + throw new Error("audio clip " + sound_name + " does not exist"); + } +} + +/** + * get/set the position of playback for a sound. + * @function audio.seek + * @param {string} sound_name - audio clip name - case sensitive + * @param {number} [seek] - the position to move current playback to (in seconds). + * @param {number} [id] - the sound instance ID. If none is passed, all sounds in group will changed. + * @returns {number} return the current seek position (if no extra parameters were given) + * @example + * // return the current position of the background music + * let current_pos = me.audio.seek("dst-gameforest"); + * // set back the position of the background music to the beginning + * me.audio.seek("dst-gameforest", 0); + */ +function seek(sound_name, ...args) { + let sound = audioTracks[sound_name]; + if (sound && typeof sound !== "undefined") { + return sound.seek(...args); + } else { + throw new Error("audio clip " + sound_name + " does not exist"); + } +} + +/** + * get or set the rate of playback for a sound. + * @function audio.rate + * @param {string} sound_name - audio clip name - case sensitive + * @param {number} [rate] - playback rate : 0.5 to 4.0, with 1.0 being normal speed. + * @param {number} [id] - the sound instance ID. If none is passed, all sounds in group will be changed. + * @returns {number} return the current playback rate (if no extra parameters were given) + * @example + * // get the playback rate of the background music + * let rate = me.audio.rate("dst-gameforest"); + * // speed up the playback of the background music + * me.audio.rate("dst-gameforest", 2.0); + */ +function rate(sound_name, ...args) { + let sound = audioTracks[sound_name]; + if (sound && typeof sound !== "undefined") { + return sound.rate(...args); + } else { + throw new Error("audio clip " + sound_name + " does not exist"); + } +} + +/** + * stop the specified sound on all channels + * @function audio.stop + * @param {string} [sound_name] - audio clip name (case sensitive). If none is passed, all sounds are stopped. + * @param {number} [id] - the sound instance ID. If none is passed, all sounds in group will stop. + * @example + * me.audio.stop("cling"); + */ +function stop(sound_name, id) { + if (typeof sound_name !== "undefined") { + let sound = audioTracks[sound_name]; + if (sound && typeof sound !== "undefined") { + sound.stop(id); + // remove the defined onend callback (if any defined) + sound.off("end", undefined, id); + } else { + throw new Error("audio clip " + sound_name + " does not exist"); + } + } else { + howler$1.Howler.stop(); + } +} + +/** + * pause the specified sound on all channels
                            + * this function does not reset the currentTime property + * @function audio.pause + * @param {string} sound_name - audio clip name - case sensitive + * @param {number} [id] - the sound instance ID. If none is passed, all sounds in group will pause. + * @example + * me.audio.pause("cling"); + */ +function pause(sound_name, id) { + let sound = audioTracks[sound_name]; + if (sound && typeof sound !== "undefined") { + sound.pause(id); + } else { + throw new Error("audio clip " + sound_name + " does not exist"); + } +} + +/** + * resume the specified sound on all channels
                            + * @function audio.resume + * @param {string} sound_name - audio clip name - case sensitive + * @param {number} [id] - the sound instance ID. If none is passed, all sounds in group will resume. + * @example + * // play a audio clip + * let id = me.audio.play("myClip"); + * ... + * // pause it + * me.audio.pause("myClip", id); + * ... + * // resume + * me.audio.resume("myClip", id); + */ +function resume(sound_name, id) { + let sound = audioTracks[sound_name]; + if (sound && typeof sound !== "undefined") { + sound.play(id); + } else { + throw new Error("audio clip " + sound_name + " does not exist"); + } +} + +/** + * play the specified audio track
                            + * this function automatically set the loop property to true
                            + * and keep track of the current sound being played. + * @function audio.playTrack + * @param {string} sound_name - audio track name - case sensitive + * @param {number} [volume=default] - Float specifying volume (0.0 - 1.0 values accepted). + * @returns {number} the sound instance ID. + * @example + * me.audio.playTrack("awesome_music"); + */ +function playTrack(sound_name, volume) { + current_track_id = sound_name; + return play( + current_track_id, + true, + null, + volume + ); +} + +/** + * stop the current audio track + * @function audio.stopTrack + * @see audio.playTrack + * @example + * // play a awesome music + * me.audio.playTrack("awesome_music"); + * // stop the current music + * me.audio.stopTrack(); + */ +function stopTrack() { + if (current_track_id !== null) { + audioTracks[current_track_id].stop(); + current_track_id = null; + } +} + +/** + * pause the current audio track + * @function audio.pauseTrack + * @example + * me.audio.pauseTrack(); + */ +function pauseTrack() { + if (current_track_id !== null) { + audioTracks[current_track_id].pause(); + } +} + +/** + * resume the previously paused audio track + * @function audio.resumeTrack + * @example + * // play an awesome music + * me.audio.playTrack("awesome_music"); + * // pause the audio track + * me.audio.pauseTrack(); + * // resume the music + * me.audio.resumeTrack(); + */ +function resumeTrack() { + if (current_track_id !== null) { + audioTracks[current_track_id].play(); + } +} + +/** + * returns the current track Id + * @function audio.getCurrentTrack + * @returns {string} audio track name + */ +function getCurrentTrack() { + return current_track_id; +} + +/** + * set the default global volume + * @function audio.setVolume + * @param {number} volume - Float specifying volume (0.0 - 1.0 values accepted). + */ +function setVolume(volume) { + howler$1.Howler.volume(volume); +} + +/** + * get the default global volume + * @function audio.getVolume + * @returns {number} current volume value in Float [0.0 - 1.0] . + */ +function getVolume() { + return howler$1.Howler.volume(); +} + +/** + * mute or unmute the specified sound, but does not pause the playback. + * @function audio.mute + * @param {string} sound_name - audio clip name - case sensitive + * @param {number} [id] - the sound instance ID. If none is passed, all sounds in group will mute. + * @param {boolean} [mute=true] - True to mute and false to unmute + * @example + * // mute the background music + * me.audio.mute("awesome_music"); + */ +function mute(sound_name, id, mute = true) { + let sound = audioTracks[sound_name]; + if (sound && typeof(sound) !== "undefined") { + sound.mute(mute, id); + } else { + throw new Error("audio clip " + sound_name + " does not exist"); + } +} + +/** + * unmute the specified sound + * @function audio.unmute + * @param {string} sound_name - audio clip name + * @param {number} [id] - the sound instance ID. If none is passed, all sounds in group will unmute. + */ +function unmute(sound_name, id) { + mute(sound_name, id, false); +} + +/** + * mute all audio + * @function audio.muteAll + */ +function muteAll() { + howler$1.Howler.mute(true); +} + +/** + * unmute all audio + * @function audio.unmuteAll + */ +function unmuteAll() { + howler$1.Howler.mute(false); +} + +/** + * Returns true if audio is muted globally. + * @function audio.muted + * @returns {boolean} true if audio is muted globally + */ +function muted() { + return howler$1.Howler._muted; +} + +/** + * unload specified audio track to free memory + * @function audio.unload + * @param {string} sound_name - audio track name - case sensitive + * @returns {boolean} true if unloaded + * @example + * me.audio.unload("awesome_music"); + */ +function unload$1(sound_name) { + if (!(sound_name in audioTracks)) { + return false; + } + + // destroy the Howl object + audioTracks[sound_name].unload(); + delete audioTracks[sound_name]; + return true; +} + +/** + * unload all audio to free memory + * @function audio.unloadAll + * @example + * me.audio.unloadAll(); + */ +function unloadAll$1() { + for (let sound_name in audioTracks) { + if (audioTracks.hasOwnProperty(sound_name)) { + unload$1(sound_name); + } + } +} + +var audio = { + __proto__: null, + disable: disable, + enable: enable, + fade: fade, + getCurrentTrack: getCurrentTrack, + getVolume: getVolume, + hasAudio: hasAudio, + hasFormat: hasFormat, + init: init$1, + load: load$1, + mute: mute, + muteAll: muteAll, + muted: muted, + pause: pause, + pauseTrack: pauseTrack, + play: play, + playTrack: playTrack, + rate: rate, + resume: resume, + resumeTrack: resumeTrack, + seek: seek, + setVolume: setVolume, + stop: stop, + stopOnAudioError: stopOnAudioError, + stopTrack: stopTrack, + unload: unload$1, + unloadAll: unloadAll$1, + unmute: unmute, + unmuteAll: unmuteAll +}; + +/** + * allow to access and manage the device localStorage + * @example + * // Initialize "score" and "lives" with default values + * // This loads the properties from localStorage if they exist, else it sets the given defaults + * me.save.add({ score : 0, lives : 3 }); + * + * // Print all + * // On first load, this prints { score : 0, lives : 3 } + * // On further reloads, it prints { score : 31337, lives : 3, complexObject : ... } + * // Because the following changes will be saved to localStorage + * console.log(JSON.stringify(me.save)); + * + * // Save score + * me.save.score = 31337; + * + * // Also supports complex objects thanks to the JSON backend + * me.save.add({ complexObject : {} }) + * me.save.complexObject = { a : "b", c : [ 1, 2, 3, "d" ], e : { f : [{}] } }; + * + * // WARNING: Do not set any child properties of complex objects directly! + * // Changes made that way will not save. Always set the entire object value at once. + * // If you cannot live with this limitation, there's a workaround: + * me.save.complexObject.c.push("foo"); // Modify a child property + * me.save.complexObject = me.save.complexObject; // Save the entire object! + * + * // Remove "lives" from localStorage + * me.save.remove("lives"); + * @namespace save + */ + +// Variable to hold the object data +let data = {}; + +let hasLocalStorage$1 = false; + +try { + // true if localStorage is supported + hasLocalStorage$1 = typeof globalThis !== "undefined" && typeof globalThis.localStorage !== "undefined"; +} catch (e) { + // the above generates an exception when cookies are blocked + hasLocalStorage$1 = false; +} + +/** + * a function to check if the given key is a reserved word + * @ignore + */ +function isReserved(key) { + return (key === "add" || key === "remove"); +} + + +// Initialize me.save on Boot event +on(BOOT, () => { + // Load previous data if local Storage is supported + if (hasLocalStorage$1 === true) { + let me_save_content = globalThis.localStorage.getItem("me.save"); + + if (typeof me_save_content === "string" && me_save_content.length > 0) { + let keys = JSON.parse(me_save_content) || []; + keys.forEach((key) => { + data[key] = JSON.parse(globalThis.localStorage.getItem("me.save." + key)); + }); + } + } +}); + +let save = { + + /** + * Add new keys to localStorage and set them to the given default values if they do not exist + * @name add + * @memberof save + * @param {object} props - key and corresponding values + * @example + * // Initialize "score" and "lives" with default values + * me.save.add({ score : 0, lives : 3 }); + * // get or set the value through me.save + * me.save.score = 1000; + */ + add(props) { + let obj = save; + + Object.keys(props).forEach((key) => { + if (isReserved(key)) { + return; + } + + (function (prop) { + Object.defineProperty(obj, prop, { + configurable : true, + enumerable : true, + /** + * @ignore + */ + get () { + return data[prop]; + }, + /** + * @ignore + */ + set (value) { + data[prop] = value; + if (hasLocalStorage$1 === true) { + globalThis.localStorage.setItem("me.save." + prop, JSON.stringify(value)); + } + } + }); + })(key); + + // Set default value for key + if (!(key in data)) { + obj[key] = props[key]; + } + }); + + // Save keys + if (hasLocalStorage$1 === true) { + globalThis.localStorage.setItem("me.save", JSON.stringify(Object.keys(data))); + } + }, + + /** + * Remove a key from localStorage + * @name remove + * @memberof save + * @param {string} key - key to be removed + * @example + * // Remove the "score" key from localStorage + * me.save.remove("score"); + */ + remove (key) { + if (!isReserved(key)) { + if (typeof data[key] !== "undefined") { + delete data[key]; + if (hasLocalStorage$1 === true) { + globalThis.localStorage.removeItem("me.save." + key); + globalThis.localStorage.setItem("me.save", JSON.stringify(Object.keys(data))); + } + } + } + } +}; + +/** + * a collection of utility functons to ease porting between different user agents. + * @namespace utils.agent + */ + +/** + * Known agent vendors + * @ignore + */ +const vendors = [ "ms", "MS", "moz", "webkit", "o" ]; + +/** + * Get a vendor-prefixed property + * @public + * @name prefixed + * @param {string} name - Property name + * @param {object} [obj=globalThis] - Object or element reference to access + * @returns {string} Value of property + * @memberof utils.agent + */ +function prefixed(name, obj) { + obj = obj || globalThis; + if (name in obj) { + return obj[name]; + } + + let uc_name = capitalize(name); + + let result; + vendors.some((vendor) => { + let name = vendor + uc_name; + return (result = (name in obj) ? obj[name] : undefined); + }); + return result; +} + +/** + * Set a vendor-prefixed property + * @public + * @name setPrefixed + * @param {string} name - Property name + * @param {string} value - Property value + * @param {object} [obj=globalThis] - Object or element reference to access + * @returns {boolean} true if one of the vendor-prefixed property was found + * @memberof utils.agent + */ +function setPrefixed(name, value, obj) { + obj = obj || globalThis; + if (name in obj) { + obj[name] = value; + return; + } + + let uc_name = capitalize(name); + + vendors.some((vendor) => { + let name = vendor + uc_name; + if (name in obj) { + obj[name] = value; + return true; + } + return false; + }); + + return false; +} + +var agent$1 = { + __proto__: null, + prefixed: prefixed, + setPrefixed: setPrefixed +}; + +/** +* The device platform type +* @namespace platform +* @memberof device +* @property {string} ua the user agent string for the current device +* @property {boolean} iOS `true` if the device is an iOS platform +* @property {boolean} android `true` if the device is an Android platform +* @property {boolean} android2 `true` if the device is an Android 2.x platform +* @property {boolean} linux `true` if the device is a Linux platform +* @property {boolean} chromeOS `true` if the device is running on ChromeOS. +* @property {boolean} wp `true` if the device is a Windows Phone platform +* @property {boolean} BlackBerry`true` if the device is a BlackBerry platform +* @property {boolean} Kindle`true` if the device is a Kindle platform +* @property {boolean} ejecta `true` if running under Ejecta +* @property {boolean} isWeixin `true` if running under Wechat +* @property {boolean} nodeJS `true` if running under node.js +* @property {boolean} isMobile `true` if a mobile device +*/ + +const ua = typeof globalThis.navigator !== "undefined" ? globalThis.navigator.userAgent : ""; +const iOS = /iPhone|iPad|iPod/i.test(ua); +const android = /Android/i.test(ua); +const android2 = /Android 2/i.test(ua); +const linux = /Linux/i.test(ua); +const chromeOS = /CrOS/.test(ua); +const wp = /Windows Phone/i.test(ua); +const BlackBerry = /BlackBerry/i.test(ua); +const Kindle = /Kindle|Silk.*Mobile Safari/i.test(ua); +const ejecta = (typeof globalThis.ejecta !== "undefined"); +const isWeixin = /MicroMessenger/i.test(ua); +const nodeJS = (typeof globalThis.process !== "undefined") && (typeof globalThis.process.release !== "undefined") && (globalThis.process.release.name === "node"); +const isMobile$1 = /Mobi/i.test(ua) || iOS || android || wp || BlackBerry || Kindle || false; + +var device_platform = { + __proto__: null, + BlackBerry: BlackBerry, + Kindle: Kindle, + android: android, + android2: android2, + chromeOS: chromeOS, + ejecta: ejecta, + iOS: iOS, + isMobile: isMobile$1, + isWeixin: isWeixin, + linux: linux, + nodeJS: nodeJS, + ua: ua, + wp: wp +}; + +// track if DOMContentLoaded was called already +let readyBound = false; + +// is the DOM ready ? +let isDOMReady = false; + +// check if the dom is ready +function _domReady() { + + // Make sure that the DOM is not already loaded + if (!isDOMReady) { + // be sure document.body is there + if (typeof globalThis.document !== "undefined" && !globalThis.document.body) { + return setTimeout(_domReady, 13); + } + + // clean up loading event + if (typeof globalThis.document !== "undefined" && typeof globalThis.document.removeEventListener === "function") { + globalThis.document.removeEventListener( + "DOMContentLoaded", + _domReady, + false + ); + } + + if (typeof globalThis.removeEventListener === "function") { + // remove the event on globalThis.onload (always added in `onReady`) + globalThis.removeEventListener("load", _domReady, false); + } + + // execute all callbacks + emit(DOM_READY); + + // Remember that the DOM is ready + isDOMReady = true; + } +} + +// https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event +function DOMContentLoaded(fn) { + // If the DOM is already ready + if (isDOMReady) { + // Execute the function immediately + fn.call(globalThis, []); + } + else { + // else add the function to the DOM_READY event + once(DOM_READY, fn, globalThis); + // bind dom load event if not done yet + if (!readyBound) { + // directly call domReady if document is already "ready" + if (nodeJS === true || (typeof globalThis.document !== "undefined" && globalThis.document.readyState === "complete")) { + // defer the fn call to ensure our script is fully loaded + globalThis.setTimeout(_domReady, 0); + } + else { + if (typeof globalThis.document !== "undefined" && typeof globalThis.document.addEventListener === "function") { + // Use the handy event callback + globalThis.document.addEventListener("DOMContentLoaded", _domReady, false); + } + // A fallback to globalThis.onload, that will always work + globalThis.addEventListener("load", _domReady, false); + } + readyBound = true; + } + } +} + +/** + * device type and capabilities + * @namespace device + */ + +let accelInitialized = false; +let deviceOrientationInitialized = false; +// swipe utility fn & flag +let swipeEnabled = true; +// a cache DOMRect object +let domRect = {left: 0, top: 0, x: 0, y: 0, width: 0, height: 0, right: 0, bottom: 0}; + +function disableSwipeFn(e) { + e.preventDefault(); + if (typeof globalThis.scroll === "function") { + globalThis.scroll(0, 0); + } + return false; +} + +function hasLocalStorage() { + try { + return !!globalThis.localStorage; + } catch (e) { + // the above generates an exception when cookies are blocked + return false; + } +} + +function hasOffscreenCanvas() { + try { + // some browser (e.g. Safari) implements WebGL1 and WebGL2 contexts only + // https://bugzilla.mozilla.org/show_bug.cgi?id=801176 + return (typeof globalThis.OffscreenCanvas !== "undefined") && ((new globalThis.OffscreenCanvas(0, 0).getContext( "2d" )) !== null); + } catch (e) { + return false; + } +} + +/** + * used by [un]watchAccelerometer() + * @ignore + */ +function onDeviceMotion(e) { + // Accelerometer information + accelerationX = e.accelerationIncludingGravity.x; + accelerationY = e.accelerationIncludingGravity.y; + accelerationZ = e.accelerationIncludingGravity.z; +} + +/** + * used by [un]watchDeviceOrientation() + * @ignore + */ +function onDeviceRotate(e) { + gamma = e.gamma; + beta = e.beta; + alpha = e.alpha; +} + +/** + * the device platform type + * @name platform + * @memberof device + * @readonly + * @public + * @type {device.platform} + */ +let platform = device_platform; + +/** + * True if the browser supports Touch Events + * @name touchEvent + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const touchEvent = !!("ontouchstart" in globalThis); + +/** + * True if the browser supports Pointer Events + * @name pointerEvent + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const pointerEvent = !!globalThis.PointerEvent; + +/** + * Touch capabilities (support either Touch or Pointer events) + * @name touch + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const touch = touchEvent || (pointerEvent && globalThis.navigator.maxTouchPoints > 0); + +/** + * the maximum number of simultaneous touch contact points are supported by the current device. + * @name maxTouchPoints + * @memberof device + * @type {number} + * @readonly + * @public + * @example + * if (me.device.maxTouchPoints > 1) { + * // device supports multi-touch + * } + */ +const maxTouchPoints = touch ? (pointerEvent ? globalThis.navigator.maxTouchPoints || 1 : 10) : 1; + +/** + * W3C standard wheel events + * @name wheel + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const wheel = typeof globalThis.document !== "undefined" && "onwheel" in globalThis.document.createElement("div"); + + +/** + * Browser pointerlock api support + * @name hasPointerLockSupport + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const hasPointerLockSupport = typeof globalThis.document !== "undefined" && typeof globalThis.document.pointerLockElement !== "undefined"; + +/** + * Browser device orientation + * @name hasDeviceOrientation + * @memberof device + * @readonly + * @public + * @type {boolean} + */ +const hasDeviceOrientation = !!globalThis.DeviceOrientationEvent; + +/** + * Supports the ScreenOrientation API + * @name screenOrientation + * @memberof device + * @see https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/onchange + * @type {boolean} + * @readonly + * @public + */ +const screenOrientation = (typeof screen !== "undefined") && (typeof screen.orientation !== "undefined"); + +/** + * Browser accelerometer capabilities + * @name hasAccelerometer + * @memberof device + * @readonly + * @public + * @type {boolean} + */ +const hasAccelerometer = !!globalThis.DeviceMotionEvent; + +/** + * Browser full screen support + * @name hasFullscreenSupport + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const hasFullscreenSupport = typeof globalThis.document !== "undefined" && (prefixed("fullscreenEnabled", globalThis.document) || globalThis.document.mozFullScreenEnabled); + +if (hasFullscreenSupport === true) { + globalThis.document.exitFullscreen = prefixed("cancelFullScreen", globalThis.document) || prefixed("exitFullscreen", globalThis.document); +} + +/** + * Device WebAudio Support + * @name hasWebAudio + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const hasWebAudio = !!(globalThis.AudioContext || globalThis.webkitAudioContext); + +/** + * Device HTML5Audio Support + * @name hasHTML5Audio + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const hasHTML5Audio = (typeof globalThis.Audio !== "undefined"); + +/** + * Returns true if the browser/device has audio capabilities. + * @name sound + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const sound = hasWebAudio || hasHTML5Audio; + +/** + * Browser Local Storage capabilities
                            + * (this flag will be set to false if cookies are blocked) + * @name localStorage + * @memberof device + * @readonly + * @public + * @type {boolean} + */ +const localStorage = hasLocalStorage(); + +/** + * equals to true if the device browser supports OffScreenCanvas. + * @name offscreenCanvas + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const offscreenCanvas = hasOffscreenCanvas(); + +/** + * Browser Base64 decoding capability + * @name nativeBase64 + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const nativeBase64 = (typeof(globalThis.atob) === "function"); + +/** + * a string representing the preferred language of the user, usually the language of the browser UI. + * (will default to "en" if the information is not available) + * @name language + * @memberof device + * @type {string} + * @readonly + * @public + * @see http://www.w3schools.com/tags/ref_language_codes.asp + */ +const language = typeof globalThis.navigator !== "undefined" ? globalThis.navigator.language || globalThis.navigator.browserLanguage || globalThis.navigator.userLanguage || "en" : "en"; + +/** + * Ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device. + * @name devicePixelRatio + * @memberof device + * @type {number} + * @readonly + * @public + */ +const devicePixelRatio = globalThis.devicePixelRatio || 1; + +/** + * equals to true if a mobile device. + * (Android | iPhone | iPad | iPod | BlackBerry | Windows Phone | Kindle) + * @name isMobile + * @memberof device + * @type {boolean} + * @readonly + * @public + */ +const isMobile = platform.isMobile; + +/** + * contains the g-force acceleration along the x-axis. + * @name accelerationX + * @memberof device + * @type {number} + * @readonly + * @public + * @see device.watchAccelerometer + */ +let accelerationX = 0; + +/** + * contains the g-force acceleration along the y-axis. + * @name accelerationY + * @memberof device + * @type {number} + * @readonly + * @public + * @see device.watchAccelerometer + */ +let accelerationY = 0; + +/** + * contains the g-force acceleration along the z-axis. + * @name accelerationZ + * @memberof device + * @type {number} + * @readonly + * @public + * @see device.watchAccelerometer + */ +let accelerationZ = 0; + +/** + * Device orientation Gamma property. Gives angle on tilting a portrait held phone left or right + * @name gamma + * @memberof device + * @type {number} + * @readonly + * @public + * @see device.watchDeviceOrientation + */ +let gamma = 0; + +/** + * Device orientation Beta property. Gives angle on tilting a portrait held phone forward or backward + * @name beta + * @memberof device + * @type {number} + * @readonly + * @public + * @see device.watchDeviceOrientation + */ +let beta = 0; + +/** + * Device orientation Alpha property. Gives angle based on the rotation of the phone around its z axis. + * The z-axis is perpendicular to the phone, facing out from the center of the screen. + * @name alpha + * @memberof device + * @type {number} + * @readonly + * @public + * @see device.watchDeviceOrientation + */ +let alpha = 0; + +/** + * Specify whether to pause the game when losing focus + * @name pauseOnBlur + * @memberof device + * @deprecated since 15.4.0 + * @see Application.pauseOnBlur + * @type {boolean} + * @public + * @default true + */ +let pauseOnBlur = true; + +/** + * Specify whether to unpause the game when gaining focus + * @name resumeOnFocus + * @memberof device + * @deprecated since 15.4.0 + * @see Application.resumeOnFocus + * @type {boolean} + * @public + * @default true + */ +let resumeOnFocus = true; + +/** + * Specify whether to stop the game when losing focus or not. + * The engine restarts on focus if this is enabled. + * @name stopOnBlur + * @memberof device + * @deprecated since 15.4.0 + * @see Application.stopOnBlur + * @type {boolean} + * @public + * @default false + */ +let stopOnBlur = false; + +/** + * Specify whether to automatically bring the window to the front + * @name autoFocus + * @memberof device + * @type {boolean} + * @public + * @default true + */ +let autoFocus = true; + +/** +* specify a function to execute when the Device is fully loaded and ready +* @function onReady +* @memberof device +* @public +* @param {Function} fn - the function to be executed +* @example +* // small game skeleton +* let game = { +* // called by the me.device.onReady function +* onload = function () { +* // init video +* if (!me.video.init('screen', 640, 480, true)) { +* alert("Sorry but your browser does not support html 5 canvas."); +* return; +* } +* +* // initialize the "audio" +* me.audio.init("mp3,ogg"); +* +* // set callback for ressources loaded event +* me.loader.onload = this.loaded.bind(this); +* +* // set all ressources to be loaded +* me.loader.preload(game.assets); +* +* // load everything & display a loading screen +* me.state.change(me.state.LOADING); +* }; +* +* // callback when everything is loaded +* loaded = function () { +* // define stuff +* // .... +* +* // change to the menu screen +* me.state.change(me.state.PLAY); +* } +* }; // game +* +* // "bootstrap" +* me.device.onReady(function () { +* game.onload(); +* }); +*/ +function onReady(fn) { + // register on blur/focus and visibility event handlers + if (typeof globalThis.addEventListener === "function") { + // set pause/stop action on losing focus + globalThis.addEventListener("blur", () => { + emit(BLUR); + }, false); + // set restart/resume action on gaining focus + globalThis.addEventListener("focus", () => { + emit(FOCUS); + // force focus if autofocus is on + if (autoFocus === true) { + focus(); + } + }, false); + } + if (typeof globalThis.document !== "undefined") { + if (typeof globalThis.document.addEventListener === "function") { + // register on the visibilitychange event if supported + globalThis.document.addEventListener("visibilitychange", () => { + if (globalThis.document.visibilityState === "visible") { + emit(FOCUS); + // force focus if autofocus is on + if (autoFocus === true) { + focus(); + } + } else { + emit(BLUR); + } + }, false ); + } + } + // call the supplied function + DOMContentLoaded(fn); +} + +/** + * enable/disable swipe on WebView. + * @function enableSwipe + * @memberof device + * @public + * @param {boolean} [enable=true] - enable or disable swipe. + */ +function enableSwipe(enable) { + let moveEvent = pointerEvent ? "pointermove" : (touchEvent ? "touchmove" : "mousemove"); + if (enable !== false) { + if (swipeEnabled === false) { + globalThis.document.removeEventListener(moveEvent, disableSwipeFn); + swipeEnabled = true; + } + } else if (swipeEnabled === true) { + globalThis.document.addEventListener(moveEvent, disableSwipeFn, { passive: false }); + swipeEnabled = false; + } +} + +/** + * Returns true if the browser/device is in full screen mode. + * @function isFullscreen + * @memberof device + * @public + * @returns {boolean} + */ +function isFullscreen() { + if (hasFullscreenSupport) { + return !!(prefixed("fullscreenElement", globalThis.document) || globalThis.document.mozFullScreenElement); + } else { + return false; + } +} + +/** + * Triggers a fullscreen request. Requires fullscreen support from the browser/device. + * @function requestFullscreen + * @memberof device + * @public + * @param {Element} [element] - the element to be set in full-screen mode. + * @example + * // add a keyboard shortcut to toggle Fullscreen mode on/off + * me.input.bindKey(me.input.KEY.F, "toggleFullscreen"); + * me.event.on(me.event.KEYDOWN, function (action, keyCode, edge) { + * // toggle fullscreen on/off + * if (action === "toggleFullscreen") { + * me.device.requestFullscreen(); + * } else { + * me.device.exitFullscreen(); + * } + * }); + */ +function requestFullscreen(element) { + if (hasFullscreenSupport && !isFullscreen()) { + element = element || getParent(); + element.requestFullscreen = prefixed("requestFullscreen", element) || element.mozRequestFullScreen; + element.requestFullscreen(); + } +} + +/** + * Exit fullscreen mode. Requires fullscreen support from the browser/device. + * @function exitFullscreen + * @memberof device + * @public + */ +function exitFullscreen() { + if (hasFullscreenSupport && isFullscreen()) { + globalThis.document.exitFullscreen(); + } +} + +/** + * Return a string representing the orientation of the device screen. + * It can be "any", "natural", "landscape", "portrait", "portrait-primary", "portrait-secondary", "landscape-primary", "landscape-secondary" + * @function getScreenOrientation + * @memberof device + * @public + * @see https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation + * @returns {string} the screen orientation + */ +function getScreenOrientation() { + const PORTRAIT = "portrait"; + const LANDSCAPE = "landscape"; + + let screen = globalThis.screen; + + // first try using "standard" values + if (screenOrientation === true) { + let orientation = prefixed("orientation", screen); + if (typeof orientation !== "undefined" && typeof orientation.type === "string") { + // Screen Orientation API specification + return orientation.type; + } else if (typeof orientation === "string") { + // moz/ms-orientation are strings + return orientation; + } + } + + // check using the deprecated API + if (typeof globalThis.orientation === "number") { + return (Math.abs(globalThis.orientation) === 90) ? LANDSCAPE : PORTRAIT; + } + + // fallback to window size check + return (globalThis.outerWidth > globalThis.outerHeight) ? LANDSCAPE : PORTRAIT; +} + +/** + * locks the device screen into the specified orientation.
                            + * This method only works for installed Web apps or for Web pages in full-screen mode. + * @function lockOrientation + * @memberof device + * @public + * @see https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation + * @param {string|string[]} orientation - The orientation into which to lock the screen. + * @returns {boolean} true if the orientation was unsuccessfully locked + */ +function lockOrientation(orientation) { + let screen = globalThis.screen; + if (typeof screen !== "undefined") { + let _lockOrientation = prefixed("lockOrientation", screen); + if (typeof _lockOrientation !== "undefined") { + return _lockOrientation(orientation); + } + } + return false; +} + +/** + * unlocks the device screen into the specified orientation.
                            + * This method only works for installed Web apps or for Web pages in full-screen mode. + * @function unlockOrientation + * @memberof device + * @public + * @see https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation + * @returns {boolean} true if the orientation was unsuccessfully unlocked + */ +function unlockOrientation() { + let screen = globalThis.screen; + if (typeof screen !== "undefined") { + let _unlockOrientation = prefixed("unlockOrientation", screen); + if (typeof _unlockOrientation !== "undefined") { + return _unlockOrientation(); + } + } + return false; +} + +/** + * return true if the device screen orientation is in Portrait mode + * @function isPortrait + * @memberof device + * @public + * @returns {boolean} + */ +function isPortrait() { + return getScreenOrientation().includes("portrait"); +} + +/** + * return true if the device screen orientation is in Portrait mode + * @function isLandscape + * @memberof device + * @public + * @returns {boolean} + */ +function isLandscape() { + return getScreenOrientation().includes("landscape"); +} + +/** + * return the device storage + * @function getStorage + * @memberof device + * @public + * @see save + * @param {string} [type="local"] + * @returns {object} a reference to the device storage + */ +function getStorage(type = "local") { + switch (type) { + case "local" : + return save; + + default : + throw new Error("storage type " + type + " not supported"); + } +} + +/** + * return the parent DOM element for the given parent name or HTMLElement object + * @function getParentElement + * @memberof device + * @public + * @param {string|HTMLElement} element - the parent element name or a HTMLElement object + * @returns {HTMLElement} the parent Element + */ +function getParentElement(element) { + let target = getElement(element); + + if (target.parentNode !== null) { + target = target.parentNode; + } + + return target; +} + +/** + * return the DOM element for the given element name or HTMLElement object + * @function getElement + * @memberof device + * @public + * @param {string|HTMLElement} element - the parent element name or a HTMLElement object + * @returns {HTMLElement} the corresponding DOM Element or null if not existing + */ +function getElement(element) { + let target = null; + + if (element !== "undefined") { + if (typeof element === "string") { + target = globalThis.document.getElementById(element); + } else if (typeof element === "object" && element.nodeType === Node.ELEMENT_NODE) { + target = element; + } + } + + // fallback, if invalid target or non HTMLElement object + if (!target) { + //default to document.body + target = globalThis.document.body; + } + + return target; +} + +/** + * returns the size of the given HTMLElement and its position relative to the viewport + *
                            + * @function getElementBounds + * @memberof device + * @public + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMRect + * @param {string|HTMLElement} element - an HTMLElement object + * @returns {DOMRect} the size and position of the element relatively to the viewport + */ +function getElementBounds(element) { + if (typeof element === "object" && element !== globalThis.document.body && typeof element.getBoundingClientRect !== "undefined") { + return element.getBoundingClientRect(); + } else { + domRect.width = domRect.right = globalThis.innerWidth; + domRect.height = domRect.bottom = globalThis.innerHeight; + return domRect; + } +} + +/** + * returns the size of the given HTMLElement Parent and its position relative to the viewport + *
                            + * @function getParentBounds + * @memberof device + * @public + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMRect + * @param {string|HTMLElement} element - an HTMLElement object + * @returns {DOMRect} the size and position of the given element parent relative to the viewport + */ +function getParentBounds(element) { + return getElementBounds(getParentElement(element)); +} + +/** + * returns true if the device supports WebGL + * @function isWebGLSupported + * @memberof device + * @public + * @param {object} [options] - context creation options + * @param {boolean} [options.failIfMajorPerformanceCaveat=true] - If true, the renderer will switch to CANVAS mode if the performances of a WebGL context would be dramatically lower than that of a native application making equivalent OpenGL calls. + * @returns {boolean} true if WebGL is supported + */ +function isWebGLSupported(options) { + let _supported = false; + try { + let canvas = globalThis.document.createElement("canvas"); + let ctxOptions = { + stencil: true, + failIfMajorPerformanceCaveat: options.failIfMajorPerformanceCaveat + }; + _supported = !! (globalThis.WebGLRenderingContext && (canvas.getContext("webgl", ctxOptions) || canvas.getContext("experimental-webgl", ctxOptions))); + } catch (e) { + _supported = false; + } + + return _supported; +} + +/** + * Makes a request to bring this device window to the front. + * @function focus + * @memberof device + * @public + * @example + * if (clicked) { + * me.device.focus(); + * } + */ +function focus() { + if (typeof (globalThis.focus) === "function") { + globalThis.focus(); + } +} + +/** + * Enable monitor of the device accelerator to detect the amount of physical force of acceleration the device is receiving. + * (one some device a first user gesture will be required before calling this function) + * @function watchAccelerometer + * @memberof device + * @public + * @see device.accelerationX + * @see device.accelerationY + * @see device.accelerationZ + * @link {http://www.mobilexweb.com/samples/ball.html} + * @link {http://www.mobilexweb.com/blog/safari-ios-accelerometer-websockets-html5} + * @returns {boolean} false if not supported or permission not granted by the user + * @example + * // try to enable device accelerometer event on user gesture + * me.input.registerPointerEvent("pointerleave", me.game.viewport, function() { + * if (me.device.watchAccelerometer() === true) { + * // Success + * me.input.releasePointerEvent("pointerleave", me.game.viewport); + * } else { + * // ... fail at enabling the device accelerometer event + * } + * }); + */ +function watchAccelerometer() { + if (hasAccelerometer && !accelInitialized) { + if (DeviceOrientationEvent && typeof DeviceOrientationEvent.requestPermission === "function") { + DeviceOrientationEvent.requestPermission() + .then(response => { + if (response === "granted") { + // add a listener for the devicemotion event + globalThis.addEventListener("devicemotion", onDeviceMotion, false); + accelInitialized = true; + } + }).catch(console.error); + } else { + // add a listener for the devicemotion event + globalThis.addEventListener("devicemotion", onDeviceMotion, false); + accelInitialized = true; + } + } + return accelInitialized; +} + +/** + * unwatch Accelerometor event + * @function unwatchAccelerometer + * @memberof device + * @public + */ +function unwatchAccelerometer() { + if (accelInitialized) { + // remove the listener for the devicemotion event + globalThis.removeEventListener("devicemotion", onDeviceMotion, false); + accelInitialized = false; + } +} + +/** + * Enable monitor of the device orientation to detect the current orientation of the device as compared to the Earth coordinate frame. + * (one some device a first user gesture will be required before calling this function) + * @function watchDeviceOrientation + * @memberof device + * @public + * @see device.alpha + * @see device.beta + * @see device.gamma + * @returns {boolean} false if not supported or permission not granted by the user + * @example + * // try to enable device orientation event on user gesture + * me.input.registerPointerEvent("pointerleave", me.game.viewport, function() { + * if (me.device.watchDeviceOrientation() === true) { + * // Success + * me.input.releasePointerEvent("pointerleave", me.game.viewport); + * } else { + * // ... fail at enabling the device orientation event + * } + * }); + */ +function watchDeviceOrientation() { + if (hasDeviceOrientation && !deviceOrientationInitialized) { + if (typeof DeviceOrientationEvent.requestPermission === "function") { + DeviceOrientationEvent.requestPermission() + .then(response => { + if (response === "granted") { + globalThis.addEventListener("deviceorientation", onDeviceRotate, false); + deviceOrientationInitialized = true; + } + }).catch(console.error); + } else { + globalThis.addEventListener("deviceorientation", onDeviceRotate, false); + deviceOrientationInitialized = true; + } + } + return deviceOrientationInitialized; +} + +/** + * unwatch Device orientation event + * @function unwatchDeviceOrientation + * @memberof device + * @public + */ +function unwatchDeviceOrientation() { + if (deviceOrientationInitialized) { + globalThis.removeEventListener("deviceorientation", onDeviceRotate, false); + deviceOrientationInitialized = false; + } +} + +/** + * the vibrate method pulses the vibration hardware on the device,
                            + * If the device doesn't support vibration, this method has no effect.
                            + * If a vibration pattern is already in progress when this method is called, + * the previous pattern is halted and the new one begins instead. + * @function vibrate + * @memberof device + * @public + * @param {number|number[]} pattern - pattern of vibration and pause intervals + * @example + * // vibrate for 1000 ms + * me.device.vibrate(1000); + * // or alternatively + * me.device.vibrate([1000]); + * // vibrate for 50 ms, be still for 100 ms, and then vibrate for 150 ms: + * me.device.vibrate([50, 100, 150]); + * // cancel any existing vibrations + * me.device.vibrate(0); + */ +function vibrate(pattern) { + if (typeof globalThis.navigator !== "undefined" && typeof globalThis.navigator.vibrate === "function") { + globalThis.navigator.vibrate(pattern); + } +} + +var device = { + __proto__: null, + get accelerationX () { return accelerationX; }, + get accelerationY () { return accelerationY; }, + get accelerationZ () { return accelerationZ; }, + get alpha () { return alpha; }, + autoFocus: autoFocus, + get beta () { return beta; }, + devicePixelRatio: devicePixelRatio, + enableSwipe: enableSwipe, + exitFullscreen: exitFullscreen, + focus: focus, + get gamma () { return gamma; }, + getElement: getElement, + getElementBounds: getElementBounds, + getParentBounds: getParentBounds, + getParentElement: getParentElement, + getScreenOrientation: getScreenOrientation, + getStorage: getStorage, + hasAccelerometer: hasAccelerometer, + hasDeviceOrientation: hasDeviceOrientation, + hasFullscreenSupport: hasFullscreenSupport, + hasHTML5Audio: hasHTML5Audio, + hasPointerLockSupport: hasPointerLockSupport, + hasWebAudio: hasWebAudio, + isFullscreen: isFullscreen, + isLandscape: isLandscape, + isMobile: isMobile, + isPortrait: isPortrait, + isWebGLSupported: isWebGLSupported, + language: language, + localStorage: localStorage, + lockOrientation: lockOrientation, + maxTouchPoints: maxTouchPoints, + nativeBase64: nativeBase64, + offscreenCanvas: offscreenCanvas, + onDeviceRotate: onDeviceRotate, + onReady: onReady, + pauseOnBlur: pauseOnBlur, + platform: platform, + pointerEvent: pointerEvent, + requestFullscreen: requestFullscreen, + resumeOnFocus: resumeOnFocus, + screenOrientation: screenOrientation, + sound: sound, + stopOnBlur: stopOnBlur, + touch: touch, + touchEvent: touchEvent, + unlockOrientation: unlockOrientation, + unwatchAccelerometer: unwatchAccelerometer, + unwatchDeviceOrientation: unwatchDeviceOrientation, + vibrate: vibrate, + watchAccelerometer: watchAccelerometer, + watchDeviceOrientation: watchDeviceOrientation, + wheel: wheel +}; + +/** + * constant to select the HTML5 Canvas renderer + * @type {number} + * @static + * @see Application + */ +const CANVAS = 0; + +/** + * constant to select select the WebGL renderer + * @type {number} + * @static + * @see Application + */ +const WEBGL = 1; + +/** + * constant to auto-select the renderer (Attempt WebGL first, with fallback to Canvas) + * @static + * @type {number} + * @see Application + */ +const AUTO = 2; + +/** + * A reference to the active Canvas or WebGL active renderer renderer + * @memberof video + * @type {CanvasRenderer|WebGLRenderer} + */ +let renderer = null; + +/** + * Initialize the "video" system (create a canvas based on the given arguments, and the related renderer).
                            + * @memberof video + * @param {number} width - The width of the canvas viewport + * @param {number} height - The height of the canvas viewport + * @param {Application.Settings} [options] - optional parameters for the renderer + * @returns {boolean} false if initialization failed (canvas not supported) + * @example + * // init the video with a 640x480 canvas + * me.video.init(640, 480, { + * parent : "screen", + * renderer : me.video.AUTO, + * scale : "auto", + * scaleMethod : "fit" + * }); + */ +function init(width, height, options) { + // ensure melonjs has been properly initialized + if (!initialized) { + throw new Error("me.video.init() called before engine initialization."); + } + + try { + // initialize the default game Application with the given options + game.init(width, height, options); + } catch (e) { + console.log(e.message); + // me.video.init() historically returns false if failing at creating/using a HTML5 canvas + return false; + } + + // assign the default renderer + renderer = game.renderer; + + //add a channel for the onresize/onorientationchange event + globalThis.addEventListener( + "resize", + throttle( + (e) => { + emit(WINDOW_ONRESIZE, e); + }, 100 + ), false + ); + + // Screen Orientation API + globalThis.addEventListener( + "orientationchange", + (e) => { + emit(WINDOW_ONORIENTATION_CHANGE, e); + }, + false + ); + + // pre-fixed implementation on mozzila + globalThis.addEventListener( + "onmozorientationchange", + (e) => { + emit(WINDOW_ONORIENTATION_CHANGE, e); + }, + false + ); + + if (screenOrientation === true) { + globalThis.screen.orientation.onchange = function (e) { + emit(WINDOW_ONORIENTATION_CHANGE, e); + }; + } + + // Automatically update relative canvas position on scroll + globalThis.addEventListener("scroll", throttle((e) => { + emit(WINDOW_ONSCROLL, e); + }, 100), false); + + // notify the video has been initialized + emit(VIDEO_INIT, game.renderer); + + return true; +} + +/** + * Create and return a new Canvas element + * @memberof video + * @param {number} width - width + * @param {number} height - height + * @param {boolean} [returnOffscreenCanvas=false] - will return an OffscreenCanvas if supported + * @returns {HTMLCanvasElement|OffscreenCanvas} a new Canvas element of the given size + */ +function createCanvas(width, height, returnOffscreenCanvas = false) { + let _canvas; + + if (width === 0 || height === 0) { + throw new Error("width or height was zero, Canvas could not be initialized !"); + } + + if (offscreenCanvas === true && returnOffscreenCanvas === true) { + _canvas = new globalThis.OffscreenCanvas(0, 0); + // stubbing style for compatibility, + // as OffscreenCanvas is detached from the DOM + if (typeof _canvas.style === "undefined") { + _canvas.style = {}; + } + } else { + // "else" create a "standard" canvas + _canvas = globalThis.document.createElement("canvas"); + } + _canvas.width = width; + _canvas.height = height; + + return _canvas; +} + +/** + * return a reference to the parent DOM element holding the main canvas + * @memberof video + * @returns {HTMLElement} the HTML parent element + */ +function getParent() { + return game.getParentElement(); +} + +var video = { + __proto__: null, + AUTO: AUTO, + CANVAS: CANVAS, + WEBGL: WEBGL, + createCanvas: createCanvas, + getParent: getParent, + init: init, + get renderer () { return renderer; } +}; + +// corresponding actions +let _keyStatus = {}; + +// lock enable flag for keys +let _keyLock = {}; +// actual lock status of each key +let _keyLocked = {}; + +// List of binded keys being held +let _keyRefs = {}; + +// whether default event should be prevented for a given keypress +let _preventDefaultForKeys = {}; + +// list of binded keys +let _keyBindings = {}; + +/** + * key down event + * @ignore + */ +let keyDownEvent = function (e, keyCode, mouseButton) { + + keyCode = keyCode || e.keyCode || e.button; + let action = _keyBindings[keyCode]; + + // publish a message for keydown event + emit(KEYDOWN, + action, + keyCode, + action ? !_keyLocked[action] : true + ); + + if (action) { + if (!_keyLocked[action]) { + let trigger = (typeof mouseButton !== "undefined") ? mouseButton : keyCode; + if (!_keyRefs[action][trigger]) { + _keyStatus[action]++; + _keyRefs[action][trigger] = true; + } + } + // prevent event propagation + if (_preventDefaultForKeys[keyCode] && (typeof e.preventDefault === "function")) { + // "fake" events generated through triggerKeyEvent do not have a preventDefault fn + return e.preventDefault(); + } + else { + return true; + } + } + + return true; +}; + + +/** + * key up event + * @ignore + */ +let keyUpEvent = function (e, keyCode, mouseButton) { + keyCode = keyCode || e.keyCode || e.button; + let action = _keyBindings[keyCode]; + + // publish a message for keydown event + emit(KEYUP, action, keyCode); + + if (action) { + let trigger = (typeof mouseButton !== "undefined") ? mouseButton : keyCode; + _keyRefs[action][trigger] = undefined; + + if (_keyStatus[action] > 0) { + _keyStatus[action]--; + } + + _keyLocked[action] = false; + + // prevent event propagation + if (_preventDefaultForKeys[keyCode] && (typeof e.preventDefault === "function")) { + // "fake" events generated through triggerKeyEvent do not have a preventDefault fn + return e.preventDefault(); + } + else { + return true; + } + } + + return true; +}; + +/* + * PUBLIC STUFF + */ + +/** + * the default target element for keyboard events (usually the window element in which the game is running) + * @public + * @type {EventTarget} + * @name keyBoardEventTarget + * @memberof input + */ +let keyBoardEventTarget = null; + +/** + * standard keyboard constants + * @public + * @enum {number} + * @namespace KEY + * @memberof input + */ +const KEY = { + "BACKSPACE" : 8, + /** @memberof input.KEY */ + "TAB" : 9, + /** @memberof input.KEY */ + "ENTER" : 13, + /** @memberof input.KEY */ + "SHIFT" : 16, + /** @memberof input.KEY */ + "CTRL" : 17, + /** @memberof input.KEY */ + "ALT" : 18, + /** @memberof input.KEY */ + "PAUSE" : 19, + /** @memberof input.KEY */ + "CAPS_LOCK" : 20, + /** @memberof input.KEY */ + "ESC" : 27, + /** @memberof input.KEY */ + "SPACE" : 32, + /** @memberof input.KEY */ + "PAGE_UP" : 33, + /** @memberof input.KEY */ + "PAGE_DOWN" : 34, + /** @memberof input.KEY */ + "END" : 35, + /** @memberof input.KEY */ + "HOME" : 36, + /** @memberof input.KEY */ + "LEFT" : 37, + /** @memberof input.KEY */ + "UP" : 38, + /** @memberof input.KEY */ + "RIGHT" : 39, + /** @memberof input.KEY */ + "DOWN" : 40, + /** @memberof input.KEY */ + "PRINT_SCREEN" : 42, + /** @memberof input.KEY */ + "INSERT" : 45, + /** @memberof input.KEY */ + "DELETE" : 46, + /** @memberof input.KEY */ + "NUM0" : 48, + /** @memberof input.KEY */ + "NUM1" : 49, + /** @memberof input.KEY */ + "NUM2" : 50, + /** @memberof input.KEY */ + "NUM3" : 51, + /** @memberof input.KEY */ + "NUM4" : 52, + /** @memberof input.KEY */ + "NUM5" : 53, + /** @memberof input.KEY */ + "NUM6" : 54, + /** @memberof input.KEY */ + "NUM7" : 55, + /** @memberof input.KEY */ + "NUM8" : 56, + /** @memberof input.KEY */ + "NUM9" : 57, + /** @memberof input.KEY */ + "A" : 65, + /** @memberof input.KEY */ + "B" : 66, + /** @memberof input.KEY */ + "C" : 67, + /** @memberof input.KEY */ + "D" : 68, + /** @memberof input.KEY */ + "E" : 69, + /** @memberof input.KEY */ + "F" : 70, + /** @memberof input.KEY */ + "G" : 71, + /** @memberof input.KEY */ + "H" : 72, + /** @memberof input.KEY */ + "I" : 73, + /** @memberof input.KEY */ + "J" : 74, + /** @memberof input.KEY */ + "K" : 75, + /** @memberof input.KEY */ + "L" : 76, + /** @memberof input.KEY */ + "M" : 77, + /** @memberof input.KEY */ + "N" : 78, + /** @memberof input.KEY */ + "O" : 79, + /** @memberof input.KEY */ + "P" : 80, + /** @memberof input.KEY */ + "Q" : 81, + /** @memberof input.KEY */ + "R" : 82, + /** @memberof input.KEY */ + "S" : 83, + /** @memberof input.KEY */ + "T" : 84, + /** @memberof input.KEY */ + "U" : 85, + /** @memberof input.KEY */ + "V" : 86, + /** @memberof input.KEY */ + "W" : 87, + /** @memberof input.KEY */ + "X" : 88, + /** @memberof input.KEY */ + "Y" : 89, + /** @memberof input.KEY */ + "Z" : 90, + /** @memberof input.KEY */ + "WINDOW_KEY" : 91, + /** @memberof input.KEY */ + "NUMPAD0" : 96, + /** @memberof input.KEY */ + "NUMPAD1" : 97, + /** @memberof input.KEY */ + "NUMPAD2" : 98, + /** @memberof input.KEY */ + "NUMPAD3" : 99, + /** @memberof input.KEY */ + "NUMPAD4" : 100, + /** @memberof input.KEY */ + "NUMPAD5" : 101, + /** @memberof input.KEY */ + "NUMPAD6" : 102, + /** @memberof input.KEY */ + "NUMPAD7" : 103, + /** @memberof input.KEY */ + "NUMPAD8" : 104, + /** @memberof input.KEY */ + "NUMPAD9" : 105, + /** @memberof input.KEY */ + "MULTIPLY" : 106, + /** @memberof input.KEY */ + "ADD" : 107, + /** @memberof input.KEY */ + "SUBSTRACT" : 109, + /** @memberof input.KEY */ + "DECIMAL" : 110, + /** @memberof input.KEY */ + "DIVIDE" : 111, + /** @memberof input.KEY */ + "F1" : 112, + /** @memberof input.KEY */ + "F2" : 113, + /** @memberof input.KEY */ + "F3" : 114, + /** @memberof input.KEY */ + "F4" : 115, + /** @memberof input.KEY */ + "F5" : 116, + /** @memberof input.KEY */ + "F6" : 117, + /** @memberof input.KEY */ + "F7" : 118, + /** @memberof input.KEY */ + "F8" : 119, + /** @memberof input.KEY */ + "F9" : 120, + /** @memberof input.KEY */ + "F10" : 121, + /** @memberof input.KEY */ + "F11" : 122, + /** @memberof input.KEY */ + "F12" : 123, + /** @memberof input.KEY */ + "TILDE" : 126, + /** @memberof input.KEY */ + "NUM_LOCK" : 144, + /** @memberof input.KEY */ + "SCROLL_LOCK" : 145, + /** @memberof input.KEY */ + "SEMICOLON" : 186, + /** @memberof input.KEY */ + "PLUS" : 187, + /** @memberof input.KEY */ + "COMMA" : 188, + /** @memberof input.KEY */ + "MINUS" : 189, + /** @memberof input.KEY */ + "PERIOD" : 190, + /** @memberof input.KEY */ + "FORWAND_SLASH" : 191, + /** @memberof input.KEY */ + "GRAVE_ACCENT" : 192, + /** @memberof input.KEY */ + "OPEN_BRACKET" : 219, + /** @memberof input.KEY */ + "BACK_SLASH" : 220, + /** @memberof input.KEY */ + "CLOSE_BRACKET" : 221, + /** @memberof input.KEY */ + "SINGLE_QUOTE" : 222 +}; + +/** + * enable keyboard event + * @ignore + */ +function initKeyboardEvent() { + // make sure the keyboard is enable + if (keyBoardEventTarget === null && isMobile$1 === false) { + keyBoardEventTarget = globalThis; + if (typeof keyBoardEventTarget.addEventListener === "function") { + keyBoardEventTarget.addEventListener("keydown", keyDownEvent, false); + keyBoardEventTarget.addEventListener("keyup", keyUpEvent, false); + } + } +} + +/** + * return the key press status of the specified action + * @name isKeyPressed + * @memberof input + * @public + * @param {string} action - user defined corresponding action + * @returns {boolean} true if pressed + * @example + * if (me.input.isKeyPressed('left')) { + * //do something + * } + * else if (me.input.isKeyPressed('right')) { + * //do something else... + * } + */ +function isKeyPressed(action) { + if (_keyStatus[action] && !_keyLocked[action]) { + if (_keyLock[action]) { + _keyLocked[action] = true; + } + return true; + } + return false; +} + +/** + * return the key status of the specified action + * @name keyStatus + * @memberof input + * @public + * @param {string} action - user defined corresponding action + * @returns {boolean} down (true) or up(false) + */ +function keyStatus(action) { + return (_keyStatus[action] > 0); +} + + +/** + * trigger the specified key (simulated) event
                            + * @name triggerKeyEvent + * @memberof input + * @public + * @param {number} keycode - (See {@link input.KEY}) + * @param {boolean} [status=false] - true to trigger a key down event, or false for key up event + * @param {number} [mouseButton] - the mouse button to trigger + * @example + * // trigger a key press + * me.input.triggerKeyEvent(me.input.KEY.LEFT, true); + */ +function triggerKeyEvent(keycode, status, mouseButton) { + if (status === true) { + keyDownEvent({}, keycode, mouseButton); + } + else { + keyUpEvent({}, keycode, mouseButton); + } +} + + +/** + * associate a user defined action to a keycode + * @name bindKey + * @memberof input + * @public + * @param {number} keycode - (See {@link input.KEY}) + * @param {string} action - user defined corresponding action + * @param {boolean} [lock=false] - cancel the keypress event once read + * @param {boolean} [preventDefault=input.preventDefault] - prevent default browser action + * @example + * // enable the keyboard + * me.input.bindKey(me.input.KEY.LEFT, "left"); + * me.input.bindKey(me.input.KEY.RIGHT, "right"); + * me.input.bindKey(me.input.KEY.X, "jump", true); + * me.input.bindKey(me.input.KEY.F1, "options", true, true); + */ +function bindKey(keycode, action, lock, preventDefault$1 = preventDefault) { + _keyBindings[keycode] = action; + _preventDefaultForKeys[keycode] = preventDefault$1; + + _keyStatus[action] = 0; + _keyLock[action] = lock ? lock : false; + _keyLocked[action] = false; + _keyRefs[action] = {}; +} + +/** + * return the action associated with the given keycode + * @name getBindingKey + * @memberof input + * @public + * @param {number} keycode - (See {@link input.KEY}) + * @returns {string} user defined associated action + */ +function getBindingKey(keycode) { + return _keyBindings[keycode]; +} + +/** + * unlock a key manually + * @name unlockKey + * @memberof input + * @public + * @param {string} action - user defined corresponding action + * @example + * // Unlock jump when touching the ground + * if (!this.falling && !this.jumping) { + * me.input.unlockKey("jump"); + * } + */ +function unlockKey(action) { + _keyLocked[action] = false; +} + +/** + * unbind the defined keycode + * @name unbindKey + * @memberof input + * @public + * @param {number} keycode - (See {@link input.KEY}) + * @example + * me.input.unbindKey(me.input.KEY.LEFT); + */ +function unbindKey(keycode) { + // clear the event status + let keybinding = _keyBindings[keycode]; + _keyStatus[keybinding] = 0; + _keyLock[keybinding] = false; + _keyRefs[keybinding] = {}; + // remove the key binding + _keyBindings[keycode] = null; + _preventDefaultForKeys[keycode] = null; +} + +/** + * a temporary vector object + * @ignore + */ +let tmpVec = new Vector2d(); + +/** + * @classdesc + * a pointer object, representing a single finger on a touch enabled device. + * @class Pointer + * @augments Bounds + */ +class Pointer extends Bounds { + + /** + * @ignore + */ + constructor(x = 0, y = 0, w = 1, h = 1) { + + // parent constructor + super(); + + // initial coordinates/size + this.setMinMax(x, y, x + w, y + h); + + /** + * constant for left button + * @public + * @type {number} + * @name LEFT + * @memberof Pointer + */ + this.LEFT = 0; + + /** + * constant for middle button + * @public + * @type {number} + * @name MIDDLE + * @memberof Pointer + */ + this.MIDDLE = 1; + + /** + * constant for right button + * @public + * @type {number} + * @name RIGHT + * @memberof Pointer + */ + this.RIGHT = 2; + + /** + * the originating Event Object + * @public + * @type {PointerEvent|TouchEvent|MouseEvent} + * @name event + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent + * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent + * @memberof Pointer + */ + this.event = undefined; + + /** + * a string containing the event's type. + * @public + * @type {string} + * @name type + * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/type + * @memberof Pointer + */ + this.type = undefined; + + + /** + * the button property indicates which button was pressed on the mouse to trigger the event. + * @public + * @type {number} + * @name button + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button + * @memberof Pointer + */ + this.button = 0; + + /** + * indicates whether or not the pointer device that created the event is the primary pointer. + * @public + * @type {boolean} + * @name isPrimary + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary + * @memberof Pointer + */ + this.isPrimary = false; + + /** + * the horizontal coordinate at which the event occurred, relative to the left edge of the entire document. + * @public + * @type {number} + * @name pageX + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/pageX + * @memberof Pointer + */ + this.pageX = 0; + + /** + * the vertical coordinate at which the event occurred, relative to the left edge of the entire document. + * @public + * @type {number} + * @name pageY + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/pageY + * @memberof Pointer + */ + this.pageY = 0; + + /** + * the horizontal coordinate within the application's client area at which the event occurred + * @public + * @type {number} + * @name clientX + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX + * @memberof Pointer + */ + this.clientX = 0; + + /** + * the vertical coordinate within the application's client area at which the event occurred + * @public + * @type {number} + * @name clientY + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY + * @memberof Pointer + */ + this.clientY = 0; + + /** + * the difference in the X coordinate of the pointer since the previous move event + * @public + * @type {number} + * @name movementX + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementX + * @memberof Pointer + */ + this.movementX = 0; + + /** + * the difference in the Y coordinate of the pointer since the previous move event + * @public + * @type {number} + * @name movementY + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementY + * @memberof Pointer + */ + this.movementY = 0; + + /** + * an unsigned long representing the unit of the delta values scroll amount + * @public + * @type {number} + * @name deltaMode + * @see https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaMode + * @memberof Pointer + */ + this.deltaMode = 0; + + /** + * a double representing the horizontal scroll amount in the Wheel Event deltaMode unit. + * @public + * @type {number} + * @name deltaX + * @see https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaX + * @memberof Pointer + */ + this.deltaX = 0; + + /** + * a double representing the vertical scroll amount in the Wheel Event deltaMode unit. + * @public + * @type {number} + * @name deltaY + * @see https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaY + * @memberof Pointer + */ + this.deltaY = 0; + + /** + * a double representing the scroll amount in the z-axis, in the Wheel Event deltaMode unit. + * @public + * @type {number} + * @name deltaZ + * @see https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/deltaZ + * @memberof Pointer + */ + this.deltaZ = 0; + + /** + * Event normalized X coordinate within the game canvas itself
                            + * + * @public + * @type {number} + * @name gameX + * @memberof Pointer + */ + this.gameX = 0; + + /** + * Event normalized Y coordinate within the game canvas itself
                            + * + * @public + * @type {number} + * @name gameY + * @memberof Pointer + */ + this.gameY = 0; + + /** + * Event X coordinate relative to the viewport + * @public + * @type {number} + * @name gameScreenX + * @memberof Pointer + */ + this.gameScreenX = 0; + + /** + * Event Y coordinate relative to the viewport + * @public + * @type {number} + * @name gameScreenY + * @memberof Pointer + */ + this.gameScreenY = 0; + + /** + * Event X coordinate relative to the map + * @public + * @type {number} + * @name gameWorldX + * @memberof Pointer + */ + this.gameWorldX = 0; + + /** + * Event Y coordinate relative to the map + * @public + * @type {number} + * @name gameWorldY + * @memberof Pointer + */ + this.gameWorldY = 0; + + /** + * Event X coordinate relative to the holding container + * @public + * @type {number} + * @name gameLocalX + * @memberof Pointer + */ + this.gameLocalX = 0; + + /** + * Event Y coordinate relative to the holding container + * @public + * @type {number} + * @name gameLocalY + * @memberof Pointer + */ + this.gameLocalY = 0; + + /** + * The unique identifier of the contact for a touch, mouse or pen + * @public + * @type {number} + * @name pointerId + * @memberof Pointer + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId + */ + this.pointerId = undefined; + + /** + * true if not originally a pointer event + * @public + * @type {boolean} + * @name isNormalized + * @memberof Pointer + */ + this.isNormalized = false; + + /** + * true if the pointer is currently locked + * @public + * @type {boolean} + * @name locked + * @memberof Pointer + */ + this.locked = false; + + // bind list for mouse buttons + this.bind = [ 0, 0, 0 ]; + } + + /** + * initialize the Pointer object using the given Event Object + * @name Pointer#set + * @private + * @param {Event} event - the original Event object + * @param {number} [pageX=0] - the horizontal coordinate at which the event occurred, relative to the left edge of the entire document + * @param {number} [pageY=0] - the vertical coordinate at which the event occurred, relative to the left edge of the entire document + * @param {number} [clientX=0] - the horizontal coordinate within the application's client area at which the event occurred + * @param {number} [clientY=0] - the vertical coordinate within the application's client area at which the event occurred + * @param {number} [pointerId=1] - the Pointer, Touch or Mouse event Id (1) + */ + setEvent(event, pageX = 0, pageY = 0, clientX = 0, clientY = 0, pointerId = 1) { + // the original event object + this.event = event; + + this.pageX = pageX; + this.pageY = pageY; + this.clientX = clientX; + this.clientY = clientY; + + // translate to local coordinates + globalToLocal(this.pageX, this.pageY, tmpVec); + this.gameScreenX = this.x = tmpVec.x; + this.gameScreenY = this.y = tmpVec.y; + + // true if not originally a pointer event + this.isNormalized = (typeof globalThis.PointerEvent !== "undefined" && !(event instanceof globalThis.PointerEvent)); + + this.locked = locked; + this.movementX = event.movementX || 0; + this.movementY = event.movementY || 0; + + if (event.type === "wheel") { + this.deltaMode = event.deltaMode || 0; + this.deltaX = event.deltaX || 0; + this.deltaY = event.deltaY || 0; + this.deltaZ = event.deltaZ || 0; + } else { + this.deltaMode = 0; + this.deltaX = 0; + this.deltaY = 0; + this.deltaZ = 0; + } + + this.pointerId = pointerId; + + this.isPrimary = (typeof event.isPrimary !== "undefined") ? event.isPrimary : true; + + // in case of touch events, button is not defined + this.button = event.button || 0; + + this.type = event.type; + + // get the current screen to game world offset + if (typeof game.viewport !== "undefined") { + game.viewport.localToWorld(this.gameScreenX, this.gameScreenY, tmpVec); + } + + /* Initialize the two coordinate space properties. */ + this.gameWorldX = tmpVec.x; + this.gameWorldY = tmpVec.y; + + // get the pointer size + if (this.isNormalized === false) { + // native PointerEvent + this.width = event.width || 1; + this.height = event.height || 1; + } else if (typeof(event.radiusX) === "number") { + // TouchEvent + this.width = (event.radiusX * 2) || 1; + this.height = (event.radiusY * 2) || 1; + } else { + this.width = this.height = 1; + } + } +} + +/** + * A pool of `Pointer` objects to cache pointer/touch event coordinates. + * @type {Array.} + * @ignore + */ +let T_POINTERS = []; + +// list of registered Event handlers +let eventHandlers = new Map(); + +// a cache rect represeting the current pointer area +let currentPointer; + +// some useful flags +let pointerInitialized = false; + +// Track last event timestamp to prevent firing events out of order +let lastTimeStamp = 0; + +// "active" list of supported events +let activeEventList = []; + +// internal constants +const WHEEL = ["wheel"]; +const POINTER_MOVE = ["pointermove", "mousemove", "touchmove"]; +const POINTER_DOWN = ["pointerdown", "mousedown", "touchstart"]; +const POINTER_UP = ["pointerup", "mouseup", "touchend"]; +const POINTER_CANCEL = ["pointercancel", "mousecancel", "touchcancel"]; +const POINTER_ENTER = ["pointerenter", "mouseenter", "touchenter"]; +const POINTER_OVER = ["pointerover", "mouseover", "touchover"]; +const POINTER_LEAVE = ["pointerleave", "mouseleave", "touchleave"]; + +// list of standard pointer event type +const pointerEventList = [ + WHEEL[0], + POINTER_MOVE[0], + POINTER_DOWN[0], + POINTER_UP[0], + POINTER_CANCEL[0], + POINTER_ENTER[0], + POINTER_OVER[0], + POINTER_LEAVE[0] +]; + +// legacy mouse event type +const mouseEventList = [ + WHEEL[0], + POINTER_MOVE[1], + POINTER_DOWN[1], + POINTER_UP[1], + POINTER_CANCEL[1], + POINTER_ENTER[1], + POINTER_OVER[1], + POINTER_LEAVE[1] +]; + +// iOS style touch event type +const touchEventList = [ + POINTER_MOVE[2], + POINTER_DOWN[2], + POINTER_UP[2], + POINTER_CANCEL[2], + POINTER_ENTER[2], + POINTER_OVER[2], + POINTER_LEAVE[2] +]; + +const pointerEventMap = { + wheel : WHEEL, + pointermove: POINTER_MOVE, + pointerdown: POINTER_DOWN, + pointerup: POINTER_UP, + pointercancel: POINTER_CANCEL, + pointerenter: POINTER_ENTER, + pointerover: POINTER_OVER, + pointerleave: POINTER_LEAVE +}; + +/** + * Array of normalized events (mouse, touch, pointer) + * @ignore + */ +let normalizedEvents = []; + +/** + * addEventListerner for the specified event list and callback + * @ignore + */ +function registerEventListener(eventList, callback) { + for (let x = 0; x < eventList.length; x++) { + if (POINTER_MOVE.indexOf(eventList[x]) === -1) { + pointerEventTarget.addEventListener(eventList[x], callback, { passive: (preventDefault === false) }); + } + } +} + +/** + * enable pointer event (Pointer/Mouse/Touch) + * @ignore + */ +function enablePointerEvent() { + if (!pointerInitialized) { + + // the current pointer area + currentPointer = new Rect(0, 0, 1, 1); + + // instantiate a pool of pointer catched + for (let v = 0; v < maxTouchPoints; v++) { + T_POINTERS.push(new Pointer()); + } + + if (pointerEventTarget === null) { + // default pointer event target + pointerEventTarget = renderer.getCanvas(); + } + + if (pointerEvent) { + // standard Pointer Events + activeEventList = pointerEventList; + } else { + // Regular Mouse events + activeEventList = mouseEventList; + } + if (touch && !pointerEvent) { + // touch event on mobile devices + activeEventList = activeEventList.concat(touchEventList); + } + registerEventListener(activeEventList, onPointerEvent); + + // set the PointerMove/touchMove/MouseMove event + if (typeof(throttlingInterval) === "undefined") { + // set the default value + throttlingInterval = ~~(1000 / timer$1.maxfps); + } + + if (autoFocus === true) { + focus(); + pointerEventTarget.addEventListener( + activeEventList[2], // MOUSE/POINTER DOWN + () => { + focus(); + }, + { passive: (preventDefault === false) } + ); + } + + // if time interval <= 16, disable the feature + let events = findAllActiveEvents(activeEventList, POINTER_MOVE); + if (throttlingInterval < 17) { + for (let i = 0; i < events.length; i++) { + if (activeEventList.indexOf(events[i]) !== -1) { + pointerEventTarget.addEventListener( + events[i], + onMoveEvent, + { passive: true } // do not preventDefault on Move events + ); + } + + } + } + else { + for (let i = 0; i < events.length; i++) { + if (activeEventList.indexOf(events[i]) !== -1) { + pointerEventTarget.addEventListener( + events[i], + throttle( + onMoveEvent, + throttlingInterval, + false + ), + { passive: true } // do not preventDefault on Move events + ); + } + } + } + // disable all gesture by default + setTouchAction(pointerEventTarget); + + // set a on change listener on pointerlock if supported + if (hasPointerLockSupport) { + globalThis.document.addEventListener("pointerlockchange", () => { + // change the locked status accordingly + locked = globalThis.document.pointerLockElement === game.getParentElement(); + // emit the corresponding internal event + emit(POINTERLOCKCHANGE, locked); + }, true); + } + + // all done ! + pointerInitialized = true; + } +} + +/** + * @ignore + */ +function findActiveEvent(activeEventList, eventTypes) { + for (let i = 0; i < eventTypes.length; i++) { + const event = activeEventList.indexOf(eventTypes[i]); + if (event !== -1) { + return eventTypes[i]; + } + } +} + +/** + * @ignore + */ +function findAllActiveEvents(activeEventList, eventTypes) { + let events = []; + for (let i = 0; i < eventTypes.length; i++) { + const event = activeEventList.indexOf(eventTypes[i]); + if (event !== -1) { + events.push(eventTypes[i]); + } + } + + return events; +} + +/** + * @ignore + */ +function triggerEvent(handlers, type, pointer, pointerId) { + let callback; + if (handlers.callbacks[type]) { + handlers.pointerId = pointerId; + for (let i = handlers.callbacks[type].length - 1; (i >= 0) && (callback = handlers.callbacks[type][i]); i--) { + if (callback(pointer) === false) { + // stop propagating the event if return false + return true; + } + } + } + return false; +} + +/** + * propagate events to registered objects + * @ignore + */ +function dispatchEvent(normalizedEvents) { + let handled = false; + + while (normalizedEvents.length > 0) { + + // keep a reference to the last item + let pointer = normalizedEvents.pop(); + // and put it back into our cache + T_POINTERS.push(pointer); + + // Do not fire older touch events (not required for PointerEvent type) + if (pointer.isNormalized === true && typeof(pointer.event.timeStamp) !== "undefined") { + if (pointer.event.timeStamp < lastTimeStamp) { + continue; + } + lastTimeStamp = pointer.event.timeStamp; + } + + currentPointer.setShape( + pointer.gameWorldX, + pointer.gameWorldY, + pointer.width, + pointer.height + ); + + // trigger a global event for pointer move + if (POINTER_MOVE.includes(pointer.type)) { + pointer.gameX = pointer.gameLocalX = pointer.gameScreenX; + pointer.gameY = pointer.gameLocalY = pointer.gameScreenY; + emit(POINTERMOVE, pointer); + } + + // fetch valid candiates from the game world container + let candidates = game.world.broadphase.retrieve(currentPointer, game.world._sortReverseZ); + + // add the main game viewport to the list of candidates + candidates = candidates.concat([ game.viewport ]); + + for (let c = candidates.length, candidate; c--, (candidate = candidates[c]);) { + if (eventHandlers.has(candidate) && (candidate.isKinematic !== true)) { + const handlers = eventHandlers.get(candidate); + const region = handlers.region; + const ancestor = region.ancestor; + const bounds = region.getBounds(); + let eventInBounds = false; + + if (region.isFloating === true) { + pointer.gameX = pointer.gameLocalX = pointer.gameScreenX; + pointer.gameY = pointer.gameLocalY = pointer.gameScreenY; + } else { + pointer.gameX = pointer.gameLocalX = pointer.gameWorldX; + pointer.gameY = pointer.gameLocalY = pointer.gameWorldY; + } + + // adjust gameLocalX to specify coordinates + // within the region ancestor container + if (typeof ancestor !== "undefined") { + let parentBounds = ancestor.getBounds(); + pointer.gameLocalX = pointer.gameX - parentBounds.x; + pointer.gameLocalY = pointer.gameY - parentBounds.y; + } + + eventInBounds = bounds.contains(pointer.gameX, pointer.gameY); + + switch (pointer.type) { + case POINTER_MOVE[0]: + case POINTER_MOVE[1]: + case POINTER_MOVE[2]: + case POINTER_MOVE[3]: + // moved out of bounds: trigger the POINTER_LEAVE callbacks + if (handlers.pointerId === pointer.pointerId && !eventInBounds) { + if (triggerEvent(handlers, findActiveEvent(activeEventList, POINTER_LEAVE), pointer, null)) { + handled = true; + break; + } + } + // no pointer & moved inside of bounds: trigger the POINTER_ENTER callbacks + else if (handlers.pointerId === null && eventInBounds) { + if (triggerEvent(handlers, findActiveEvent(activeEventList, POINTER_ENTER), pointer, pointer.pointerId)) { + handled = true; + break; + } + } + + // trigger the POINTER_MOVE callbacks + if (eventInBounds && triggerEvent(handlers, pointer.type, pointer, pointer.pointerId)) { + handled = true; + break; + } + break; + + case POINTER_UP[0]: + case POINTER_UP[1]: + case POINTER_UP[2]: + case POINTER_UP[3]: + // pointer defined & inside of bounds: trigger the POINTER_UP callback + if (handlers.pointerId === pointer.pointerId && eventInBounds) { + // trigger the corresponding callback + if (triggerEvent(handlers, pointer.type, pointer, null)) { + handled = true; + break; + } + } + break; + + case POINTER_CANCEL[0]: + case POINTER_CANCEL[1]: + case POINTER_CANCEL[2]: + case POINTER_CANCEL[3]: + // pointer defined: trigger the POINTER_CANCEL callback + if (handlers.pointerId === pointer.pointerId) { + // trigger the corresponding callback + if (triggerEvent(handlers, pointer.type, pointer, null)) { + handled = true; + break; + } + } + break; + + default: + // event inside of bounds: trigger the POINTER_DOWN or WHEEL callback + if (eventInBounds) { + // trigger the corresponding callback + if (triggerEvent(handlers, pointer.type, pointer, pointer.pointerId)) { + handled = true; + break; + } + } + break; + } + } + if (handled === true) { + // stop iterating through this list of candidates + break; + } + } + } + return handled; +} + +/** + * translate event coordinates + * @ignore + */ +function normalizeEvent(originalEvent) { + let _pointer; + + // PointerEvent or standard Mouse event + if (touchEvent && originalEvent.changedTouches) { + // iOS/Android Touch event + for (let i = 0, l = originalEvent.changedTouches.length; i < l; i++) { + const touchEvent = originalEvent.changedTouches[i]; + _pointer = T_POINTERS.pop(); + _pointer.setEvent( + originalEvent, + touchEvent.pageX, + touchEvent.pageY, + touchEvent.clientX, + touchEvent.clientY, + touchEvent.identifier + ); + normalizedEvents.push(_pointer); + } + } else { + // Mouse or PointerEvent + _pointer = T_POINTERS.pop(); + _pointer.setEvent( + originalEvent, + originalEvent.pageX, + originalEvent.pageY, + originalEvent.clientX, + originalEvent.clientY, + originalEvent.pointerId + ); + normalizedEvents.push(_pointer); + } + + // if event.isPrimary is defined and false, return + if (originalEvent.isPrimary === false) { + return normalizedEvents; + } + + // else use the first entry to simulate mouse event + normalizedEvents[0].isPrimary = true; + Object.assign(pointer, normalizedEvents[0]); + + return normalizedEvents; +} + +/** + * mouse/touch/pointer event management (move) + * @ignore + */ +function onMoveEvent(e) { + // dispatch mouse event to registered object + dispatchEvent(normalizeEvent(e)); + // do not prevent default on moveEvent : +} + +/** + * mouse/touch/pointer event management (start/down, end/up) + * @ignore + */ +function onPointerEvent(e) { + // normalize eventTypes + normalizeEvent(e); + + // remember/use the first "primary" normalized event for pointer.bind + let button = normalizedEvents[0].button; + + // dispatch event to registered objects + if (dispatchEvent(normalizedEvents) || e.type === "wheel") { + // always preventDefault for wheel event (?legacy code/behavior?) + if (preventDefault === true) { + e.preventDefault(); + } + } + + let keycode = pointer.bind[button]; + + // check if mapped to a key + if (keycode) { + triggerKeyEvent(keycode, POINTER_DOWN.includes(e.type), button + 1); + } +} + +/* + * PUBLIC STUFF + */ + +/** + * the default target element for pointer events (usually the canvas element in which the game is rendered) + * @public + * @type {EventTarget} + * @name pointerEventTarget + * @memberof input + */ +let pointerEventTarget = null; + +/** + * Pointer information (current position and size) + * @public + * @type {Rect} + * @name pointer + * @memberof input + */ +let pointer = new Pointer(0, 0, 1, 1); + + +/** + * indicates if the pointer is currently locked + * @public + * @type {boolean} + * @name locked + * @memberof input + */ +let locked = false; + +/** + * time interval for event throttling in milliseconds
                            + * default value : "1000/me.timer.maxfps" ms
                            + * set to 0 ms to disable the feature + * @public + * @type {number} + * @name throttlingInterval + * @memberof input + */ +let throttlingInterval; + +/** + * return true if there are pending pointer events in the queue + * @memberof input + * @returns true if there are pending events + */ +function hasActiveEvents() { + return normalizedEvents.length > 0; +} + +/** + * return true if there are register pointer events + * @memberof input + * @see registerPointerEvent + * @returns true if there are pending events + */ +function hasRegisteredEvents() { + return eventHandlers.size > 0; +} + +/** + * Translate the specified x and y values from the global (absolute) + * coordinate to local (viewport) relative coordinate. + * @memberof input + * @param {number} x - the global x coordinate to be translated. + * @param {number} y - the global y coordinate to be translated. + * @param {Vector2d} [v] - an optional vector object where to set the translated coordinates + * @returns {Vector2d} A vector object with the corresponding translated coordinates + * @example + * onMouseEvent : function (pointer) { + * // convert the given into local (viewport) relative coordinates + * let pos = me.input.globalToLocal(pointer.clientX, pointer.clientY); + * // do something with pos ! + * }; + */ +function globalToLocal(x, y, v) { + v = v || pool.pull("Vector2d"); + let rect = getElementBounds(renderer.getCanvas()); + let pixelRatio = globalThis.devicePixelRatio || 1; + x -= rect.left + (globalThis.pageXOffset || 0); + y -= rect.top + (globalThis.pageYOffset || 0); + let scale = renderer.scaleRatio; + if (scale.x !== 1.0 || scale.y !== 1.0) { + x /= scale.x; + y /= scale.y; + } + return v.set(x * pixelRatio, y * pixelRatio); +} + +/** + * enable/disable all gestures on the given element.
                            + * by default melonJS will disable browser handling of all panning and zooming gestures. + * @memberof input + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action + * @param {HTMLCanvasElement} element + * @param {string} [value="none"] + */ +function setTouchAction(element, value) { + element.style["touch-action"] = value || "none"; +} + +/** + * Associate a pointer event to a keycode
                            + * Left button – 0 + * Middle button – 1 + * Right button – 2 + * @memberof input + * @param {number} [button=input.pointer.LEFT] - (accordingly to W3C values : 0,1,2 for left, middle and right buttons) + * @param {input.KEY} keyCode + * @example + * // enable the keyboard + * me.input.bindKey(me.input.KEY.X, "shoot"); + * // map the left button click on the X key (default if the button is not specified) + * me.input.bindPointer(me.input.KEY.X); + * // map the right button click on the X key + * me.input.bindPointer(me.input.pointer.RIGHT, me.input.KEY.X); + */ +function bindPointer() { + let button = (arguments.length < 2) ? pointer.LEFT : arguments[0]; + let keyCode = (arguments.length < 2) ? arguments[0] : arguments[1]; + + // make sure the mouse is initialized + enablePointerEvent(); + + // throw an exception if no action is defined for the specified keycode + if (!getBindingKey(keyCode)) { + throw new Error("no action defined for keycode " + keyCode); + } + // map the mouse button to the keycode + pointer.bind[button] = keyCode; +} + +/** + * unbind the defined keycode + * @memberof input + * @param {number} [button=input.pointer.LEFT] - (accordingly to W3C values : 0,1,2 for left, middle and right buttons) + * @example + * me.input.unbindPointer(me.input.pointer.LEFT); + */ +function unbindPointer(button) { + // clear the event status + pointer.bind[ + typeof(button) === "undefined" ? + pointer.LEFT : button + ] = null; +} + + +/** + * allows registration of event listeners on the object target.
                            + * melonJS will pass a me.Pointer object to the defined callback. + * @see Pointer + * @see {@link http://www.w3.org/TR/pointerevents/#list-of-pointer-events|W3C Pointer Event list} + * @memberof input + * @param {string} eventType - The event type for which the object is registering
                            + * melonJS currently supports:
                            + *
                              + *
                            • "pointermove"
                            • + *
                            • "pointerdown"
                            • + *
                            • "pointerup"
                            • + *
                            • "pointerenter"
                            • + *
                            • "pointerover"
                            • + *
                            • "pointerleave"
                            • + *
                            • "pointercancel"
                            • + *
                            • "wheel"
                            • + *
                            + * @param {Rect|Polygon|Line|Ellipse} region - a shape representing the region to register on + * @param {Function} callback - methods to be called when the event occurs. + * Returning `false` from the defined callback will prevent the event to be propagated to other objects + * @example + * // onActivate function + * onActivateEvent: function () { + * // register on the 'pointerdown' event + * me.input.registerPointerEvent('pointerdown', this, (e) => this.pointerDown(e)); + * }, + * + * // pointerDown event callback + * pointerDown: function (pointer) { + * // do something + * .... + * // don"t propagate the event to other objects + * return false; + * }, + */ +function registerPointerEvent(eventType, region, callback) { + // make sure the mouse/touch events are initialized + enablePointerEvent(); + + if (pointerEventList.indexOf(eventType) === -1) { + throw new Error("invalid event type : " + eventType); + } + + if (typeof region === "undefined") { + throw new Error("registerPointerEvent: region for " + toString(region) + " event is undefined "); + } + + let eventTypes = findAllActiveEvents(activeEventList, pointerEventMap[eventType]); + + // register the event + if (!eventHandlers.has(region)) { + eventHandlers.set(region, { + region : region, + callbacks : {}, + pointerId : null + }); + } + + // allocate array if not defined + let handlers = eventHandlers.get(region); + for (let i = 0; i < eventTypes.length; i++) { + const eventType = eventTypes[i]; + if (handlers.callbacks[eventType]) { + handlers.callbacks[eventType].push(callback); + } else { + handlers.callbacks[eventType] = [callback]; + } + } +} + +/** + * allows the removal of event listeners from the object target. + * @see {@link http://www.w3.org/TR/pointerevents/#list-of-pointer-events|W3C Pointer Event list} + * @memberof input + * @param {string} eventType - The event type for which the object was registered. See {@link input.registerPointerEvent} + * @param {Rect|Polygon|Line|Ellipse} region - the registered region to release for this event + * @param {Function} [callback="all"] - if specified unregister the event only for the specific callback + * @example + * // release the registered region on the 'pointerdown' event + * me.input.releasePointerEvent('pointerdown', this); + */ +function releasePointerEvent(eventType, region, callback) { + if (pointerEventList.indexOf(eventType) === -1) { + throw new Error("invalid event type : " + eventType); + } + + // convert to supported event type if pointerEvent not natively supported + let eventTypes = findAllActiveEvents(activeEventList, pointerEventMap[eventType]); + + let handlers = eventHandlers.get(region); + if (typeof (handlers) !== "undefined") { + for (let i = 0; i < eventTypes.length; i++) { + const eventType = eventTypes[i]; + if (handlers.callbacks[eventType]) { + if (typeof (callback) !== "undefined") { + remove(handlers.callbacks[eventType], callback); + } else { + while (handlers.callbacks[eventType].length > 0) { + handlers.callbacks[eventType].pop(); + } + } + // free the array if empty + if (handlers.callbacks[eventType].length === 0) { + delete handlers.callbacks[eventType]; + } + } + } + if (Object.keys(handlers.callbacks).length === 0) { + eventHandlers.delete(region); + } + } +} + +/** + * allows the removal of all registered event listeners from the object target. + * @memberof input + * @param {Rect|Polygon|Line|Ellipse} region - the registered region to release event from + * @example + * // release all registered event on the + * me.input.releaseAllPointerEvents(this); + */ +function releaseAllPointerEvents(region) { + if (eventHandlers.has(region)) { + for (let i = 0; i < pointerEventList.length; i++) { + releasePointerEvent(pointerEventList[i], region); + } + } +} + +/** + * request for the pointer to be locked on the parent DOM element. + * (Must be called in a click event or an event that requires user interaction) + * @memberof input + * @returns {boolean} return true if the request was successfully submitted + * @example + * // register on the pointer lock change event + * event.on(event.POINTERLOCKCHANGE, (locked)=> { + * console.log("pointer lock: " + locked); + * }); + * // request for pointer lock + * me.input.requestPointerLock(); + */ +function requestPointerLock() { + if (hasPointerLockSupport) { + let element = game.getParentElement(); + element.requestPointerLock(); + return true; + } + return false; +} + +/** + * Initiates an exit from pointer lock state + * @memberof input + * @returns {boolean} return true if the request was successfully submitted + */ +function exitPointerLock() { + if (hasPointerLockSupport) { + globalThis.document.exitPointerLock(); + return true; + } + return false; +} + +// Analog deadzone +let deadzone = 0.1; + +/** + * Normalize axis values for wired Xbox 360 + * @ignore + */ +function wiredXbox360NormalizeFn(value, axis, button) { + if (button === this.GAMEPAD.BUTTONS.L2 || button === this.GAMEPAD.BUTTONS.R2) { + return (value + 1) / 2; + } + return value; +} + +/** + * Normalize axis values for OUYA + * @ignore + */ +function ouyaNormalizeFn(value, axis, button) { + if (value > 0) { + if (button === this.GAMEPAD.BUTTONS.L2) { + // L2 is wonky; seems like the deadzone is around 20000 + // (That's over 15% of the total range!) + value = Math.max(0, value - 20000) / 111070; + } + else { + // Normalize [1..65536] => [0.0..0.5] + value = (value - 1) / 131070; + } + } + else { + // Normalize [-65536..-1] => [0.5..1.0] + value = (65536 + value) / 131070 + 0.5; + } + + return value; +} + +// Match vendor and product codes for Firefox +const vendorProductRE = /^([0-9a-f]{1,4})-([0-9a-f]{1,4})-/i; + +// Match leading zeros +const leadingZeroRE = /^0+/; + +/** + * Firefox reports different ids for gamepads depending on the platform: + * - Windows: vendor and product codes contain leading zeroes + * - Mac: vendor and product codes are sparse (no leading zeroes) + * + * This function normalizes the id to support both formats + * @ignore + */ +function addMapping(id, mapping) { + const expanded_id = id.replace(vendorProductRE, (_, a, b) => + "000".slice(a.length - 1) + a + "-" + + "000".slice(b.length - 1) + b + "-" + ); + const sparse_id = id.replace(vendorProductRE, (_, a, b) => + a.replace(leadingZeroRE, "") + "-" + + b.replace(leadingZeroRE, "") + "-" + ); + + // Normalize optional parameters + mapping.analog = mapping.analog || mapping.buttons.map(() => -1); + mapping.normalize_fn = mapping.normalize_fn || function (value) { return value; }; + + remap.set(expanded_id, mapping); + remap.set(sparse_id, mapping); +} + +// binding list +let bindings = {}; + +// mapping list +let remap = new Map(); + +let updateEventHandler; + +// Default gamepad mappings +[ + // Firefox mappings + [ + "45e-28e-Xbox 360 Wired Controller", + { + "axes" : [ 0, 1, 3, 4 ], + "buttons" : [ 11, 12, 13, 14, 8, 9, -1, -1, 5, 4, 6, 7, 0, 1, 2, 3, 10 ], + "analog" : [ -1, -1, -1, -1, -1, -1, 2, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1 ], + "normalize_fn" : wiredXbox360NormalizeFn + } + ], + [ + "54c-268-PLAYSTATION(R)3 Controller", + { + "axes" : [ 0, 1, 2, 3 ], + "buttons" : [ 14, 13, 15, 12, 10, 11, 8, 9, 0, 3, 1, 2, 4, 6, 7, 5, 16 ] + } + ], + [ + "54c-5c4-Wireless Controller", // PS4 Controller + { + "axes" : [ 0, 1, 2, 3 ], + "buttons" : [ 1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 12, 13 ] + } + ], + [ + "2836-1-OUYA Game Controller", + { + "axes" : [ 0, 3, 7, 9 ], + "buttons" : [ 3, 6, 4, 5, 7, 8, 15, 16, -1, -1, 9, 10, 11, 12, 13, 14, -1 ], + "analog" : [ -1, -1, -1, -1, -1, -1, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1 ], + "normalize_fn" : ouyaNormalizeFn + } + ], + + // Chrome mappings + [ + "OUYA Game Controller (Vendor: 2836 Product: 0001)", + { + "axes" : [ 0, 1, 3, 4 ], + "buttons" : [ 0, 3, 1, 2, 4, 5, 12, 13, -1, -1, 6, 7, 8, 9, 10, 11, -1 ], + "analog" : [ -1, -1, -1, -1, -1, -1, 2, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1 ], + "normalize_fn" : ouyaNormalizeFn + } + ] +].forEach((value) => { + addMapping(value[0], value[1]); +}); + +/** + * Update gamepad status + * @ignore + */ +let updateGamepads = function () { + let gamepads = navigator.getGamepads(); + + // Trigger button bindings + Object.keys(bindings).forEach((index) => { + let gamepad = gamepads[index]; + if (!gamepad) { + return; + } + + let mapping = null; + if (gamepad.mapping !== "standard") { + mapping = remap.get(gamepad.id); + } + + let binding = bindings[index]; + + // Iterate all buttons that have active bindings + Object.keys(binding.buttons).forEach((button) => { + let last = binding.buttons[button]; + let mapped_button = button; + let mapped_axis = -1; + + // Remap buttons if necessary + if (mapping) { + mapped_button = mapping.buttons[button]; + mapped_axis = mapping.analog[button]; + if (mapped_button < 0 && mapped_axis < 0) { + // Button is not mapped + return; + } + } + + // Get mapped button + let current = gamepad.buttons[mapped_button] || {}; + + // Remap an axis to an analog button + if (mapping) { + if (mapped_axis >= 0) { + let value = mapping.normalize_fn(gamepad.axes[mapped_axis], -1, +button); + + // Create a new object, because GamepadButton is read-only + current = { + "value" : value, + "pressed" : current.pressed || (Math.abs(value) >= deadzone) + }; + } + } + + emit(GAMEPAD_UPDATE, index, "buttons", +button, current); + + // Edge detection + if (!last.pressed && current.pressed) { + triggerKeyEvent(last.keyCode, true, mapped_button + 256); + } + else if (last.pressed && !current.pressed) { + triggerKeyEvent(last.keyCode, false, mapped_button + 256); + } + + // Update last button state + last.value = current.value; + last.pressed = current.pressed; + }); + + // Iterate all axes that have active bindings + Object.keys(binding.axes).forEach((axis) => { + let last = binding.axes[axis]; + let mapped_axis = axis; + + // Remap buttons if necessary + if (mapping) { + mapped_axis = mapping.axes[axis]; + if (mapped_axis < 0) { + // axe is not mapped + return; + } + } + + // retrieve the current value and normalize if necessary + let value = gamepad.axes[mapped_axis]; + if (typeof(value) === "undefined") { + return; + } + if (mapping) { + value = mapping.normalize_fn(value, +axis, -1); + } + // normalize value into a [-1, 1] range value (treat 0 as positive) + let range = Math.sign(value) || 1; + if (last[range].keyCode === 0) { + return; + } + let pressed = (Math.abs(value) >= (deadzone + Math.abs(last[range].threshold))); + + emit(GAMEPAD_UPDATE, index, "axes", +axis, value); + + // Edge detection + if (!last[range].pressed && pressed) { + // Release the opposite direction, if necessary + if (last[-range].pressed) { + triggerKeyEvent(last[-range].keyCode, false, mapped_axis + 256); + last[-range].value = 0; + last[-range].pressed = false; + } + + triggerKeyEvent(last[range].keyCode, true, mapped_axis + 256); + } + else if ((last[range].pressed || last[-range].pressed) && !pressed) { + range = last[range].pressed ? range : -range; + triggerKeyEvent(last[range].keyCode, false, mapped_axis + 256); + } + + // Update last axis state + last[range].value = value; + last[range].pressed = pressed; + }); + }); +}; + +// gamepad connected callback +if (globalThis.navigator && typeof globalThis.navigator.getGamepads === "function") { + globalThis.addEventListener("gamepadconnected", (e) => { + emit(GAMEPAD_CONNECTED, e.gamepad); + }, false); + + /* + * gamepad disconnected callback + */ + globalThis.addEventListener("gamepaddisconnected", (e) => { + emit(GAMEPAD_DISCONNECTED, e.gamepad); + }, false); +} + +/* + * PUBLIC STUFF + */ + +/** + * Namespace for standard gamepad mapping constants + * @public + * @namespace GAMEPAD + * @memberof input + */ +let GAMEPAD = { + /** + * Standard gamepad mapping information for axes
                            + *
                              + *
                            • Left control stick: LX (horizontal), LY (vertical)
                            • + *
                            • Right control stick: RX (horizontal), RY (vertical)
                            • + *
                            • Extras: EXTRA_1, EXTRA_2, EXTRA_3, EXTRA_4
                            • + *
                            + * @public + * @name AXES + * @enum {number} + * @memberof input.GAMEPAD + * @see https://w3c.github.io/gamepad/#remapping + */ + "AXES" : { + "LX" : 0, + "LY" : 1, + "RX" : 2, + "RY" : 3, + "EXTRA_1" : 4, + "EXTRA_2" : 5, + "EXTRA_3" : 6, + "EXTRA_4" : 7 + }, + + /** + * Standard gamepad mapping information for buttons
                            + *
                              + *
                            • Face buttons: FACE_1, FACE_2, FACE_3, FACE_4
                            • + *
                            • D-Pad: UP, DOWN, LEFT, RIGHT
                            • + *
                            • Shoulder buttons: L1, L2, R1, R2
                            • + *
                            • Analog stick (clicks): L3, R3
                            • + *
                            • Navigation: SELECT (BACK), START (FORWARD), HOME
                            • + *
                            • Extras: EXTRA_1, EXTRA_2, EXTRA_3, EXTRA_4
                            • + *
                            + * @public + * @name BUTTONS + * @enum {number} + * @memberof input.GAMEPAD + * @see https://w3c.github.io/gamepad/#remapping + */ + "BUTTONS" : { + "FACE_1" : 0, + "FACE_2" : 1, + "FACE_3" : 2, + "FACE_4" : 3, + "L1" : 4, + "R1" : 5, + "L2" : 6, + "R2" : 7, + "SELECT" : 8, + "BACK" : 8, + "START" : 9, + "FORWARD" : 9, + "L3" : 10, + "R3" : 11, + "UP" : 12, + "DOWN" : 13, + "LEFT" : 14, + "RIGHT" : 15, + "HOME" : 16, + "EXTRA_1" : 17, + "EXTRA_2" : 18, + "EXTRA_3" : 19, + "EXTRA_4" : 20 + } +}; + +/** + * Associate a gamepad event to a keycode + * @name bindGamepad + * @memberof input + * @public + * @param {number} index - Gamepad index + * @param {object} button - Button/Axis definition + * @param {string} button.type - "buttons" or "axes" + * @param {number} button.code - button or axis code id (See {@link input.GAMEPAD.BUTTONS}, {@link input.GAMEPAD.AXES}) + * @param {number} [button.threshold=1] - value indicating when the axis should trigger the keycode (e.g. -0.5 or 0.5) + * @param {number} keyCode - (See {@link input.KEY}) + * @example + * // enable the keyboard + * me.input.bindKey(me.input.KEY.X, "shoot"); + * ... + * // map the lower face button on the first gamepad to the X key + * me.input.bindGamepad(0, {type:"buttons", code: me.input.GAMEPAD.BUTTONS.FACE_1}, me.input.KEY.X); + * // map the left axis value on the first gamepad to the LEFT key + * me.input.bindGamepad(0, {type:"axes", code: me.input.GAMEPAD.AXES.LX, threshold: -0.5}, me.input.KEY.LEFT); + */ +function bindGamepad(index, button, keyCode) { + // Throw an exception if no action is defined for the specified keycode + if (!getBindingKey(keyCode)) { + throw new Error("no action defined for keycode " + keyCode); + } + + // register to the the update event if not yet done and supported by the browser + // if not supported, the function will fail silently (-> update loop won't be called) + if (typeof updateEventHandler === "undefined" && typeof navigator.getGamepads === "function") { + updateEventHandler = on(GAME_BEFORE_UPDATE, updateGamepads); + } + + // Allocate bindings if not defined + if (!bindings[index]) { + bindings[index] = { + "axes" : {}, + "buttons" : {} + }; + } + + let mapping = { + "keyCode" : keyCode, + "value" : 0, + "pressed" : false, + "threshold" : button.threshold // can be undefined + }; + let binding = bindings[index][button.type]; + + // Map the gamepad button or axis to the keycode + if (button.type === "buttons") { + // buttons are defined by a `gamePadButton` object + binding[button.code] = mapping; + } else if (button.type === "axes") { + // normalize threshold into a value that can represent both side of the axis + let range = (Math.sign(button.threshold) || 1); + // axes are defined using two objects; one for negative and one for positive + if (!binding[button.code]) { + binding[button.code] = {}; + } + let axes = binding[button.code]; + axes[range] = mapping; + + // Ensure the opposite axis exists + if (!axes[-range]) { + axes[-range] = { + "keyCode" : 0, + "value" : 0, + "pressed" : false, + "threshold" : -range + }; + } + } +} + +/** + * unbind the defined keycode + * @name unbindGamepad + * @memberof input + * @public + * @param {number} index - Gamepad index + * @param {number} button - (See {@link input.GAMEPAD.BUTTONS}) + * @example + * me.input.unbindGamepad(0, me.input.GAMEPAD.BUTTONS.FACE_1); + */ +function unbindGamepad(index, button) { + if (!bindings[index]) { + throw new Error("no bindings for gamepad " + index); + } + bindings[index].buttons[button] = {}; +} + +/** + * Set deadzone for analog gamepad inputs
                            + * The default deadzone is 0.1 (10%) Analog values less than this will be ignored + * @name setGamepadDeadzone + * @memberof input + * @public + * @param {number} value - Deadzone value + */ +function setGamepadDeadzone(value) { + deadzone = value; +} + +/** + * specify a custom mapping for a specific gamepad id
                            + * see below for the default mapping :
                            + *

                            + * @name setGamepadMapping + * @memberof input + * @public + * @param {string} id - Gamepad id string + * @param {object} mapping - A hash table + * @param {number[]} mapping.axes - Standard analog control stick axis locations + * @param {number[]} mapping.buttons - Standard digital button locations + * @param {number[]} [mapping.analog] - Analog axis locations for buttons + * @param {Function} [mapping.normalize_fn] - a function that returns a normalized value in range [-1.0..1.0] for the given value, axis and button + * @example + * // A weird controller that has its axis mappings reversed + * me.input.setGamepadMapping("Generic USB Controller", { + * "axes" : [ 3, 2, 1, 0 ], + * "buttons" : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ] + * }); + * + * // Mapping extra axes to analog buttons + * me.input.setGamepadMapping("Generic Analog Controller", { + * "axes" : [ 0, 1, 2, 3 ], + * "buttons" : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ], + * + * // Raw axis 4 is mapped to GAMEPAD.BUTTONS.FACE_1 + * // Raw axis 5 is mapped to GAMEPAD.BUTTONS.FACE_2 + * // etc... + * // Also maps left and right triggers + * "analog" : [ 4, 5, 6, 7, -1, -1, 8, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1 ], + * + * // Normalize the value of button L2: [-1.0..1.0] => [0.0..1.0] + * "normalize_fn" : function (value, axis, button) { + * return ((button === me.input.GAMEPAD.BUTTONS.L2) ? ((value + 1) / 2) : value) || 0; + * } + * }); + */ +let setGamepadMapping = addMapping; + +/** + * @namespace input + */ + +/** + * specify if melonJS should prevent all default browser action on registered events. + * @public + * @type {boolean} + * @default true + * @name preventDefault + * @memberof input + */ +let preventDefault = true; + +var input = { + __proto__: null, + GAMEPAD: GAMEPAD, + KEY: KEY, + bindGamepad: bindGamepad, + bindKey: bindKey, + bindPointer: bindPointer, + exitPointerLock: exitPointerLock, + getBindingKey: getBindingKey, + globalToLocal: globalToLocal, + hasActiveEvents: hasActiveEvents, + hasRegisteredEvents: hasRegisteredEvents, + initKeyboardEvent: initKeyboardEvent, + isKeyPressed: isKeyPressed, + get keyBoardEventTarget () { return keyBoardEventTarget; }, + keyStatus: keyStatus, + get locked () { return locked; }, + pointer: pointer, + get pointerEventTarget () { return pointerEventTarget; }, + preventDefault: preventDefault, + registerPointerEvent: registerPointerEvent, + releaseAllPointerEvents: releaseAllPointerEvents, + releasePointerEvent: releasePointerEvent, + requestPointerLock: requestPointerLock, + setGamepadDeadzone: setGamepadDeadzone, + setGamepadMapping: setGamepadMapping, + setTouchAction: setTouchAction, + get throttlingInterval () { return throttlingInterval; }, + triggerKeyEvent: triggerKeyEvent, + unbindGamepad: unbindGamepad, + unbindKey: unbindKey, + unbindPointer: unbindPointer, + unlockKey: unlockKey +}; + +/** + * @classdesc + * A base class for renderable objects. + * @augments Rect + */ +class Renderable extends Rect { + /** + * @param {number} x - position of the renderable object (accessible through inherited pos.x property) + * @param {number} y - position of the renderable object (accessible through inherited pos.y property) + * @param {number} width - object width + * @param {number} height - object height + */ + constructor(x, y, width, height) { + + // parent constructor + super(x, y, width, height); + + if (this.pos instanceof ObservableVector3d) { + this.pos.setMuted(x, y, 0).setCallback(this.updateBoundsPos, this); + } else { + /** + * Position of the Renderable relative to its parent container + * @public + * @type {ObservableVector3d} + */ + this.pos = pool.pull("ObservableVector3d", x, y, 0, { onUpdate: this.updateBoundsPos, scope: this}); + } + + if (this.anchorPoint instanceof ObservableVector2d) { + this.anchorPoint.setMuted(0.5, 0.5).setCallback(this.onAnchorUpdate, this); + } else { + /** + * The anchor point is used for attachment behavior, and/or when applying transformations.
                            + * The coordinate system places the origin at the top left corner of the frame (0, 0) and (1, 1) means the bottom-right corner
                            + *
                            + * a Renderable's anchor point defaults to (0.5,0.5), which corresponds to the center position.
                            + *
                            + * Note: Object created through Tiled will have their anchorPoint set to (0, 0) to match Tiled Level editor implementation. + * To specify a value through Tiled, use a json expression like `json:{"x":0.5,"y":0.5}`. + * @type {ObservableVector2d} + * @default <0.5,0.5> + */ + this.anchorPoint = pool.pull("ObservableVector2d", 0.5, 0.5, { onUpdate: this.onAnchorUpdate, scope: this }); + } + + if (typeof this.currentTransform === "undefined") { + /** + * the renderable default transformation matrix + * @type {Matrix2d} + */ + this.currentTransform = pool.pull("Matrix2d"); + } + this.currentTransform.identity(); + + /** + * the renderable physic body + * @type {Body} + * @example + * // define a new Player Class + * class PlayerEntity extends me.Sprite { + * // constructor + * constructor(x, y, settings) { + * // call the parent constructor + * super(x, y , settings); + * + * // define a basic walking animation + * this.addAnimation("walk", [...]); + * // define a standing animation (using the first frame) + * this.addAnimation("stand", [...]); + * // set the standing animation as default + * this.setCurrentAnimation("stand"); + * + * // add a physic body + * this.body = new me.Body(this); + * // add a default collision shape + * this.body.addShape(new me.Rect(0, 0, this.width, this.height)); + * // configure max speed, friction, and initial force to be applied + * this.body.setMaxVelocity(3, 15); + * this.body.setFriction(0.4, 0); + * this.body.force.set(3, 0); + * this.isKinematic = false; + * + * // set the display to follow our position on both axis + * me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH); + * } + * + * ... + * + * } + */ + this.body = undefined; + + /** + * (G)ame (U)nique (Id)entifier"
                            + * a GUID will be allocated for any renderable object added
                            + * to an object container (including the `me.game.world` container) + * @type {string} + */ + this.GUID = undefined; + + /** + * an event handler that is called when the renderable leave or enter a camera viewport + * @type {Function} + * @default undefined + * @example + * this.onVisibilityChange = function(inViewport) { + * if (inViewport === true) { + * console.log("object has entered the in a camera viewport!"); + * } + * }; + */ + this.onVisibilityChange = undefined; + + /** + * Whether the renderable object will always update, even when outside of the viewport
                            + * @type {boolean} + * @default false + */ + this.alwaysUpdate = false; + + /** + * Whether to update this object when the game is paused. + * @type {boolean} + * @default false + */ + this.updateWhenPaused = false; + + /** + * make the renderable object persistent over level changes
                            + * @type {boolean} + * @default false + */ + this.isPersistent = false; + + /** + * If true, this renderable will be rendered using screen coordinates, + * as opposed to world coordinates. Use this, for example, to define UI elements. + * @type {boolean} + * @default false + */ + this.floating = false; + + /** + * When enabled, an object container will automatically apply + * any defined transformation before calling the child draw method. + * @type {boolean} + * @default true + * @example + * // enable "automatic" transformation when the object is activated + * onActivateEvent: function () { + * // reset the transformation matrix + * this.currentTransform.identity(); + * // ensure the anchor point is the renderable center + * this.anchorPoint.set(0.5, 0.5); + * // enable auto transform + * this.autoTransform = true; + * .... + * } + */ + this.autoTransform = true; + + /** + * Define the renderable opacity
                            + * Set to zero if you do not wish an object to be drawn + * @see Renderable#setOpacity + * @see Renderable#getOpacity + * @type {number} + * @default 1.0 + */ + this.alpha = 1.0; + + /** + * a reference to the parent object that contains this renderable + * @type {Container|Entity} + * @default undefined + */ + this.ancestor = undefined; + + /** + * A mask limits rendering elements to the shape and position of the given mask object. + * So, if the renderable is larger than the mask, only the intersecting part of the renderable will be visible. + * @type {Rect|RoundRect|Polygon|Line|Ellipse} + * @default undefined + * @example + * // apply a mask in the shape of a Star + * myNPCSprite.mask = new me.Polygon(myNPCSprite.width / 2, 0, [ + * // draw a star + * {x: 0, y: 0}, + * {x: 14, y: 30}, + * {x: 47, y: 35}, + * {x: 23, y: 57}, + * {x: 44, y: 90}, + * {x: 0, y: 62}, + * {x: -44, y: 90}, + * {x: -23, y: 57}, + * {x: -47, y: 35}, + * {x: -14, y: 30} + * ]); + */ + this.mask = undefined; + + /** + * (Experimental) an optional shader, to be used instead of the default built-in one, when drawing this renderable (WebGL only) + * @type {GLShader} + * @default undefined + */ + this.shader = undefined; + + /** + * the blend mode to be applied to this renderable (see renderer setBlendMode for available blend mode) + * @type {string} + * @default "normal" + * @see CanvasRenderer#setBlendMode + * @see WebGLRenderer#setBlendMode + */ + this.blendMode = "normal"; + + /** + * The name of the renderable + * @type {string} + * @default "" + */ + this.name = ""; + + /** + * to identify the object as a renderable object + * @ignore + */ + this.isRenderable = true; + + /** + * If true then physic collision and input events will not impact this renderable + * @type {boolean} + * @default true + */ + this.isKinematic = true; + + /** + * when true the renderable will be redrawn during the next update cycle + * @type {boolean} + * @default true + */ + this.isDirty = true; + + // keep track of when we flip + this._flip = { + x : false, + y : false + }; + + // viewport flag + this._inViewport = false; + + // cache value for the parentApp + this._parentApp = undefined; + + // renderable cache tint value used by the getter/setter + this._tint = pool.pull("Color", 255, 255, 255, 1.0); + + // ensure it's fully opaque by default + this.setOpacity(1.0); + } + + /** + * returns the parent application (or game) to which this renderable is attached to + * @return {Application} the parent application or undefined if not attached to any container/app + */ + get parentApp() { + if (typeof this._parentApp === "undefined") { + if (typeof this.ancestor !== "undefined" && typeof this.ancestor.getRootAncestor === "function") { + // the `app` property is only defined in the world "root" container + this._parentApp = this.ancestor.getRootAncestor().app; + } + } + return this._parentApp; + } + + /** + * Whether the renderable object is floating (i.e. used screen coordinates), or contained in a floating parent container + * @see Renderable#floating + * @type {boolean} + */ + get isFloating() { + return this.floating === true || (typeof this.ancestor !== "undefined" && this.ancestor.isFloating === true); + } + + /** + * define a tint for this renderable. a (255, 255, 255) r, g, b value will remove the tint effect. + * @type {Color} + * @default (255, 255, 255) + * @example + * // add a red tint to this renderable + * this.tint.setColor(255, 128, 128); + * // remove the tint + * this.tint.setColor(255, 255, 255); + */ + get tint() { + return this._tint; + } + set tint(value) { + this._tint.copy(value); + this.isDirty = true; + } + + /** + * the depth of this renderable on the z axis + * @type {number} + */ + get depth() { + return this.pos.z; + } + set depth(value) { + this.pos.z = value; + this.isDirty = true; + } + + /** + * Whether the renderable object is visible and within the viewport + * @type {boolean} + * @default false + */ + get inViewport() { + return this._inViewport; + } + set inViewport(value) { + if (this._inViewport !== value) { + this._inViewport = value; + if (typeof this.onVisibilityChange === "function") { + this.onVisibilityChange.call(this, value); + } + } + } + + /** + * returns true if this renderable is flipped on the horizontal axis + * @public + * @see Renderable#flipX + * @type {boolean} + */ + get isFlippedX() { + return this._flip.x === true; + } + + /** + * returns true if this renderable is flipped on the vertical axis + * @public + * @see Renderable#flipY + * @type {boolean} + */ + get isFlippedY() { + return this._flip.y === true; + } + + /** + * returns the bounding box for this renderable + * @returns {Bounds} bounding box Rectangle object + */ + getBounds() { + if (typeof this._bounds === "undefined") { + super.getBounds(); + if (this.isFinite()) { + this.updateBounds(); + } else { + // e.g. containers or game world can have infinite size + this._bounds.setMinMax(this.pos.x, this.pos.y, this.width, this.height); + } + + } + return this._bounds; + } + + /** + * get the renderable alpha channel value
                            + * @returns {number} current opacity value between 0 and 1 + */ + getOpacity() { + return this.alpha; + } + + /** + * set the renderable alpha channel value
                            + * @param {number} alpha - opacity value between 0.0 and 1.0 + */ + setOpacity(alpha) { + if (typeof (alpha) === "number") { + this.alpha = clamp(alpha, 0.0, 1.0); + // Set to 1 if alpha is NaN + if (isNaN(this.alpha)) { + this.alpha = 1.0; + } + this.isDirty = true; + } + } + + /** + * flip the renderable on the horizontal axis (around the center of the renderable) + * @see Matrix2d#scaleX + * @param {boolean} [flip=true] - `true` to flip this renderable. + * @returns {Renderable} Reference to this object for method chaining + */ + flipX(flip = true) { + this._flip.x = !!flip; + this.isDirty = true; + return this; + } + + /** + * flip the renderable on the vertical axis (around the center of the renderable) + * @see Matrix2d#scaleY + * @param {boolean} [flip=true] - `true` to flip this renderable. + * @returns {Renderable} Reference to this object for method chaining + */ + flipY(flip = true) { + this._flip.y = !!flip; + this.isDirty = true; + return this; + } + + /** + * multiply the renderable currentTransform with the given matrix + * @see Renderable#currentTransform + * @param {Matrix2d} m - the transformation matrix + * @returns {Renderable} Reference to this object for method chaining + */ + transform(m) { + this.currentTransform.multiply(m); + this.updateBounds(); + this.isDirty = true; + return this; + } + + /** + * return the angle to the specified target + * @param {Renderable|Vector2d|Vector3d} target + * @returns {number} angle in radians + */ + angleTo(target) { + let a = this.getBounds(); + let ax, ay; + + if (target instanceof Renderable) { + let b = target.getBounds(); + ax = b.centerX - a.centerX; + ay = b.centerY - a.centerY; + } else { // vector object + ax = target.x - a.centerX; + ay = target.y - a.centerY; + } + + return Math.atan2(ay, ax); + } + + /** + * return the distance to the specified target + * @param {Renderable|Vector2d|Vector3d} target + * @returns {number} distance + */ + distanceTo(target) { + let a = this.getBounds(); + let dx, dy; + + if (target instanceof Renderable) { + let b = target.getBounds(); + dx = a.centerX - b.centerX; + dy = a.centerY - b.centerY; + } else { // vector object + dx = a.centerX - target.x; + dy = a.centerY - target.y; + } + + return Math.sqrt(dx * dx + dy * dy); + } + + /** + * Rotate this renderable towards the given target. + * @param {Renderable|Vector2d|Vector3d} target - the renderable or position to look at + * @returns {Renderable} Reference to this object for method chaining + */ + lookAt(target) { + let position; + + if (target instanceof Renderable) { + position = target.pos; + } else { + position = target; + } + + let angle = this.angleTo(position); + + this.rotate(angle); + + return this; + } + + /** + * Rotate this renderable by the specified angle (in radians). + * @param {number} angle - The angle to rotate (in radians) + * @param {Vector2d|ObservableVector2d} [v] - an optional point to rotate around + * @returns {Renderable} Reference to this object for method chaining + */ + rotate(angle, v) { + if (angle !== 0) { + this.currentTransform.rotate(angle, v); + this.updateBounds(); + this.isDirty = true; + } + return this; + } + + /** + * scale the renderable around his anchor point. Scaling actually applies changes + * to the currentTransform member wich is used by the renderer to scale the object + * when rendering. It does not scale the object itself. For example if the renderable + * is an image, the image.width and image.height properties are unaltered but the currentTransform + * member will be changed. + * @param {number} x - a number representing the abscissa of the scaling vector. + * @param {number} [y=x] - a number representing the ordinate of the scaling vector. + * @returns {Renderable} Reference to this object for method chaining + */ + scale(x, y = x) { + this.currentTransform.scale(x, y); + this.updateBounds(); + this.isDirty = true; + return this; + } + + /** + * scale the renderable around his anchor point + * @param {Vector2d} v - scaling vector + * @returns {Renderable} Reference to this object for method chaining + */ + scaleV(v) { + this.scale(v.x, v.y); + return this; + } + + /** + * update function (automatically called by melonJS). + * @param {number} dt - time since the last update in milliseconds. + * @returns {boolean} true if the renderable is dirty + */ + update(dt) { // eslint-disable-line no-unused-vars + return this.isDirty; + } + + /** + * update the bounding box for this shape. + * @param {boolean} [absolute=true] - update the bounds size and position in (world) absolute coordinates + * @returns {Bounds} this shape bounding box Rectangle object + */ + updateBounds(absolute = true) { + if (this.isRenderable) { + let bounds = this.getBounds(); + + bounds.clear(); + + if ((this.autoTransform === true) && (!this.currentTransform.isIdentity())) { + // temporarly translate the matrix based on the anchor point + this.currentTransform.translate( + -this.width * this.anchorPoint.x, + -this.height * this.anchorPoint.y + ); + bounds.addFrame( + 0, + 0, + this.width, + this.height, + this.currentTransform + ); + this.currentTransform.translate( + this.width * this.anchorPoint.x, + this.height * this.anchorPoint.y + ); + } else { + bounds.addFrame( + 0, + 0, + this.width, + this.height + ); + // translate the bounds based on the anchor point + bounds.translate( + -this.width * this.anchorPoint.x, + -this.height * this.anchorPoint.y + ); + } + + if (absolute === true) { + let absPos = this.getAbsolutePosition(); + bounds.centerOn(absPos.x + bounds.x + bounds.width / 2, absPos.y + bounds.y + bounds.height / 2); + } + return bounds; + + } else { + // manage the case where updateBounds is called + // before the object being yet properly initialized + return super.updateBounds(absolute); + } + } + + /** + * update the renderable's bounding rect (private) + * @ignore + */ + updateBoundsPos(newX = this.pos.x, newY = this.pos.y) { + this.getBounds().translate(newX - this.pos.x, newY - this.pos.y); + } + + /** + * return the renderable absolute position in the game world + * @returns {Vector2d} + */ + getAbsolutePosition() { + if (typeof this._absPos === "undefined") { + this._absPos = pool.pull("Vector2d"); + } + // XXX Cache me or something + this._absPos.set(this.pos.x, this.pos.y); + if (typeof this.ancestor !== "undefined" && typeof this.ancestor.getAbsolutePosition === "function" && this.floating !== true) { + this._absPos.add(this.ancestor.getAbsolutePosition()); + } + return this._absPos; + } + + /** + * called when the anchor point value is changed + * @private + * @param {number} x - the new X value to be set for the anchor + * @param {number} y - the new Y value to be set for the anchor + */ + onAnchorUpdate(x, y) { + // since the callback is called before setting the new value + // manually update the anchor point (required for updateBoundsPos) + this.anchorPoint.setMuted(x, y); + // then call updateBounds + this.updateBounds(); + this.isDirty = true; + } + + /** + * Prepare the rendering context before drawing (automatically called by melonJS). + * This will apply any defined transforms, anchor point, tint or blend mode and translate the context accordingly to this renderable position. + * @see Renderable#draw + * @see Renderable#postDraw + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer object + */ + preDraw(renderer) { + let ax = this.width * this.anchorPoint.x, + ay = this.height * this.anchorPoint.y; + + // save renderer context + renderer.save(); + + // apply the defined alpha value + renderer.setGlobalAlpha(renderer.globalAlpha() * this.getOpacity()); + + // apply flip + if (this._flip.x || this._flip.y) { + var dx = this._flip.x ? this.centerX - ax : 0, + dy = this._flip.y ? this.centerY - ay : 0; + + renderer.translate(dx, dy); + renderer.scale(this._flip.x ? -1 : 1, this._flip.y ? -1 : 1); + renderer.translate(-dx, -dy); + } + + // apply stencil mask if defined + if (typeof this.mask !== "undefined") { + renderer.translate(this.pos.x, this.pos.y); + renderer.setMask(this.mask); + renderer.translate(-this.pos.x, -this.pos.y); + } + + // use this renderable shader if defined + if (typeof this.shader === "object" && typeof renderer.gl !== "undefined") { + renderer.customShader = this.shader; + } + + if ((this.autoTransform === true) && (!this.currentTransform.isIdentity())) { + // apply the renderable transformation matrix + renderer.translate(this.pos.x, this.pos.y); + renderer.transform(this.currentTransform); + renderer.translate(-this.pos.x, -this.pos.y); + } + + // offset by the anchor point + renderer.translate(-ax, -ay); + + // apply the current tint and opacity + renderer.setTint(this.tint, this.getOpacity()); + + // apply blending if different from "normal" + if (this.blendMode !== renderer.getBlendMode()) { + renderer.setBlendMode(this.blendMode); + } + } + + /** + * Draw this renderable (automatically called by melonJS). + * All draw operations for renderable are made respectively + * to the position or transforms set or applied by the preDraw method. + * The main draw loop will first call preDraw() to prepare the context for drawing the renderable, + * then draw() to draw the renderable, and finally postDraw() to clear the context. + * If you override this method, be mindful about the drawing logic; for example if you draw a shape + * from the draw method, you should make sure that your draw it at the 0, 0 coordinates. + * @see Renderable#preDraw + * @see Renderable#postDraw + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance + * @param {Camera2d} [viewport] - the viewport to (re)draw + */ + draw(renderer, viewport) { // eslint-disable-line no-unused-vars + // empty one ! + } + + /** + * restore the rendering context after drawing (automatically called by melonJS). + * @see Renderable#preDraw + * @see Renderable#draw + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer object + */ + postDraw(renderer) { + // remove the previously applied tint + renderer.clearTint(); + + // clear the mask if set + if (typeof this.mask !== "undefined") { + renderer.clearMask(); + } + + // revert to the default shader if defined + if (typeof this.shader === "object" && typeof renderer.gl !== "undefined") { + renderer.customShader = undefined; + //renderer.setCompositor("quad"); + } + + // restore the context + renderer.restore(); + + // reset the dirty flag + this.isDirty = false; + } + + /** + * onCollision callback, triggered in case of collision, + * when this renderable body is colliding with another one + * @param {ResponseObject} response - the collision response object + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} other - the other renderable touching this one (a reference to response.a or response.b) + * @returns {boolean} true if the object should respond to the collision (its position and velocity will be corrected) + * @example + * // colision handler + * onCollision(response) { + * if (response.b.body.collisionType === me.collision.types.ENEMY_OBJECT) { + * // makes the other object solid, by substracting the overlap vector to the current position + * this.pos.sub(response.overlapV); + * this.hurt(); + * // not solid + * return false; + * } + * // Make the object solid + * return true; + * }, + */ + onCollision(response, other) { // eslint-disable-line no-unused-vars + return false; + } + + /** + * Destroy function
                            + * @ignore + */ + destroy() { + // allow recycling object properties + pool.push(this.currentTransform); + this.currentTransform = undefined; + + pool.push(this.anchorPoint); + this.anchorPoint = undefined; + + pool.push(this.pos); + this.pos = undefined; + + if (typeof this._absPos !== "undefined") { + pool.push(this._absPos); + this._absPos = undefined; + } + + pool.push(this._bounds); + this._bounds = undefined; + + this.onVisibilityChange = undefined; + + if (typeof this.mask !== "undefined") { + pool.push(this.mask); + this.mask = undefined; + } + + if (typeof this._tint !== "undefined") { + pool.push(this._tint); + this._tint = undefined; + } + + this.ancestor = undefined; + this._parentApp = undefined; + + // destroy the physic body if defined and is a builtin body object + if ((typeof this.body !== "undefined") && (typeof this.body.destroy === "function")) { + this.body.destroy.apply(this.body, arguments); + this.body = undefined; + } + + // release all registered events + releaseAllPointerEvents(this); + + // call the user defined destroy method + this.onDestroyEvent.apply(this, arguments); + + // destroy any shader object if not done by the user through onDestroyEvent() + if (typeof this.shader === "object") { + this.shader.destroy(); + this.shader = undefined; + } + } + + /** + * OnDestroy Notification function
                            + * Called by engine before deleting the object + */ + onDestroyEvent() { + // to be extended ! + } + +} + +// some ref shortcut +const MIN = Math.min, MAX = Math.max; + +let targetV = new Vector2d(); + +/** + * @classdesc + * a 2D orthographic camera + * @augments Renderable + */ +class Camera2d extends Renderable { + /** + * @param {number} minX - start x offset + * @param {number} minY - start y offset + * @param {number} maxX - end x offset + * @param {number} maxY - end y offset + */ + constructor(minX, minY, maxX, maxY) { + super(minX, minY, maxX - minX, maxY - minY); + + /** + * Axis definition + * @enum {number} + * @property {number} NONE no axis + * @property {number} HORIZONTAL horizontal axis only + * @property {number} VERTICAL vertical axis only + * @property {number} BOTH both axis + * @readonly + * @name AXIS + * @memberof Camera2d + */ + this.AXIS = { + NONE : 0, + HORIZONTAL : 1, + VERTICAL : 2, + BOTH : 3 + }; + + /** + * Camera bounds + * @public + * @type {Bounds} + * @name bounds + * @memberof Camera2d + */ + this.bounds = pool.pull("Bounds"); + + /** + * enable or disable damping + * @private + * @default true + */ + this.smoothFollow = true; + + /** + * Camera damping for smooth transition [0 .. 1]. + * 1 being the maximum value and will snap the camera to the target position + * @public + * @type {number} + * @name damping + * @default 1.0 + * @memberof Camera2d + */ + this.damping = 1.0; + + /** + * the closest point relative to the camera + * @public + * @type {number} + * @name near + * @default -1000 + * @memberof Camera2d + */ + this.near = -1000; + + /** + * the furthest point relative to the camera. + * @public + * @type {number} + * @name far + * @default 1000 + * @memberof Camera2d + */ + this.far = 1000; + + /** + * the default camera projection matrix + * (2d cameras use an orthographic projection by default). + * @public + * @type {Matrix3d} + * @name projectionMatrix + * @memberof Camera2d + */ + this.projectionMatrix = new Matrix3d(); + + /** + * the invert camera transform used to unproject points + * @ignore + * @type {Matrix2d} + * @name invCurrentTransform + * @memberof Camera2d + */ + this.invCurrentTransform = new Matrix2d(); + + // offset for shake effect + this.offset = new Vector2d(); + + // target to follow + this.target = null; + + // default value follow + this.follow_axis = this.AXIS.NONE; + + // shake variables + this._shake = { + intensity : 0, + duration : 0, + axis : this.AXIS.BOTH, + onComplete : null + }; + + // flash variables + this._fadeOut = { + color : null, + tween : null + }; + // fade variables + this._fadeIn = { + color : null, + tween : null + }; + + // default camera name + this.name = "default"; + + // set a default deadzone + this.setDeadzone(this.width / 6, this.height / 6); + + // for backward "compatiblity" (in terms of behavior) + this.anchorPoint.set(0, 0); + + // enable event detection on the camera + this.isKinematic = false; + + this.bounds.setMinMax(minX, minY, maxX, maxY); + + // update the projection matrix + this._updateProjectionMatrix(); + + // subscribe to the game reset event + on(GAME_RESET, this.reset, this); + // subscribe to the canvas resize event + on(CANVAS_ONRESIZE, this.resize, this); + } + + // -- some private function --- + + /** @ignore */ + // update the projection matrix based on the projection frame (a rectangle) + _updateProjectionMatrix() { + this.projectionMatrix.ortho(0, this.width, this.height, 0, this.near, this.far); + } + + /** @ignore */ + _followH(target) { + let targetX = this.pos.x; + if ((target.x - this.pos.x) > (this.deadzone.right)) { + targetX = MIN((target.x) - (this.deadzone.right), this.bounds.width - this.width); + } + else if ((target.x - this.pos.x) < (this.deadzone.pos.x)) { + targetX = MAX((target.x) - this.deadzone.pos.x, this.bounds.left); + } + return targetX; + + } + + /** @ignore */ + _followV(target) { + let targetY = this.pos.y; + if ((target.y - this.pos.y) > (this.deadzone.bottom)) { + targetY = MIN((target.y) - (this.deadzone.bottom), this.bounds.height - this.height); + } + else if ((target.y - this.pos.y) < (this.deadzone.pos.y)) { + targetY = MAX((target.y) - this.deadzone.pos.y, this.bounds.top); + } + return targetY; + } + + // -- public function --- + + /** + * reset the camera position to specified coordinates + * @name reset + * @memberof Camera2d + * @param {number} [x=0] - initial position of the camera on the x axis + * @param {number} [y=0] - initial position of the camera on the y axis + */ + reset(x = 0, y = 0) { + // reset the initial camera position to 0,0 + this.pos.x = x; + this.pos.y = y; + + // reset the target + this.unfollow(); + + // damping default value + this.smoothFollow = true; + this.damping = 1.0; + + // reset the transformation matrix + this.currentTransform.identity(); + this.invCurrentTransform.identity().invert(); + + // update the projection matrix + this._updateProjectionMatrix(); + } + + /** + * change the deadzone settings. + * the "deadzone" defines an area within the current camera in which + * the followed renderable can move without scrolling the camera. + * @name setDeadzone + * @see Camera2d.follow + * @memberof Camera2d + * @param {number} w - deadzone width + * @param {number} h - deadzone height + */ + setDeadzone(w, h) { + if (typeof(this.deadzone) === "undefined") { + this.deadzone = new Rect(0, 0, 0, 0); + } + + // reusing the old code for now... + this.deadzone.pos.set( + ~~((this.width - w) / 2), + ~~((this.height - h) / 2 - h * 0.25) + ); + this.deadzone.resize(w, h); + + this.smoothFollow = false; + + // force a camera update + this.updateTarget(); + + this.smoothFollow = true; + } + + /** + * resize the camera + * @name resize + * @memberof Camera2d + * @param {number} w - new width of the camera + * @param {number} h - new height of the camera + * @returns {Camera2d} this camera + */ + resize(w, h) { + // parent consctructor, resize camera rect + super.resize(w, h); + + // disable damping while resizing + this.smoothFollow = false; + + // reset everything + this.setBounds(0, 0, w, h); + this.setDeadzone(w / 6, h / 6); + this.update(); + this.smoothFollow = true; + + // update the projection matrix + this._updateProjectionMatrix(); + + // publish the viewport resize event + emit(VIEWPORT_ONRESIZE, this.width, this.height, this); + + return this; + } + + /** + * set the camera boundaries (set to the world limit by default). + * the camera is bound to the given coordinates and cannot move/be scrolled outside of it. + * @name setBounds + * @memberof Camera2d + * @param {number} x - world left limit + * @param {number} y - world top limit + * @param {number} w - world width limit + * @param {number} h - world height limit + */ + setBounds(x, y, w, h) { + this.smoothFollow = false; + this.bounds.setMinMax(x, y, w + x, h + y); + this.moveTo(this.pos.x, this.pos.y); + this.update(); + this.smoothFollow = true; + } + + /** + * set the camera to follow the specified renderable.
                            + * (this will put the camera center around the given target) + * @name follow + * @memberof Camera2d + * @param {Renderable|Vector2d} target - renderable or position vector to follow + * @param {number} [axis=me.game.viewport.AXIS.BOTH] - Which axis to follow (see {@link Camera2d.AXIS}) + * @param {number} [damping=1] - default damping value + * @example + * // set the camera to follow this renderable on both axis, and enable damping + * me.game.viewport.follow(this, me.game.viewport.AXIS.BOTH, 0.1); + */ + follow(target, axis, damping) { + if (target instanceof Renderable) { + this.target = target.pos; + } + else if ((target instanceof Vector2d) || (target instanceof Vector3d) || + (target instanceof ObservableVector2d) || (target instanceof ObservableVector3d)) { + this.target = target; + } + else { + throw new Error("invalid target for me.Camera2d.follow"); + } + // if axis is null, camera is moved on target center + this.follow_axis = ( + typeof(axis) === "undefined" ? this.AXIS.BOTH : axis + ); + + this.smoothFollow = false; + + if (typeof damping !== "number") { + this.damping = 1; + } else { + this.damping = clamp(damping, 0.0, 1.0); + } + + // force a camera update + this.updateTarget(); + + this.smoothFollow = true; + } + + /** + * unfollow the current target + * @name unfollow + * @memberof Camera2d + */ + unfollow() { + this.target = null; + this.follow_axis = this.AXIS.NONE; + } + + /** + * move the camera upper-left position by the specified offset. + * @name move + * @memberof Camera2d + * @see Camera2d.focusOn + * @param {number} x - horizontal offset + * @param {number} y - vertical offset + * @example + * // Move the camera up by four pixels + * me.game.viewport.move(0, -4); + */ + move(x, y) { + this.moveTo(this.pos.x + x, this.pos.y + y); + } + + /** + * move the camera upper-left position to the specified coordinates + * @name moveTo + * @memberof Camera2d + * @see Camera2d.focusOn + * @param {number} x + * @param {number} y + */ + moveTo(x, y) { + let _x = this.pos.x; + let _y = this.pos.y; + + this.pos.x = clamp( + x, + this.bounds.left, + this.bounds.width + ); + this.pos.y = clamp( + y, + this.bounds.top, + this.bounds.height + ); + + //publish the VIEWPORT_ONCHANGE event if necessary + if (_x !== this.pos.x || _y !== this.pos.y) { + this.isDirty = true; + } + } + + /** @ignore */ + updateTarget() { + if (this.target) { + + targetV.setV(this.pos); + + switch (this.follow_axis) { + case this.AXIS.NONE: + //this.focusOn(this.target); + break; + + case this.AXIS.HORIZONTAL: + targetV.x = this._followH(this.target); + break; + + case this.AXIS.VERTICAL: + targetV.y = this._followV(this.target); + break; + + case this.AXIS.BOTH: + targetV.x = this._followH(this.target); + targetV.y = this._followV(this.target); + break; + + default: + break; + } + + if (!this.pos.equals(targetV)) { + // update the camera position + if (this.smoothFollow === true && this.damping < 1.0) { + // account for floating precision and check if we are close "enough" + if (toBeCloseTo(targetV.x, this.pos.x, 2) && + toBeCloseTo(targetV.y, this.pos.y, 2)) { + this.pos.setV(targetV); + return; + } else { + this.pos.lerp(targetV, this.damping); + } + } else { + this.pos.setV(targetV); + } + this.isDirty = true; + } + } + } + + /** @ignore */ + update(dt) { + // update the camera position + this.updateTarget(dt); + + if (this._shake.duration > 0) { + this._shake.duration -= dt; + if (this._shake.duration <= 0) { + this._shake.duration = 0; + this.offset.setZero(); + if (typeof(this._shake.onComplete) === "function") { + this._shake.onComplete(); + } + } + else { + if (this._shake.axis === this.AXIS.BOTH || + this._shake.axis === this.AXIS.HORIZONTAL) { + this.offset.x = (Math.random() - 0.5) * this._shake.intensity; + } + if (this._shake.axis === this.AXIS.BOTH || + this._shake.axis === this.AXIS.VERTICAL) { + this.offset.y = (Math.random() - 0.5) * this._shake.intensity; + } + } + // updated! + this.isDirty = true; + } + + if (this.isDirty === true) { + //publish the corresponding message + emit(VIEWPORT_ONCHANGE, this.pos); + } + + // check for fade/flash effect + if ((this._fadeIn.tween != null) || (this._fadeOut.tween != null)) { + this.isDirty = true; + } + + if (!this.currentTransform.isIdentity()) { + this.invCurrentTransform.copy(this.currentTransform).invert(); + } else { + // reset to default + this.invCurrentTransform.identity(); + } + + return super.update(dt); + } + + /** + * shake the camera + * @name shake + * @memberof Camera2d + * @param {number} intensity - maximum offset that the screen can be moved + * while shaking + * @param {number} duration - expressed in milliseconds + * @param {number} [axis=me.game.viewport.AXIS.BOTH] - specify on which axis to apply the shake effect (see {@link Camera2d.AXIS}) + * @param {Function} [onComplete] - callback once shaking effect is over + * @param {boolean} [force] - if true this will override the current effect + * @example + * // shake it baby ! + * me.game.viewport.shake(10, 500, me.game.viewport.AXIS.BOTH); + */ + shake(intensity, duration, axis, onComplete, force) { + if (this._shake.duration === 0 || force === true) { + this._shake.intensity = intensity; + this._shake.duration = duration; + this._shake.axis = axis || this.AXIS.BOTH; + this._shake.onComplete = typeof (onComplete) === "function" ? onComplete : undefined; + } + } + + /** + * fadeOut(flash) effect

                            + * screen is filled with the specified color and slowly goes back to normal + * @name fadeOut + * @memberof Camera2d + * @param {Color|string} color - a CSS color value + * @param {number} [duration=1000] - expressed in milliseconds + * @param {Function} [onComplete] - callback once effect is over + * @example + * // fade the camera to white upon dying, reload the level, and then fade out back + * me.game.viewport.fadeIn("#fff", 150, function() { + * me.audio.play("die", false); + * me.level.reload(); + * me.game.viewport.fadeOut("#fff", 150); + * }); + */ + fadeOut(color, duration = 1000, onComplete) { + this._fadeOut.color = pool.pull("Color").copy(color); + this._fadeOut.tween = pool.pull("Tween", this._fadeOut.color) + .to({ alpha: 0.0 }, duration) + .onComplete(onComplete || null); + this._fadeOut.tween.isPersistent = true; + this._fadeOut.tween.start(); + } + + /** + * fadeIn effect

                            + * fade to the specified color + * @name fadeIn + * @memberof Camera2d + * @param {Color|string} color - a CSS color value + * @param {number} [duration=1000] - expressed in milliseconds + * @param {Function} [onComplete] - callback once effect is over + * @example + * // flash the camera to white for 75ms + * me.game.viewport.fadeIn("#FFFFFF", 75); + */ + fadeIn(color, duration = 1000, onComplete) { + this._fadeIn.color = pool.pull("Color").copy(color); + let _alpha = this._fadeIn.color.alpha; + this._fadeIn.color.alpha = 0.0; + this._fadeIn.tween = pool.pull("Tween", this._fadeIn.color) + .to({ alpha: _alpha }, duration) + .onComplete(onComplete || null); + this._fadeIn.tween.isPersistent = true; + this._fadeIn.tween.start(); + } + + /** + * set the camera position around the specified object + * @name focusOn + * @memberof Camera2d + * @param {Renderable|Entity|Sprite|NineSliceSprite} target - the renderable to focus the camera on + */ + focusOn(target) { + let bounds = target.getBounds(); + this.moveTo( + target.pos.x + bounds.left + (bounds.width / 2), + target.pos.y + bounds.top + (bounds.height / 2) + ); + } + + /** + * check if the specified renderable is in the camera + * @name isVisible + * @memberof Camera2d + * @param {Renderable|Entity|Sprite|NineSliceSprite} obj - to be checked against + * @param {boolean} [floating = obj.floating] - if visibility check should be done against screen coordinates + * @returns {boolean} true if within the viewport + */ + isVisible(obj, floating = obj.floating) { + if (floating === true || obj.floating === true) { + // check against screen coordinates + return renderer.overlaps(obj.getBounds()); + } else { + // check if within the current camera + return obj.getBounds().overlaps(this); + } + } + + /** + * convert the given "local" (screen) coordinates into world coordinates + * @name localToWorld + * @memberof Camera2d + * @param {number} x - the x coordinate of the local point to be converted + * @param {number} y - the y coordinate of the local point to be converted + * @param {number} [v] - an optional vector object where to set the converted value + * @returns {Vector2d} + */ + localToWorld(x, y, v) { + // TODO memoization for one set of coords (multitouch) + v = v || pool.pull("Vector2d"); + v.set(x, y).add(this.pos).sub(game.world.pos); + if (!this.currentTransform.isIdentity()) { + this.invCurrentTransform.apply(v); + } + return v; + } + + /** + * convert the given world coordinates into "local" (screen) coordinates + * @name worldToLocal + * @memberof Camera2d + * @param {number} x + * @param {number} y + * @param {number} [v] - an optional vector object where to set the converted value + * @returns {Vector2d} a vector with the converted local coordinates + */ + worldToLocal(x, y, v) { + // TODO memoization for one set of coords (multitouch) + v = v || pool.pull("Vector2d"); + v.set(x, y); + if (!this.currentTransform.isIdentity()) { + this.currentTransform.apply(v); + } + return v.sub(this.pos).add(game.world.pos); + } + + /** + * render the camera effects + * @ignore + */ + drawFX(renderer) { + // fading effect + if (this._fadeIn.tween) { + // add an overlay + renderer.save(); + // reset all transform so that the overaly cover the whole camera area + renderer.resetTransform(); + renderer.setColor(this._fadeIn.color); + renderer.fillRect(0, 0, this.width, this.height); + renderer.restore(); + // remove the tween if over + if (this._fadeIn.color.alpha === 1.0) { + this._fadeIn.tween = null; + pool.push(this._fadeIn.color); + this._fadeIn.color = null; + } + } + + // flashing effect + if (this._fadeOut.tween) { + // add an overlay + renderer.save(); + // reset all transform so that the overaly cover the whole camera area + renderer.resetTransform(); + renderer.setColor(this._fadeOut.color); + renderer.fillRect(0, 0, this.width, this.height); + renderer.restore(); + // remove the tween if over + if (this._fadeOut.color.alpha === 0.0) { + this._fadeOut.tween = null; + pool.push(this._fadeOut.color); + this._fadeOut.color = null; + } + } + } + + /** + * draw all object visibile in this viewport + * @ignore + */ + draw(renderer, container) { + let translateX = this.pos.x + this.offset.x; + let translateY = this.pos.y + this.offset.y; + + // translate the world coordinates by default to screen coordinates + container.currentTransform.translate(-translateX, -translateY); + + // set the camera projection + renderer.setProjection(this.projectionMatrix); + + // clip to camera bounds + renderer.clipRect( + 0, + 0, + this.width, + this.height + ); + + this.preDraw(renderer); + + container.preDraw(renderer, this); + + // draw all objects, + // specifying the viewport as the rectangle area to redraw + container.draw(renderer, this); + + // draw the viewport/camera effects + this.drawFX(renderer); + + container.postDraw(renderer, this); + + this.postDraw(renderer); + + // translate the world coordinates by default to screen coordinates + container.currentTransform.translate(translateX, translateY); + } + +} + +// a default camera instance to use across all stages +let default_camera; + +// default stage settings +let default_settings = { + cameras : [] +}; + +/** + * @classdesc + * a default "Stage" object. + * every "stage" object (title screen, credits, ingame, etc...) to be managed + * through the state manager must inherit from this base class. + * @see state + */ +class Stage { + + /** + * @param {object} [settings] - The stage` parameters + * @param {Camera2d[]} [settings.cameras=[new me.Camera2d()]] - a list of cameras (experimental) + * @param {Function} [settings.onResetEvent] - called by the state manager when reseting the object + * @param {Function} [settings.onDestroyEvent] - called by the state manager before switching to another state + */ + constructor(settings) { + /** + * The list of active cameras in this stage. + * Cameras will be renderered based on this order defined in this list. + * Only the "default" camera will be resized when the window or canvas is resized. + * @public + * @type {Map} + * @name cameras + * @memberof Stage + */ + this.cameras = new Map(); + + /** + * The list of active lights in this stage. + * (Note: Canvas Renderering mode will only properly support one light per stage) + * @public + * @type {Map} + * @name lights + * @memberof Stage + * @see Light2d + * @see Stage.ambientLight + * @example + * // create a white spot light + * let whiteLight = new me.Light2d(0, 0, 140, "#fff", 0.7); + * // and add the light to this current stage + * this.lights.set("whiteLight", whiteLight); + * // set a dark ambient light + * this.ambientLight.parseCSS("#1117"); + * // make the light follow the mouse + * me.input.registerPointerEvent("pointermove", me.game.viewport, (event) => { + * whiteLight.centerOn(event.gameX, event.gameY); + * }); + */ + this.lights = new Map(); + + /** + * an ambient light that will be added to the stage rendering + * @public + * @type {Color} + * @name ambientLight + * @memberof Stage + * @default "#000000" + * @see Light2d + */ + this.ambientLight = new Color(0, 0, 0, 0); + + /** + * The given constructor options + * @public + * @name settings + * @memberof Stage + * @type {object} + */ + this.settings = Object.assign(default_settings, settings || {}); + } + + /** + * Object reset function + * @ignore + */ + reset() { + // add all defined cameras + this.settings.cameras.forEach((camera) => { + this.cameras.set(camera.name, camera); + }); + + // empty or no default camera + if (this.cameras.has("default") === false) { + if (typeof default_camera === "undefined") { + let width = renderer.width; + let height = renderer.height; + // new default camera instance + default_camera = new Camera2d(0, 0, width, height); + } + this.cameras.set("default", default_camera); + } + + // reset the game + emit(STAGE_RESET, this); + + // call the onReset Function + this.onResetEvent.apply(this, arguments); + } + + /** + * update function + * @name update + * @memberof Stage + * @ignore + * @param {number} dt - time since the last update in milliseconds. + * @returns {boolean} + */ + update(dt) { + let isDirty = false; + + // update the camera/viewport + // iterate through all cameras + this.cameras.forEach((camera) => { + if (camera.update(dt) === true) { + isDirty = true; + } + }); + + // update all lights + this.lights.forEach((light) => { + if (light.update(dt) === true) { + isDirty = true; + } + }); + + return isDirty; + } + + /** + * draw the current stage + * @name draw + * @memberof Stage + * @ignore + * @param {Renderer} renderer - the renderer object to draw with + * @param {World} world - the world object to draw + */ + draw(renderer, world) { + + // iterate through all cameras + this.cameras.forEach((camera) => { + // render the root container + camera.draw(renderer, world); + + // render the ambient light + if (this.ambientLight.alpha !== 0) { + renderer.save(); + // iterate through all lights + this.lights.forEach((light) => { + // cut out all lights visible areas + renderer.setMask(light.getVisibleArea(), true); + }); + // fill the screen with the ambient color + renderer.setColor(this.ambientLight); + renderer.fillRect(0, 0, camera.width, camera.height); + // clear all masks + renderer.clearMask(); + renderer.restore(); + } + + // render all lights + this.lights.forEach((light) => { + light.preDraw(renderer, world); + light.draw(renderer, world); + light.postDraw(renderer, world); + }); + }); + } + + /** + * destroy function + * @ignore + */ + destroy() { + // clear all cameras + this.cameras.clear(); + // clear all lights + this.lights.forEach((light) => { + light.destroy(); + }); + this.lights.clear(); + // notify the object + this.onDestroyEvent.apply(this, arguments); + } + + /** + * onResetEvent function
                            + * called by the state manager when reseting the object + * this is typically where you will load a level, add renderables, etc... + * @name onResetEvent + * @memberof Stage + * @param {object} [...arguments] - optional arguments passed when switching state + * @see state#change + */ + onResetEvent() { + // execute onResetEvent function if given through the constructor + if (typeof this.settings.onResetEvent === "function") { + this.settings.onResetEvent.apply(this, arguments); + } + } + + /** + * onDestroyEvent function
                            + * called by the state manager before switching to another state + * @name onDestroyEvent + * @memberof Stage + */ + onDestroyEvent() { + // execute onDestroyEvent function if given through the constructor + if (typeof this.settings.onDestroyEvent === "function") { + this.settings.onDestroyEvent.apply(this, arguments); + } + } +} + +/** + * a collection of file utility functions + * @namespace utils.file + */ + +// regexp to deal with file name & path +const PATH = /^.*(\\|\/|\:)/; +const EXT = /\.[^\.]*$/; + + +/** + * return the base name of the file without path info + * @public + * @memberof utils.file + * @name getBasename + * @param {string} path - path containing the basename to extract + * @returns {string} the base name without path information. + */ +function getBasename(path) { + return path.replace(PATH, "").replace(EXT, ""); +} + +/** + * return the path of the file + * @public + * @memberof utils.file + * @name getPath + * @param {string} path - the copmplete file path to extract the path from + * @returns {string} the extracted path + */ +function getPath(path) { + return path.match(PATH)[0]; +} + +/** + * return the extension of the file in the given path + * @public + * @memberof utils.file + * @name getExtension + * @param {string} path - path containing the filename and extension to extract + * @returns {string} filename extension. + */ +function getExtension(path) { + return path.substring(path.lastIndexOf(".") + 1, path.length); +} + +var file$1 = { + __proto__: null, + getBasename: getBasename, + getExtension: getExtension, + getPath: getPath +}; + +/** + * where all preloaded content is cached + */ + +// contains all the images loaded +let imgList = {}; + +// contains all the TMX loaded +let tmxList = {}; + +// contains all the binary files loaded +let binList = {}; + +// contains all the JSON files +let jsonList = {}; + +/** + * parse/preload an image + * @param {loader.Asset} img + * @param {Function} [onload] - function to be called when the resource is loaded + * @param {Function} [onerror] - function to be called in case of error + * @returns {number} the amount of corresponding resource parsed/preloaded + * @ignore + * @example + * preloadImages([ + * { name : 'image1', src : 'images/image1.png'}, + * { name : 'image2', src : 'images/image2.png'}, + * { name : 'image3', src : 'images/image3.png'}, + * { name : 'image4', src : 'images/image4.png'} + * ]); + */ +function preloadImage(img, onload, onerror) { + if (typeof imgList[img.name] !== "undefined") { + // already loaded + return 0; + } + + // create new Image object and add to list + imgList[img.name] = new Image(); + if (typeof onload === "function") { + imgList[img.name].onload = onload; + } + if (typeof onerror === "function") { + imgList[img.name].onerror = onerror; + } + if (typeof (crossOrigin) === "string") { + imgList[img.name].crossOrigin = crossOrigin; + } + imgList[img.name].src = img.src + nocache; + + return 1; +} + +/** + * parse/preload a font face + * @param {loader.Asset} data - asset data + * @param {Function} [onload] - function to be called when the asset is loaded + * @param {Function} [onerror] - function to be called in case of error + * @returns {number} the amount of corresponding resource parsed/preloaded + * @ignore + * @example + * preloadFontFace( + * name: "'kenpixel'", type: "fontface", src: "url('data/font/kenvector_future.woff2')" + * ]); + */ +function preloadFontFace(data, onload, onerror) { + + if (isDataUrl(data.src) === true) { + // make sure it in the `url(data:[][;base64],)` format as expected by FontFace + if (!data.src.startsWith("url(")) { + data.src = "url(" + data.src + ")"; + } + } + + let font = new FontFace(data.name, data.src); + + // loading promise + font.load().then(() => { + // apply the font after the font has finished downloading + globalThis.document.fonts.add(font); + globalThis.document.body.style.fontFamily = data.name; + if (typeof onload === "function") { + // onloaded callback + onload(); + } + }, () => { + if (typeof onerror === "function") { + // rejected + onerror(data.name); + } + }); + + return 1; +} + +/** + * a collection of utility functions + * @namespace utils + */ + +// guid default value +let GUID_base = ""; +let GUID_index = 0; + +/** + * Compare two version strings + * @public + * @memberof utils + * @name checkVersion + * @param {string} first - First version string to compare + * @param {string} second - second version string to compare + * @returns {number} comparison result
                            < 0 : first < second
                            + * 0 : first == second
                            + * > 0 : first > second + * @example + * if (me.utils.checkVersion("7.0.0") > 0) { + * console.error( + * "melonJS is too old. Expected: 7.0.0, Got: 6.3.0" + * ); + * } + */ +function checkVersion(first, second) { + let a = first.split("."); + let b = second.split("."); + let len = Math.min(a.length, b.length); + let result = 0; + + for (let i = 0; i < len; i++) { + if ((result = +a[i] - +b[i])) { + break; + } + } + + return result ? result : a.length - b.length; +} + +/** + * parse the fragment (hash) from a URL and returns them into + * @public + * @memberof utils + * @name getUriFragment + * @param {string} [url=document.location] - an optional params string or URL containing fragment (hash) params to be parsed + * @returns {object} an object representing the deserialized params string. + * @property {boolean} [hitbox=false] draw the hitbox in the debug panel (if enabled) + * @property {boolean} [velocity=false] draw the entities velocity in the debug panel (if enabled) + * @property {boolean} [quadtree=false] draw the quadtree in the debug panel (if enabled) + * @property {boolean} [webgl=false] force the renderer to WebGL + * @property {boolean} [debug=false] display the debug panel (if preloaded) + * @property {string} [debugToggleKey="s"] show/hide the debug panel (if preloaded) + * @example + * // http://www.example.com/index.html#debug&hitbox=true&mytag=value + * let UriFragment = me.utils.getUriFragment(); + * console.log(UriFragment["mytag"]); //> "value" + */ +function getUriFragment(url) { + let hash = {}; + + if (typeof url === "undefined") { + if (typeof globalThis.document !== "undefined") { + let location = globalThis.document.location; + + if (location && location.hash) { + url = location.hash; + } else { + // No "document.location" exist for Wechat mini game platform. + return hash; + } + } else { + // "document" undefined on node.js + return hash; + } + } else { + // never cache if a url is passed as parameter + let index = url.indexOf("#"); + if (index !== -1) { + url = url.slice(index, url.length); + } else { + return hash; + } + } + + // parse the url + url.slice(1).split("&").filter((value) => value !== "").forEach((value) => { + let kv = value.split("="); + let k = kv.shift(); + let v = kv.join("="); + hash[k] = v || true; + }); + + return hash; +} + +/** + * reset the GUID Base Name + * the idea here being to have a unique ID + * per level / object + * @ignore + */ +function resetGUID(base, index = 0) { + // also ensure it's only 8bit ASCII characters + GUID_base = toHex(base.toString().toUpperCase()); + GUID_index = index; +} + +/** + * create and return a very simple GUID + * Game Unique ID + * @ignore + */ +function createGUID(index = 1) { + // to cover the case of undefined id for groups + GUID_index += index; + return GUID_base + "-" + (index || GUID_index); +} + +var utils = { + __proto__: null, + agent: agent$1, + array: array$1, + checkVersion: checkVersion, + createGUID: createGUID, + file: file$1, + function: _function, + getUriFragment: getUriFragment, + resetGUID: resetGUID, + string: string$1 +}; + +/** + * @classdesc + * a TMX Tile Set Object + */ +class TMXTileset { + /** + * @param {object} tileset - tileset data in JSON format ({@link http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#tileset}) + */ + constructor(tileset) { + // tile properties (collidable, etc..) + this.TileProperties = []; + + // hold reference to each tile image + this.imageCollection = []; + + this.firstgid = this.lastgid = +tileset.firstgid; + + // check if an external tileset is defined + if (typeof(tileset.source) !== "undefined") { + let src = tileset.source; + let ext = getExtension(src); + if (ext === "tsx" || ext === "json") { + // load the external tileset (TSX/JSON) + tileset = getTMX(getBasename(src)); + if (!tileset) { + throw new Error(src + " external TSX/JSON tileset not found"); + } + } + } + + this.name = tileset.name; + this.tilewidth = +tileset.tilewidth; + this.tileheight = +tileset.tileheight; + this.spacing = +tileset.spacing || 0; + this.margin = +tileset.margin || 0; + + // set tile offset properties (if any) + this.tileoffset = new Vector2d(); + + /** + * Tileset contains animated tiles + * @type {boolean} + */ + this.isAnimated = false; + + /** + * true if the tileset is a "Collection of Image" Tileset + * @type {boolean} + */ + this.isCollection = false; + + /** + * the tileset class + * @type {boolean} + */ + this.class = tileset.class; + + /** + * Tileset animations + * @private + */ + this.animations = new Map(); + + /** + * Remember the last update timestamp to prevent too many animation updates + * @private + */ + this._lastUpdate = 0; + + let tiles = tileset.tiles; + for (let i in tiles) { + if (tiles.hasOwnProperty(i)) { + if ("animation" in tiles[i]) { + this.isAnimated = true; + this.animations.set(tiles[+i].animation[0].tileid, { + dt : 0, + idx : 0, + frames : tiles[+i].animation, + cur : tiles[+i].animation[0] + }); + } + // set tile properties, if any + if ("properties" in tiles[i]) { + if (Array.isArray(tiles[i].properties)) { // JSON (new format) + let tileProperty = {}; + for (let j in tiles[i].properties) { + tileProperty[tiles[i].properties[j].name] = tiles[i].properties[j].value; + } + this.setTileProperty(+tiles[i].id + this.firstgid, tileProperty); + } else { // XML format + this.setTileProperty(+i + this.firstgid, tiles[i].properties); + } + } + if ("image" in tiles[i]) { + let image = getImage(tiles[i].image); + if (!image) { + throw new Error("melonJS: '" + tiles[i].image + "' file for tile '" + (+i + this.firstgid) + "' not found!"); + } + this.imageCollection[+i + this.firstgid] = image; + } + } + } + + this.isCollection = this.imageCollection.length > 0; + + let offset = tileset.tileoffset; + if (offset) { + this.tileoffset.x = +offset.x; + this.tileoffset.y = +offset.y; + } + + // set tile properties, if any (JSON old format) + let tileInfo = tileset.tileproperties; + if (tileInfo) { + for (let i in tileInfo) { + if (tileInfo.hasOwnProperty(i)) { + this.setTileProperty(+i + this.firstgid, tileInfo[i]); + } + } + } + + // if not a tile image collection + if (this.isCollection === false) { + + // get the global tileset texture + this.image = getImage(tileset.image); + + if (!this.image) { + throw new Error("melonJS: '" + tileset.image + "' file for tileset '" + this.name + "' not found!"); + } + + // create a texture atlas for the given tileset + this.texture = renderer.cache.get(this.image, { + framewidth : this.tilewidth, + frameheight : this.tileheight, + margin : this.margin, + spacing : this.spacing + }); + this.atlas = this.texture.getAtlas(); + + // calculate the number of tiles per horizontal line + let hTileCount = +tileset.columns || Math.round(this.image.width / (this.tilewidth + this.spacing)); + let vTileCount = Math.round(this.image.height / (this.tileheight + this.spacing)); + if (tileset.tilecount % hTileCount > 0) { + ++vTileCount; + } + // compute the last gid value in the tileset + this.lastgid = this.firstgid + (((hTileCount * vTileCount) - 1) || 0); + if (tileset.tilecount && this.lastgid - this.firstgid + 1 !== +tileset.tilecount) { + console.warn( + "Computed tilecount (" + (this.lastgid - this.firstgid + 1) + + ") does not match expected tilecount (" + tileset.tilecount + ")" + ); + } + } + } + + /** + * return the tile image from a "Collection of Image" tileset + * @param {number} gid + * @returns {Image} corresponding image or undefined + */ + getTileImage(gid) { + return this.imageCollection[gid]; + } + + + /** + * set the tile properties + * @ignore + */ + setTileProperty(gid, prop) { + // set the given tile id + this.TileProperties[gid] = prop; + } + + /** + * return true if the gid belongs to the tileset + * @param {number} gid + * @returns {boolean} + */ + contains(gid) { + return gid >= this.firstgid && gid <= this.lastgid; + } + + /** + * Get the view (local) tile ID from a GID, with animations applied + * @param {number} gid - Global tile ID + * @returns {number} View tile ID + */ + getViewTileId(gid) { + let localId = gid - this.firstgid; + + if (this.animations.has(localId)) { + // return the current corresponding tile id if animated + return this.animations.get(localId).cur.tileid; + } + + return localId; + } + + /** + * return the properties of the specified tile + * @param {number} tileId + * @returns {object} + */ + getTileProperties(tileId) { + return this.TileProperties[tileId]; + } + + // update tile animations + update(dt) { + let duration = 0, + now = timer$1.getTime(), + result = false; + + if (this._lastUpdate !== now) { + this._lastUpdate = now; + + this.animations.forEach((anim) => { + anim.dt += dt; + duration = anim.cur.duration; + while (anim.dt >= duration) { + anim.dt -= duration; + anim.idx = (anim.idx + 1) % anim.frames.length; + anim.cur = anim.frames[anim.idx]; + duration = anim.cur.duration; + result = true; + } + }); + } + + return result; + } + + // draw the x,y tile + drawTile(renderer, dx, dy, tmxTile) { + + // check if any transformation is required + if (tmxTile.flipped) { + renderer.save(); + // apply the tile current transform + renderer.translate(dx, dy); + renderer.transform(tmxTile.currentTransform); + // reset both values as managed through transform(); + dx = dy = 0; + } + + // check if the tile has an associated image + if (this.isCollection === true) { + // draw the tile + renderer.drawImage( + this.imageCollection[tmxTile.tileId], + 0, 0, + tmxTile.width, tmxTile.height, + dx, dy, + tmxTile.width, tmxTile.height + ); + } else { + // use the tileset texture + let offset = this.atlas[this.getViewTileId(tmxTile.tileId)].offset; + // draw the tile + renderer.drawImage( + this.image, + offset.x, offset.y, + this.tilewidth, this.tileheight, + dx, dy, + this.tilewidth + renderer.uvOffset, this.tileheight + renderer.uvOffset + ); + } + + if (tmxTile.flipped) { + // restore the context to the previous state + renderer.restore(); + } + } +} + +// bitmask constants to check for flipped & rotated tiles +const TMX_FLIP_H = 0x80000000; +const TMX_FLIP_V = 0x40000000; +const TMX_FLIP_AD = 0x20000000; +const TMX_CLEAR_BIT_MASK = ~(TMX_FLIP_H | TMX_FLIP_V | TMX_FLIP_AD); + +// constant to identify the collision object layer +const COLLISION_GROUP = "collision"; + +/** + * @classdesc + * an object containing all tileset + */ +class TMXTilesetGroup { + + constructor() { + this.tilesets = []; + this.length = 0; + } + + /** + * add a tileset to the tileset group + * @param {TMXTileset} tileset + */ + add(tileset) { + this.tilesets.push(tileset); + this.length++; + } + + /** + * return the tileset at the specified index + * @param {number} i + * @returns {TMXTileset} corresponding tileset + */ + getTilesetByIndex(i) { + return this.tilesets[i]; + } + + /** + * return the tileset corresponding to the specified id
                            + * will throw an exception if no matching tileset is found + * @param {number} gid + * @returns {TMXTileset} corresponding tileset + */ + getTilesetByGid(gid) { + let invalidRange = -1; + + // clear the gid of all flip/rotation flags + gid &= TMX_CLEAR_BIT_MASK; + + // cycle through all tilesets + for (let i = 0, len = this.tilesets.length; i < len; i++) { + // return the corresponding tileset if matching + if (this.tilesets[i].contains(gid)) { + return this.tilesets[i]; + } + // typically indicates a layer with no asset loaded (collision?) + if (this.tilesets[i].firstgid === this.tilesets[i].lastgid && + gid >= this.tilesets[i].firstgid) { + // store the id if the [firstgid .. lastgid] is invalid + invalidRange = i; + } + } + // return the tileset with the invalid range + if (invalidRange !== -1) { + return this.tilesets[invalidRange]; + } + else { + throw new Error("no matching tileset found for gid " + gid); + } + } +} + +/** + * the function used to decompress zlib/gzip data + * @ignore + */ +let inflateFunction; + +/** + * set and interpret a TMX property value + * @ignore + */ +function setTMXValue(name, type, value) { + let match; + + if (typeof(value) !== "string") { + // Value is already normalized (e.g. with JSON maps) + return value; + } + + switch (type) { + + case "int" : + case "float" : + value = Number(value); + break; + + case "bool" : + value = (value === "true"); + break; + + default : + // try to parse it anyway + if (!value || isBoolean(value)) { + // if value not defined or boolean + value = value ? (value === "true") : true; + } + else if (isNumeric(value)) { + // check if numeric + value = Number(value); + } + else if (value.search(/^json:/i) === 0) { + // try to parse it + match = value.split(/^json:/i)[1]; + try { + value = JSON.parse(match); + } + catch (e) { + throw new Error("Unable to parse JSON: " + match); + } + } + else if (value.search(/^eval:/i) === 0) { + // try to evaluate it + match = value.split(/^eval:/i)[1]; + try { + // eslint-disable-next-line + value = Function("'use strict';return (" + match + ")")(); + } + catch (e) { + throw new Error("Unable to evaluate: " + match); + } + } + else if ( + ((match = value.match(/^#([\da-fA-F])([\da-fA-F]{3})$/))) || + ((match = value.match(/^#([\da-fA-F]{2})([\da-fA-F]{6})$/))) + ) { + value = "#" + match[2] + match[1]; + } + + // normalize values + if (name.search(/^(ratio|anchorPoint)$/) === 0) { + // convert number to vector + if (typeof(value) === "number") { + value = { + "x" : value, + "y" : value + }; + } + } + } + // return the interpreted value + return value; +} + +/** + * @ignore + */ +function parseAttributes(obj, elt) { + // do attributes + if (elt.attributes && elt.attributes.length > 0) { + for (let j = 0; j < elt.attributes.length; j++) { + const attribute = elt.attributes.item(j); + if (typeof(attribute.name) !== "undefined") { + // DOM4 (Attr no longer inherit from Node) + obj[attribute.name] = attribute.value; + } else { + // else use the deprecated ones + obj[attribute.nodeName] = attribute.nodeValue; + } + } + } +} + +/** + * Normalize TMX format to Tiled JSON format + * @ignore + */ +function normalize(obj, item) { + let nodeName = item.nodeName; + + switch (nodeName) { + case "data": { + let data = parse(item); + + data.encoding = data.encoding || "xml"; + + // decode chunks for infinite maps + if (typeof data.chunks !== "undefined") { + obj.chunks = obj.chunks || []; + // infinite maps containing chunk data + data.chunks.forEach((chunk) => { + obj.chunks.push({ + x: +chunk.x, + y: +chunk.y, + // chunk width is in tiles + width: +chunk.width, + // chunk height is in tiles + height: +chunk.height, + data: decode(chunk.text, data.encoding, data.compression) + }); + }); + obj.encoding = "none"; + } + // Bug on if condition: when parsing data, data.text is sometimes defined when chunks are present + if (typeof data.text !== "undefined" && typeof obj.chunks === "undefined") { + // Finite maps + obj.data = decode(data.text, data.encoding, data.compression); + obj.encoding = "none"; + } + break; + } + case "chunk": + obj.chunks = obj.chunks || []; + obj.chunks.push(parse(item)); + break; + + case "imagelayer": + case "layer": + case "objectgroup": + case "group": { + let layer = parse(item); + layer.type = (nodeName === "layer" ? "tilelayer" : nodeName); + if (layer.image) { + layer.image = layer.image.source; + } + + obj.layers = obj.layers || []; + obj.layers.push(layer); + break; + } + case "animation": + obj.animation = parse(item).frames; + break; + + case "frame": + case "object": { + const name = nodeName + "s"; + obj[name] = obj[name] || []; + obj[name].push(parse(item)); + break; + } + case "tile": { + let tile = parse(item); + if (tile.image) { + tile.imagewidth = tile.image.width; + tile.imageheight = tile.image.height; + tile.image = tile.image.source; + } + obj.tiles = obj.tiles || {}; + obj.tiles[tile.id] = tile; + break; + } + case "tileset": { + let tileset = parse(item); + if (tileset.image) { + tileset.imagewidth = tileset.image.width; + tileset.imageheight = tileset.image.height; + tileset.image = tileset.image.source; + } + + obj.tilesets = obj.tilesets || []; + obj.tilesets.push(tileset); + break; + } + case "polygon": + case "polyline": { + obj[nodeName] = []; + + // Get a point array + let points = parse(item).points.split(" "); + + // And normalize them into an array of vectors + for (let i = 0; i < points.length; i++) { + const v = points[i].split(","); + obj[nodeName].push({ + "x" : +v[0], + "y" : +v[1] + }); + } + + break; + } + case "properties": + obj.properties = parse(item); + break; + + case "property": { + const property = parse(item); + // for custom properties, text is used + const value = (typeof property.value !== "undefined") ? property.value : property.text; + + obj[property.name] = setTMXValue( + property.name, + // in XML type is undefined for "string" values + property.type || "string", + value + ); + break; + } + default: + obj[nodeName] = parse(item); + break; + } +} + +/** + * a collection of utility functions for parsing TMX maps + * @namespace TMXUtils + */ + +/** + * decompress and decode zlib/gzip data + * @memberof TMXUtils + * @param {string} input - Base64 encoded and compressed data + * @param {string} format - compressed data format ("gzip","zlib", "zstd") + * @returns {Uint32Array} Decoded and decompress data + */ +function decompress(data, format) { + if (typeof inflateFunction === "function") { + return inflateFunction(data, format); + } else { + throw new Error("GZIP/ZLIB compressed TMX Tile Map not supported!"); + } +} + +/** + * Decode a CSV encoded array into a binary array + * @memberof TMXUtils + * @param {string} input- - CSV formatted data (only numbers, everything else will be converted to NaN) + * @returns {number[]} Decoded data + */ +function decodeCSV(input) { + let entries = input.replace("\n", "").trim().split(","); + + let result = []; + for (let i = 0; i < entries.length; i++) { + result.push(+entries[i]); + } + return result; +} + +/** + * Decode a base64 encoded string into a byte array + * @memberof TMXUtils + * @param {string} input - Base64 encoded data + * @param {number} [bytes] - number of bytes per array entry + * @returns {Uint32Array} Decoded data + */ +function decodeBase64AsArray(input, bytes = 1) { + let dec = globalThis.atob(input.replace(/[^A-Za-z0-9\+\/\=]/g, "")); + let ar = new Uint32Array(dec.length / bytes); + + for (let i = 0, len = dec.length / bytes; i < len; i++) { + ar[i] = 0; + for (let j = bytes - 1; j >= 0; --j) { + ar[i] += dec.charCodeAt((i * bytes) + j) << (j << 3); + } + } + return ar; +} + +/** + * set the function used to inflate gzip/zlib data + * @memberof TMXUtils + * @param {Func} fn - inflate function + */ +function setInflateFunction(fn) { + inflateFunction = fn; +} + +/** + * Decode a encoded array into a binary array + * @memberof TMXUtils + * @param {string} data - data to be decoded + * @param {string} [encoding="none"] - data encoding ("csv", "base64", "xml") + * @returns {number[]} Decoded data + */ +function decode(data, encoding, compression) { + compression = compression || "none"; + encoding = encoding || "none"; + + switch (encoding) { + case "csv": + return decodeCSV(data); + + case "base64": + if (compression !== "none") { + data = decompress(data, compression); + } else { + data = decodeBase64AsArray(data, 4); + } + return data; + + case "none": + return data; + + case "xml": + throw new Error("XML encoding is deprecated, use base64 instead"); + + default: + throw new Error("Unknown layer encoding: " + encoding); + } +} + +/** + * Parse a XML TMX object and returns the corresponding javascript object + * @memberof TMXUtils + * @param {Document} xml - XML TMX object + * @returns {object} Javascript object + */ +function parse(xml) { + // Create the return object + let obj = {}; + + let text = ""; + + if (xml.nodeType === 1) { + // do attributes + parseAttributes(obj, xml); + } + + // do children + if (xml.hasChildNodes()) { + let children = xml.childNodes; + for (const node of children) { + switch (node.nodeType) { + case 1: + normalize(obj, node); + break; + + case 3: + text += node.nodeValue.trim(); + break; + } + } + } + + if (text) { + obj.text = text; + } + + return obj; +} + +/** + * Apply TMX Properties to the given object + * @memberof TMXUtils + * @param {object} obj - object to apply the properties to + * @param {object} data - TMX data object + * @returns {object} obj + */ +function applyTMXProperties(obj, data) { + let properties = data.properties; + let types = data.propertytypes; + if (typeof(properties) !== "undefined") { + for (let property in properties) { + if (properties.hasOwnProperty(property)) { + let type = "string"; + let name = property; + let value = properties[property]; + // proof-check for new and old JSON format + if (typeof properties[property].name !== "undefined") { + name = properties[property].name; + } + if (typeof(types) !== "undefined") { + type = types[property]; + } else if (typeof properties[property].type !== "undefined") { + type = properties[property].type; + } + if (typeof properties[property].value !== "undefined") { + value = properties[property].value; + } + // set the value + obj[name] = setTMXValue(name, type, value); + } + } + } +} + +var TMXUtils = { + __proto__: null, + applyTMXProperties: applyTMXProperties, + decode: decode, + parse: parse, + setInflateFunction: setInflateFunction +}; + +/** + * @classdesc + * a basic tile object + * @augments Bounds + */ +class Tile extends Bounds { + /** + * @param {number} x - x index of the Tile in the map + * @param {number} y - y index of the Tile in the map + * @param {number} gid - tile gid + * @param {TMXTileset} tileset - the corresponding tileset object + */ + constructor(x, y, gid, tileset) { + let width, height; + + // call the parent constructor + super(); + + // determine the tile size + if (tileset.isCollection) { + let image = tileset.getTileImage(gid & TMX_CLEAR_BIT_MASK); + width = image.width; + height = image.height; + } else { + width = tileset.tilewidth; + height = tileset.tileheight; + } + + this.setMinMax(0, 0, width, height); + + /** + * tileset + * @type {TMXTileset} + */ + this.tileset = tileset; + + /** + * the tile transformation matrix (if defined) + * @ignore + */ + this.currentTransform = null; + + // Tile col / row pos + this.col = x; + this.row = y; + + /** + * tileId + * @type {number} + */ + this.tileId = gid; + + /** + * True if the tile is flipped horizontally + * @type {boolean} + */ + this.flippedX = (this.tileId & TMX_FLIP_H) !== 0; + + /** + * True if the tile is flipped vertically + * @type {boolean} + */ + this.flippedY = (this.tileId & TMX_FLIP_V) !== 0; + + /** + * True if the tile is flipped anti-diagonally + * @type {boolean} + */ + this.flippedAD = (this.tileId & TMX_FLIP_AD) !== 0; + + /** + * Global flag that indicates if the tile is flipped + * @type {boolean} + */ + this.flipped = this.flippedX || this.flippedY || this.flippedAD; + + // create and apply transformation matrix if required + if (this.flipped === true) { + if (this.currentTransform === null) { + this.currentTransform = new Matrix2d(); + } + this.setTileTransform(this.currentTransform.identity()); + } + + // clear out the flags and set the tileId + this.tileId &= TMX_CLEAR_BIT_MASK; + } + + /** + * set the transformation matrix for this tile + * @ignore + */ + setTileTransform(transform) { + transform.translate(this.width / 2, this.height / 2); + if (this.flippedAD) { + transform.rotate(-90 * Math.PI / 180); + transform.scale(-1, 1); + } + if (this.flippedX) { + transform.scale( + this.flippedAD ? 1 : -1, this.flippedAD ? -1 : 1 + ); + } + if (this.flippedY) { + transform.scale( + this.flippedAD ? -1 : 1, this.flippedAD ? 1 : -1 + ); + } + transform.translate(-this.width / 2, -this.height / 2); + } + + /** + * return a renderable object for this Tile object + * @param {object} [settings] - see {@link Sprite} + * @returns {Renderable} a me.Sprite object + */ + getRenderable(settings) { + let renderable; + let tileset = this.tileset; + + if (tileset.animations.has(this.tileId)) { + let frames = []; + let frameId = []; + (tileset.animations.get(this.tileId).frames).forEach((frame) => { + frameId.push(frame.tileid); + frames.push({ + name : "" + frame.tileid, + delay : frame.duration + }); + }); + renderable = tileset.texture.createAnimationFromName(frameId, settings); + renderable.addAnimation(this.tileId - tileset.firstgid, frames); + renderable.setCurrentAnimation(this.tileId - tileset.firstgid); + + } else { + if (tileset.isCollection === true) { + let image = tileset.getTileImage(this.tileId); + renderable = new Sprite(0, 0, + Object.assign({ + image: image + })//, settings) + ); + renderable.anchorPoint.set(0, 0); + renderable.scale((settings.width / this.width), (settings.height / this.height)); + if (typeof settings.rotation !== "undefined") { + renderable.anchorPoint.set(0.5, 0.5); + renderable.currentTransform.rotate(settings.rotation); + renderable.currentTransform.translate(settings.width / 2, settings.height / 2); + // TODO : move the rotation related code from TMXTiledMap to here (under) + settings.rotation = undefined; + } + } else { + renderable = tileset.texture.createSpriteFromName(this.tileId - tileset.firstgid, settings); + renderable.anchorPoint.set(0, 0); + } + } + + // any H/V flipping to apply? + this.setTileTransform(renderable.currentTransform); + + return renderable; + } +} + +/** + * @classdesc + * a TMX Object defintion, as defined in Tiled + * (Object definition is translated into the virtual `me.game.world` using `me.Renderable`) + * @ignore + */ +class TMXObject { + + constructor(map, settings, z) { + + /** + * point list in JSON format + * @type {object[]} + */ + this.points = undefined; + + /** + * object name + * @type {string} + */ + this.name = settings.name; + + /** + * object x position + * @type {number} + */ + this.x = +settings.x; + + /** + * object y position + * @type {number} + */ + this.y = +settings.y; + + /** + * object z order + * @type {number} + */ + this.z = +z; + + /** + * object width + * @type {number} + */ + this.width = +settings.width || 0; + + /** + * object height + * @type {number} + */ + this.height = +settings.height || 0; + + /** + * object gid value + * when defined the object is a tiled object + * @type {number} + */ + this.gid = +settings.gid || null; + + /** + * tint color + * @type {string} + */ + this.tintcolor = settings.tintcolor; + + /** + * object type + * @type {string} + * @deprecated since Tiled 1.9 + * @see https://docs.mapeditor.org/en/stable/reference/tmx-changelog/#tiled-1-9 + */ + this.type = settings.type; + + /** + * the object class + * @type {string} + */ + this.class = typeof settings.class !== "undefined" ? settings.class : settings.type; + + /** + * object text + * @type {object} + * @see http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#text + */ + this.text = undefined; + + /** + * The rotation of the object in radians clockwise (defaults to 0) + * @type {number} + */ + this.rotation = degToRad(+settings.rotation || 0); + + /** + * object unique identifier per level (Tiled 0.11.x+) + * @type {number} + */ + this.id = +settings.id || undefined; + + /** + * object orientation (orthogonal or isometric) + * @type {string} + */ + this.orientation = map.orientation; + + /** + * the collision shapes defined for this object + * @type {object[]} + */ + this.shapes = undefined; + + /** + * if true, the object is an Ellipse + * @type {boolean} + */ + this.isEllipse = false; + + /** + * if true, the object is a Point + * @type {boolean} + */ + this.isPoint = false; + + /** + * if true, the object is a Polygon + * @type {boolean} + */ + this.isPolygon = false; + + /** + * if true, the object is a PolyLine + * @type {boolean} + */ + this.isPolyLine = false; + + // check if the object has an associated gid + if (typeof this.gid === "number") { + this.setTile(map.tilesets); + } + else { + if (typeof settings.ellipse !== "undefined") { + this.isEllipse = true; + } else if (typeof settings.point !== "undefined") { + this.isPoint = true; + } else if (typeof settings.polygon !== "undefined") { + this.points = settings.polygon; + this.isPolygon = true; + } else if (typeof settings.polyline !== "undefined") { + this.points = settings.polyline; + this.isPolyLine = true; + } + } + + // check for text information + if (typeof settings.text !== "undefined") { + // a text object + this.text = settings.text; + // normalize field name and default value the melonjs way + this.text.font = settings.text.fontfamily || "sans-serif"; + this.text.size = settings.text.pixelsize || 16; + this.text.fillStyle = settings.text.color || "#000000"; + this.text.textAlign = settings.text.halign || "left"; + this.text.textBaseline = settings.text.valign || "top"; + this.text.width = this.width; + this.text.height = this.height; + // set the object properties + applyTMXProperties(this.text, settings); + } else { + // set the object properties + applyTMXProperties(this, settings); + // a standard object + if (!this.shapes) { + // else define the object shapes if required + this.shapes = this.parseTMXShapes(); + } + } + + // Adjust the Position to match Tiled + if (!map.isEditor) { + map.getRenderer().adjustPosition(this); + } + } + + /** + * set the object image (for Tiled Object) + * @ignore + */ + setTile(tilesets) { + // get the corresponding tileset + let tileset = tilesets.getTilesetByGid(this.gid); + + if (tileset.isCollection === false) { + // set width and height equal to tile size + this.width = this.framewidth = tileset.tilewidth; + this.height = this.frameheight = tileset.tileheight; + } + + // the object corresponding tile object + this.tile = new Tile(this.x, this.y, this.gid, tileset); + } + + /** + * parses the TMX shape definition and returns a corresponding array of me.Shape object + * @private + * @returns {Polygon[]|Line[]|Ellipse[]} an array of shape objects + */ + parseTMXShapes() { + let shapes = []; + + // add an ellipse shape + if (this.isEllipse === true) { + // ellipse coordinates are the center position, so set default to the corresonding radius + shapes.push((pool.pull("Ellipse", + this.width / 2, + this.height / 2, + this.width, + this.height + )).rotate(this.rotation)); + } else if (this.isPoint === true) { + shapes.push(pool.pull("Point", this.x, this.y)); + } else { + // add a polygon + if (this.isPolygon === true) { + let _polygon = pool.pull("Polygon", 0, 0, this.points); + let isConvex = _polygon.isConvex(); + // make sure it's a convex polygon + if (isConvex === false ) { + throw new Error("collision polygones in Tiled should be defined as Convex"); + } else if (isConvex === null) { + throw new Error("invalid polygone"); + } + shapes.push(_polygon.rotate(this.rotation)); + + } else if (this.isPolyLine === true) { + let p = this.points; + let p1, p2; + let segments = p.length - 1; + for (let i = 0; i < segments; i++) { + // clone the value before, as [i + 1] + // is reused later by the next segment + p1 = pool.pull("Vector2d", p[i].x, p[i].y); + p2 = pool.pull("Vector2d", p[i + 1].x, p[i + 1].y); + if (this.rotation !== 0) { + p1 = p1.rotate(this.rotation); + p2 = p2.rotate(this.rotation); + } + shapes.push(pool.pull("Line", 0, 0, [ p1, p2 ])); + } + } + + // it's a rectangle, returns a polygon object anyway + else { + shapes.push((pool.pull("Polygon", + 0, 0, [ + pool.pull("Vector2d"), pool.pull("Vector2d", this.width, 0), + pool.pull("Vector2d", this.width, this.height), pool.pull("Vector2d", 0, this.height) + ] + )).rotate(this.rotation)); + } + + } + + // Apply isometric projection + if (this.orientation === "isometric") { + for (let i = 0; i < shapes.length; i++) { + if (typeof shapes[i].toIso === "function") { + shapes[i].toIso(); + } + } + } + + return shapes; + } + + /** + * getObjectPropertyByName + * @ignore + */ + getObjectPropertyByName(name) { + return this[name]; + } +} + +/** + * @classdesc + * a simplified path2d implementation, supporting only one path + */ +class Path2D { + constructor() { + /** + * the points defining the current path + * @type {Point[]} + */ + this.points = []; + + /** + * space between interpolated points for quadratic and bezier curve approx. in pixels. + * @type {number} + * @default 5 + */ + this.arcResolution = 5; + + /* @ignore */ + this.vertices = []; + + /* @ignore */ + this.startPoint = pool.pull("Point"); + + /* @ignore */ + this.isDirty = false; + } + + /** + * begin a new path + */ + beginPath() { + // empty the cache and recycle all vectors + this.points.forEach((point) => { + pool.push(point); + }); + this.isDirty = true; + this.points.length = 0; + this.startPoint.set(0, 0); + } + + /** + * causes the point of the pen to move back to the start of the current path. + * It tries to draw a straight line from the current point to the start. + * If the shape has already been closed or has only one point, this function does nothing. + */ + closePath() { + let points = this.points; + if (points.length > 0) { + let firstPoint = points[0]; + if (!firstPoint.equals(points[points.length-1])) { + this.lineTo(firstPoint.x, firstPoint.y); + } + this.isDirty = true; + } + } + + /** + * triangulate the shape defined by this path into an array of triangles + * @returns {Point[]} an array of vertices representing the triangulated path or shape + */ + triangulatePath() { + let vertices = this.vertices; + + if (this.isDirty) { + let points = this.points; + let indices = earcut$1(points.flatMap(p => [p.x, p.y])); + let indicesLength = indices.length; + + // pre-allocate vertices if necessary + while (vertices.length < indicesLength) { + vertices.push(pool.pull("Point")); + } + + // calculate all vertices + for (let i = 0; i < indicesLength; i++ ) { + let point = points[indices[i]]; + vertices[i].set(point.x, point.y); + } + + // recycle overhead from a previous triangulation + while (vertices.length > indicesLength) { + pool.push(vertices[vertices.length-1]); + vertices.length -= 1; + } + this.isDirty = false; + } + + return vertices; + } + + /** + * moves the starting point of the current path to the (x, y) coordinates. + * @param {number} x - the x-axis (horizontal) coordinate of the point. + * @param {number} y - the y-axis (vertical) coordinate of the point. + */ + moveTo(x, y) { + this.startPoint.set(x, y); + this.isDirty = true; + } + + /** + * connects the last point in the current path to the (x, y) coordinates with a straight line. + * @param {number} x - the x-axis coordinate of the line's end point. + * @param {number} y - the y-axis coordinate of the line's end point. + */ + lineTo(x, y) { + let points = this.points; + let startPoint = this.startPoint; + let lastPoint = points.length === 0 ? startPoint : points[points.length-1]; + + if (!startPoint.equals(lastPoint)) { + points.push(pool.pull("Point", startPoint.x, startPoint.y)); + } else { + points.push(pool.pull("Point", lastPoint.x, lastPoint.y)); + } + points.push(pool.pull("Point", x, y)); + + startPoint.x = x; + startPoint.y = y; + + this.isDirty = true; + } + + /** + * adds an arc to the current path which is centered at (x, y) position with the given radius, + * starting at startAngle and ending at endAngle going in the given direction by counterclockwise (defaulting to clockwise). + * @param {number} x - the horizontal coordinate of the arc's center. + * @param {number} y - the vertical coordinate of the arc's center. + * @param {number} radius - the arc's radius. Must be positive. + * @param {number} startAngle - the angle at which the arc starts in radians, measured from the positive x-axis. + * @param {number} endAngle - the angle at which the arc ends in radians, measured from the positive x-axis. + * @param {boolean} [anticlockwise=false] - an optional boolean value. If true, draws the arc counter-clockwise between the start and end angles. + */ + arc(x, y, radius, startAngle, endAngle, anticlockwise = false) { + // based on from https://github.com/karellodewijk/canvas-webgl/blob/master/canvas-webgl.js + //bring angles all in [0, 2*PI] range + if (startAngle === endAngle) return; + const fullCircle = anticlockwise ? Math.abs(startAngle-endAngle) >= (TAU) : Math.abs(endAngle-startAngle) >= (TAU); + + startAngle = startAngle % (TAU); + endAngle = endAngle % (TAU); + + if (startAngle < 0) startAngle += TAU; + if (endAngle < 0) endAngle += TAU; + + if (startAngle >= endAngle) { + endAngle+= TAU; + } + + let diff = endAngle - startAngle; + let direction = 1; + if (anticlockwise) { + direction = -1; + diff = TAU - diff; + } + + if (fullCircle) diff = TAU; + + const length = diff * radius; + const nr_of_interpolation_points = length / this.arcResolution; + const dangle = diff / nr_of_interpolation_points; + const angleStep = dangle * direction; + + this.moveTo(x + radius * Math.cos(startAngle), y + radius * Math.sin(startAngle)); + + let angle = startAngle; + for (let j = 0; j < nr_of_interpolation_points; j++) { + this.lineTo(x + radius * Math.cos(angle), y + radius * Math.sin(angle)); + angle += angleStep; + } + + this.lineTo(x + radius * Math.cos(endAngle), y + radius * Math.sin(endAngle)); + + this.isDirty = true; + } + + /** + * adds a circular arc to the path with the given control points and radius, connected to the previous point by a straight line. + * @param {number} x1 - the x-axis coordinate of the first control point. + * @param {number} y1 - the y-axis coordinate of the first control point. + * @param {number} x2 - the x-axis coordinate of the second control point. + * @param {number} y2 - the y-axis coordinate of the second control point. + * @param {number} radius - the arc's radius. Must be positive. + */ + arcTo(x1, y1, x2, y2, radius) { + let points = this.points; + // based on from https://github.com/karellodewijk/canvas-webgl/blob/master/canvas-webgl.js + let x0 = points[points.length-1].x, y0 = points[points.length-1].y; + + //a = -incoming vector, b = outgoing vector to x1, y1 + let a0 = x0 - x1, a1 = y0 - y1; + let b0 = x2 - x1, b1 = y2 - y1; + + //normalize + let l_a = Math.sqrt(Math.pow(a0, 2) + Math.pow(a1, 2)); + let l_b = Math.sqrt(Math.pow(b0, 2) + Math.pow(b1, 2)); + a0 /= l_a; a1 /= l_a; b0 /= l_b; b1 /= l_b; + let angle = Math.atan2(a1, a0) - Math.atan2(b1, b0); + + //work out tangent points using tan(θ) = opposite / adjacent; angle/2 because hypotenuse is the bisection of a,b + let tan_angle_div2 = Math.tan(angle/2); + let adj_l = (radius/tan_angle_div2); + + let tangent1_pointx = x1 + a0 * adj_l, tangent1_pointy = y1 + a1 * adj_l; + let tangent2_pointx = x1 + b0 * adj_l, tangent2_pointy = y1 + b1 * adj_l; + + this.moveTo(tangent1_pointx, tangent1_pointy); + + let bisec0 = (a0 + b0) / 2.0, bisec1 = (a1 + b1) / 2.0; + let bisec_l = Math.sqrt(Math.pow(bisec0, 2) + Math.pow(bisec1, 2)); + bisec0 /= bisec_l; bisec1 /= bisec_l; + + let hyp_l = Math.sqrt(Math.pow(radius, 2) + Math.pow(adj_l, 2)); + let centerx = x1 + hyp_l * bisec0, centery = y1 + hyp_l * bisec1; + + let startAngle = Math.atan2(tangent1_pointy - centery, tangent1_pointx - centerx); + let endAngle = Math.atan2(tangent2_pointy - centery, tangent2_pointx - centerx); + + this.arc(centerx, centery, radius, startAngle, endAngle); + } + + /** + * adds an elliptical arc to the path which is centered at (x, y) position with the radii radiusX and radiusY + * starting at startAngle and ending at endAngle going in the given direction by counterclockwise. + * @param {number} x - the x-axis (horizontal) coordinate of the ellipse's center. + * @param {number} y - the y-axis (vertical) coordinate of the ellipse's center. + * @param {number} radiusX - the ellipse's major-axis radius. Must be non-negative. + * @param {number} radiusY - the ellipse's minor-axis radius. Must be non-negative. + * @param {number} rotation - the rotation of the ellipse, expressed in radians. + * @param {number} startAngle - the angle at which the ellipse starts, measured clockwise from the positive x-axis and expressed in radians. + * @param {number} endAngle - the angle at which the ellipse ends, measured clockwise from the positive x-axis and expressed in radians. + * @param {boolean} [anticlockwise=false] - an optional boolean value which, if true, draws the ellipse counterclockwise (anticlockwise). + */ + ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise = false) { + // based on from https://github.com/karellodewijk/canvas-webgl/blob/master/canvas-webgl.js + if (startAngle === endAngle) return; + let fullCircle = anticlockwise ? Math.abs(startAngle-endAngle) >= (TAU) : Math.abs(endAngle-startAngle) >= (TAU); + + //bring angles all in [0, 2*PI] range + startAngle = startAngle % (TAU); + endAngle = endAngle % (TAU); + if (startAngle < 0) startAngle += TAU; + if (endAngle < 0) endAngle += TAU; + + if (startAngle>=endAngle) { + endAngle += TAU; + } + + let diff = endAngle - startAngle; + + let direction = 1; + if (anticlockwise) { + direction = -1; + diff = TAU - diff; + } + + if (fullCircle) diff = TAU; + + const length = (diff * radiusX + diff * radiusY) / 2; + const nr_of_interpolation_points = length / this.arcResolution; + const dangle = diff / nr_of_interpolation_points; + const angleStep = dangle * direction; + + let angle = startAngle; + const cos_rotation = Math.cos(rotation); + const sin_rotation = Math.sin(rotation); + + this.moveTo(x + radiusX * Math.cos(startAngle), y + radiusY * Math.sin(startAngle)); + + for (let j = 0; j < nr_of_interpolation_points; j++) { + const _x1 = radiusX * Math.cos(angle); + const _y1 = radiusY * Math.sin(angle); + const _x2 = x + _x1 * cos_rotation - _y1 * sin_rotation; + const _y2 = y + _x1 * sin_rotation + _y1 * cos_rotation; + this.lineTo( _x2, _y2); + angle += angleStep; + } + // close the ellipse + this.lineTo(x + radiusX * Math.cos(startAngle), y + radiusY * Math.sin(startAngle)); + this.isDirty = true; + } + + /** + * creates a path for a rectangle at position (x, y) with a size that is determined by width and height. + * @param {number} x - the x-axis coordinate of the rectangle's starting point. + * @param {number} y - the y-axis coordinate of the rectangle's starting point. + * @param {number} width - the rectangle's width. Positive values are to the right, and negative to the left. + * @param {number} height - the rectangle's height. Positive values are down, and negative are up. + */ + rect(x, y, width, height) { + this.moveTo(x, y); + this.lineTo(x + width, y); + + this.moveTo(x + width, y); + this.lineTo(x + width, y + height); + + this.moveTo(x + width, y + height); + this.lineTo(x, y + height); + + this.moveTo(x, y + height); + this.lineTo(x, y); + + this.isDirty = true; + } + + /** + * adds an rounded rectangle to the current path. + * @param {number} x - the x-axis coordinate of the rectangle's starting point. + * @param {number} y - the y-axis coordinate of the rectangle's starting point. + * @param {number} width - the rectangle's width. Positive values are to the right, and negative to the left. + * @param {number} height - the rectangle's height. Positive values are down, and negative are up. + * @param {number} radius - the arc's radius to draw the borders. Must be positive. + */ + roundRect(x, y, width, height, radius) { + this.moveTo(x + radius, y); + this.lineTo(x + width - radius, y); + this.arcTo(x + width, y, x + width, y + radius, radius); + + this.moveTo(x + width, y + radius); + this.lineTo(x + width, y + height - radius); + this.arcTo(x + width, y + height, x + width - radius, y + height, radius); + + this.moveTo(x + width - radius, y + height); + this.lineTo(x + radius, y + height); + this.arcTo(x, y + height, x, y + height - radius, radius); + + this.moveTo(x, y + height - radius); + this.lineTo(x, y + radius); + this.arcTo(x, y, x + radius, y, radius); + + this.isDirty = true; + } +} + +/** + * @classdesc + * a base renderer object + */ +class Renderer { + /** + * @param {Application.Settings} [options] - optional parameters for the renderer + */ + constructor(options) { + /** + * The given constructor options + * @public + * @type {object} + */ + this.settings = options; + + /** + * the requested video size ratio + * @public + * @type {number} + */ + this.designRatio = this.settings.width / this.settings.height; + + /** + * the scaling ratio to be applied to the main canvas + * @type {Vector2d} + * @default <1,1> + */ + this.scaleRatio = new Vector2d(this.settings.scale, this.settings.scale); + + /** + * true if the current rendering context is valid + * @default true + * @type {boolean} + */ + this.isContextValid = true; + + /** + * the default method to sort object ("sorting", "z-buffer") + * @type {string} + * @default "sorting" + */ + this.depthTest = "sorting"; + + + /** + * The Path2D instance used by the renderer to draw primitives + * @type {Path2D} + */ + this.path2D = new Path2D(); + + /** + * The renderer type : Canvas, WebGL, etc... + * (override this property with a specific value when implementing a custom renderer) + * @type {string} + */ + this.type = "Generic"; + + /** + * @ignore + */ + this.currentScissor = new Int32Array([ 0, 0, this.settings.width, this.settings.height ]); + + /** + * @ignore + */ + this.maskLevel = 0; + + /** + * @ignore + */ + this.currentBlendMode = "none"; + + // create the main screen canvas + if (platform.ejecta === true) { + // a main canvas is already automatically created by Ejecta + this.canvas = globalThis.document.getElementById("canvas"); + } else if (typeof globalThis.canvas !== "undefined") { + // a global canvas is available, e.g. webapp adapter for wechat + this.canvas = globalThis.canvas; + } else if (typeof this.settings.canvas !== "undefined") { + this.canvas = this.settings.canvas; + } else { + this.canvas = createCanvas(this.settings.width, this.settings.height); + } + + // global color + this.currentColor = new Color(0, 0, 0, 1.0); + + // global tint color + this.currentTint = new Color(255, 255, 255, 1.0); + + // the projectionMatrix (set through setProjection) + this.projectionMatrix = new Matrix3d(); + + // default uvOffset + this.uvOffset = 0; + } + + /** + * return the height of the canvas which this renderer draws to + * @returns {number} height of the system Canvas + */ + get height() { + return this.getCanvas().height; + } + + set height(value) { + this.resize(this.width, value); + } + + /** + * return the width of the canvas which this renderer draws to + * @returns {number} width of the system Canvas + */ + get width() { + return this.getCanvas().width; + } + + set width(value) { + this.resize(value, this.height); + } + + /** + * prepare the framebuffer for drawing a new frame + */ + clear() {} + + /** + * render the main framebuffer on screen + */ + flush() {} + + /** + * Reset context state + */ + reset() { + this.resetTransform(); + this.setBlendMode(this.settings.blendMode); + this.setColor("#000000"); + this.clearTint(); + this.cache.clear(); + this.currentScissor[0] = 0; + this.currentScissor[1] = 0; + this.currentScissor[2] = this.width; + this.currentScissor[3] = this.height; + this.clearMask(); + } + + /** + * return a reference to the canvas which this renderer draws to + * @returns {HTMLCanvasElement} + */ + getCanvas() { + return this.canvas; + } + + /** + * return a reference to this renderer canvas corresponding Context + * @returns {CanvasRenderingContext2D|WebGLRenderingContext} + */ + getContext() { + return this.context; + } + + /** + * returns the current blend mode for this renderer + * @returns {string} blend mode + */ + getBlendMode() { + return this.currentBlendMode; + } + + /** + * Returns the 2D Context object of the given Canvas
                            + * Also configures anti-aliasing and blend modes based on constructor options. + * @param {HTMLCanvasElement} canvas + * @param {boolean} [transparent=true] - use false to disable transparency + * @returns {CanvasRenderingContext2D} + */ + getContext2d(canvas, transparent) { + if (typeof canvas === "undefined" || canvas === null) { + throw new Error( + "You must pass a canvas element in order to create " + + "a 2d context" + ); + } + + if (typeof canvas.getContext === "undefined") { + throw new Error( + "Your browser does not support HTML5 canvas." + ); + } + + if (typeof transparent !== "boolean") { + transparent = true; + } + + let _context = canvas.getContext("2d", { + "alpha" : transparent + }); + + if (!_context.canvas) { + _context.canvas = canvas; + } + this.setAntiAlias(_context, this.settings.antiAlias); + return _context; + } + + /** + * get the current fill & stroke style color. + * @returns {Color} current global color + */ + getColor() { + return this.currentColor; + } + + /** + * return the current global alpha + * @returns {number} + */ + globalAlpha() { + return this.currentColor.glArray[3]; + } + + /** + * check if the given rect or bounds overlaps with the renderer screen coordinates + * @param {Rect|Bounds} bounds + * @returns {boolean} true if overlaps + */ + overlaps(bounds) { + return ( + bounds.left <= this.width && bounds.right >= 0 && + bounds.top <= this.height && bounds.bottom >= 0 + ); + } + + /** + * resizes the system canvas + * @param {number} width - new width of the canvas + * @param {number} height - new height of the canvas + */ + resize(width, height) { + let canvas = this.getCanvas(); + if (width !== canvas.width || height !== canvas.height) { + canvas.width = width; + canvas.height = height; + this.currentScissor[0] = 0; + this.currentScissor[1] = 0; + this.currentScissor[2] = width; + this.currentScissor[3] = height; + // publish the corresponding event + emit(CANVAS_ONRESIZE, width, height); + } + } + + /** + * enable/disable image smoothing (scaling interpolation) for the given context + * @param {CanvasRenderingContext2D} context + * @param {boolean} [enable=false] + */ + setAntiAlias(context, enable) { + let canvas = context.canvas; + + // enable/disable antialis on the given Context2d object + setPrefixed("imageSmoothingEnabled", enable === true, context); + + // set antialias CSS property on the main canvas + if (enable !== true) { + // https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering + canvas.style["image-rendering"] = "optimizeSpeed"; // legal fallback + canvas.style["image-rendering"] = "-moz-crisp-edges"; // Firefox + canvas.style["image-rendering"] = "-o-crisp-edges"; // Opera + canvas.style["image-rendering"] = "-webkit-optimize-contrast"; // Safari + canvas.style["image-rendering"] = "optimize-contrast"; // CSS 3 + canvas.style["image-rendering"] = "crisp-edges"; // CSS 4 + canvas.style["image-rendering"] = "pixelated"; // CSS 4 + canvas.style.msInterpolationMode = "nearest-neighbor"; // IE8+ + } else { + canvas.style["image-rendering"] = "auto"; + } + } + + /** + * set/change the current projection matrix (WebGL only) + * @param {Matrix3d} matrix + */ + setProjection(matrix) { + this.projectionMatrix.copy(matrix); + } + + /** + * stroke the given shape + * @param {Rect|RoundRect|Polygon|Line|Ellipse} shape - a shape object to stroke + * @param {boolean} [fill=false] - fill the shape with the current color if true + */ + stroke(shape, fill) { + switch (shape.type) { + + // RoundRect + case "RoundRect": + this.strokeRoundRect(shape.left, shape.top, shape.width, shape.height, shape.radius, fill); + break; + + // Rect or Bounds + case "Rectangle": + case "Bounds": + this.strokeRect(shape.left, shape.top, shape.width, shape.height, fill); + break; + + // Polygon or Line + case "Polygon": + case "Line": + this.strokePolygon(shape, fill); + break; + + case "Ellipse": + this.strokeEllipse(shape.pos.x, shape.pos.y, shape.radiusV.x, shape.radiusV.y, fill); + break; + + // Point + case "Point": + this.strokePoint(shape.x, shape.y); + break; + + default: + throw new Error("Invalid geometry for fill/stroke"); + } + } + + /** + * fill the given shape + * @param {Rect|RoundRect|Polygon|Line|Ellipse} shape - a shape object to fill + */ + fill(shape) { + this.stroke(shape, true); + } + + /** + * tint the given image or canvas using the given color + * @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas} src - the source image to be tinted + * @param {Color|string} color - the color that will be used to tint the image + * @param {string} [mode="multiply"] - the composition mode used to tint the image + * @returns {HTMLCanvasElement|OffscreenCanvas} a new canvas element representing the tinted image + */ + tint(src, color, mode) { + let canvas = createCanvas(src.width, src.height, true); + let context = this.getContext2d(canvas); + + context.save(); + + context.fillStyle = color instanceof Color ? color.toRGB() : color; + context.fillRect(0, 0, src.width, src.height); + + context.globalCompositeOperation = mode || "multiply"; + context.drawImage(src, 0, 0); + context.globalCompositeOperation = "destination-atop"; + context.drawImage(src, 0, 0); + + context.restore(); + + return canvas; + } + + /** + * A mask limits rendering elements to the shape and position of the given mask object. + * So, if the renderable is larger than the mask, only the intersecting part of the renderable will be visible. + * Mask are not preserved through renderer context save and restore. + * @param {Rect|RoundRect|Polygon|Line|Ellipse} [mask] - the shape defining the mask to be applied + * @param {boolean} [invert=false] - either the given shape should define what is visible (default) or the opposite + */ + // eslint-disable-next-line no-unused-vars + setMask(mask, invert = false) {} + + /** + * disable (remove) the rendering mask set through setMask. + * @see Renderer#setMask + */ + clearMask() {} + + /** + * set a coloring tint for sprite based renderables + * @param {Color} tint - the tint color + * @param {number} [alpha] - an alpha value to be applied to the tint + */ + setTint(tint, alpha = tint.alpha) { + // global tint color + this.currentTint.copy(tint); + this.currentTint.alpha *= alpha; + } + + /** + * clear the rendering tint set through setTint. + * @see Renderer#setTint + */ + clearTint() { + // reset to default + this.currentTint.setFloat(1.0, 1.0, 1.0, 1.0); + } + + /** + * creates a Blob object representing the last rendered frame + * @param {object} [options] - An object with the following properties: + * @param {string} [options.type="image/png"] - A string indicating the image format + * @param {number} [options.quality] - A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support lossy compression (such as image/jpeg or image/webp). A user agent will use its default quality value if this option is not specified, or if the number is outside the allowed range. + * @returns {Promise} A Promise returning a Blob object representing the last rendered frame + * @example + * renderer.convertToBlob().then((blob) => console.log(blob)); + */ + toBlob(options) { + return new Promise((resolve) => { + once(GAME_AFTER_DRAW, () => { + this.canvas.toBlob((blob) => { + resolve(blob); + }, options ? options.type : undefined, options ? options.quality : undefined); + }); + }); + } + + /** + * creates an ImageBitmap object of the last frame rendered + * (not supported by standard Canvas) + * @param {object} [options] - An object with the following properties: + * @param {string} [options.type="image/png"] - A string indicating the image format + * @param {number} [options.quality] - A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support lossy compression (such as image/jpeg or image/webp). A user agent will use its default quality value if this option is not specified, or if the number is outside the allowed range. + * @returns {Promise} A Promise returning an ImageBitmap. + * @example + * renderer.transferToImageBitmap().then((image) => console.log(image)); + */ + toImageBitmap(options) { + return new Promise((resolve) => { + once(GAME_AFTER_DRAW, () => { + let image = new Image(); + image.src = this.canvas.toDataURL(options); + image.onload = () => { + createImageBitmap(image).then((bitmap) => resolve(bitmap)); + }; + }); + }); + } + + /** + * returns a data URL containing a representation of the last frame rendered + * @param {object} [options] - An object with the following properties: + * @param {string} [options.type="image/png"] - A string indicating the image format + * @param {number} [options.quality] - A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support lossy compression (such as image/jpeg or image/webp). A user agent will use its default quality value if this option is not specified, or if the number is outside the allowed range. + * @returns {Promise} A Promise returning a string containing the requested data URL. + * @example + * renderer.toDataURL().then((dataURL) => console.log(dataURL)); + */ + toDataURL(options) { + return new Promise((resolve) => { + once(GAME_AFTER_DRAW, () => { + resolve(this.canvas.toDataURL(options)); + }); + }); + } +} + +/** + * create a simple 1 frame texture atlas based on the given parameters + * @ignore + */ +function createAtlas(width, height, name = "default", repeat = "no-repeat") { + return { + "meta" : { + "app" : "melonJS", + "size" : { "w" : width, "h" : height }, + "repeat" : repeat, + "image" : "default" + }, + "frames" : [{ + "filename" : name, + "frame" : { "x" : 0, "y" : 0, "w" : width, "h" : height } + }] + }; +} + +/** + * @classdesc + * A Texture atlas class, currently supports :
                            + * - [TexturePacker]{@link http://www.codeandweb.com/texturepacker/} : through JSON export (standard and multipack texture atlas)
                            + * - [ShoeBox]{@link http://renderhjs.net/shoebox/} : through JSON export using the + * melonJS setting [file]{@link https://github.com/melonjs/melonJS/raw/master/media/shoebox_JSON_export.sbx}
                            + * - [Free Texture Packer]{@link http://free-tex-packer.com/app/} : through JSON export (standard and multipack texture atlas)
                            + * - Standard (fixed cell size) spritesheet : through a {framewidth:xx, frameheight:xx, anchorPoint:me.Vector2d} object + * ); + */ +class TextureAtlas { + /** + * @param {object|object[]} atlases - atlas information. See {@link loader.getJSON} + * @param {HTMLImageElement|HTMLCanvasElement|string|HTMLImageElement[]|HTMLCanvasElement[]|string[]} [src=atlas.meta.image] - Image source + * @param {boolean} [cache=false] - Use true to skip caching this Texture + * @example + * // create a texture atlas from a JSON Object + * game.texture = new me.TextureAtlas( + * me.loader.getJSON("texture") + * ); + * + * // create a texture atlas from a multipack JSON Object + * game.texture = new me.TextureAtlas([ + * me.loader.getJSON("texture-0"), + * me.loader.getJSON("texture-1"), + * me.loader.getJSON("texture-2") + * ]); + * + * // create a texture atlas for a spritesheet with an anchorPoint in the center of each frame + * game.texture = new me.TextureAtlas( + * { + * framewidth : 32, + * frameheight : 32, + * anchorPoint : new me.Vector2d(0.5, 0.5) + * }, + * me.loader.getImage("spritesheet") + */ + constructor (atlases, src, cache) { + /** + * to identify the atlas format (e.g. texture packer) + * @ignore + */ + this.format = null; + + /** + * the texture source(s) itself + * @type {Map} + * @ignore + */ + this.sources = new Map(); + + /** + * the atlas dictionnaries + * @type {Map} + * @ignore + */ + this.atlases = new Map(); + + // parse given atlas(es) paremeters + if (typeof (atlases) !== "undefined") { + // normalize to array to keep the following code generic + atlases = Array.isArray(atlases) ? atlases : [atlases]; + for (let i in atlases) { + let atlas = atlases[i]; + + if (typeof(atlas.meta) !== "undefined") { + // Texture Packer or Free Texture Packer + if (atlas.meta.app.includes("texturepacker") || atlas.meta.app.includes("free-tex-packer")) { + this.format = "texturepacker"; + // set the texture + if (typeof(src) === "undefined") { + // get the texture name from the atlas meta data + let image = getImage(atlas.meta.image); + if (!image) { + throw new Error( + "Atlas texture '" + image + "' not found" + ); + } + this.sources.set(atlas.meta.image, image); + } else { + this.sources.set(atlas.meta.image || "default", typeof src === "string" ? getImage(src) : src); + } + this.repeat = "no-repeat"; + } + // ShoeBox + else if (atlas.meta.app.includes("ShoeBox")) { + if (!atlas.meta.exporter || !atlas.meta.exporter.includes("melonJS")) { + throw new Error( + "ShoeBox requires the JSON exporter : " + + "https://github.com/melonjs/melonJS/tree/master/media/shoebox_JSON_export.sbx" + ); + } + this.format = "ShoeBox"; + this.repeat = "no-repeat"; + this.sources.set("default", typeof src === "string" ? getImage(src) : src); + } + // Internal texture atlas + else if (atlas.meta.app.includes("melonJS")) { + this.format = "melonJS"; + this.repeat = atlas.meta.repeat || "no-repeat"; + this.sources.set("default", typeof src === "string" ? getImage(src) : src); + } + // initialize the atlas + this.atlases.set(atlas.meta.image || "default", this.parse(atlas)); + + } else { + // a regular spritesheet + if (typeof(atlas.framewidth) !== "undefined" && + typeof(atlas.frameheight) !== "undefined") { + this.format = "Spritesheet (fixed cell size)"; + this.repeat = "no-repeat"; + + if (typeof(src) !== "undefined") { + // overwrite if specified + atlas.image = typeof src === "string" ? getImage(src) : src; + } + // initialize the atlas + this.atlases.set("default", this.parseFromSpriteSheet(atlas)); + this.sources.set("default", atlas.image); + + } + } + } // end forEach + } + + // if format not recognized + if (this.atlases.length === 0) { + throw new Error("texture atlas format not supported"); + } + + // Add self to TextureCache if cache !== false + if (cache !== false) { + this.sources.forEach((source) => { + renderer.cache.set(source, this); + }); + } + } + + /** + * build an atlas from the given data + * @ignore + */ + parse(data) { + let atlas = {}; + + data.frames.forEach((frame) => { + // fix wrongly formatted JSON (e.g. last dummy object in ShoeBox) + if (frame.hasOwnProperty("filename")) { + // Source coordinates + let s = frame.frame; + + let originX, originY; + // Pixel-based offset origin from the top-left of the source frame + let hasTextureAnchorPoint = (frame.spriteSourceSize && frame.sourceSize && frame.pivot); + if (hasTextureAnchorPoint) { + originX = (frame.sourceSize.w * frame.pivot.x) - ((frame.trimmed) ? frame.spriteSourceSize.x : 0); + originY = (frame.sourceSize.h * frame.pivot.y) - ((frame.trimmed) ? frame.spriteSourceSize.y : 0); + } + + atlas[frame.filename] = { + name : frame.filename, // frame name + texture : data.meta.image || "default", // the source texture + offset : new Vector2d(s.x, s.y), + anchorPoint : (hasTextureAnchorPoint) ? new Vector2d(originX / s.w, originY / s.h) : null, + trimmed : !!frame.trimmed, + width : s.w, + height : s.h, + angle : (frame.rotated === true) ? -ETA : 0 + }; + this.addUVs(atlas, frame.filename, data.meta.size.w, data.meta.size.h); + } + }); + return atlas; + } + + /** + * build an atlas from the given spritesheet + * @ignore + */ + parseFromSpriteSheet(data) { + let atlas = {}; + let image = data.image; + let spacing = data.spacing || 0; + let margin = data.margin || 0; + + let width = image.width; + let height = image.height; + + // calculate the sprite count (line, col) + let spritecount = pool.pull("Vector2d", + ~~((width - margin + spacing) / (data.framewidth + spacing)), + ~~((height - margin + spacing) / (data.frameheight + spacing)) + ); + + // verifying the texture size + if ((width % (data.framewidth + spacing)) !== 0 || + (height % (data.frameheight + spacing)) !== 0) { + let computed_width = spritecount.x * (data.framewidth + spacing); + let computed_height = spritecount.y * (data.frameheight + spacing); + if (computed_width - width !== spacing && computed_height - height !== spacing) { + // "truncate size" if delta is different from the spacing size + width = computed_width; + height = computed_height; + // warning message + console.warn( + "Spritesheet Texture for image: " + image.src + + " is not divisible by " + (data.framewidth + spacing) + + "x" + (data.frameheight + spacing) + + ", truncating effective size to " + width + "x" + height + ); + } + } + + // build the local atlas + for (let frame = 0, count = spritecount.x * spritecount.y; frame < count; frame++) { + let name = "" + frame; + atlas[name] = { + name : name, + texture : "default", // the source texture + offset : new Vector2d( + margin + (spacing + data.framewidth) * (frame % spritecount.x), + margin + (spacing + data.frameheight) * ~~(frame / spritecount.x) + ), + anchorPoint : (data.anchorPoint || null), + trimmed : false, + width : data.framewidth, + height : data.frameheight, + angle : 0 + }; + this.addUVs(atlas, name, width, height); + } + + pool.push(spritecount); + + return atlas; + } + + /** + * return the default or specified atlas dictionnary + * @param {string} [name] - atlas name in case of multipack textures + * @returns {object} + */ + getAtlas(name) { + if (typeof name === "string") { + return this.atlases.get(name); + } else { + return this.atlases.values().next().value; + } + } + + /** + * return the format of the atlas dictionnary + * @returns {string} will return "texturepacker", or "ShoeBox", or "melonJS", or "Spritesheet (fixed cell size)" + */ + getFormat() { + return this.format; + } + + /** + * return the source texture for the given region (or default one if none specified) + * @param {object} [region] - region name in case of multipack textures + * @returns {HTMLImageElement|HTMLCanvasElement} + */ + getTexture(region) { + if ((typeof region === "object") && (typeof region.texture === "string")) { + return this.sources.get(region.texture); + } else { + return this.sources.values().next().value; + } + } + + /** + * add a region to the atlas + * @param {string} name - region mame + * @param {number} x - x origin of the region + * @param {number} y - y origin of the region + * @param {number} w - width of the region + * @param {number} h - height of the region + * @returns {object} the created region + */ + addRegion(name, x, y, w, h) { + // TODO: Require proper atlas regions instead of caching arbitrary region keys + if (renderer.settings.verbose === true) { + console.warn("Adding texture region", name, "for texture", this); + } + + let source = this.getTexture(); + let atlas = this.getAtlas(); + let dw = source.width; + let dh = source.height; + + atlas[name] = { + name : name, + offset : new Vector2d(x, y), + width : w, + height : h, + angle : 0 + }; + + this.addUVs(atlas, name, dw, dh); + + return atlas[name]; + } + + /** + * return a normalized region (or frame) information for the specified sprite name + * @param {string} name - name of the sprite + * @param {string} [atlas] - name of a specific atlas where to search for the region + * @returns {object} + */ + getRegion(name, atlas) { + let region; + if (typeof atlas === "string") { + region = this.getAtlas(atlas)[name]; + } else { + // look for the given region in each existing atlas + for (let atlas of this.atlases.values()) { + if (typeof atlas[name] !== "undefined") { + // there should be only one + region = atlas[name]; + break; + } + } + } + return region; + } + + /** + * return the uvs mapping for the given region + * @param {object} name - region (or frame) name + * @returns {Float32Array} region Uvs + */ + getUVs(name) { + // Get the source texture region + let region = this.getRegion(name); + + if (typeof(region) === "undefined") { + // TODO: Require proper atlas regions instead of caching arbitrary region keys + let keys = name.split(","), + sx = +keys[0], + sy = +keys[1], + sw = +keys[2], + sh = +keys[3]; + region = this.addRegion(name, sx, sy, sw, sh); + } + return region.uvs; + } + + /** + * add uvs mapping for the given region + * @param {object} atlas - the atlas dictionnary where the region is define + * @param {object} name - region (or frame) name + * @param {number} w - the width of the region + * @param {number} h - the height of the region + * @returns {Float32Array} the created region UVs + */ + addUVs(atlas, name, w, h) { + // ignore if using the Canvas Renderer + if (typeof renderer.gl !== "undefined") { + // Source coordinates + let s = atlas[name].offset; + let sw = atlas[name].width; + let sh = atlas[name].height; + + atlas[name].uvs = new Float32Array([ + s.x / w, // u0 (left) + s.y / h, // v0 (top) + (s.x + sw) / w, // u1 (right) + (s.y + sh) / h // v1 (bottom) + ]); + // Cache source coordinates + // TODO: Remove this when the Batcher only accepts a region name + let key = s.x + "," + s.y + "," + w + "," + h; + atlas[key] = atlas[name]; + } + return atlas[name].uvs; + } + + /** + * Create a sprite object using the first region found using the specified name + * @param {string} name - name of the sprite + * @param {object} [settings] - Additional settings passed to the {@link Sprite} contructor + * @param {boolean} [nineSlice=false] - if true returns a 9-slice sprite + * @returns {Sprite|NineSliceSprite} + * @example + * // create a new texture object under the `game` namespace + * game.texture = new me.TextureAtlas( + * me.loader.getJSON("texture"), + * me.loader.getImage("texture") + * ); + * ... + * ... + * // create a new "coin" sprite + * let sprite = game.texture.createSpriteFromName("coin.png"); + * // set the renderable position to bottom center + * sprite.anchorPoint.set(0.5, 1.0); + * ... + * ... + * // create a 9-slice sprite + * let dialogPanel = game.texture.createSpriteFromName( + * "rpg_dialo.png", + * // width & height are mandatory for 9-slice sprites + * { width: this.width, height: this.height }, + * true + * ); + */ + createSpriteFromName(name, settings, nineSlice = false) { + // instantiate a new sprite object + return pool.pull( + nineSlice === true ? "me.NineSliceSprite" : "me.Sprite", + 0, 0, + Object.assign({ + image: this, + region : name + }, settings || {}) + ); + } + + /** + * Create an animation object using the first region found using all specified names + * @param {string[]|number[]} names - list of names for each sprite + * (when manually creating a Texture out of a spritesheet, only numeric values are authorized) + * @param {object} [settings] - Additional settings passed to the {@link Sprite} contructor + * @returns {Sprite} + * @example + * // create a new texture object under the `game` namespace + * game.texture = new me.TextureAtlas( + * me.loader.getJSON("texture"), + * me.loader.getImage("texture") + * ); + * + * // create a new Animated Sprite + * let sprite = game.texture.createAnimationFromName([ + * "walk0001.png", "walk0002.png", "walk0003.png", + * "walk0004.png", "walk0005.png", "walk0006.png", + * "walk0007.png", "walk0008.png", "walk0009.png", + * "walk0010.png", "walk0011.png" + * ]); + * + * // define an additional basic walking animation + * sprite.addAnimation ("simple_walk", [0,2,1]); + * // you can also use frame name to define your animation + * sprite.addAnimation ("speed_walk", ["walk0007.png", "walk0008.png", "walk0009.png", "walk0010.png"]); + * // set the default animation + * sprite.setCurrentAnimation("simple_walk"); + * // set the renderable position to bottom center + * sprite.anchorPoint.set(0.5, 1.0); + */ + createAnimationFromName(names, settings) { + let tpAtlas = [], indices = {}; + let width = 0, height = 0; + let region; + // iterate through the given names + // and create a "normalized" atlas + for (let i = 0; i < names.length; ++i) { + region = this.getRegion(names[i]); + if (region == null) { + // throw an error + throw new Error("Texture - region for " + names[i] + " not found"); + } + tpAtlas[i] = region; + // save the corresponding index + indices[names[i]] = i; + // calculate the max size of a frame + width = Math.max(region.width, width); + height = Math.max(region.height, height); + } + // instantiate a new animation sheet object + return new Sprite(0, 0, Object.assign({ + image: this, + framewidth: width, + frameheight: height, + margin: 0, + spacing: 0, + atlas: tpAtlas, + atlasIndices: indices + }, settings || {})); + } +} + +class Multimap { + constructor(operator, iterable) { + this.size_ = 0; + this.map = new Map(); + this.operator = operator; + if (iterable) { + for (const [key, value] of iterable) { + this.put(key, value); + } + } + return this; + } + get size() { + return this.size_; + } + get(key) { + const values = this.map.get(key); + if (values) { + return this.operator.clone(values); + } + else { + return this.operator.create(); + } + } + put(key, value) { + let values = this.map.get(key); + if (!values) { + values = this.operator.create(); + } + if (!this.operator.add(value, values)) { + return false; + } + this.map.set(key, values); + this.size_++; + return true; + } + putAll(arg1, arg2) { + let pushed = 0; + if (arg2) { + const key = arg1; + const values = arg2; + for (const value of values) { + this.put(key, value); + pushed++; + } + } + else if (arg1 instanceof Multimap) { + for (const [key, value] of arg1.entries()) { + this.put(key, value); + pushed++; + } + } + else { + throw new TypeError("unexpected arguments"); + } + return pushed > 0; + } + has(key) { + return this.map.has(key); + } + hasEntry(key, value) { + return this.operator.has(value, this.get(key)); + } + delete(key) { + this.size_ -= this.operator.size(this.get(key)); + return this.map.delete(key); + } + deleteEntry(key, value) { + const current = this.get(key); + if (!this.operator.delete(value, current)) { + return false; + } + this.map.set(key, current); + this.size_--; + return true; + } + clear() { + this.map.clear(); + this.size_ = 0; + } + keys() { + return this.map.keys(); + } + entries() { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + function* gen() { + for (const [key, values] of self.map.entries()) { + for (const value of values) { + yield [key, value]; + } + } + } + return gen(); + } + values() { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + function* gen() { + for (const [, value] of self.entries()) { + yield value; + } + } + return gen(); + } + forEach(callback, thisArg) { + for (const [key, value] of this.entries()) { + callback.call(thisArg === undefined ? this : thisArg, value, key, this); + } + } + [Symbol.iterator]() { + return this.entries(); + } + asMap() { + const ret = new Map(); + for (const key of this.keys()) { + ret.set(key, this.operator.clone(this.get(key))); + } + return ret; + } +} + +class ArrayMultimap extends Multimap { + constructor(iterable) { + super(new ArrayOperator(), iterable); + } + get [Symbol.toStringTag]() { + return "ArrayMultimap"; + } +} +class ArrayOperator { + create() { + return []; + } + clone(collection) { + return collection.slice(); + } + add(value, collection) { + collection.push(value); + return true; + } + size(collection) { + return collection.length; + } + delete(value, collection) { + const index = collection.indexOf(value); + if (index > -1) { + collection.splice(index, 1); + return true; + } + return false; + } + has(value, collection) { + return collection.includes(value); + } +} + +class SetMultimap extends Multimap { + constructor(iterable) { + super(new SetOperator(), iterable); + } + get [Symbol.toStringTag]() { + return "SetMultimap"; + } +} +class SetOperator { + create() { + return new Set(); + } + clone(collection) { + return new Set(collection); + } + add(value, collection) { + const prev = collection.size; + collection.add(value); + return prev !== collection.size; + } + size(collection) { + return collection.size; + } + delete(value, collection) { + return collection.delete(value); + } + has(value, collection) { + return collection.has(value); + } +} + +/** + * a basic texture cache object + * @ignore + */ +class TextureCache { + + /** + * @ignore + */ + constructor(max_size = Infinity) { + // cache uses an array to allow for duplicated key + this.cache = new ArrayMultimap(); + this.tinted = new Map(); + this.units = new Map(); + this.usedUnits = new Set(); + this.max_size = max_size; + this.clear(); + } + + /** + * @ignore + */ + clear() { + this.cache.clear(); + this.tinted.clear(); + this.units.clear(); + this.usedUnits.clear(); + } + + /** + * @ignore + */ + allocateTextureUnit() { + // find the first unit available among the max_size + for (let unit = 0; unit < this.max_size; unit++) { + // Check if unit is available + if (!this.usedUnits.has(unit)) { + // Add to used set + this.usedUnits.add(unit); + // return the new unit + return unit; + } + } + + // No units available + // TODO: Merge textures instead of throwing an exception + throw new Error( + "Texture cache overflow: " + this.max_size + + " texture units available for this GPU." + ); + } + + /** + * @ignore + */ + freeTextureUnit(texture) { + let unit = this.units.get(texture); + // was a texture unit allocated ? + if (typeof unit !== "undefined") { + this.usedUnits.delete(unit); + this.units.delete(texture); + } + } + + /** + * @ignore + */ + get(image, atlas) { + let entry; + + if (typeof atlas === "undefined") { + entry = this.cache.get(image)[0]; + } else { + // manage cases where a specific atlas is specified + this.cache.forEach((value, key) => { + let _atlas = value.getAtlas()[0]; + if (key === image && _atlas.width === atlas.framewidth && _atlas.height === atlas.frameheight) { + entry = value; + } + }); + } + + if (typeof entry === "undefined") { + if (!atlas) { + atlas = createAtlas(image.width, image.height, image.src ? getBasename(image.src) : undefined); + } + entry = new TextureAtlas(atlas, image, false); + this.set(image, entry); + } + + return entry; + } + + /** + * @ignore + */ + delete(image) { + if (this.cache.has(image)) { + let texture = this.cache.get(image)[0]; + if (typeof texture !== "undefined") { + this.freeTextureUnit(texture); + } + this.cache.delete(image); + } + } + + /** + * @ignore + */ + tint(src, color) { + // make sure the src is in the cache + let image_cache = this.tinted.get(src); + + if (image_cache === undefined) { + image_cache = this.tinted.set(src, new Map()); + } + + if (!image_cache.has(color)) { + image_cache.set(color, renderer.tint(src, color, "multiply")); + } + + return image_cache.get(color); + } + + /** + * @ignore + */ + set(image, texture) { + let width = image.width; + let height = image.height; + + // warn if a non POT texture is added to the cache when using WebGL1 + if (renderer.WebGLVersion === 1 && (!isPowerOfTwo(width) || !isPowerOfTwo(height))) { + let src = typeof image.src !== "undefined" ? image.src : image; + console.warn( + "[Texture] " + src + " is not a POT texture " + + "(" + width + "x" + height + ")" + ); + } + return this.cache.put(image, texture); + } + + /** + * @ignore + */ + getUnit(texture) { + if (!this.units.has(texture)) { + this.units.set(texture, this.allocateTextureUnit()); + } + return this.units.get(texture); + } +} + +/** + * @classdesc + * a canvas renderer object + * @augments Renderer + */ +class CanvasRenderer extends Renderer { + /** + * @param {Application.Settings} [options] - optional parameters for the renderer + */ + constructor(options) { + // parent constructor + super(options); + + // defined the 2d context + this.context = this.getContext2d(this.getCanvas(), this.settings.transparent); + + this.setBlendMode(this.settings.blendMode); + + // apply the default color to the 2d context + this.setColor(this.currentColor); + + // create a texture cache + this.cache = new TextureCache(); + + if (this.settings.textureSeamFix !== false && !this.settings.antiAlias) { + // enable the tile texture seam fix with the canvas renderer + this.uvOffset = 1; + } + + // set the renderer type + this.type = "CANVAS"; + + // context lost & restore event for canvas + this.getCanvas().addEventListener("contextlost", (e) => { + e.preventDefault(); + this.isContextValid = false; + emit(ONCONTEXT_LOST, this); + }, false ); + // ctx.restoreContext() + this.getCanvas().addEventListener("contextrestored", () => { + this.isContextValid = true; + emit(ONCONTEXT_RESTORED, this); + }, false ); + + // reset the renderer on game reset + on(GAME_RESET, () => { + this.reset(); + }); + } + + /** + * Reset context state + */ + reset() { + super.reset(); + this.clearColor(this.currentColor, this.settings.transparent !== true); + } + + /** + * Reset the canvas transform to identity + */ + resetTransform() { + this.getContext().setTransform(1, 0, 0, 1, 0, 0); + } + + /** + * set a blend mode for the given context.
                            + * Supported blend mode between Canvas and WebGL remderer :
                            + * - "normal" : this is the default mode and draws new content on top of the existing content
                            + *
                            + * - "multiply" : the pixels of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.
                            + *
                            + * - "additive or lighter" : where both content overlap the color is determined by adding color values.
                            + *
                            + * - "screen" : The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)
                            + *
                            + * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + * @param {string} [mode="normal"] - blend mode : "normal", "multiply", "lighter, "additive", "screen" + * @param {CanvasRenderingContext2D} [context] + */ + setBlendMode(mode = "normal", context) { + context = context || this.getContext(); + this.currentBlendMode = mode; + switch (mode) { + case "screen" : + context.globalCompositeOperation = "screen"; + break; + + case "lighter" : + case "additive" : + context.globalCompositeOperation = "lighter"; + break; + + case "multiply" : + context.globalCompositeOperation = "multiply"; + break; + + default : // normal + context.globalCompositeOperation = "source-over"; + this.currentBlendMode = "normal"; + break; + } + } + + /** + * prepare the framebuffer for drawing a new frame + */ + clear() { + if (this.settings.transparent === false) { + let canvas = this.getCanvas(); + let context = this.getContext(); + context.clearRect(0, 0, canvas.width, canvas.height); + } + } + + /** + * Clears the main framebuffer with the given color + * @param {Color|string} [color="#000000"] - CSS color. + * @param {boolean} [opaque=false] - Allow transparency [default] or clear the surface completely [true] + */ + clearColor(color = "#000000", opaque = false) { + let canvas = this.getCanvas(); + let context = this.getContext(); + + this.save(); + this.resetTransform(); + context.globalAlpha = 1; + context.globalCompositeOperation = opaque === true ? "copy" : "source-over"; + context.fillStyle = (color instanceof Color) ? color.toRGBA() : color; + this.fillRect(0, 0, canvas.width, canvas.height); + this.restore(); + } + + /** + * Erase the pixels in the given rectangular area by setting them to transparent black (rgba(0,0,0,0)). + * @param {number} x - x axis of the coordinate for the rectangle starting point. + * @param {number} y - y axis of the coordinate for the rectangle starting point. + * @param {number} width - The rectangle's width. + * @param {number} height - The rectangle's height. + */ + clearRect(x, y, width, height) { + this.getContext().clearRect(x, y, width, height); + } + + /** + * Create a pattern with the specified repetition + * @param {HTMLImageElement|SVGImageElement|HTMLVideoElement|HTMLCanvasElement|ImageBitmap|OffscreenCanvas|VideoFrame} image - Source image to be used as the pattern's image + * @param {string} repeat - Define how the pattern should be repeated + * @returns {CanvasPattern} + * @see ImageLayer#repeat + * @example + * let tileable = renderer.createPattern(image, "repeat"); + * let horizontal = renderer.createPattern(image, "repeat-x"); + * let vertical = renderer.createPattern(image, "repeat-y"); + * let basic = renderer.createPattern(image, "no-repeat"); + */ + createPattern(image, repeat) { + return this.getContext().createPattern(image, repeat); + } + + /** + * Draw an image onto the main using the canvas api + * @param {HTMLImageElement|SVGImageElement|HTMLVideoElement|HTMLCanvasElement|ImageBitmap|OffscreenCanvas|VideoFrame} image - An element to draw into the context. + * @param {number} sx - The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. + * @param {number} sy - The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. + * @param {number} sw - The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used. + * @param {number} sh - The height of the sub-rectangle of the source image to draw into the destination context. + * @param {number} dx - The X coordinate in the destination canvas at which to place the top-left corner of the source image. + * @param {number} dy - The Y coordinate in the destination canvas at which to place the top-left corner of the source image. + * @param {number} dw - The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn. + * @param {number} dh - The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn. + * @example + * // Position the image on the canvas: + * renderer.drawImage(image, dx, dy); + * // Position the image on the canvas, and specify width and height of the image: + * renderer.drawImage(image, dx, dy, dWidth, dHeight); + * // Clip the image and position the clipped part on the canvas: + * renderer.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight); + */ + drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) { + if (this.getGlobalAlpha() < 1 / 255) { + // Fast path: don't draw fully transparent + return; + } + let context = this.getContext(); + + if (typeof sw === "undefined") { + sw = dw = image.width; + sh = dh = image.height; + dx = sx; + dy = sy; + sx = 0; + sy = 0; + } + else if (typeof dx === "undefined") { + dx = sx; + dy = sy; + dw = sw; + dh = sh; + sw = image.width; + sh = image.height; + sx = 0; + sy = 0; + } + + if (this.settings.subPixel === false) { + // clamp to pixel grid + dx = ~~dx; + dy = ~~dy; + } + + // apply a tint if required + let source = image; + let tint = this.currentTint.toArray(); + if (tint[0] !== 1.0 || tint[1] !== 1.0 || tint[2] !== 1.0) { + // get a tinted version of this image from the texture cache + source = this.cache.tint(image, this.currentTint.toRGB()); + } + context.drawImage(source, sx, sy, sw, sh, dx, dy, dw, dh); + } + + /** + * Draw a pattern within the given rectangle. + * @param {CanvasPattern} pattern - Pattern object + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @see CanvasRenderer#createPattern + */ + drawPattern(pattern, x, y, width, height) { + if (this.getGlobalAlpha() < 1 / 255) { + // Fast path: don't draw fully transparent + return; + } + let context = this.getContext(); + let fillStyle = context.fillStyle; + context.fillStyle = pattern; + context.fillRect(x, y, width, height); + context.fillStyle = fillStyle; + } + + /** + * starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path + * @example + * // First path + * renderer.beginPath(); + * renderer.setColor("blue"); + * renderer.moveTo(20, 20); + * renderer.lineTo(200, 20); + * renderer.stroke(); + * // Second path + * renderer.beginPath(); + * renderer.setColor("green"); + * renderer.moveTo(20, 20); + * renderer.lineTo(120, 120); + * renderer.stroke(); + */ + beginPath() { + this.getContext().beginPath(); + } + + /** + * begins a new sub-path at the point specified by the given (x, y) coordinates. + * @param {number} x - The x axis of the point. + * @param {number} y - The y axis of the point. + */ + moveTo(x, y) { + this.getContext().moveTo(x, y); + } + + /** + * adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates. + */ + lineTo(x, y) { + this.getContext().lineTo(x, y); + } + + /** + * creates a rectangular path whose starting point is at (x, y) and whose size is specified by width and height. + * @param {number} x - The x axis of the coordinate for the rectangle starting point. + * @param {number} y - The y axis of the coordinate for the rectangle starting point. + * @param {number} width - The rectangle's width. + * @param {number} height - The rectangle's height. + */ + rect(x, y, width, height) { + this.getContext().rect(x, y, width, height); + } + + /** + * adds a rounded rectangle to the current path. + * @param {number} x - The x axis of the coordinate for the rectangle starting point. + * @param {number} y - The y axis of the coordinate for the rectangle starting point. + * @param {number} width - The rectangle's width. + * @param {number} height - The rectangle's height. + * @param {number} radius - The corner radius. + */ + roundRect(x, y, width, height, radii) { + this.getContext().roundRect(x, y, width, height, radii); + } + + /** + * stroke the given shape or the current defined path + * @param {Rect|RoundRect|Polygon|Line|Ellipse} [shape] - a shape object to stroke + * @param {boolean} [fill=false] - fill the shape with the current color if true + */ + stroke(shape, fill) { + if (typeof shape === "undefined") { + if (fill === true) { + this.getContext().fill(); + } else { + this.getContext().stroke(); + } + } else { + super.stroke(shape, fill); + } + } + + /** + * fill the given shape or the current defined path + * @param {Rect|RoundRect|Polygon|Line|Ellipse} [shape] - a shape object to fill + */ + fill(shape) { + this.stroke(shape, true); + } + + /** + * 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 + */ + closePath() { + this.getContext().closePath(); + } + + + /** + * Stroke an arc at the specified coordinates with given radius, start and end points + * @param {number} x - arc center point x-axis + * @param {number} y - arc center point y-axis + * @param {number} radius + * @param {number} start - start angle in radians + * @param {number} end - end angle in radians + * @param {boolean} [antiClockwise=false] - draw arc anti-clockwise + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokeArc(x, y, radius, start, end, antiClockwise, fill = false) { + if (this.getGlobalAlpha() < 1 / 255) { + // Fast path: don't draw fully transparent + return; + } + let context = this.getContext(); + + context.translate(x, y); + context.beginPath(); + context.arc(0, 0, radius, start, end, antiClockwise || false); + context[fill === true ? "fill" : "stroke"](); + context.translate(-x, -y); + } + + /** + * Fill an arc at the specified coordinates with given radius, start and end points + * @param {number} x - arc center point x-axis + * @param {number} y - arc center point y-axis + * @param {number} radius + * @param {number} start - start angle in radians + * @param {number} end - end angle in radians + * @param {boolean} [antiClockwise=false] - draw arc anti-clockwise + */ + fillArc(x, y, radius, start, end, antiClockwise) { + this.strokeArc(x, y, radius, start, end, antiClockwise || false, true); + } + + /** + * Stroke an ellipse at the specified coordinates with given radius + * @param {number} x - ellipse center point x-axis + * @param {number} y - ellipse center point y-axis + * @param {number} w - horizontal radius of the ellipse + * @param {number} h - vertical radius of the ellipse + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokeEllipse(x, y, w, h, fill = false) { + if (this.getGlobalAlpha() < 1 / 255) { + // Fast path: don't draw fully transparent + return; + } + let context = this.getContext(); + + let hw = w, + hh = h, + lx = x - hw, + rx = x + hw, + ty = y - hh, + by = y + hh; + + let xmagic = hw * 0.551784, + ymagic = hh * 0.551784, + xmin = x - xmagic, + xmax = x + xmagic, + ymin = y - ymagic, + ymax = y + ymagic; + + context.beginPath(); + context.moveTo(x, ty); + context.bezierCurveTo(xmax, ty, rx, ymin, rx, y); + context.bezierCurveTo(rx, ymax, xmax, by, x, by); + context.bezierCurveTo(xmin, by, lx, ymax, lx, y); + context.bezierCurveTo(lx, ymin, xmin, ty, x, ty); + context[fill === true ? "fill" : "stroke"](); + context.closePath(); + } + + /** + * Fill an ellipse at the specified coordinates with given radius + * @param {number} x - ellipse center point x-axis + * @param {number} y - ellipse center point y-axis + * @param {number} w - horizontal radius of the ellipse + * @param {number} h - vertical radius of the ellipse + */ + fillEllipse(x, y, w, h) { + this.strokeEllipse(x, y, w, h, true); + } + + /** + * Stroke a line of the given two points + * @param {number} startX - the start x coordinate + * @param {number} startY - the start y coordinate + * @param {number} endX - the end x coordinate + * @param {number} endY - the end y coordinate + */ + strokeLine(startX, startY, endX, endY) { + if (this.getGlobalAlpha() < 1 / 255) { + // Fast path: don't draw fully transparent + return; + } + + let context = this.getContext(); + + context.beginPath(); + context.moveTo(startX, startY); + context.lineTo(endX, endY); + context.stroke(); + } + + /** + * Fill a line of the given two points + * @param {number} startX - the start x coordinate + * @param {number} startY - the start y coordinate + * @param {number} endX - the end x coordinate + * @param {number} endY - the end y coordinate + */ + fillLine(startX, startY, endX, endY) { + this.strokeLine(startX, startY, endX, endY); + } + + /** + * Stroke the given me.Polygon on the screen + * @param {Polygon} poly - the shape to draw + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokePolygon(poly, fill = false) { + if (this.getGlobalAlpha() < 1 / 255) { + // Fast path: don't draw fully transparent + return; + } + let context = this.getContext(); + let points = poly.points; + let pointsLength = points.length; + let firstPoint = points[0]; + + this.translate(poly.pos.x, poly.pos.y); + + context.beginPath(); + context.moveTo(firstPoint.x, firstPoint.y); + for (let i = 1; i < pointsLength; i++) { + const point = points[i]; + context.lineTo(point.x, point.y); + } + context.lineTo(firstPoint.x, firstPoint.y); + context[fill === true ? "fill" : "stroke"](); + context.closePath(); + + this.translate(-poly.pos.x, -poly.pos.y); + } + + /** + * Fill the given me.Polygon on the screen + * @param {Polygon} poly - the shape to draw + */ + fillPolygon(poly) { + this.strokePolygon(poly, true); + } + + /** + * Stroke a rectangle at the specified coordinates + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokeRect(x, y, width, height, fill = false) { + if (this.getGlobalAlpha() < 1 / 255) { + // Fast path: don't draw fully transparent + return; + } + let context = this.getContext(); + + context[fill === true ? "fillRect" : "strokeRect"](x, y, width, height); + } + + /** + * Draw a filled rectangle at the specified coordinates + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + */ + fillRect(x, y, width, height) { + this.strokeRect(x, y, width, height, true); + } + + /** + * Stroke a rounded rectangle at the specified coordinates + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {number} radius + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokeRoundRect(x, y, width, height, radius, fill = false) { + if (this.getGlobalAlpha() < 1 / 255) { + // Fast path: don't draw fully transparent + return; + } + let context = this.getContext(); + + context.beginPath(); + context.roundRect(x, y, width, height, radius); + context[fill === true ? "fill" : "stroke"](); + } + + /** + * Draw a rounded filled rectangle at the specified coordinates + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @param {number} radius + */ + fillRoundRect(x, y, width, height, radius) { + this.strokeRoundRect(x, y, width, height, radius, true); + } + + /** + * Stroke a Point at the specified coordinates + * @param {number} x + * @param {number} y + */ + strokePoint(x, y) { + this.strokeLine(x, y, x + 1, y + 1); + } + + /** + * Draw a a point at the specified coordinates + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + */ + fillPoint(x, y) { + this.strokePoint(x, y); + } + + /** + * restores the most recently saved renderer state by popping the top entry in the drawing state stack + * @example + * // Save the current state + * renderer.save(); + * + * // apply a transform and draw a rect + * renderer.tranform(matrix); + * renderer.fillRect(10, 10, 100, 100); + * + * // Restore to the state saved by the most recent call to save() + * renderer.restore(); + */ + restore() { + this.getContext().restore(); + this.currentColor.glArray[3] = this.getGlobalAlpha(); + this.currentScissor[0] = 0; + this.currentScissor[1] = 0; + this.currentScissor[2] = this.getCanvas().width; + this.currentScissor[3] = this.getCanvas().height; + } + + /** + * saves the entire state of the renderer by pushing the current state onto a stack. + * @example + * // Save the current state + * renderer.save(); + * + * // apply a transform and draw a rect + * renderer.tranform(matrix); + * renderer.fillRect(10, 10, 100, 100); + * + * // Restore to the state saved by the most recent call to save() + * renderer.restore(); + */ + save() { + this.getContext().save(); + } + + /** + * adds a rotation to the transformation matrix. + * @param {number} angle - the rotation angle, clockwise in radians + * @example + * // Rotated rectangle + * renderer.rotate((45 * Math.PI) / 180); + * renderer.setColor("red"); + * renderer.fillRect(10, 10, 100, 100); + * + * // Reset transformation matrix to the identity matrix + * renderer.setTransform(1, 0, 0, 1, 0, 0); + */ + rotate(angle) { + this.getContext().rotate(angle); + } + + /** + * adds a scaling transformation to the renderer units horizontally and/or vertically + * @param {number} x - Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of 1 results in no horizontal scaling. + * @param {number} y - Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results in no vertical scaling + */ + scale(x, y) { + this.getContext().scale(x, y); + } + + /** + * Set the current fill & stroke style color. + * By default, or upon reset, the value is set to #000000. + * @param {Color|string} color - css color value + */ + setColor(color) { + let currentColor = this.currentColor; + let context = this.getContext(); + + currentColor.copy(color); + // globalAlpha is applied at rendering time by the canvas + + context.strokeStyle = context.fillStyle = currentColor.toRGBA(); + } + + /** + * Set the global alpha + * @param {number} alpha - 0.0 to 1.0 values accepted. + */ + setGlobalAlpha(alpha) { + this.getContext().globalAlpha = alpha; + } + + /** + * Return the global alpha + * @returns {number} global alpha value + */ + getGlobalAlpha() { + return this.getContext().globalAlpha; + } + + /** + * Set the line width on the context + * @param {number} width - Line width + */ + setLineWidth(width) { + this.getContext().lineWidth = width; + } + + /** + * Reset (overrides) the renderer transformation matrix to the + * identity one, and then apply the given transformation matrix. + * @param {Matrix2d|number} a - a matrix2d to transform by, or a the a component to multiply the current matrix by + * @param {number} b - the b component to multiply the current matrix by + * @param {number} c - the c component to multiply the current matrix by + * @param {number} d - the d component to multiply the current matrix by + * @param {number} e - the e component to multiply the current matrix by + * @param {number} f - the f component to multiply the current matrix by + */ + setTransform(a, b, c, d, e, f) { + this.resetTransform(); + this.transform(a, b, c, d, e, f); + } + + /** + * Multiply given matrix into the renderer tranformation matrix + * @see {@link CanvasRenderer.setTransform} which will reset the current transform matrix prior to performing the new transformation + * @param {Matrix2d|number} a - a matrix2d to transform by, or a the a component to multiply the current matrix by + * @param {number} b - the b component to multiply the current matrix by + * @param {number} c - the c component to multiply the current matrix by + * @param {number} d - the d component to multiply the current matrix by + * @param {number} e - the e component to multiply the current matrix by + * @param {number} f - the f component to multiply the current matrix by + */ + transform(a, b, c, d, e, f) { + if (typeof a === "object") { + let m = a.toArray(); + a = m[0]; + b = m[1]; + c = m[3]; + d = m[4]; + e = m[6]; + f = m[7]; + } + // else individual components + + if (this.settings.subPixel === false) { + e |= 0; + f |= 0; + } + + this.getContext().transform(a, b, c, d, e, f); + } + + /** + * adds a translation transformation to the current matrix. + * @param {number} x - Distance to move in the horizontal direction. Positive values are to the right, and negative to the left. + * @param {number} y - Distance to move in the vertical direction. Positive values are down, and negative are up. + */ + translate(x, y) { + if (this.settings.subPixel === false) { + this.getContext().translate(~~x, ~~y); + } else { + this.getContext().translate(x, y); + } + } + + /** + * clip the given region from the original canvas. Once a region is clipped, + * all future drawing will be limited to the clipped region. + * You can however save the current region using the save(), + * and restore it (with the restore() method) any time in the future. + * (this is an experimental feature !) + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + */ + clipRect(x, y, width, height) { + let canvas = this.getCanvas(); + // if requested box is different from the current canvas size; + if (x !== 0 || y !== 0 || width !== canvas.width || height !== canvas.height) { + let currentScissor = this.currentScissor; + // if different from the current scissor box + if (currentScissor[0] !== x || currentScissor[1] !== y || + currentScissor[2] !== width || currentScissor[3] !== height) { + let context = this.getContext(); + context.beginPath(); + context.rect(x, y, width, height); + context.clip(); + // save the new currentScissor box + currentScissor[0] = x; + currentScissor[1] = y; + currentScissor[2] = width; + currentScissor[3] = height; + } + } + } + + /** + * A mask limits rendering elements to the shape and position of the given mask object. + * If the drawing or rendering area is larger than the mask, only the intersecting part of the renderable will be visible. + * (Note Mask are not preserved through renderer context save and restore and need so be manually cleared) + * @see CanvasRenderer#clearMask + * @param {Rect|RoundRect|Polygon|Line|Ellipse} [mask] - the shape defining the mask to be applied + * @param {boolean} [invert=false] - either the given shape should define what is visible (default) or the opposite + */ + setMask(mask, invert = false) { + let context = this.getContext(); + + if (this.maskLevel === 0) { + // only save context on the first mask + context.save(); + if (typeof mask !== "undefined") { + context.beginPath(); + } + // else use the current path + } + + if (typeof mask !== "undefined") { + switch (mask.type) { + // RoundRect + case "RoundRect": + context.roundRect(mask.top, mask.left, mask.width, mask.height, mask.radius); + break; + + // Rect or Bounds + case "Rectangle": + case "Bounds": + context.rect(mask.top, mask.left, mask.width, mask.height); + break; + + // Polygon or Line + case "Polygon": + { + // polygon + const _x = mask.pos.x, _y = mask.pos.y; + context.moveTo(_x + mask.points[0].x, _y + mask.points[0].y); + for (let i = 1; i < mask.points.length; i++) { + const point = mask.points[i]; + context.lineTo(_x + point.x, _y + point.y); + } + } + break; + + case "Ellipse": + { + const _x = mask.pos.x, _y = mask.pos.y, + hw = mask.radiusV.x, + hh = mask.radiusV.y, + lx = _x - hw, + rx = _x + hw, + ty = _y - hh, + by = _y + hh; + + let xmagic = hw * 0.551784, + ymagic = hh * 0.551784, + xmin = _x - xmagic, + xmax = _x + xmagic, + ymin = _y - ymagic, + ymax = _y + ymagic; + + context.moveTo(_x, ty); + context.bezierCurveTo(xmax, ty, rx, ymin, rx, _y); + context.bezierCurveTo(rx, ymax, xmax, by, _x, by); + context.bezierCurveTo(xmin, by, lx, ymax, lx, _y); + context.bezierCurveTo(lx, ymin, xmin, ty, _x, ty); + } + break; + + default: + throw new Error("Invalid geometry for setMask"); + } + } + + this.maskLevel++; + + if (invert === true) { + context.closePath(); + context.globalCompositeOperation = "destination-atop"; + context.fill(); + } else { + context.clip(); + } + } + + /** + * disable (remove) the rendering mask set through setMask. + * @see CanvasRenderer#setMask + */ + clearMask() { + if (this.maskLevel > 0) { + this.maskLevel = 0; + this.getContext().restore(); + } + } +} + +/** + * Create required arrays for the given layer object + * @ignore + */ +function initArray(rows, cols) { + // initialize the array + let array = new Array(cols); + for (let col = 0; col < cols; col++) { + array[col] = new Array(rows); + for (let row = 0; row < rows; row++) { + array[col][row] = null; + } + } + return array; +} + +/** + * Set a tiled layer Data + * @ignore + */ +function setLayerData(layer, bounds, data) { + let idx = 0; + let width, height; + + // layer provide rows and cols, chunk width and height + if (typeof bounds.rows === "undefined") { + width = bounds.width; + height = bounds.height; + } else { + width = bounds.cols; + height = bounds.rows; + } + // set everything + for (let y = 0; y < height; y++) { + for (let x = 0; x < width; x++) { + // get the value of the gid + const gid = data[idx++]; + // fill the array + if (gid !== 0) { + // add a new tile to the layer + layer.layerData[x + bounds.x][y + bounds.y] = layer.getTileById(gid, x + bounds.x, y + bounds.y); + } + } + } +} + +/** + * @classdesc + * a TMX Tile Layer Object + * Tiled QT 0.7.x format + * @augments Renderable + */ +class TMXLayer extends Renderable { + /** + * @param {object} map - layer data in JSON format ({@link http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#layer}) + * @param {object} data - layer data in JSON format ({@link http://docs.mapeditor.org/en/stable/reference/tmx-map-format/#layer}) + * @param {number} tilewidth - width of each tile in pixels + * @param {number} tileheight - height of each tile in pixels + * @param {string} orientation - "isometric" or "orthogonal" + * @param {TMXTilesetGroup} tilesets - tileset as defined in Tiled + * @param {number} z - z-index position + */ + constructor(map, data, tilewidth, tileheight, orientation, tilesets, z) { + // super constructor + super(0, 0, 0, 0); + + // tile width & height + this.tilewidth = data.tilewidth || tilewidth; + this.tileheight = data.tileheight || tileheight; + + // layer orientation + this.orientation = orientation; + + /** + * Horizontal layer offset in tiles + * @default 0 + * @type {number} + */ + this.x = 0; + + /** + * Vertical layer offset in tiles + * @default 0 + * @type {number} + */ + this.y = 0; + + /** + * The Layer corresponding Tilesets + * @type {TMXTilesetGroup} + */ + this.tilesets = tilesets; + + // the default tileset + // XXX: Is this even used? + this.tileset = (this.tilesets ? this.tilesets.getTilesetByIndex(0) : null); + + // Biggest tile size to draw + this.maxTileSize = { + "width" : 0, + "height" : 0 + }; + for (let i = 0; i < this.tilesets.length; i++) { + const tileset = this.tilesets.getTilesetByIndex(i); + this.maxTileSize.width = Math.max(this.maxTileSize.width, tileset.tilewidth); + this.maxTileSize.height = Math.max(this.maxTileSize.height, tileset.tileheight); + } + + /** + * All animated tilesets in this layer + * @type {TMXTileset[]} + */ + this.animatedTilesets = []; + + /** + * Layer contains tileset animations + * @type {boolean} + */ + this.isAnimated = false; + + /** + * the order in which tiles on orthogonal tile layers are rendered. + * (valid values are "left-down", "left-up", "right-down", "right-up") + * @type {string} + * @default "right-down" + */ + this.renderorder = data.renderorder || "right-down"; + + /** + * the layer class + * @type {string} + */ + this.class = data.class; + + // for displaying order + this.pos.z = z; + + // tiled default coordinates are top-left + this.anchorPoint.set(0, 0); + + // additional TMX flags + this.name = data.name; + this.cols = +data.width; + this.rows = +data.height; + + // layer opacity + let visible = typeof(data.visible) !== "undefined" ? +data.visible : 1; + this.setOpacity(visible ? +data.opacity : 0); + + // layer tint + if (typeof data.tintcolor === "string") { + // Tiled provides #RRGGBB or #AARRGGBB + this.tint.parseHex(data.tintcolor, true); + } + + // layer "real" size + if (this.orientation === "isometric") { + this.width = (this.cols + this.rows) * (this.tilewidth / 2); + this.height = (this.cols + this.rows) * (this.tileheight / 2); + } else { + this.width = this.cols * this.tilewidth; + this.height = this.rows * this.tileheight; + } + + // check if we have any user-defined properties + applyTMXProperties(this, data); + + // set a renderer + this.setRenderer(map.getRenderer()); + + + // initialize the data array + this.layerData = initArray(this.rows, this.cols); + + if (map.infinite === 0) { + // initialize and set the layer data + setLayerData( + this, + this, + decode( + data.data, + data.encoding, + data.compression + ) + ); + } else if (map.infinite === 1) { + // infinite map, initialize per chunk + data.chunks.forEach((chunk) => { + // initialize and set the layer data + setLayerData( + this, + chunk, + decode( + chunk.data, + data.encoding, + data.compression + ) + ); + }); + } + + } + + // called when the layer is added to the game world or a container + onActivateEvent() { + + if (this.animatedTilesets === undefined) { + this.animatedTilesets = []; + } + + if (this.tilesets) { + let tileset = this.tilesets.tilesets; + for (let i = 0; i < tileset.length; i++) { + if (tileset[i].isAnimated) { + this.animatedTilesets.push(tileset[i]); + } + } + } + + this.isAnimated = this.animatedTilesets.length > 0; + + // check for the correct rendering method + if (typeof this.preRender === "undefined" && this.isAnimated === false) { + this.preRender = this.ancestor.getRootAncestor().preRender; + } else { + // Force pre-render off when tileset animation is used + this.preRender = false; + } + + // if pre-rendering method is use, create an offline canvas/renderer + if ((this.preRender === true) && (!this.canvasRenderer)) { + this.canvasRenderer = new CanvasRenderer({ + canvas : createCanvas(this.width, this.height), + width : this.width, + heigth : this.height, + transparent : true + }); + // pre render the layer on the canvas + this.getRenderer().drawTileLayer(this.canvasRenderer, this, this); + } + + this.isDirty = true; + } + + // called when the layer is removed from the game world or a container + onDeactivateEvent() { + // clear all allocated objects + //this.layerData = undefined; + this.animatedTilesets = undefined; + } + + /** + * Set the TMX renderer for this layer object + * @param {TMXRenderer} renderer + * @example + * // use the parent map default renderer + * let layer = new me.TMXLayer(...); + * layer.setRenderer(map.getRenderer()); + */ + setRenderer(renderer) { + this.renderer = renderer; + this.isDirty = true; + } + + /** + * Return the layer current renderer object + * @returns {TMXRenderer} renderer + */ + getRenderer() { + return this.renderer; + } + + /** + * Return the TileId of the Tile at the specified position + * @param {number} x - X coordinate (in world/pixels coordinates) + * @param {number} y - Y coordinate (in world/pixels coordinates) + * @returns {number} TileId or null if there is no Tile at the given position + */ + getTileId(x, y) { + let tile = this.getTile(x, y); + return (tile ? tile.tileId : null); + } + + /** + * Return the Tile object at the specified position + * @param {number} x - X coordinate (in world/pixels coordinates) + * @param {number} y - Y coordinate (in world/pixels coordinates) + * @returns {Tile} corresponding tile or null if there is no defined tile at the coordinate or if outside of the layer bounds + * @example + * // get the TMX Map Layer called "Front layer" + * let layer = me.game.world.getChildByName("Front Layer")[0]; + * // get the tile object corresponding to the latest pointer position + * let tile = layer.getTile(me.input.pointer.x, me.input.pointer.y); + */ + getTile(x, y) { + let tile = null; + + if (this.contains(x, y)) { + let coord = this.getRenderer().pixelToTileCoords(x, y, pool.pull("Vector2d")); + tile = this.cellAt(coord.x, coord.y); + pool.push(coord); + } + return tile; + } + + /** + * assign the given Tile object to the specified position + * @param {Tile} tile - the tile object to be assigned + * @param {number} x - x coordinate (in world/pixels coordinates) + * @param {number} y - y coordinate (in world/pixels coordinates) + * @returns {Tile} the tile object + */ + setTile(tile, x, y) { + this.layerData[x][y] = tile; + this.isDirty = true; + return tile; + } + + /** + * return a new the Tile object corresponding to the given tile id + * @param {number} tileId - tileId + * @param {number} x - X coordinate (in world/pixels coordinates) + * @param {number} y - Y coordinate (in world/pixels coordinates) + * @returns {Tile} the tile object + */ + getTileById(tileId, x, y) { + if (!this.tileset.contains(tileId)) { + // look for the corresponding tileset + this.tileset = this.tilesets.getTilesetByGid(tileId); + } + return new Tile(x, y, tileId, this.tileset); + } + + /** + * Return the Tile object at the specified tile coordinates + * @param {number} x - x position of the tile (in Tile unit) + * @param {number} y - x position of the tile (in Tile unit) + * @param {number} [boundsCheck=true] - check first if within the layer bounds + * @returns {Tile} corresponding tile or null if there is no defined tile at the position or if outside of the layer bounds + * @example + * // return the first tile at offset 0, 0 + * let tile = layer.cellAt(0, 0); + */ + cellAt(x, y, boundsCheck) { + let _x = ~~x; + let _y = ~~y; + + let renderer = this.getRenderer(); + // boundsCheck only used internally by the tiled renderer, when the layer bound check was already done + if (boundsCheck === false || (_x >= 0 && _x < renderer.cols && _y >= 0 && _y < renderer.rows)) { + return this.layerData[_x][_y]; + } else { + return null; + } + } + + /** + * clear the tile at the specified position + * @param {number} x - X coordinate (in map coordinates: row/column) + * @param {number} y - Y coordinate (in map coordinates: row/column) + * @example + * me.game.world.getChildByType(me.TMXLayer).forEach(function(layer) { + * // clear all tiles at the given x,y coordinates + * layer.clearTile(x, y); + * }); + */ + clearTile(x, y) { + // clearing tile + this.layerData[x][y] = null; + // erase the corresponding area in the canvas + if (this.preRender) { + this.canvasRenderer.clearRect(x * this.tilewidth, y * this.tileheight, this.tilewidth, this.tileheight); + } + this.isDirty = true; + } + + /** + * update animations in a tileset layer + * @ignore + */ + update(dt) { + let result = this.isDirty; + if (this.isAnimated) { + for (let i = 0; i < this.animatedTilesets.length; i++) { + result = this.animatedTilesets[i].update(dt) || result; + } + } + return result; + } + + /** + * draw a tileset layer + * @ignore + */ + draw(renderer, rect) { + // use the offscreen canvas + if (this.preRender) { + const width = Math.min(rect.width, this.width); + const height = Math.min(rect.height, this.height); + + // draw using the cached canvas + renderer.drawImage( + this.canvasRenderer.getCanvas(), + rect.pos.x, rect.pos.y, // sx,sy + width, height, // sw,sh + rect.pos.x, rect.pos.y, // dx,dy + width, height // dw,dh + ); + } + // dynamically render the layer + else { + // draw the layer + this.getRenderer().drawTileLayer(renderer, this, rect); + } + } +} + +/** + * @classdesc + * object group definition as defined in Tiled. + * (group definition is translated into the virtual `me.game.world` using `me.Container`) + * @ignore + */ +class TMXGroup { + + constructor(map, data, z) { + + /** + * group name + * @type {string} + */ + this.name = data.name; + + /** + * group width + * @type {number} + */ + this.width = data.width || 0; + + /** + * group height + * @type {number} + */ + this.height = data.height || 0; + + /** + * tint color + * @type {string} + */ + this.tintcolor = data.tintcolor; + + + /** + * the group class + * @type {string} + */ + this.class = data.class; + + /** + * group z order + * @type {number} + */ + this.z = z; + + /** + * group objects list definition + * @see TMXObject + * @type {object[]} + */ + this.objects = []; + + let visible = typeof(data.visible) !== "undefined" ? data.visible : true; + this.opacity = (visible === true) ? clamp(+data.opacity || 1.0, 0.0, 1.0) : 0; + + // check if we have any user-defined properties + applyTMXProperties(this, data); + + // parse all child objects/layers + if (data.objects) { + data.objects.forEach((object) => { + object.tintcolor = this.tintcolor; + this.objects.push(new TMXObject(map, object, z)); + }); + } + + if (data.layers) { + data.layers.forEach((data) => { + let layer = new TMXLayer(map, data, map.tilewidth, map.tileheight, map.orientation, map.tilesets, z++); + // set a renderer + layer.setRenderer(map.getRenderer()); + // resize container accordingly + this.width = Math.max(this.width, layer.width); + this.height = Math.max(this.height, layer.height); + this.objects.push(layer); + }); + } + } + + /** + * reset function + * @ignore + */ + destroy() { + // clear all allocated objects + this.objects = null; + } + + /** + * return the object count + * @ignore + */ + getObjectCount() { + return this.objects.length; + } + + /** + * returns the object at the specified index + * @ignore + */ + getObjectByIndex(idx) { + return this.objects[idx]; + } +} + +/** + * Private function to re-use for object removal in a defer + * @ignore + */ +function deferredRemove(child, keepalive) { + this.removeChildNow(child, keepalive); +} + +let globalFloatingCounter = 0; + +/** + * @classdesc + * Container represents a collection of child objects + * @augments Renderable + */ +class Container extends Renderable { + /** + * @param {number} [x=0] - position of the container (accessible via the inherited pos.x property) + * @param {number} [y=0] - position of the container (accessible via the inherited pos.y property) + * @param {number} [width=game.viewport.width] - width of the container + * @param {number} [height=game.viewport.height] - height of the container + */ + constructor(x = 0, y = 0, width, height, root = false) { + + // call the super constructor + super( + x, y, + typeof width === "undefined" ? (typeof game.viewport !== "undefined" ? game.viewport.width : Infinity) : width, + typeof height === "undefined" ? (typeof game.viewport !== "undefined" ? game.viewport.height : Infinity) : height + ); + + /** + * keep track of pending sort + * @ignore + */ + this.pendingSort = null; + + /** + * whether the container is the root of the scene + * @type {boolean} + * @default false + */ + this.root = root; + + /** + * The array of children of this container. + * @ignore + */ + this.children = undefined; + + /** + * The property of the child object that should be used to sort on this container + * value : "x", "y", "z" + * @type {string} + * @default "z" + */ + this.sortOn = "z"; + + /** + * Specify if the children list should be automatically sorted when adding a new child + * @type {boolean} + * @default true + */ + this.autoSort = true; + + /** + * Specify if the children z index should automatically be managed by the parent container + * @type {boolean} + * @default true + */ + this.autoDepth = true; + + /** + * Specify if the container draw operation should clip his children to its own bounds + * @type {boolean} + * @default false + */ + this.clipping = false; + + /** + * a callback to be extended, triggered after a child has been added or removed + * @param {number} index - added or removed child index + */ + this.onChildChange = function (index) { // eslint-disable-line no-unused-vars + // to be extended + }; + + /** + * Specify if the container bounds should automatically take in account + * all child bounds when updated (this is expensive and disabled by default, + * only enable if necessary) + * @type {boolean} + * @default false + */ + this.enableChildBoundsUpdate = false; + + /** + * define a background color for this container + * @type {Color} + * @default (0, 0, 0, 0.0) + * @example + * // add a red background color to this container + * this.backgroundColor.setColor(255, 0, 0); + */ + this.backgroundColor = pool.pull("Color", 0, 0, 0, 0.0); + + /** + * Used by the debug panel plugin + * @ignore + */ + this.drawCount = 0; + + // container self apply any defined transformation + this.autoTransform = true; + + // enable collision and event detection + this.isKinematic = false; + + this.anchorPoint.set(0, 0); + + // subscribe on the canvas resize event + if (this.root === true) { + // Workaround for not updating container child-bounds automatically (it's expensive!) + on(CANVAS_ONRESIZE, () => { + // temporarly enable the enableChildBoundsUpdate flag + this.enableChildBoundsUpdate === true; + // update bounds + this.updateBounds(); + this.enableChildBoundsUpdate === false; + }); + } + } + + /** + * reset the container, removing all childrens, and reseting transforms. + */ + reset() { + // cancel any sort operation + if (this.pendingSort) { + clearTimeout(this.pendingSort); + this.pendingSort = null; + } + + // delete all children + let children = this.getChildren(); + for (let i = children.length, child; i >= 0; (child = children[--i])) { + // don't remove it if a persistent object + if (child && child.isPersistent !== true) { + this.removeChildNow(child); + } + } + + if (typeof this.currentTransform !== "undefined") { + // just reset some variables + this.currentTransform.identity(); + } + + this.backgroundColor.setColor(0, 0, 0, 0.0); + } + + /** + * Add a child to the container
                            + * if auto-sort is disable, the object will be appended at the bottom of the list. + * Adding a child to the container will automatically remove it from its other container. + * Meaning a child can only have one parent. This is important if you add a renderable + * to a container then add it to the World container it will move it out of the + * orginal container. Then when the World container reset() method is called the renderable + * will not be in any container.
                            + * if the given child implements a onActivateEvent method, that method will be called + * once the child is added to this container. + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be added + * @param {number} [z] - forces the z index of the child to the specified value + * @returns {Renderable} the added child + */ + addChild(child, z) { + if (child.ancestor instanceof Container) { + child.ancestor.removeChildNow(child); + } + else { + // only allocate a GUID if the object has no previous ancestor + // (e.g. move one child from one container to another) + if (child.isRenderable) { + // allocated a GUID value (use child.id as based index if defined) + child.GUID = createGUID(child.id); + } + } + + // add the new child + child.ancestor = this; + this.getChildren().push(child); + + // update child bounds to reflect the new ancestor + if (typeof child.updateBounds === "function") { + if (this.isFloating === true) { + // only parent container can be floating + child.floating = false; + } + child.updateBounds(); + } + + // set the child z value if required + if (typeof(child.pos) !== "undefined") { + if (typeof(z) === "number") { + child.pos.z = z; + } else if (this.autoDepth === true) { + child.pos.z = this.getChildren().length; + } + } + + if (this.autoSort === true) { + this.sort(); + } + + if (typeof child.onActivateEvent === "function" && this.isAttachedToRoot()) { + child.onActivateEvent(); + } + + // force container bounds update if required + if (this.enableChildBoundsUpdate === true) { + this.updateBounds(); + } + + // if a physic body(ies) to the game world + if (this.isAttachedToRoot()) { + let worldContainer = this.getRootAncestor(); + if (child.body instanceof Body) { + worldContainer.addBody(child.body); + } + // if the child is a container + if (child instanceof Container) { + // add all container child bodies + // TODO: make it recursive ? + child.forEach((cchild) => { + if (cchild.body instanceof Body) { + worldContainer.addBody(cchild.body); + } + }); + } + } + + // mark the container for repaint + this.isDirty = true; + + // triggered callback if defined + this.onChildChange.call(this, this.getChildren().length - 1); + + return child; + } + + /** + * Add a child to the container at the specified index
                            + * (the list won't be sorted after insertion) + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be added + * @param {number} index - The index at which to insert the child + * @returns {Renderable} the added child + */ + addChildAt(child, index) { + if (index >= 0 && index < this.getChildren().length) { + if (child.ancestor instanceof Container) { + child.ancestor.removeChildNow(child); + } + else { + // only allocate a GUID if the object has no previous ancestor + // (e.g. move one child from one container to another) + if (child.isRenderable) { + // allocated a GUID value + child.GUID = createGUID(); + } + } + + // add the new child + child.ancestor = this; + this.getChildren().splice(index, 0, child); + + // update child bounds to reflect the new ancestor + if (typeof child.updateBounds === "function") { + if (this.isFloating === true) { + // only parent container can be floating + child.floating = false; + } + child.updateBounds(); + } + + if (typeof child.onActivateEvent === "function" && this.isAttachedToRoot()) { + child.onActivateEvent(); + } + + // force container bounds update if required + if (this.enableChildBoundsUpdate === true) { + this.updateBounds(); + } + + // if a physic body(ies) to the game world + if (this.isAttachedToRoot()) { + let worldContainer = this.getRootAncestor(); + if (child.body instanceof Body) { + worldContainer.addBody(child.body); + } + // if the child is a container + if (child instanceof Container) { + // add all container child bodies + // TODO: make it recursive ? + child.forEach((cchild) => { + if (cchild.body instanceof Body) { + worldContainer.addBody(cchild.body); + } + }); + } + } + + // mark the container for repaint + this.isDirty = true; + + // triggered callback if defined + this.onChildChange.call(this, index); + + return child; + } + else { + throw new Error("Index (" + index + ") Out Of Bounds for addChildAt()"); + } + } + + /** + * The forEach() method executes a provided function once per child element.
                            + * the callback function is invoked with three arguments:
                            + * - The current element being processed in the array
                            + * - The index of element in the array.
                            + * - The array forEach() was called upon.
                            + * @param {Function} callback - fnction to execute on each element + * @param {object} [thisArg] - value to use as this(i.e reference Object) when executing callback. + * @example + * // iterate through all children of this container + * container.forEach((child) => { + * // do something with the child + * child.doSomething(); + * }); + * container.forEach((child, index) => { ... }); + * container.forEach((child, index, array) => { ... }); + * container.forEach((child, index, array) => { ... }, thisArg); + */ + forEach(callback, thisArg) { + let context = this, i = 0; + let children = this.getChildren(); + + let len = children.length; + + if (typeof callback !== "function") { + throw new Error(callback + " is not a function"); + } + + if (arguments.length > 1) { + context = thisArg; + } + + while (i < len) { + callback.call(context, children[i], i, children); + i++; + } + } + + /** + * Swaps the position (z-index) of 2 children + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be added + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child2 - Child to be added + */ + swapChildren(child, child2) { + let index = this.getChildIndex(child); + let index2 = this.getChildIndex(child2); + + if ((index !== -1) && (index2 !== -1)) { + // swap z index + let _z = child.pos.z; + child.pos.z = child2.pos.z; + child2.pos.z = _z; + // swap the positions.. + this.getChildren()[index] = child2; + this.getChildren()[index2] = child; + // mark the container as dirty + this.isDirty = true; + } + else { + throw new Error(child + " Both the supplied childs must be a child of the caller " + this); + } + } + + /** + * Returns the Child at the specified index + * @param {number} index - The index of the child + * @returns {Renderable} the child at the specified index + */ + getChildAt(index) { + if (index >= 0 && index < this.getChildren().length) { + return this.getChildren()[index]; + } + else { + throw new Error("Index (" + index + ") Out Of Bounds for getChildAt()"); + } + } + + /** + * Returns the index of the given Child + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - The child object + * @returns {number} index + */ + getChildIndex(child) { + return this.getChildren().indexOf(child); + } + + /** + * Returns the next child within the container or undefined if none + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - The child object + * @returns {Renderable} child + */ + getNextChild(child) { + let index = this.getChildren().indexOf(child) - 1; + if (index >= 0 && index < this.getChildren().length) { + return this.getChildAt(index); + } + return undefined; + } + + /** + * Returns true if contains the specified Child + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - The child object + * @returns {boolean} + */ + hasChild(child) { + return this === child.ancestor; + } + + /** + * return the child corresponding to the given property and value.
                            + * note : avoid calling this function every frame since + * it parses the whole object tree each time + * @param {string} prop - Property name + * @param {string|RegExp|number|boolean} value - Value of the property + * @returns {Renderable[]} Array of childs + * @example + * // get the first child object called "mainPlayer" in a specific container : + * let ent = myContainer.getChildByProp("name", "mainPlayer"); + * + * // or query the whole world : + * let ent = container.getChildByProp("name", "mainPlayer"); + * + * // partial property matches are also allowed by using a RegExp. + * // the following matches "redCOIN", "bluecoin", "bagOfCoins", etc : + * let allCoins = container.getChildByProp("name", /coin/i); + * + * // searching for numbers or other data types : + * let zIndex10 = container.getChildByProp("z", 10); + * let inViewport = container.getChildByProp("inViewport", true); + */ + getChildByProp(prop, value) { + let objList = []; + + /** + * @ignore + */ + function compare(obj, prop) { + let v = obj[prop]; + if (value instanceof RegExp && typeof(v) === "string") { + if (value.test(v)) { + objList.push(obj); + } + } + else if (v === value) { + objList.push(obj); + } + } + + this.forEach((child) => { + compare(child, prop); + if (child instanceof Container) { + objList = objList.concat(child.getChildByProp(prop, value)); + } + }); + + return objList; + } + + /** + * returns the list of childs with the specified class type + * @param {object} classType - Class type + * @returns {Renderable[]} Array of children + */ + getChildByType(classType) { + let objList = []; + + this.forEach((child) => { + if (child instanceof classType) { + objList.push(child); + } + if (child instanceof Container) { + objList = objList.concat(child.getChildByType(classType)); + } + }); + + return objList; + } + + /** + * returns the list of childs with the specified name
                            + * as defined in Tiled (Name field of the Object Properties)
                            + * note : avoid calling this function every frame since + * it parses the whole object list each time + * @param {string|RegExp|number|boolean} name - child name + * @returns {Renderable[]} Array of children + */ + getChildByName(name) { + return this.getChildByProp("name", name); + } + + /** + * return the child corresponding to the specified GUID
                            + * note : avoid calling this function every frame since + * it parses the whole object list each time + * @param {string|RegExp|number|boolean} guid - child GUID + * @returns {Renderable} corresponding child or null + */ + getChildByGUID(guid) { + let obj = this.getChildByProp("GUID", guid); + return (obj.length > 0) ? obj[0] : null; + } + + /** + * return all child in this container + * @returns {Renderable[]} an array of renderable object + */ + getChildren() { + if (typeof this.children === "undefined") { + this.children = []; + } + return this.children; + } + + /** + * update the bounding box for this container. + * @param {boolean} [absolute=true] - update the bounds size and position in (world) absolute coordinates + * @returns {Bounds} this container bounding box Rectangle object + */ + updateBounds(absolute = true) { + let bounds = this.getBounds(); + + // call parent method + super.updateBounds(absolute); + + if (this.enableChildBoundsUpdate === true) { + this.forEach((child) => { + if (child.isRenderable) { + let childBounds = child.updateBounds(true); + if (childBounds.isFinite()) { + bounds.addBounds(childBounds); + } + } + }); + } + + return bounds; + } + + /** + * Checks if this container is root or if it's attached to the root container. + * @returns {boolean} true if this container is root or if it's attached to the root container + */ + isAttachedToRoot() { + if (this.root === true) { + return true; + } else { + let ancestor = this.ancestor; + while (ancestor) { + if (ancestor.root === true) { + return true; + } + ancestor = ancestor.ancestor; + } + return false; + } + } + + /** + * Returns the instance of the root container (i.e. the current application World container). + * @returns {Container} root container + */ + getRootAncestor() { + if (this.root === true) { + return this; + } else { + let ancestor = this.ancestor; + while (ancestor) { + if (ancestor.root === true) { + break; + } + ancestor = ancestor.ancestor; + } + return ancestor; + } + } + + /** + * update the cointainer's bounding rect (private) + * @ignore + */ + updateBoundsPos(newX = this.pos.x, newY = this.pos.y) { + // call the parent method + super.updateBoundsPos(newX, newY); + + // Notify children that the parent's position has changed + this.forEach((child) => { + if (child.isRenderable) { + child.updateBoundsPos( + child.pos.x + newX - this.pos.x, + child.pos.y + newY - this.pos.y + ); + } + }); + } + + /** + * @ignore + */ + onActivateEvent() { + this.forEach((child) => { + if (typeof child.onActivateEvent === "function") { + child.onActivateEvent(); + } + }); + } + + /** + * Invokes the removeChildNow in a defer, to ensure the child is removed safely after the update & draw stack has completed.
                            + * if the given child implements a onDeactivateEvent() method, that method will be called once the child is removed from this container. + * @param {RendRenderable|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapTexterable} child - Child to be removed + * @param {boolean} [keepalive=false] - true to prevent calling child.destroy() + */ + removeChild(child, keepalive) { + if (this.hasChild(child)) { + defer(deferredRemove, this, child, keepalive); + } + else { + throw new Error("Child is not mine."); + } + } + + /** + * Removes (and optionally destroys) a child from the container.
                            + * (removal is immediate and unconditional)
                            + * Never use keepalive=true with objects from {@link pool}. Doing so will create a memory leak. + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be removed + * @param {boolean} [keepalive=False] - True to prevent calling child.destroy() + */ + removeChildNow(child, keepalive) { + if (this.hasChild(child) && (this.getChildIndex(child) >= 0)) { + if (typeof child.onDeactivateEvent === "function") { + child.onDeactivateEvent(); + } + + // remove the body first to avoid a condition where a body can be detached + // from its parent, before the body is removed from the game world + if (child.body instanceof Body) { + this.getRootAncestor().removeBody(child.body); + } + + if (!keepalive) { + // attempt at recycling the object + if (pool.push(child, false) === false ) { + // else just destroy it + if (typeof child.destroy === "function") { + child.destroy(); + } + } + } + + // Don't cache the child index; another element might have been removed + // by the child's `onDeactivateEvent` or `destroy` methods + let childIndex = this.getChildIndex(child); + if (childIndex >= 0) { + this.getChildren().splice(childIndex, 1); + child.ancestor = undefined; + } + + // force bounds update if required + if (this.enableChildBoundsUpdate === true) { + this.updateBounds(); + } + + // mark the container for repaint + this.isDirty = true; + + // triggered callback if defined + this.onChildChange.call(this, childIndex); + } + } + + /** + * Automatically set the specified property of all childs to the given value + * @param {string} prop - property name + * @param {object} value - property value + * @param {boolean} [recursive=false] - recursively apply the value to child containers if true + */ + setChildsProperty(prop, value, recursive) { + this.forEach((child) => { + if ((recursive === true) && (child instanceof Container)) { + child.setChildsProperty(prop, value, recursive); + } + child[prop] = value; + }); + } + + /** + * Move the child in the group one step forward (z depth). + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be moved + */ + moveUp(child) { + let childIndex = this.getChildIndex(child); + if (childIndex - 1 >= 0) { + // note : we use an inverted loop + this.swapChildren(child, this.getChildAt(childIndex - 1)); + // mark the container as dirty + this.isDirty = true; + } + } + + /** + * Move the child in the group one step backward (z depth). + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be moved + */ + moveDown(child) { + let childIndex = this.getChildIndex(child); + if (childIndex >= 0 && (childIndex + 1) < this.getChildren().length) { + // note : we use an inverted loop + this.swapChildren(child, this.getChildAt(childIndex + 1)); + // mark the container as dirty + this.isDirty = true; + } + } + + /** + * Move the specified child to the top(z depth). + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be moved + */ + moveToTop(child) { + let childIndex = this.getChildIndex(child); + if (childIndex > 0) { + let children = this.getChildren(); + // note : we use an inverted loop + children.splice(0, 0, children.splice(childIndex, 1)[0]); + // increment our child z value based on the previous child depth + child.pos.z = children[1].pos.z + 1; + // mark the container as dirty + this.isDirty = true; + } + } + + /** + * Move the specified child the bottom (z depth). + * @param {Renderable|Entity|Sprite|Collectable|Trigger|Draggable|DropTarget|NineSliceSprite|ImageLayer|ColorLayer|Light2d|UIBaseElement|UISpriteElement|UITextButton|Text|BitmapText} child - Child to be moved + */ + moveToBottom(child) { + let childIndex = this.getChildIndex(child); + let children = this.getChildren(); + if (childIndex >= 0 && childIndex < (children.length - 1)) { + // note : we use an inverted loop + children.splice((children.length - 1), 0, children.splice(childIndex, 1)[0]); + // increment our child z value based on the next child depth + child.pos.z = children[(children.length - 2)].pos.z - 1; + // mark the container as dirty + this.isDirty = true; + } + } + + /** + * Manually trigger the sort of all the childs in the container + * @param {boolean} [recursive=false] - recursively sort all containers if true + */ + sort(recursive) { + // do nothing if there is already a pending sort + if (!this.pendingSort) { + if (recursive === true) { + this.forEach((child) => { + if (child instanceof Container) { + // note : this will generate one defered sorting function + // for each existing containe + child.sort(recursive); + } + }); + } + /** @ignore */ + this.pendingSort = defer(function () { + // sort everything in this container + this.getChildren().sort(this["_sort" + this.sortOn.toUpperCase()]); + // clear the defer id + this.pendingSort = null; + // make sure we redraw everything + this.isDirty = true; + }, this); + } + } + + /** + * @ignore + */ + onDeactivateEvent() { + this.forEach((child) => { + if (typeof child.onDeactivateEvent === "function") { + child.onDeactivateEvent(); + } + }); + } + + /** + * Z Sorting function + * @ignore + */ + _sortZ(a, b) { + return (b.pos && a.pos) ? (b.pos.z - a.pos.z) : (a.pos ? -Infinity : Infinity); + } + + /** + * Reverse Z Sorting function + * @ignore + */ + _sortReverseZ(a, b) { + return (a.pos && b.pos) ? (a.pos.z - b.pos.z) : (a.pos ? Infinity : -Infinity); + } + + /** + * X Sorting function + * @ignore + */ + _sortX(a, b) { + if (!b.pos || !a.pos) { + return (a.pos ? -Infinity : Infinity); + } + let result = b.pos.z - a.pos.z; + return (result ? result : (b.pos.x - a.pos.x)); + } + + /** + * Y Sorting function + * @ignore + */ + _sortY(a, b) { + if (!b.pos || !a.pos) { + return (a.pos ? -Infinity : Infinity); + } + let result = b.pos.z - a.pos.z; + return (result ? result : (b.pos.y - a.pos.y)); + } + + /** + * Destroy function
                            + * @ignore + */ + destroy() { + // empty the container + this.reset(); + // call the parent destroy method + super.destroy(arguments); + } + + /** + * container update function.
                            + * automatically called by the application update loop {@link Application} + * @protected + * @param {number} dt - time since the last update in milliseconds. + * @returns {boolean} true if the Container is dirty + */ + update(dt) { + let isFloating = false; + let isPaused = state$1.isPaused(); + let children = this.getChildren(); + const childrenLength = children.length; + + for (let i = childrenLength, obj; i--, (obj = children[i]);) { + if (isPaused && (!obj.updateWhenPaused)) { + // skip this object + continue; + } + + if (obj.isRenderable) { + isFloating = (globalFloatingCounter > 0 || obj.floating); + if (isFloating) { + globalFloatingCounter++; + } + + // check if object is in any active cameras + obj.inViewport = false; + // iterate through all cameras + state$1.current().cameras.forEach((camera) => { + if (camera.isVisible(obj, isFloating)) { + obj.inViewport = true; + } + }); + + // update our object + this.isDirty |= ((obj.inViewport || obj.alwaysUpdate) && obj.update(dt)); + + if (globalFloatingCounter > 0) { + globalFloatingCounter--; + } + } + else { + // just directly call update() for non renderable object + this.isDirty |= obj.update(dt); + } + } + + // call the parent method + return super.update(dt); + } + + /** + * draw this renderable (automatically called by melonJS) + * @protected + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance + * @param {Camera2d} [viewport] - the viewport to (re)draw + */ + draw(renderer, viewport) { + let isFloating = false; + let bounds = this.getBounds(); + + this.drawCount = 0; + + // clip the containter children to the container bounds + if (this.root === false && this.clipping === true && bounds.isFinite() === true) { + renderer.clipRect( + bounds.left, + bounds.top, + bounds.width, + bounds.height + ); + } + + // adjust position if required (e.g. canvas/window centering) + renderer.translate(this.pos.x, this.pos.y); + + // color background if defined + if (this.backgroundColor.alpha > 1 / 255) { + renderer.clearColor(this.backgroundColor); + } + + let children = this.getChildren(); + for (let i = children.length, obj; i--, (obj = children[i]);) { + if (obj.isRenderable) { + + isFloating = obj.floating === true; + + if ((obj.inViewport || isFloating)) { + + if (isFloating) { + // translate to screen coordinates + renderer.save(); + renderer.resetTransform(); + } + + // predraw (apply transforms) + obj.preDraw(renderer); + + // draw the object + obj.draw(renderer, viewport); + + // postdraw (clean-up); + obj.postDraw(renderer); + + // restore the previous "state" + if (isFloating) { + renderer.restore(); + } + + this.drawCount++; + } + } + } + } +} + +/* eslint-disable no-unused-vars */ + + +/** + * @classdesc + * The map renderer base class + */ +class TMXRenderer { + /** + * @param {number} cols - width of the tilemap in tiles + * @param {number} rows - height of the tilemap in tiles + * @param {number} tilewidth - width of each tile in pixels + * @param {number} tileheight - height of each tile in pixels + */ + constructor(cols, rows, tilewidth, tileheight) { + this.cols = cols; + this.rows = rows; + this.tilewidth = tilewidth; + this.tileheight = tileheight; + this.bounds = new Bounds(); + } + + /** + * return true if the renderer can render the specified map or layer + * @param {TMXTileMap|TMXLayer} component - TMX Map or Layer + * @returns {boolean} + */ + canRender(component) { + return ( + /* + // layers can have different size within + // the same maps, so commenting these two lines + (this.cols === component.cols) && + (this.rows === component.rows) && + */ + (this.tilewidth === component.tilewidth) && + (this.tileheight === component.tileheight) + ); + } + + /** + * return the bounding rect for this map renderer + * @param {TMXLayer} [layer] - calculate the bounding rect for a specific layer (will return a new bounds object) + * @returns {Bounds} + */ + getBounds(layer) { + let bounds = layer instanceof TMXLayer ? pool.pull("Bounds") : this.bounds; + bounds.setMinMax( + 0, 0, + this.cols * this.tilewidth, + this.rows * this.tileheight + ); + return bounds; + } + + /** + * return the tile position corresponding to the specified pixel + * @param {number} x - X coordinate + * @param {number} y - Y coordinate + * @param {Vector2d} [v] - an optional vector object where to put the return values + * @returns {Vector2d} + */ + pixelToTileCoords(x, y, v) { + return v; + } + + /** + * return the pixel position corresponding of the specified tile + * @param {number} col - tile horizontal position + * @param {number} row - tile vertical position + * @param {Vector2d} [v] - an optional vector object where to put the return values + * @returns {Vector2d} + */ + tileToPixelCoords(col, row, v) { + return v; + } + + /** + * draw the given tile at the specified layer + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer object + * @param {number} x - X coordinate where to draw the tile + * @param {number} y - Y coordinate where to draw the tile + * @param {Tile} tile - the tile object to draw + */ + drawTile(renderer, x, y, tile) { + } + + /** + * draw the given TMX Layer for the given area + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer object + * @param {TMXLayer} layer - a TMX Layer object + * @param {Rect} rect - the area of the layer to draw + */ + drawTileLayer(renderer, layer, rect) { + } + +} + + +/* eslint-enable no-unused-vars */ + +/** + * @classdesc + * an Orthogonal Map Renderder + * @augments TMXRenderer + */ +class TMXOrthogonalRenderer extends TMXRenderer { + /** + * @param {TMXTileMap} map - the TMX map + */ + constructor(map) { + super( + map.cols, + map.rows, + map.tilewidth, + map.tileheight + ); + } + + /** + * return true if the renderer can render the specified layer + * @ignore + */ + canRender(layer) { + return ( + (layer.orientation === "orthogonal") && + super.canRender(layer) + ); + } + + /** + * return the tile position corresponding to the specified pixel + * @ignore + */ + pixelToTileCoords(x, y, v) { + let ret = v || new Vector2d(); + return ret.set( + x / this.tilewidth, + y / this.tileheight + ); + } + + + /** + * return the pixel position corresponding of the specified tile + * @ignore + */ + tileToPixelCoords(x, y, v) { + let ret = v || new Vector2d(); + return ret.set( + x * this.tilewidth, + y * this.tileheight + ); + } + + /** + * fix the position of Objects to match + * the way Tiled places them + * @ignore + */ + adjustPosition(obj) { + // only adjust position if obj.gid is defined + if (typeof(obj.gid) === "number") { + // Tiled objects origin point is "bottom-left" in Tiled, + // "top-left" in melonJS) + obj.y -= obj.height; + } + } + + /** + * draw the tile map + * @ignore + */ + drawTile(renderer, x, y, tmxTile) { + let tileset = tmxTile.tileset; + // draw the tile + tileset.drawTile( + renderer, + tileset.tileoffset.x + x * this.tilewidth, + tileset.tileoffset.y + (y + 1) * this.tileheight - tileset.tileheight, + tmxTile + ); + } + + /** + * draw the tile map + * @ignore + */ + drawTileLayer(renderer, layer, rect) { + let incX = 1, incY = 1; + + // get top-left and bottom-right tile position + let start = this.pixelToTileCoords( + Math.max(rect.pos.x - (layer.maxTileSize.width - layer.tilewidth), 0), + Math.max(rect.pos.y - (layer.maxTileSize.height - layer.tileheight), 0), + pool.pull("Vector2d") + ).floorSelf(); + + let end = this.pixelToTileCoords( + rect.pos.x + rect.width + this.tilewidth, + rect.pos.y + rect.height + this.tileheight, + pool.pull("Vector2d") + ).ceilSelf(); + + //ensure we are in the valid tile range + end.x = end.x > this.cols ? this.cols : end.x; + end.y = end.y > this.rows ? this.rows : end.y; + + switch (layer.renderorder) { + case "right-up" : + // swapping start.y and end.y + end.y = start.y + (start.y = end.y) - end.y; + incY = -1; + break; + case "left-down" : + // swapping start.x and end.x + end.x = start.x + (start.x = end.x) - end.x; + incX = -1; + break; + case "left-up" : + // swapping start.x and end.x + end.x = start.x + (start.x = end.x) - end.x; + // swapping start.y and end.y + end.y = start.y + (start.y = end.y) - end.y; + incX = -1; + incY = -1; + break; + default: // right-down + break; + } + + // main drawing loop + for (let y = start.y; y !== end.y; y+= incY) { + for (let x = start.x; x !== end.x; x+= incX) { + let tmxTile = layer.cellAt(x, y, false); + if (tmxTile) { + this.drawTile(renderer, x, y, tmxTile); + } + } + } + + pool.push(start); + pool.push(end); + } +} + +/** + * @classdesc + * an Isometric Map Renderder + * @augments TMXRenderer + */ +class TMXIsometricRenderer extends TMXRenderer { + /** + * @param {TMXTileMap} map - the TMX map + */ + constructor(map) { + super( + map.cols, + map.rows, + map.tilewidth, + map.tileheight + ); + + this.hTilewidth = this.tilewidth / 2; + this.hTileheight = this.tileheight / 2; + this.originX = this.rows * this.hTilewidth; + } + + /** + * return true if the renderer can render the specified layer + * @ignore + */ + canRender(layer) { + return ( + (layer.orientation === "isometric") && + super.canRender(layer) + ); + } + + /** + * return the bounding rect for this map renderer + * @ignore + */ + getBounds(layer) { + let bounds = layer instanceof TMXLayer ? pool.pull("Bounds") : this.bounds; + bounds.setMinMax( + 0, 0, + (this.cols + this.rows) * (this.tilewidth / 2), + (this.cols + this.rows) * (this.tileheight / 2) + ); + return bounds; + } + + /** + * return the tile position corresponding to the specified pixel + * @ignore + */ + pixelToTileCoords(x, y, v) { + let ret = v || new Vector2d(); + return ret.set( + (y / this.tileheight) + ((x - this.originX) / this.tilewidth), + (y / this.tileheight) - ((x - this.originX) / this.tilewidth) + ); + } + + /** + * return the pixel position corresponding of the specified tile + * @ignore + */ + tileToPixelCoords(x, y, v) { + let ret = v || new Vector2d(); + return ret.set( + (x - y) * this.hTilewidth + this.originX, + (x + y) * this.hTileheight + ); + } + + /** + * fix the position of Objects to match + * the way Tiled places them + * @ignore + */ + adjustPosition(obj) { + let tileX = obj.x / this.hTilewidth; + let tileY = obj.y / this.tileheight; + let isoPos = pool.pull("Vector2d"); + + this.tileToPixelCoords(tileX, tileY, isoPos); + + obj.x = isoPos.x; + obj.y = isoPos.y; + + pool.push(isoPos); + } + + /** + * draw the tile map + * @ignore + */ + drawTile(renderer, x, y, tmxTile) { + let tileset = tmxTile.tileset; + // draw the tile + tileset.drawTile( + renderer, + ((this.cols - 1) * tileset.tilewidth + (x - y) * tileset.tilewidth >> 1), + (-tileset.tilewidth + (x + y) * tileset.tileheight >> 2), + tmxTile + ); + } + + /** + * draw the tile map + * @ignore + */ + drawTileLayer(renderer, layer, rect) { + // cache a couple of useful references + let tileset = layer.tileset; + + // get top-left and bottom-right tile position + let rowItr = this.pixelToTileCoords( + rect.pos.x - tileset.tilewidth, + rect.pos.y - tileset.tileheight, + pool.pull("Vector2d") + ).floorSelf(); + let tileEnd = this.pixelToTileCoords( + rect.pos.x + rect.width + tileset.tilewidth, + rect.pos.y + rect.height + tileset.tileheight, + pool.pull("Vector2d") + ).ceilSelf(); + + let rectEnd = this.tileToPixelCoords(tileEnd.x, tileEnd.y, pool.pull("Vector2d")); + + // Determine the tile and pixel coordinates to start at + let startPos = this.tileToPixelCoords(rowItr.x, rowItr.y, pool.pull("Vector2d")); + startPos.x -= this.hTilewidth; + startPos.y += this.tileheight; + + /* Determine in which half of the tile the top-left corner of the area we + * need to draw is. If we're in the upper half, we need to start one row + * up due to those tiles being visible as well. How we go up one row + * depends on whether we're in the left or right half of the tile. + */ + let inUpperHalf = startPos.y - rect.pos.y > this.hTileheight; + let inLeftHalf = rect.pos.x - startPos.x < this.hTilewidth; + + if (inUpperHalf) { + if (inLeftHalf) { + rowItr.x--; + startPos.x -= this.hTilewidth; + } + else { + rowItr.y--; + startPos.x += this.hTilewidth; + } + startPos.y -= this.hTileheight; + } + + // Determine whether the current row is shifted half a tile to the right + let shifted = inUpperHalf ^ inLeftHalf; + + // initialize the columItr vector + let columnItr = rowItr.clone(); + + // main drawing loop + for (let y = startPos.y * 2; y - this.tileheight * 2 < rectEnd.y * 2; y += this.tileheight) { + columnItr.setV(rowItr); + for (let x = startPos.x; x < rectEnd.x; x += this.tilewidth) { + let tmxTile = layer.cellAt(columnItr.x, columnItr.y); + // render if a valid tile position + if (tmxTile) { + tileset = tmxTile.tileset; + // offset could be different per tileset + let offset = tileset.tileoffset; + // draw our tile + tileset.drawTile( + renderer, + offset.x + x, + offset.y + y / 2 - tileset.tileheight, + tmxTile + ); + } + + // Advance to the next column + columnItr.x++; + columnItr.y--; + } + + // Advance to the next row + if (!shifted) { + rowItr.x++; + startPos.x += this.hTilewidth; + shifted = true; + } + else { + rowItr.y++; + startPos.x -= this.hTilewidth; + shifted = false; + } + } + + pool.push(columnItr); + pool.push(rowItr); + pool.push(tileEnd); + pool.push(rectEnd); + pool.push(startPos); + } +} + +// scope global variables & constants +const offsetsStaggerX = [ + {x: 0, y: 0}, + {x: + 1, y: - 1}, + {x: + 1, y: 0}, + {x: + 2, y: 0} +]; +const offsetsStaggerY = [ + {x: 0, y: 0}, + {x: - 1, y: + 1}, + {x: 0, y: + 1}, + {x: 0, y: + 2} +]; + +/** + * @classdesc + * an Hexagonal Map Renderder + * @augments TMXRenderer + */ +class TMXHexagonalRenderer extends TMXRenderer { + /** + * @param {TMXTileMap} map - the TMX map + */ + constructor(map) { + super( + map.cols, + map.rows, + map.tilewidth & ~1, + map.tileheight & ~1 + ); + + this.hexsidelength = map.hexsidelength || 0; + this.staggerX = map.staggeraxis === "x"; + this.staggerEven = map.staggerindex === "even"; + + this.sidelengthx = 0; + this.sidelengthy = 0; + + if (map.orientation === "hexagonal") { + if (this.staggerX) { + this.sidelengthx = this.hexsidelength; + } + else { + this.sidelengthy = this.hexsidelength; + } + } + + this.sideoffsetx = (this.tilewidth - this.sidelengthx) / 2; + this.sideoffsety = (this.tileheight - this.sidelengthy) / 2; + + this.columnwidth = this.sideoffsetx + this.sidelengthx; + this.rowheight = this.sideoffsety + this.sidelengthy; + + this.centers = [ + new Vector2d(), + new Vector2d(), + new Vector2d(), + new Vector2d() + ]; + } + + /** + * return true if the renderer can render the specified layer + * @ignore + */ + canRender(layer) { + return ( + (layer.orientation === "hexagonal") && + super.canRender(layer) + ); + } + + /** + * return the bounding rect for this map renderer + * @ignore + */ + getBounds(layer) { + let bounds = layer instanceof TMXLayer ? pool.pull("Bounds") : this.bounds; + + // The map size is the same regardless of which indexes are shifted. + if (this.staggerX) { + bounds.setMinMax( + 0, 0, + this.cols * this.columnwidth + this.sideoffsetx, + this.rows * (this.tileheight + this.sidelengthy) + ); + if (bounds.width > 1) { + bounds.height += this.rowheight; + } + } else { + bounds.setMinMax( + 0, 0, + this.cols * (this.tilewidth + this.sidelengthx), + this.rows * this.rowheight + this.sideoffsety + ); + if (bounds.height > 1) { + bounds.width += this.columnwidth; + } + } + return bounds; + } + + /** + * @ignore + */ + doStaggerX (x) { + return this.staggerX && (x & 1) ^ this.staggerEven; + } + + /** + * @ignore + */ + doStaggerY(y) { + return !this.staggerX && (y & 1) ^ this.staggerEven; + } + + /** + * @ignore + */ + topLeft(x, y, v) { + let ret = v || new Vector2d(); + + if (!this.staggerX) { + if ((y & 1) ^ this.staggerEven) { + ret.set(x, y - 1); + } + else { + ret.set(x - 1, y - 1); + } + } else { + if ((x & 1) ^ this.staggerEven) { + ret.set(x - 1, y); + } + else { + ret.set(x - 1, y - 1); + } + } + return ret; + } + + /** + * @ignore + */ + topRight(x, y, v) { + let ret = v || new Vector2d(); + + if (!this.staggerX) { + if ((y & 1) ^ this.staggerEven) { + ret.set(x + 1, y - 1); + } + else { + ret.set(x, y - 1); + } + } else { + if ((x & 1) ^ this.staggerEven) { + ret.set(x + 1, y); + } + else { + ret.set(x + 1, y - 1); + } + } + return ret; + } + + + /** + * @ignore + */ + bottomLeft(x, y, v) { + let ret = v || new Vector2d(); + + if (!this.staggerX) { + if ((y & 1) ^ this.staggerEven) { + ret.set(x, y + 1); + } + else { + ret.set(x - 1, y + 1); + } + } else { + if ((x & 1) ^ this.staggerEven) { + ret.set(x -1, y + 1); + } + else { + ret.set(x -1, y); + } + } + return ret; + } + + /** + * @ignore + */ + bottomRight(x, y, v) { + let ret = v || new Vector2d(); + + if (!this.staggerX) { + if ((y & 1) ^ this.staggerEven) { + ret.set(x + 1, y + 1); + } + else { + ret.set(x, y + 1); + } + } else { + if ((x & 1) ^ this.staggerEven) { + ret.set(x + 1, y + 1); + } + else { + ret.set(x + 1, y); + } + } + return ret; + } + + /** + * return the tile position corresponding to the specified pixel + * @ignore + */ + pixelToTileCoords(x, y, v) { + let ret = v || new Vector2d(); + + if (this.staggerX) { //flat top + x -= this.staggerEven ? this.tilewidth : this.sideoffsetx; + } + else { //pointy top + y -= this.staggerEven ? this.tileheight : this.sideoffsety; + } + + // Start with the coordinates of a grid-aligned tile + let referencePoint = pool.pull("Vector2d", + Math.floor(x / (this.columnwidth * 2)), + Math.floor((y / (this.rowheight * 2))) + ); + + // Relative x and y position on the base square of the grid-aligned tile + let rel = pool.pull("Vector2d", + x - referencePoint.x * (this.columnwidth * 2), + y - referencePoint.y * (this.rowheight * 2) + ); + + // Adjust the reference point to the correct tile coordinates + if (this.staggerX) { + referencePoint.x = referencePoint.x * 2; + if (this.staggerEven) { + ++referencePoint.x; + } + } + else { + referencePoint.y = referencePoint.y * 2; + if (this.staggerEven) { + ++referencePoint.y; + } + } + + // Determine the nearest hexagon tile by the distance to the center + let left, top, centerX, centerY; + if (this.staggerX) { + left = this.sidelengthx / 2; + centerX = left + this.columnwidth; + centerY = this.tileheight / 2; + + this.centers[0].set(left, centerY); + this.centers[1].set(centerX, centerY - this.rowheight); + this.centers[2].set(centerX, centerY + this.rowheight); + this.centers[3].set(centerX + this.columnwidth, centerY); + } + else { + top = this.sidelengthy / 2; + centerX = this.tilewidth / 2; + centerY = top + this.rowheight; + + this.centers[0].set(centerX, top); + this.centers[1].set(centerX - this.columnwidth, centerY); + this.centers[2].set(centerX + this.columnwidth, centerY); + this.centers[3].set(centerX, centerY + this.rowheight); + } + + let nearest = 0; + let minDist = Number.MAX_VALUE; + for (let i = 0; i < 4; ++i) { + const dc = this.centers[i].sub(rel).length2(); + if (dc < minDist) { + minDist = dc; + nearest = i; + } + } + + let offsets = (this.staggerX) ? offsetsStaggerX : offsetsStaggerY; + + ret.set( + referencePoint.x + offsets[nearest].x, + referencePoint.y + offsets[nearest].y + ); + + pool.push(referencePoint); + pool.push(rel); + + return ret; + } + + /** + * return the pixel position corresponding of the specified tile + * @ignore + */ + tileToPixelCoords(x, y, v) { + let tileX = Math.floor(x), + tileY = Math.floor(y); + let ret = v || new Vector2d(); + + if (this.staggerX) { + ret.y = tileY * (this.tileheight + this.sidelengthy); + if (this.doStaggerX(tileX)) { + ret.y += this.rowheight; + } + ret.x = tileX * this.columnwidth; + } else { + ret.x = tileX * (this.tilewidth + this.sidelengthx); + if (this.doStaggerY(tileY)) { + ret.x += this.columnwidth; + } + ret.y = tileY * this.rowheight; + } + + return ret; + } + + /** + * fix the position of Objects to match + * the way Tiled places them + * @ignore + */ + adjustPosition(obj) { + // only adjust position if obj.gid is defined + if (typeof(obj.gid) === "number") { + // Tiled objects origin point is "bottom-left" in Tiled, + // "top-left" in melonJS) + obj.y -= obj.height; + } + } + + /** + * draw the tile map + * @ignore + */ + drawTile(renderer, x, y, tmxTile) { + let tileset = tmxTile.tileset; + let point = this.tileToPixelCoords(x, y, pool.pull("Vector2d")); + + // draw the tile + tileset.drawTile( + renderer, + tileset.tileoffset.x + point.x, + tileset.tileoffset.y + point.y + (this.tileheight - tileset.tileheight), + tmxTile + ); + + pool.push(point); + } + + /** + * draw the tile map + * @ignore + */ + drawTileLayer(renderer, layer, rect) { + let tile; + + // get top-left and bottom-right tile position + let startTile = this.pixelToTileCoords( + rect.pos.x, + rect.pos.y, + pool.pull("Vector2d") + ); + + // Compensate for the layer position + startTile.sub(layer.pos); + + // get top-left and bottom-right tile position + let startPos = this.tileToPixelCoords( + startTile.x + layer.pos.x, + startTile.y + layer.pos.y, + pool.pull("Vector2d") + ); + + let rowTile = startTile.clone(); + let rowPos = startPos.clone(); + + /* Determine in which half of the tile the top-left corner of the area we + * need to draw is. If we're in the upper half, we need to start one row + * up due to those tiles being visible as well. How we go up one row + * depends on whether we're in the left or right half of the tile. + */ + let inUpperHalf = rect.pos.y - startPos.y < this.sideoffsety; + let inLeftHalf = rect.pos.x - startPos.x < this.sideoffsetx; + + if (inUpperHalf) { + startTile.y--; + } + if (inLeftHalf) { + startTile.x--; + } + + let endX = layer.cols; + let endY = layer.rows; + + if (this.staggerX) { + //ensure we are in the valid tile range + startTile.x = Math.max(0, startTile.x); + startTile.y = Math.max(0, startTile.y); + + startPos = this.tileToPixelCoords( + startTile.x + layer.pos.x, + startTile.y + layer.pos.y, + startPos + ); + + let staggeredRow = this.doStaggerX(startTile.x + layer.pos.x); + + // main drawing loop + for (; startPos.y < rect.bottom && startTile.y < endY; ) { + rowTile.setV(startTile); + rowPos.setV(startPos); + + for (; rowPos.x < rect.right && rowTile.x < endX; rowTile.x+=2) { + tile = layer.cellAt(rowTile.x, rowTile.y, false); + if (tile) { + // draw the tile + tile.tileset.drawTile(renderer, rowPos.x, rowPos.y, tile); + } + rowPos.x += this.tilewidth + this.sidelengthx; + } + + if (staggeredRow) { + startTile.x -= 1; + startTile.y += 1; + startPos.x -= this.columnwidth; + staggeredRow = false; + } else { + startTile.x += 1; + startPos.x += this.columnwidth; + staggeredRow = true; + } + + startPos.y += this.rowheight; + } + pool.push(rowTile); + pool.push(rowPos); + + } else { + //ensure we are in the valid tile range + startTile.x = Math.max(0, startTile.x); + startTile.y = Math.max(0, startTile.y); + + startPos = this.tileToPixelCoords( + startTile.x + layer.pos.x, + startTile.y + layer.pos.y, + startPos + ); + + // Odd row shifting is applied in the rendering loop, so un-apply it here + if (this.doStaggerY(startTile.y)) { + startPos.x -= this.columnwidth; + } + + // main drawing loop + for (; startPos.y < rect.bottom && startTile.y < endY; startTile.y++) { + rowTile.setV(startTile); + rowPos.setV(startPos); + + if (this.doStaggerY(startTile.y)) { + rowPos.x += this.columnwidth; + } + + for (; rowPos.x < rect.right && rowTile.x < endX; rowTile.x++) { + tile = layer.cellAt(rowTile.x, rowTile.y, false); + if (tile) { + // draw the tile + tile.tileset.drawTile(renderer, rowPos.x, rowPos.y, tile); + } + rowPos.x += this.tilewidth + this.sidelengthx; + } + startPos.y += this.rowheight; + } + pool.push(rowTile); + pool.push(rowPos); + } + + pool.push(startTile); + pool.push(startPos); + } +} + +/** + * @classdesc + * a Staggered Map Renderder + * @augments TMXHexagonalRenderer + */ +class TMXStaggeredRenderer extends TMXHexagonalRenderer { + + /** + * return true if the renderer can render the specified layer + * @ignore + */ + canRender(layer) { + return ( + (layer.orientation === "staggered") && + super.canRender(layer) + ); + } + + /** + * return the tile position corresponding to the specified pixel + * @ignore + */ + pixelToTileCoords(x, y, v) { + let ret = v || new Vector2d(); + + let alignedX = x, + alignedY = y; + + if (this.staggerX) { + alignedX -= this.staggerEven ? this.sideoffsetx : 0; + } else { + alignedY -= this.staggerEven ? this.sideoffsety : 0; + } + + // Start with the coordinates of a grid-aligned tile + let referencePoint = pool.pull("Vector2d", + Math.floor(alignedX / this.tilewidth), + Math.floor(alignedY / this.tileheight) + ); + + // Adjust the reference point to the correct tile coordinates + if (this.staggerX) { + referencePoint.x = referencePoint.x * 2; + if (this.staggerEven) { + ++referencePoint.x; + } + } else { + referencePoint.y = referencePoint.y * 2; + if (this.staggerEven) { + ++referencePoint.y; + } + } + + // Relative x and y position on the base square of the grid-aligned tile + let rel = pool.pull("Vector2d", + alignedX - referencePoint.x * this.tilewidth, + alignedY - referencePoint.y * this.tileheight + ); + + // Check whether the cursor is in any of the corners (neighboring tiles) + let y_pos = rel.x * (this.tileheight / this.tilewidth); + + if (this.sideoffsety - y_pos > rel.y) { + referencePoint = this.topLeft(referencePoint.x, referencePoint.y, referencePoint); + } + if (-this.sideoffsety + y_pos > rel.y) { + referencePoint = this.topRight(referencePoint.x, referencePoint.y, referencePoint); + } + if (this.sideoffsety + y_pos < rel.y) { + referencePoint = this.bottomLeft(referencePoint.x, referencePoint.y, referencePoint); + } + if (this.sideoffsety * 3 - y_pos < rel.y) { + referencePoint = this.bottomRight(referencePoint.x, referencePoint.y, referencePoint); + } + + ret = this.tileToPixelCoords(referencePoint.x, referencePoint.y, ret); + + ret.set(x - ret.x, y - ret.y); + + // Start with the coordinates of a grid-aligned tile + ret.set( + ret.x - (this.tilewidth / 2), + ret.y * (this.tilewidth / this.tileheight) + ); + + ret.div(this.tilewidth / Math.sqrt(2)).rotate(degToRad(-45)).add(referencePoint); + + pool.push(referencePoint); + pool.push(rel); + + return ret; + } +} + +/** + * return a compatible renderer object for the given map + * @param {TMXTileMap} map + * @ignore + */ +function getNewTMXRenderer(map) { + switch (map.orientation) { + case "orthogonal": + return new TMXOrthogonalRenderer(map); + + case "isometric": + return new TMXIsometricRenderer(map); + + case "hexagonal": + return new TMXHexagonalRenderer(map); + + case "staggered": + return new TMXStaggeredRenderer(map); + + // if none found, throw an exception + default: + throw new Error(map.orientation + " type TMX Tile Map not supported!"); + } +} + +/** + * display a deprecation warning in the console + * @param {string} deprecated - deprecated class,function or property name + * @param {string} replacement - the replacement class, function, or property name + * @param {string} version - the version since when the lass,function or property is deprecated + */ +function warning(deprecated, replacement, version) { + const msg = "melonJS: %s is deprecated since version %s, please use %s"; + let stack = new Error().stack; + + if (console.groupCollapsed) { + console.groupCollapsed( + "%c" + msg, + "font-weight:normal;color:yellow;", + deprecated, + version, + replacement + ); + } else { + console.warn( + msg, + deprecated, + version, + replacement + ); + } + + if (typeof stack !== "undefined") { + console.warn(stack); + } + + if (console.groupCollapsed) { + console.groupEnd(); + } +} + +/** + * read the layer Data + * @ignore + */ +function readLayer(map, data, z) { + return new TMXLayer(map, data, map.tilewidth, map.tileheight, map.orientation, map.tilesets, z); +} + +/** + * read the Image Layer Data + * @ignore + */ +function readImageLayer(map, data, z) { + // Normalize properties + applyTMXProperties(data.properties, data); + + // create the layer + let imageLayer = pool.pull("ImageLayer", + // x/y is deprecated since 0.15 and replace by offsetx/y + +data.offsetx || +data.x || 0, + +data.offsety || +data.y || 0, + Object.assign({ + name: data.name, + image: data.image, + ratio : pool.pull("Vector2d", +data.parallaxx || 1.0, +data.parallaxy || 1.0), + // convert to melonJS color format (note: this should be done earlier when parsing data) + tint : typeof (data.tintcolor) !== "undefined" ? (pool.pull("Color")).parseHex(data.tintcolor, true) : undefined, + z: z + }, data.properties) + ); + + + // set some additional flags + let visible = typeof(data.visible) !== "undefined" ? data.visible : true; + imageLayer.setOpacity(visible ? +data.opacity : 0); + + return imageLayer; +} + +/** + * read the tileset Data + * @ignore + */ +function readTileset(data) { + return (new TMXTileset(data)); +} + +/** + * read the object group Data + * @ignore + */ +function readObjectGroup(map, data, z) { + return (new TMXGroup(map, data, z)); +} + +/** + * @classdesc + * a TMX Tile Map Object + * Tiled QT +0.7.x format + */ +class TMXTileMap { + /** + * @param {string} levelId - name of TMX map + * @param {object} data - TMX map in JSON format + * @example + * // create a new level object based on the TMX JSON object + * let level = new me.TMXTileMap(levelId, me.loader.getTMX(levelId)); + * // add the level to the game world container + * level.addTo(me.game.world, true); + */ + constructor(levelId, data) { + + /** + * the level data (JSON) + * @ignore + */ + this.data = data; + + /** + * name of the tilemap + * @type {string} + */ + this.name = levelId; + + /** + * width of the tilemap in tiles + * @type {number} + */ + this.cols = +data.width; + + /** + * height of the tilemap in tiles + * @type {number} + */ + this.rows = +data.height; + + /** + * Tile width + * @type {number} + */ + this.tilewidth = +data.tilewidth; + + /** + * Tile height + * @type {number} + */ + this.tileheight = +data.tileheight; + + /** + * is the map an infinite map + * @type {number} + * @default 0 + */ + this.infinite = +data.infinite || 0; + + /** + * the map orientation type. melonJS supports “orthogonal”, “isometric”, “staggered” and “hexagonal”. + * @type {string} + * @default "orthogonal" + */ + this.orientation = data.orientation; + + /** + * the order in which tiles on orthogonal tile layers are rendered. + * (valid values are "left-down", "left-up", "right-down", "right-up") + * @type {string} + * @default "right-down" + */ + this.renderorder = data.renderorder || "right-down"; + + /** + * the TMX format version + * @type {string} + */ + this.version = "" + data.version; + + /** + * The Tiled version used to save the file (since Tiled 1.0.1). + * @type {string} + */ + this.tiledversion = "" + data.tiledversion; + + /** + * The map class. + * @type {string} + */ + this.class = data.class; + + // tilesets for this map + this.tilesets = null; + + // layers + if (typeof this.layers === "undefined") { + this.layers = []; + } + // group objects + if (typeof this.objectGroups === "undefined") { + this.objectGroups = []; + } + + // Check if map is from melon editor + this.isEditor = data.editor === "melon-editor"; + + // object id + this.nextobjectid = +data.nextobjectid || undefined; + + // hex/iso properties + this.hexsidelength = +data.hexsidelength; + this.staggeraxis = data.staggeraxis; + this.staggerindex = data.staggerindex; + + // calculate the map bounding rect + this.bounds = this.getRenderer().getBounds().clone(); + + // map "real" size + this.width = this.bounds.width; + this.height = this.bounds.height; + + // background color + this.backgroundcolor = data.backgroundcolor; + + // if version is undefined or empty it usually means the map was not created with Tiled + if (this.version !== "undefined" && this.version !== "") { + // deprecation warning if map tiled version is older than 1.5 + if (checkVersion(this.version, "1.5") < 0) { + warning("("+this.name+") Tiled Map format version 1.4 and below", "format 1.5 or higher", "10.4.4"); + } + } + + + // set additional map properties (if any) + applyTMXProperties(this, data); + + // internal flag + this.initialized = false; + } + + /** + * Return the map default renderer + * @returns {TMXRenderer} a TMX renderer + */ + getRenderer() { + if ((typeof(this.renderer) === "undefined") || (!this.renderer.canRender(this))) { + this.renderer = getNewTMXRenderer(this); + } + return this.renderer; + } + + /** + * return the map bounding rect + * @returns {Bounds} + */ + getBounds() { + // calculated in the constructor + return this.bounds; + } + + /** + * parse the map + * @ignore + */ + readMapObjects(data) { + + if (this.initialized === true) { + return; + } + + // to automatically increment z index + let zOrder = 0; + + // Tileset information + if (!this.tilesets) { + // make sure we have a TilesetGroup Object + this.tilesets = new TMXTilesetGroup(); + } + + // parse all tileset objects + if (typeof (data.tilesets) !== "undefined") { + let tilesets = data.tilesets; + tilesets.forEach((tileset) => { + // add the new tileset + this.tilesets.add(readTileset(tileset)); + }); + } + + // check if a background image is defined + if (this.background_image) { + // add a new image layer + this.layers.push( + pool.pull("ImageLayer", + 0, 0, { + name : "background_image", + image : this.background_image, + z : zOrder++ + } + )); + } + + data.layers.forEach((layer) => { + switch (layer.type) { + case "imagelayer": + this.layers.push(readImageLayer(this, layer, zOrder++)); + break; + + case "tilelayer": + this.layers.push(readLayer(this, layer, zOrder++)); + break; + + // get the object groups information + case "objectgroup": + this.objectGroups.push(readObjectGroup(this, layer, zOrder++)); + break; + + // get the object groups information + case "group": + this.objectGroups.push(readObjectGroup(this, layer, zOrder++)); + break; + + default: + break; + } + }); + + this.initialized = true; + } + + + /** + * add all the map layers and objects to the given container. + * note : this will not automatically update the camera viewport + * @param {Container} container - target container + * @param {boolean} [flatten=true] - if true, flatten all objects into the given container, else a `me.Container` object will be created for each corresponding groups + * @param {boolean} [setViewportBounds=false] - if true, set the viewport bounds to the map size, this should be set to true especially if adding a level to the game world container. + * @example + * // create a new level object based on the TMX JSON object + * let level = new me.TMXTileMap(levelId, me.loader.getTMX(levelId)); + * // add the level to the game world container + * level.addTo(me.game.world, true, true); + */ + addTo(container, flatten, setViewportBounds) { + let _sort = container.autoSort; + let _depth = container.autoDepth; + + let levelBounds = this.getBounds(); + + // disable auto-sort and auto-depth + container.autoSort = false; + container.autoDepth = false; + + if (this.backgroundcolor) { + container.backgroundColor.parseCSS(this.backgroundcolor); + } + + // add all layers instances + this.getLayers().forEach((layer) => { + container.addChild(layer); + }); + + // add all Object instances + this.getObjects(flatten).forEach((object) => { + container.addChild(object); + }); + + // resize the container accordingly + container.resize(this.bounds.width, this.bounds.height); + + // sort everything (recursively) + container.sort(true); + + /** + * callback funtion for the viewport resize event + * @ignore + */ + function _setBounds(width, height) { + // adjust the viewport bounds if level is smaller + game.viewport.setBounds( + 0, 0, + Math.max(levelBounds.width, width), + Math.max(levelBounds.height, height) + ); + // center the map if smaller than the current viewport + container.pos.set( + Math.max(0, ~~((width - levelBounds.width) / 2)), + Math.max(0, ~~((height - levelBounds.height) / 2)), + // don't change the container z position if defined + container.pos.z + ); + } + + if (setViewportBounds === true) { + off(VIEWPORT_ONRESIZE, _setBounds); + // force viewport bounds update + _setBounds(game.viewport.width, game.viewport.height); + // Replace the resize handler + on(VIEWPORT_ONRESIZE, _setBounds, this); + } + + // set back auto-sort and auto-depth + container.autoSort = _sort; + container.autoDepth = _depth; + } + + /** + * return an Array of instantiated objects, based on the map object definition + * @param {boolean} [flatten=true] - if true, flatten all objects into the returned array. + * when false, a `me.Container` object will be created for each corresponding groups + * @returns {Renderable[]} Array of Objects + */ + getObjects(flatten) { + let objects = []; + let isCollisionGroup = false; + let targetContainer; + + // parse the map for objects + this.readMapObjects(this.data); + + for (let g = 0; g < this.objectGroups.length; g++) { + let group = this.objectGroups[g]; + + // check if this is the collision shape group + isCollisionGroup = group.name.toLowerCase().includes(COLLISION_GROUP); + + if (flatten === false) { + // create a new container + targetContainer = new Container(0, 0, this.width, this.height); + + // tiled uses 0,0 by default + targetContainer.anchorPoint.set(0, 0); + + // set additional properties + targetContainer.name = group.name; + targetContainer.pos.z = group.z; + targetContainer.setOpacity(group.opacity); + + // disable auto-sort and auto-depth + targetContainer.autoSort = false; + targetContainer.autoDepth = false; + } + + // iterate through the group and add all object into their + // corresponding target Container + for (let o = 0; o < group.objects.length; o++) { + // TMX object settings + let settings = group.objects[o]; + // reference to the instantiated object + let obj; + // a reference to the default shape + let shape; + + // Tiled uses 0,0 by default + if (typeof (settings.anchorPoint) === "undefined") { + settings.anchorPoint = {x : 0, y : 0}; + } + // convert to melonJS renderable argument name + if (typeof (settings.tintcolor) !== "undefined") { + settings.tint = pool.pull("Color"); + settings.tint.parseHex(settings.tintcolor, true); + } + + /// XXX Clean/rewrite all this part to remove object + /// specific instantiation logic/details from here + + // groups can contains either text, objects or layers + if (settings instanceof TMXLayer) { + // layers are already instantiated & initialized + obj = settings; + // z value set already + } else if (typeof settings.text === "object") { + // Tiled uses 0,0 by default + if (typeof (settings.text.anchorPoint) === "undefined") { + settings.text.anchorPoint = settings.anchorPoint; + } + if (settings.text.bitmap === true) { + obj = pool.pull("BitmapText", settings.x, settings.y, settings.text); + } else { + obj = pool.pull("Text", settings.x, settings.y, settings.text); + } + // set the obj z order + obj.pos.z = settings.z; + } else if (typeof settings.tile === "object") { + // create a default shape if none is specified + shape = settings.shapes; + if (typeof shape === "undefined") { + shape = pool.pull("Polygon", 0, 0, [ + pool.pull("Vector2d", 0, 0), + pool.pull("Vector2d", this.width, 0), + pool.pull("Vector2d", this.width, this.height) + ]); + } + // check if a me.Tile object is embedded + obj = settings.tile.getRenderable(settings); + obj.body = new Body(obj, shape); + obj.body.setStatic(true); + // set the obj z order + obj.pos.setMuted(settings.x, settings.y, settings.z); + } else { + // pull the corresponding object from the object pool + if (typeof settings.name !== "undefined" && settings.name !== "") { + obj = pool.pull( + settings.name, + settings.x, settings.y, + settings + ); + } else { + // unnamed shape object + obj = pool.pull( + "Renderable", + settings.x, settings.y, + settings.width, settings.height + ); + // create a default shape if none is specified + shape = settings.shapes; + if (typeof shape === "undefined") { + shape = pool.pull("Polygon", 0, 0, [ + pool.pull("Vector2d", 0, 0), + pool.pull("Vector2d", this.width, 0), + pool.pull("Vector2d", this.width, this.height) + ]); + } + obj.anchorPoint.set(0, 0); + obj.name = settings.name; + obj.type = settings.type; + // for backward compatibility + obj.class = settings.class || settings.type; + obj.id = settings.id; + obj.body = new Body(obj, shape); + obj.body.setStatic(true); + obj.resize(obj.body.getBounds().width, obj.body.getBounds().height); + } + // set the obj z order + obj.pos.z = settings.z; + } + + if (isCollisionGroup && !settings.name && obj.body) { + // configure the body accordingly + obj.body.collisionType = collision.types.WORLD_SHAPE; + // mark collision shapes as static + obj.body.isStatic = true; + } + + //apply group opacity value to the child objects if group are merged + if (flatten !== false) { + if (obj.isRenderable === true) { + obj.setOpacity(obj.getOpacity() * group.opacity); + // and to child renderables if any + if (typeof obj.renderable !== "undefined" && obj.renderable.isRenderable === true) { + obj.renderable.setOpacity(obj.renderable.getOpacity() * group.opacity); + } + } + // directly add the obj into the objects array + objects.push(obj); + } else /* false*/ { + // add it to the new container + targetContainer.addChild(obj); + } + + } + + // if we created a new container + if ((flatten === false) && (targetContainer.children.length > 0)) { + + // re-enable auto-sort and auto-depth + targetContainer.autoSort = true; + targetContainer.autoDepth = true; + + // add our container to the world + objects.push(targetContainer); + } + } + return objects; + } + + /** + * return all the existing layers + * @returns {TMXLayer[]} Array of Layers + */ + getLayers() { + // parse the map for objects + this.readMapObjects(this.data); + return this.layers; + } + + /** + * destroy function, clean all allocated objects + */ + destroy() { + this.tilesets = undefined; + this.layers.length = 0; + this.objectGroups.length = 0; + this.initialized = false; + } +} + +// our levels +let levels = {}; +// level index table +let levelIdx = []; +// current level index +let currentLevelIdx = 0; + +/** + * @ignore + */ +function safeLoadLevel(levelId, options, restart) { + // clean the destination container + options.container.reset(); + + // reset the renderer + game.reset(); + + // clean the current (previous) level + if (levels[level.getCurrentLevelId()]) { + levels[level.getCurrentLevelId()].destroy(); + } + + // update current level index + currentLevelIdx = levelIdx.indexOf(levelId); + + // add the specified level to the game world + loadTMXLevel(levelId, options.container, options.flatten, options.setViewportBounds); + + // publish the corresponding message + emit(LEVEL_LOADED, levelId); + + // fire the callback + options.onLoaded(levelId); + + if (restart) { + // resume the game loop if it was previously running + state$1.restart(); + } +} + +/** + * Load a TMX level + * @name loadTMXLevel + * @memberof level + * @private + * @param {string} levelId - level id + * @param {Container} container - target container + * @param {boolean} [flatten=true] - if true, flatten all objects into the given container + * @param {boolean} [setViewportBounds=false] - if true, set the viewport bounds to the map size, this should be set to true especially if adding a level to the game world container. + * @ignore + */ +function loadTMXLevel(levelId, container, flatten, setViewportBounds) { + let level = levels[levelId]; + + // reset the GUID generator + // and pass the level id as parameter + resetGUID(levelId, level.nextobjectid); + + // Tiled use 0,0 anchor coordinates + container.anchorPoint.set(0, 0); + + // add all level elements to the target container + level.addTo(container, flatten, setViewportBounds); +} + + +/** + * a level manager. once ressources loaded, the level manager contains all references of defined levels. + * @namespace level + */ + +let level = { + + /** + * add a level into the game manager (usually called by the preloader) + * @name add + * @memberof level + * @public + * @param {string} format - level format (only "tmx" supported) + * @param {string} levelId - the level id (or name) + * @param {Function} [callback] - a function to be called once the level is loaded + * @returns {boolean} true if the level was loaded + */ + add(format, levelId, callback) { + switch (format) { + case "tmx" : + // just load the level with the XML stuff + if (levels[levelId] == null) { + //console.log("loading "+ levelId); + levels[levelId] = new TMXTileMap(levelId, getTMX(levelId)); + // level index + levelIdx.push(levelId); + } + else { + //console.log("level %s already loaded", levelId); + return false; + } + + // call the callback if defined + if (callback) { + callback(); + } + // true if level loaded + return true; + + default : + throw new Error("no level loader defined for format " + format); + } + }, + + /** + * load a level into the game manager
                            + * (will also create all level defined entities, etc..) + * @name load + * @memberof level + * @public + * @param {string} levelId - level id + * @param {object} [options] - additional optional parameters + * @param {Container} [options.container=game.world] - container in which to load the specified level + * @param {Function} [options.onLoaded=game.onLevelLoaded] - callback for when the level is fully loaded + * @param {boolean} [options.flatten=game.mergeGroup] - if true, flatten all objects into the given container + * @param {boolean} [options.setViewportBounds=true] - if true, set the viewport bounds to the map size + * @returns {boolean} true if the level was successfully loaded + * @example + * // the game assets to be be preloaded + * // TMX maps + * let resources = [ + * {name: "a4_level1", type: "tmx", src: "data/level/a4_level1.tmx"}, + * {name: "a4_level2", type: "tmx", src: "data/level/a4_level2.tmx"}, + * {name: "a4_level3", type: "tmx", src: "data/level/a4_level3.tmx"}, + * // ... + * ]; + * + * // ... + * + * // load a level into the game world + * me.level.load("a4_level1"); + * ... + * ... + * // load a level into a specific container + * let levelContainer = new me.Container(); + * me.level.load("a4_level2", {container:levelContainer}); + * // add a simple transformation + * levelContainer.currentTransform.translate(levelContainer.width / 2, levelContainer.height / 2 ); + * levelContainer.currentTransform.rotate(0.05); + * levelContainer.currentTransform.translate(-levelContainer.width / 2, -levelContainer.height / 2 ); + * // add it to the game world + * me.game.world.addChild(levelContainer); + */ + load(levelId, options) { + options = Object.assign({ + "container" : game.world, + "onLoaded" : game.onLevelLoaded, + "flatten" : game.mergeGroup, + "setViewportBounds" : true + }, options || {}); + + // throw an exception if not existing + if (typeof(levels[levelId]) === "undefined") { + throw new Error("level " + levelId + " not found"); + } + + if (levels[levelId] instanceof TMXTileMap) { + + // check the status of the state mngr + let wasRunning = state$1.isRunning(); + + if (wasRunning) { + // stop the game loop to avoid + // some silly side effects + state$1.stop(); + + defer(safeLoadLevel, this, levelId, options, true); + } + else { + safeLoadLevel(levelId, options); + } + } + else { + throw new Error("no level loader defined"); + } + return true; + }, + + /** + * return the current level id
                            + * @name getCurrentLevelId + * @memberof level + * @public + * @returns {string} + */ + getCurrentLevelId() { + return levelIdx[currentLevelIdx]; + }, + + /** + * return the current level definition. + * for a reference to the live instantiated level, + * rather use the container in which it was loaded (e.g. me.game.world) + * @name getCurrentLevel + * @memberof level + * @public + * @returns {TMXTileMap} + */ + getCurrentLevel() { + return levels[this.getCurrentLevelId()]; + }, + + /** + * reload the current level + * @name reload + * @memberof level + * @public + * @param {object} [options] - additional optional parameters + * @param {Container} [options.container=game.world] - container in which to load the specified level + * @param {Function} [options.onLoaded=game.onLevelLoaded] - callback for when the level is fully loaded + * @param {boolean} [options.flatten=game.mergeGroup] - if true, flatten all objects into the given container + * @returns {object} the current level + */ + reload(options) { + // reset the level to initial state + //levels[currentLevel].reset(); + return this.load(this.getCurrentLevelId(), options); + }, + + /** + * load the next level + * @name next + * @memberof level + * @public + * @param {object} [options] - additional optional parameters + * @param {Container} [options.container=game.world] - container in which to load the specified level + * @param {Function} [options.onLoaded=game.onLevelLoaded] - callback for when the level is fully loaded + * @param {boolean} [options.flatten=game.mergeGroup] - if true, flatten all objects into the given container + * @returns {boolean} true if the next level was successfully loaded + */ + next(options) { + //go to the next level + if (currentLevelIdx + 1 < levelIdx.length) { + return this.load(levelIdx[currentLevelIdx + 1], options); + } + else { + return false; + } + }, + + /** + * load the previous level
                            + * @name previous + * @memberof level + * @public + * @param {object} [options] - additional optional parameters + * @param {Container} [options.container=game.world] - container in which to load the specified level + * @param {Function} [options.onLoaded=game.onLevelLoaded] - callback for when the level is fully loaded + * @param {boolean} [options.flatten=game.mergeGroup] - if true, flatten all objects into the given container + * @returns {boolean} true if the previous level was successfully loaded + */ + previous(options) { + // go to previous level + if (currentLevelIdx - 1 >= 0) { + return this.load(levelIdx[currentLevelIdx - 1], options); + } + else { + return false; + } + }, + + /** + * return the amount of level preloaded + * @name levelCount + * @memberof level + * @public + * @returns {number} the amount of level preloaded + */ + levelCount() { + return levelIdx.length; + } + +}; + +/** + * parse/preload a TMX file + * @param {loader.Asset} data - asset data + * @param {Function} [onload] - function to be called when the asset is loaded + * @param {Function} [onerror] - function to be called in case of error + * @returns {number} the amount of corresponding resource parsed/preloaded + * @ignore + */ +function preloadTMX(tmxData, onload, onerror) { + if (typeof tmxList[tmxData.name] !== "undefined") { + // already loaded + return 0; + } + + /** + * @ignore + */ + function addToTMXList(data) { + // set the TMX content + tmxList[tmxData.name] = data; + + // add the tmx to the level manager + if (tmxData.type === "tmx") { + level.add(tmxData.type, tmxData.name); + } + } + + + //if the data is in the tmxData object, don't get it via a XMLHTTPRequest + if (tmxData.data) { + addToTMXList(tmxData.data); + if (typeof onload === "function") { + onload(); + } + return; + } + + let xmlhttp = new XMLHttpRequest(); + // check the data format ('tmx', 'json') + let format = getExtension(tmxData.src); + + if (xmlhttp.overrideMimeType) { + if (format === "json") { + xmlhttp.overrideMimeType("application/json"); + } + else { + xmlhttp.overrideMimeType("text/xml"); + } + } + + xmlhttp.open("GET", tmxData.src + nocache, true); + xmlhttp.withCredentials = withCredentials; + // set the callbacks + xmlhttp.ontimeout = onerror; + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState === 4) { + // status = 0 when file protocol is used, or cross-domain origin, + // (With Chrome use "--allow-file-access-from-files --disable-web-security") + if ((xmlhttp.status === 200) || ((xmlhttp.status === 0) && xmlhttp.responseText)) { + let result = null; + + // parse response + switch (format) { + case "xml": + case "tmx": + case "tsx": { + // ie9 does not fully implement the responseXML + if (ua.match(/msie/i) || !xmlhttp.responseXML) { + if (globalThis.DOMParser) { + // manually create the XML DOM + result = (new DOMParser()).parseFromString(xmlhttp.responseText, "text/xml"); + } else { + throw new Error("XML file format loading not supported, use the JSON file format instead"); + } + } + else { + result = xmlhttp.responseXML; + } + // converts to a JS object + const data = parse(result); + switch (format) { + case "tmx": + result = data.map; + break; + + case "tsx": + result = data.tilesets[0]; + break; + } + break; + } + case "json": + case "tmj": + case "tsj": + result = JSON.parse(xmlhttp.responseText); + break; + + default: + throw new Error("TMX file format " + format + " not supported !"); + } + + //set the TMX content + addToTMXList(result); + + // fire the callback + if (typeof onload === "function") { + onload(); + } + } + else if (typeof onerror === "function") { + onerror(tmxData.name); + } + } + }; + // send the request + xmlhttp.send(); + + return 1; +} + +/** + * parse/preload a JSON files + * @param {loader.Asset} data - asset data + * @param {Function} [onload] - function to be called when the asset is loaded + * @param {Function} [onerror] - function to be called in case of error + * @returns {number} the amount of corresponding resource parsed/preloaded + * @ignore + */ +function preloadJSON(data, onload, onerror) { + if (typeof jsonList[data.name] !== "undefined") { + // already loaded + return 0; + } + + let xmlhttp = new XMLHttpRequest(); + + if (xmlhttp.overrideMimeType) { + xmlhttp.overrideMimeType("application/json"); + } + + xmlhttp.open("GET", data.src + nocache, true); + xmlhttp.withCredentials = withCredentials; + + // set the callbacks + xmlhttp.ontimeout = onerror; + xmlhttp.onreadystatechange = function () { + if (xmlhttp.readyState === 4) { + // status = 0 when file protocol is used, or cross-domain origin, + // (With Chrome use "--allow-file-access-from-files --disable-web-security") + if ((xmlhttp.status === 200) || ((xmlhttp.status === 0) && xmlhttp.responseText)) { + // get the Texture Packer Atlas content + jsonList[data.name] = JSON.parse(xmlhttp.responseText); + if (typeof onload === "function") { + // fire the callback + onload(); + } + } + else if (typeof onerror === "function") { + onerror(data.name); + } + } + }; + // send the request + xmlhttp.send(); + + return 1; +} + +/** + * parse/preload a Binary file + * @param {loader.Asset} data - asset data + * @param {Function} [onload] - function to be called when the asset is loaded + * @param {Function} [onerror] - function to be called in case of error + * @returns {number} the amount of corresponding resource parsed/preloaded + * @ignore + */ +function preloadBinary(data, onload, onerror) { + let httpReq = new XMLHttpRequest(); + + // load our file + httpReq.open("GET", data.src + nocache, true); + httpReq.withCredentials = withCredentials; + httpReq.responseType = "arraybuffer"; + httpReq.onerror = onerror; + httpReq.onload = function () { + let arrayBuffer = httpReq.response; + if (arrayBuffer) { + let byteArray = new Uint8Array(arrayBuffer); + let buffer = []; + for (let i = 0; i < byteArray.byteLength; i++) { + buffer[i] = String.fromCharCode(byteArray[i]); + } + binList[data.name] = buffer.join(""); + if (typeof onload === "function") { + // callback + onload(); + } + + } + }; + httpReq.send(); + + return 1; +} + +/** + * parse/preload a Javascript files + * @param {loader.Asset} data - asset data + * @param {Function} [onload] - function to be called when the asset is loaded + * @param {Function} [onerror] - function to be called in case of error + * @ignore + */ +function preloadJavascript$1(data, onload, onerror) { + let script = document.createElement("script"); + + script.src = data.src; + script.type = "text/javascript"; + if (typeof (crossOrigin) === "string") { + script.crossOrigin = crossOrigin; + } + script.defer = true; + + if (typeof onload === "function") { + script.onload = () => { + // callback + onload(); + }; + } + + if (typeof onerror === "function") { + script.onerror = () => { + // callback + onerror(data.name); + }; + } + + document.getElementsByTagName("body")[0].appendChild(script); + + return 1; +} + +/** + * parse/preload a Javascript files + * @param {loader.Asset} data - asset data + * @param {Function} [onload] - function to be called when the asset is loaded + * @param {Function} [onerror] - function to be called in case of error + * @returns {number} the amount of corresponding resource parsed/preloaded + * @ignore + */ +function preloadJavascript(data, onload, onerror) { + let script = globalThis.document.createElement("script"); + + script.src = data.src; + script.type = "text/javascript"; + if (typeof (crossOrigin) === "string") { + script.crossOrigin = crossOrigin; + } + script.defer = true; + + if (typeof onload === "function") { + script.onload = () => { + // callback + onload(); + }; + } + + if (typeof onerror === "function") { + script.onerror = () => { + // callback + onerror(data.name); + }; + } + + globalThis.document.getElementsByTagName("body")[0].appendChild(script); + + return 1; +} + +/** + * onload callback + * @default undefined + * @memberof loader + * @type {function} + * @example + * // set a callback when everything is loaded + * me.loader.onload = this.loaded.bind(this); + */ +let onload; + +/** + * onProgress callback
                            + * each time a resource is loaded, the loader will fire the specified function, + * giving the actual progress [0 ... 1], as argument, and an object describing the resource loaded + * @default undefined + * @memberof loader + * @type {function} + * @example + * // set a callback for progress notification + * me.loader.onProgress = this.updateProgress.bind(this); + */ +let onProgress; + +/** + * onError callback
                            + * each time a resource loading is failed, the loader will fire the specified function giving the actual asset as argument. + * @default undefined + * @memberof loader + * @type {function} + * @example + * // set a callback for error notification + * me.loader.onError = this.loaderError.bind(this); + */ +let onError; + +/** + * list of parser function for supported format type + */ +let parsers = new Map(); + +/** + * keep track if parsers were registered + */ +let parserInitialized = false; + +// flag to check loading status +let resourceCount = 0; +let loadCount = 0; +let timerId = 0; + +/** + * Assets uploaded with an error + */ +const failureLoadedAssets = {}; + +/** + * init all supported parsers + * @ignore + */ +function initParsers() { + setParser("binary", preloadBinary); + setParser("image", preloadImage); + setParser("json", preloadJSON); + setParser("js", preloadJavascript); + setParser("tmx", preloadTMX); + setParser("tsx", preloadTMX); + setParser("audio", load$1); + setParser("fontface", preloadFontFace); + parserInitialized = true; +} + +/** + * check the loading status + * @ignore + */ +function checkLoadStatus(onloadcb) { + if (loadCount === resourceCount) { + // wait 1/2s and execute callback (cheap workaround to ensure everything is loaded) + if (typeof onloadcb === "function" || onload) { + // make sure we clear the timer + clearTimeout(timerId); + // trigger the onload callback + // we call either the supplied callback (which takes precedence) or the global one + let callback = onloadcb || onload; + setTimeout(() => { + callback(); + emit(LOADER_COMPLETE); + }, 300); + } + else { + throw new Error("no load callback defined"); + } + } + else { + timerId = setTimeout(() => { + checkLoadStatus(onloadcb); + }, 100); + } +} + +/** + * just increment the number of already loaded resources + * @ignore + */ +function onResourceLoaded(res) { + delete failureLoadedAssets[res.src]; + // increment the loading counter + loadCount++; + + // currrent progress + let progress = loadCount / resourceCount; + + // call callback if defined + if (typeof onProgress === "function") { + // pass the load progress in percent, as parameter + onProgress(progress, res); + } + emit(LOADER_PROGRESS, progress, res); +} + +/** + * on error callback for image loading + * @param {loader.Asset} asset - asset that loaded with failure + * @ignore + */ +function onLoadingError(res) { + failureLoadedAssets[res.src] = res; + if (this.onError) { + this.onError(res); + } + emit(LOADER_ERROR, res); + throw new Error("Failed loading resource " + res.src); +} + +/** + * an asset definition to be used with the loader + * @typedef {object} loader.Asset + * @property {string} name - name of the asset + * @property {string} type - the type of the asset ("audio"|"binary"|"image"|"json"|"js"|"tmx"|"tmj"|"tsx"|"tsj"|"fontface") + * @property {string} [src] - path and/or file name of the resource (for audio assets only the path is required) + * @property {string} [data] - TMX data if not provided through a src url + * @property {boolean} [stream=false] - Set to true to force HTML5 Audio, which allows not to wait for large file to be downloaded before playing. + * @see loader.preload + * @see loader.load + * @example + * // PNG tileset + * {name: "tileset-platformer", type: "image", src: "data/map/tileset.png"} + * // PNG packed texture + * {name: "texture", type:"image", src: "data/gfx/texture.png"} + * // PNG base64 encoded image + * {name: "texture", type:"image", src: "data:image/png;base64,iVBORw0KAAAQAAAAEACA..."} + * // TSX file + * {name: "meta_tiles", type: "tsx", src: "data/map/meta_tiles.tsx"} + * // TMX level (XML & JSON) + * {name: "map1", type: "tmx", src: "data/map/map1.json"} + * {name: "map2", type: "tmx", src: "data/map/map2.tmx"} + * {name: "map3", type: "tmx", format: "json", data: {"height":15,"layers":[...],"tilewidth":32,"version":1,"width":20}} + * {name: "map4", type: "tmx", format: "xml", data: {xml representation of tmx}} + * // audio resources + * {name: "bgmusic", type: "audio", src: "data/audio/"} + * {name: "cling", type: "audio", src: "data/audio/"} + * // base64 encoded audio resources + * {name: "band", type: "audio", src: "data:audio/wav;base64,..."} + * // binary file + * {name: "ymTrack", type: "binary", src: "data/audio/main.ym"} + * // JSON file (used for texturePacker) + * {name: "texture", type: "json", src: "data/gfx/texture.json"} + * // JavaScript file + * {name: "plugin", type: "js", src: "data/js/plugin.js"} + * // Font Face + * { name: "'kenpixel'", type: "fontface", src: "url('data/font/kenvector_future.woff2')" } + */ + +/** + * specify a parser/preload function for the given asset type + * @memberof loader + * @param {string} type - asset type + * @param {function} parserFn - parser function + * @see loader.Asset.type + * @example + * // specify a custom function for "abc" format + * function customAbcParser(data, onload, onerror) { + * // preload and do something with the data + * let parsedData = doSomething(data); + * // when done, call the onload callback with the parsed data + * onload(parsedData); + * // in case of error, call the onerror callback + * onerror(); + * // return the amount of asset parsed + * return 1 + * } + * // set the parser for the custom format + * loader.setParser("abc", customAbcParser); + */ +function setParser(type, parserFn) { + if (typeof parserFn !== "function") { + throw new Error("invalid parser function for " + type); + } + + if (typeof parsers.get(type) !== "undefined") { + warning("overriding parser for " + type + " format"); + } + + parsers.set(type, parserFn); +} + +/** + * set all the specified game assets to be preloaded. + * @memberof loader + * @param {loader.Asset[]} assets - list of assets to load + * @param {Function} [onloadcb=loader.onload] - function to be called when all resources are loaded + * @param {boolean} [switchToLoadState=true] - automatically switch to the loading screen + * @example + * game.assets = [ + * // PNG tileset + * {name: "tileset-platformer", type: "image", src: "data/map/tileset.png"}, + * // PNG packed texture + * {name: "texture", type:"image", src: "data/gfx/texture.png"} + * // PNG base64 encoded image + * {name: "texture", type:"image", src: "data:image/png;base64,iVBORw0KAAAQAAAAEACA..."} + * // TSX file + * {name: "meta_tiles", type: "tsx", src: "data/map/meta_tiles.tsx"}, + * // TMX level (XML & JSON) + * {name: "map1", type: "tmx", src: "data/map/map1.json"}, + * {name: "map2", type: "tmx", src: "data/map/map2.tmx"}, + * {name: "map3", type: "tmx", format: "json", data: {"height":15,"layers":[...],"tilewidth":32,"version":1,"width":20}}, + * {name: "map4", type: "tmx", format: "xml", data: {xml representation of tmx}}, + * // audio resources + * {name: "bgmusic", type: "audio", src: "data/audio/"}, + * {name: "cling", type: "audio", src: "data/audio/"}, + * // base64 encoded audio resources + * {name: "band", type: "audio", src: "data:audio/wav;base64,..."}, + * // binary file + * {name: "ymTrack", type: "binary", src: "data/audio/main.ym"}, + * // JSON file (used for texturePacker) + * {name: "texture", type: "json", src: "data/gfx/texture.json"}, + * // JavaScript file + * {name: "plugin", type: "js", src: "data/js/plugin.js"}, + * // Font Face + * { name: "'kenpixel'", type: "fontface", src: "url('data/font/kenvector_future.woff2')" } + * ]; + * ... + * // set all resources to be loaded + * me.loader.preload(game.assets, () => this.loaded()); + */ +function preload(assets, onloadcb, switchToLoadState = true) { + // parse the resources + for (let i = 0; i < assets.length; i++) { + resourceCount += load( + assets[i], + onResourceLoaded.bind(this, assets[i]), + onLoadingError.bind(this, assets[i]) + ); + } + // set the onload callback if defined + if (typeof(onloadcb) !== "undefined") { + onload = onloadcb; + } + + if (switchToLoadState === true) { + // swith to the loading screen + state$1.change(state$1.LOADING); + } + + // check load status + checkLoadStatus(onload); +} + +/** + * retry loading assets after a loading failure + * @memberof loader + * @param {string} src - src of asset to reload + * @example + * event.on( + * event.LOADER_ERROR, + * (res) => { + * // custom function + * showErrorNotification({ + * text: `Error during loading content: ${res.name}`, + * done: loader.reload(res.src); + * }) + * } + * ); +**/ +function reload(src) { + const assetToReload = failureLoadedAssets[src]; + this.unload(assetToReload); + resourceCount -= 1; + resourceCount += this.load( + assetToReload, + this.onResourceLoaded.bind(this, assetToReload), + this.onLoadingError.bind(this, assetToReload) + ); + // check load status + checkLoadStatus(this.onload); +} + +/** + * Load a single asset (to be used if you need to load additional asset(s) during the game) + * @memberof loader + * @param {loader.Asset} asset + * @param {Function} [onload] - function to be called when the asset is loaded + * @param {Function} [onerror] - function to be called in case of error + * @returns {number} the amount of corresponding resource to be preloaded + * @example + * // load an image asset + * me.loader.load({name: "avatar", type:"image", src: "data/avatar.png"}, () => this.onload(), () => this.onerror()); + * // load a base64 image asset + * me.loader.load({name: "avatar", type:"image", src: "data:image/png;base64,iVBORw0KAAAQAAAAEACA..."}; + * // start loading music + * me.loader.load({ + * name : "bgmusic", + * type : "audio", + * src : "data/audio/" + * }, function () { + * me.audio.play("bgmusic"); + * }); + */ +function load(asset, onload, onerror) { + + // make sure all parsers have been initialized + if (parserInitialized === false) { + initParsers(); + } + + // transform the url if necessary + if (typeof (baseURL[asset.type]) !== "undefined") { + asset.src = baseURL[asset.type] + asset.src; + } + + let parser = parsers.get(asset.type); + + if (typeof parser === "undefined") { + throw new Error("load : unknown or invalid resource type : " + asset.type); + } + + // parser returns the amount of asset to be loaded (usually 1 unless an asset is splitted into several ones) + return parser.call(this, asset, onload, onerror); +} + +/** + * unload the specified asset to free memory + * @memberof loader + * @param {loader.Asset} asset + * @returns {boolean} true if unloaded + * @example me.loader.unload({name: "avatar", type:"image"}); + */ +function unload(asset) { + switch (asset.type) { + case "binary": + if (!(asset.name in binList)) { + return false; + } + + delete binList[asset.name]; + return true; + + case "image": + if (!(asset.name in imgList)) { + return false; + } + delete imgList[asset.name]; + return true; + + case "json": + if (!(asset.name in jsonList)) { + return false; + } + + delete jsonList[asset.name]; + return true; + + case "js": + // ?? + return true; + + case "fontface": + // ?? + return true; + + case "tmx": + case "tsx": + if (!(asset.name in tmxList)) { + return false; + } + + delete tmxList[asset.name]; + return true; + + case "audio": + return unload$1(asset.name); + + default: + throw new Error("unload : unknown or invalid resource type : " + asset.type); + } +} + +/** + * unload all resources to free memory + * @memberof loader + * @example me.loader.unloadAll(); + */ +function unloadAll() { + let name; + + // unload all binary resources + for (name in binList) { + if (binList.hasOwnProperty(name)) { + unload({ + "name" : name, + "type" : "binary" + }); + } + } + + // unload all image resources + for (name in imgList) { + if (imgList.hasOwnProperty(name)) { + unload({ + "name" : name, + "type" : "image" + }); + } + } + + // unload all tmx resources + for (name in tmxList) { + if (tmxList.hasOwnProperty(name)) { + unload({ + "name" : name, + "type" : "tmx" + }); + } + } + + // unload all in json resources + for (name in jsonList) { + if (jsonList.hasOwnProperty(name)) { + unload({ + "name" : name, + "type" : "json" + }); + } + } + + // unload all audio resources + unloadAll$1(); +} + +/** + * return the specified TMX/TSX object + * @memberof loader + * @param {string} elt - name of the tmx/tsx element ("map1"); + * @returns {object} requested element or null if not found + */ +function getTMX(elt) { + // force as string + elt = "" + elt; + if (elt in tmxList) { + return tmxList[elt]; + } + return null; +} + +/** + * return the specified Binary object + * @memberof loader + * @param {string} elt - name of the binary object ("ymTrack"); + * @returns {object} requested element or null if not found + */ +function getBinary(elt) { + // force as string + elt = "" + elt; + if (elt in binList) { + return binList[elt]; + } + return null; +} + +/** + * return the specified Image Object + * @memberof loader + * @param {string} image - name of the Image element ("tileset-platformer"); + * @returns {HTMLImageElement} requested element or null if not found + */ +function getImage(image) { + // force as string and extract the base name + image = getBasename("" + image); + if (image in imgList) { + // return the corresponding Image object + return imgList[image]; + } + return null; +} + +/** + * return the specified JSON Object + * @memberof loader + * @param {string} elt - name of the json file to load + * @returns {object} + */ +function getJSON(elt) { + // force as string + elt = "" + elt; + if (elt in jsonList) { + return jsonList[elt]; + } + return null; +} + +var loader = { + __proto__: null, + baseURL: baseURL, + crossOrigin: crossOrigin, + getBinary: getBinary, + getImage: getImage, + getJSON: getJSON, + getTMX: getTMX, + load: load, + get nocache () { return nocache; }, + onError: onError, + onProgress: onProgress, + get onload () { return onload; }, + preload: preload, + reload: reload, + setBaseURL: setBaseURL, + setNocache: setNocache, + setParser: setParser, + unload: unload, + unloadAll: unloadAll, + withCredentials: withCredentials +}; + +/** + * @classdesc + * An object to display a fixed or animated sprite on screen. + * @augments Renderable + */ +class Sprite extends Renderable { + /** + * @param {number} x - the x coordinates of the sprite object + * @param {number} y - the y coordinates of the sprite object + * @param {object} settings - Configuration parameters for the Sprite object + * @param {HTMLImageElement|HTMLCanvasElement|TextureAtlas|string} settings.image - reference to spritesheet image, a texture atlas or to a texture atlas + * @param {string} [settings.name=""] - name of this object + * @param {string} [settings.region] - region name of a specific region to use when using a texture atlas, see {@link TextureAtlas} + * @param {number} [settings.framewidth] - Width of a single frame within the spritesheet + * @param {number} [settings.frameheight] - Height of a single frame within the spritesheet + * @param {string|Color} [settings.tint] - a tint to be applied to this sprite + * @param {number} [settings.flipX] - flip the sprite on the horizontal axis + * @param {number} [settings.flipY] - flip the sprite on the vertical axis + * @param {Vector2d} [settings.anchorPoint={x:0.5, y:0.5}] - Anchor point to draw the frame at (defaults to the center of the frame). + * @example + * // create a single sprite from a standalone image, with anchor in the center + * let sprite = new me.Sprite(0, 0, { + * image : "PlayerTexture", + * framewidth : 64, + * frameheight : 64, + * anchorPoint : new me.Vector2d(0.5, 0.5) + * }); + * + * // create a single sprite from a packed texture + * mytexture = new me.TextureAtlas( + * me.loader.getJSON("texture"), + * me.loader.getImage("texture") + * ); + * let sprite = new me.Sprite(0, 0, { + * image : mytexture, + * region : "npc2.png", + * }); + */ + constructor(x, y, settings) { + + // call the super constructor + super(x, y, 0, 0); + + /** + * pause and resume animation + * @public + * @type {boolean} + * @default false + * @name Sprite#animationpause + */ + this.animationpause = false; + + /** + * animation cycling speed (delay between frame in ms) + * @public + * @type {number} + * @default 100 + * @name Sprite#animationspeed + */ + this.animationspeed = 100; + + /** + * global offset for the position to draw from on the source image. + * @public + * @type {Vector2d} + * @default <0.0,0.0> + * @name offset + * @memberof Sprite# + */ + this.offset = pool.pull("Vector2d", 0, 0); + + /** + * The source texture object this sprite object is using + * @public + * @type {TextureAtlas} + * @name source + * @memberof Sprite# + */ + this.source = null; + + // hold all defined animation + this.anim = {}; + + // a flag to reset animation + this.resetAnim = undefined; + + // current frame information + // (reusing current, any better/cleaner place?) + this.current = { + // the current animation name + name : undefined, + // length of the current animation name + length : 0, + //current frame texture offset + offset : pool.pull("Vector2d"), + // current frame size + width : 0, + height : 0, + // Source rotation angle for pre-rotating the source image + angle : 0, + // current frame index + idx : 0 + }; + + // animation frame delta + this.dt = 0; + + // flicker settings + this._flicker = { + isFlickering : false, + duration : 0, + callback : null, + state : false + }; + + // set the proper image/texture to use + if (settings.image instanceof TextureAtlas) { + this.source = settings.image; + this.image = this.source.getTexture(); + this.textureAtlas = settings.image; + // check for defined region + if (typeof (settings.region) !== "undefined") { + // use a texture atlas + let region = this.source.getRegion(settings.region); + if (region) { + // set the sprite region within the texture + this.setRegion(region); + } else { + // throw an error + throw new Error("Texture - region for " + settings.region + " not found"); + } + } + } else { + // HTMLImageElement/Canvas or {string} + this.image = (typeof settings.image === "object") ? settings.image : getImage(settings.image); + // throw an error if image ends up being null/undefined + if (!this.image) { + throw new Error("me.Sprite: '" + settings.image + "' image/texture not found!"); + } + // update the default "current" frame size + this.width = this.current.width = settings.framewidth = settings.framewidth || this.image.width; + this.height = this.current.height = settings.frameheight = settings.frameheight || this.image.height; + this.source = renderer.cache.get(this.image, settings); + this.textureAtlas = this.source.getAtlas(); + } + + // store/reset the current atlas information if specified + if (typeof(settings.atlas) !== "undefined") { + this.textureAtlas = settings.atlas; + this.atlasIndices = settings.atlasIndices; + } + + // apply flip flags if specified + if (typeof (settings.flipX) !== "undefined") { + this.flipX(!!settings.flipX); + } + if (typeof (settings.flipY) !== "undefined") { + this.flipY(!!settings.flipY); + } + + // set the default rotation angle is defined in the settings + // * WARNING: rotating sprites decreases performance with Canvas Renderer + if (typeof (settings.rotation) !== "undefined") { + this.rotate(settings.rotation); + } + + // update anchorPoint + if (settings.anchorPoint) { + this.anchorPoint.set(settings.anchorPoint.x, settings.anchorPoint.y); + } + + if (typeof (settings.tint) !== "undefined") { + if (settings.tint instanceof Color) { + this.tint.copy(settings.tint); + } else { + // string (#RGB, #ARGB, #RRGGBB, #AARRGGBB) + this.tint.parseCSS(settings.tint); + } + } + + // set the sprite name if specified + if (typeof (settings.name) === "string") { + this.name = settings.name; + } + + // displaying order + if (typeof settings.z !== "undefined") { + this.pos.z = settings.z; + } + + // addAnimation will return 0 if no texture atlas is defined + if (this.addAnimation("default", null) !== 0) { + // set as default + this.setCurrentAnimation("default"); + } + } + + /** + * return the flickering state of the object + * @name isFlickering + * @memberof Sprite + * @returns {boolean} + */ + isFlickering() { + return this._flicker.isFlickering; + } + + /** + * make the object flicker + * @name flicker + * @memberof Sprite + * @param {number} duration - expressed in milliseconds + * @param {Function} callback - Function to call when flickering ends + * @returns {Sprite} Reference to this object for method chaining + * @example + * // make the object flicker for 1 second + * // and then remove it + * this.flicker(1000, function () { + * world.removeChild(this); + * }); + */ + flicker(duration, callback) { + this._flicker.duration = duration; + if (this._flicker.duration <= 0) { + this._flicker.isFlickering = false; + this._flicker.callback = null; + } + else if (!this._flicker.isFlickering) { + this._flicker.callback = callback; + this._flicker.isFlickering = true; + } + return this; + } + + /** + * add an animation
                            + * For fixed-sized cell sprite sheet, the index list must follow the + * logic as per the following example :
                            + * + * @name addAnimation + * @memberof Sprite + * @param {string} name - animation id + * @param {number[]|string[]|object[]} index - list of sprite index or name + * defining the animation. Can also use objects to specify delay for each frame, see below + * @param {number} [animationspeed] - cycling speed for animation in ms + * @returns {number} frame amount of frame added to the animation (delay between each frame). + * @see Sprite#animationspeed + * @example + * // walking animation + * this.addAnimation("walk", [ 0, 1, 2, 3, 4, 5 ]); + * // standing animation + * this.addAnimation("stand", [ 11, 12 ]); + * // eating animation + * this.addAnimation("eat", [ 6, 6 ]); + * // rolling animation + * this.addAnimation("roll", [ 7, 8, 9, 10 ]); + * // slower animation + * this.addAnimation("roll", [ 7, 8, 9, 10 ], 200); + * // or get more specific with delay for each frame. Good solution instead of repeating: + * this.addAnimation("turn", [{ name: 0, delay: 200 }, { name: 1, delay: 100 }]) + * // can do this with atlas values as well: + * this.addAnimation("turn", [{ name: "turnone", delay: 200 }, { name: "turntwo", delay: 100 }]) + * // define an dying animation that stop on the last frame + * this.addAnimation("die", [{ name: 3, delay: 200 }, { name: 4, delay: 100 }, { name: 5, delay: Infinity }]) + * // set the standing animation as default + * this.setCurrentAnimation("stand"); + */ + addAnimation(name, index, animationspeed) { + this.anim[name] = { + name : name, + frames : [], + idx : 0, + length : 0 + }; + + // # of frames + let counter = 0; + + if (typeof (this.textureAtlas) !== "object") { + return 0; + } + + + if (index == null) { + index = []; + // create a default animation with all frame + Object.keys(this.textureAtlas).forEach((v, i) => { + index[i] = i; + }); + } + + // set each frame configuration (offset, size, etc..) + for (let i = 0, len = index.length; i < len; i++) { + let frame = index[i]; + let frameObject; + if (typeof(frame) === "number" || typeof(frame) === "string") { + frameObject = { + name: frame, + delay: animationspeed || this.animationspeed + }; + } + else { + frameObject = frame; + } + let frameObjectName = frameObject.name; + if (typeof(frameObjectName) === "number") { + if (typeof (this.textureAtlas[frameObjectName]) !== "undefined") { + // TODO: adding the cache source coordinates add undefined entries in webGL mode + this.anim[name].frames[i] = Object.assign( + {}, + this.textureAtlas[frameObjectName], + frameObject + ); + counter++; + } + } else { // string + if (this.source.getFormat().includes("Spritesheet")) { + throw new Error( + "string parameters for addAnimation are not allowed for standard spritesheet based Texture" + ); + } else { + this.anim[name].frames[i] = Object.assign( + {}, + this.textureAtlas[this.atlasIndices[frameObjectName]], + frameObject + ); + counter++; + } + } + } + this.anim[name].length = counter; + + return counter; + } + + /** + * set the current animation + * this will always change the animation & set the frame to zero + * @name setCurrentAnimation + * @memberof Sprite + * @param {string} name - animation id + * @param {string|Function} [resetAnim] - animation id to switch to when complete, or callback + * @param {boolean} [preserve_dt=false] - if false will reset the elapsed time counter since last frame + * @returns {Sprite} Reference to this object for method chaining + * @example + * // set "walk" animation + * this.setCurrentAnimation("walk"); + * + * // set "walk" animation if it is not the current animation + * if (this.isCurrentAnimation("walk")) { + * this.setCurrentAnimation("walk"); + * } + * + * // set "eat" animation, and switch to "walk" when complete + * this.setCurrentAnimation("eat", "walk"); + * + * // set "die" animation, and remove the object when finished + * this.setCurrentAnimation("die", () => { + * world.removeChild(this); + * return false; // do not reset to first frame + * }); + * + * // set "attack" animation, and pause for a short duration + * this.setCurrentAnimation("die", () => { + * this.animationpause = true; + * + * // back to "standing" animation after 1 second + * setTimeout(function () { + * this.setCurrentAnimation("standing"); + * }, 1000); + * + * return false; // do not reset to first frame + * }); + */ + setCurrentAnimation(name, resetAnim, preserve_dt = false) { + if (typeof this.anim[name] !== "undefined") { + if (!this.isCurrentAnimation(name)) { + this.current.name = name; + this.current.length = this.anim[this.current.name].length; + if (typeof resetAnim === "string") { + this.resetAnim = this.setCurrentAnimation.bind(this, resetAnim, null, true); + } else if (typeof resetAnim === "function") { + this.resetAnim = resetAnim; + } else { + this.resetAnim = undefined; + } + this.setAnimationFrame(0); + if (!preserve_dt) { + this.dt = 0; + } + this.isDirty = true; + } + } else { + throw new Error("animation id '" + name + "' not defined"); + } + return this; + } + + /** + * reverse the given or current animation if none is specified + * @name reverseAnimation + * @memberof Sprite + * @param {string} [name] - animation id + * @returns {Sprite} Reference to this object for method chaining + * @see Sprite#animationspeed + */ + reverseAnimation(name) { + if (typeof name !== "undefined" && typeof this.anim[name] !== "undefined") { + this.anim[name].frames.reverse(); + } else { + this.anim[this.current.name].frames.reverse(); + } + this.isDirty = true; + return this; + } + + /** + * return true if the specified animation is the current one. + * @name isCurrentAnimation + * @memberof Sprite + * @param {string} name - animation id + * @returns {boolean} + * @example + * if (!this.isCurrentAnimation("walk")) { + * // do something funny... + * } + */ + isCurrentAnimation(name) { + return this.current.name === name; + } + + /** + * change the current texture atlas region for this sprite + * @see Texture.getRegion + * @name setRegion + * @memberof Sprite + * @param {object} region - typically returned through me.Texture.getRegion() + * @returns {Sprite} Reference to this object for method chaining + * @example + * // change the sprite to "shadedDark13.png"; + * mySprite.setRegion(mytexture.getRegion("shadedDark13.png")); + */ + setRegion(region) { + // set the source texture for the given region + this.image = this.source.getTexture(region); + // set the sprite offset within the texture + this.current.offset.setV(region.offset); + // set angle if defined + this.current.angle = typeof region.angle === "number" ? region.angle : 0; + // update the default "current" size + this.width = this.current.width = region.width; + this.height = this.current.height = region.height; + // set global anchortPoint if defined + if (region.anchorPoint) { + this.anchorPoint.setMuted( + this._flip.x && region.trimmed === true ? 1 - region.anchorPoint.x : region.anchorPoint.x, + this._flip.y && region.trimmed === true ? 1 - region.anchorPoint.y : region.anchorPoint.y + ); + } + // update the sprite bounding box + this.updateBounds(); + this.isDirty = true; + return this; + } + + /** + * force the current animation frame index. + * @name setAnimationFrame + * @memberof Sprite + * @param {number} [index=0] - animation frame index + * @returns {Sprite} Reference to this object for method chaining + * @example + * // reset the current animation to the first frame + * this.setAnimationFrame(); + */ + setAnimationFrame(index = 0) { + this.current.idx = index % this.current.length; + return this.setRegion(this.getAnimationFrameObjectByIndex(this.current.idx)); + } + + /** + * return the current animation frame index. + * @name getCurrentAnimationFrame + * @memberof Sprite + * @returns {number} current animation frame index + */ + getCurrentAnimationFrame() { + return this.current.idx; + } + + /** + * Returns the frame object by the index. + * @name getAnimationFrameObjectByIndex + * @memberof Sprite + * @ignore + * @param {number} id - the frame id + * @returns {number} if using number indices. Returns {object} containing frame data if using texture atlas + */ + getAnimationFrameObjectByIndex(id) { + return this.anim[this.current.name].frames[id]; + } + + /** + * update function.
                            + * automatically called by the game manager {@link game} + * @name update + * @memberof Sprite + * @protected + * @param {number} dt - time since the last update in milliseconds. + * @returns {boolean} true if the Sprite is dirty + */ + update(dt) { + // Update animation if necessary + if (!this.animationpause && this.current.length > 1) { + let duration = this.getAnimationFrameObjectByIndex(this.current.idx).delay; + this.dt += dt; + while (this.dt >= duration) { + this.isDirty = true; + this.dt -= duration; + + let nextFrame = (this.current.length > 1 ? this.current.idx + 1 : this.current.idx); + this.setAnimationFrame(nextFrame); + + // Switch animation if we reach the end of the strip and a callback is defined + if (this.current.idx === 0 && typeof this.resetAnim === "function") { + // Otherwise is must be callable + if (this.resetAnim() === false) { + // Reset to last frame + this.setAnimationFrame(this.current.length - 1); + + // Bail early without skipping any more frames. + this.dt %= duration; + break; + } + } + // Get next frame duration + duration = this.getAnimationFrameObjectByIndex(this.current.idx).delay; + } + } + + //update the "flickering" state if necessary + if (this._flicker.isFlickering) { + this._flicker.duration -= dt; + if (this._flicker.duration < 0) { + if (typeof (this._flicker.callback) === "function") { + this._flicker.callback(); + } + this.flicker(-1); + } + this.isDirty = true; + } + + return super.update(dt); + } + + /** + * Destroy function
                            + * @ignore + */ + destroy() { + pool.push(this.offset); + this.offset = undefined; + super.destroy(); + } + + /** + * draw this srite (automatically called by melonJS) + * @name draw + * @memberof Sprite + * @protected + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance + * @param {Camera2d} [viewport] - the viewport to (re)draw + */ + draw(renderer, viewport) { // eslint-disable-line no-unused-vars + // do nothing if we are flickering + if (this._flicker.isFlickering) { + this._flicker.state = !this._flicker.state; + if (!this._flicker.state) { + return; + } + } + + // the frame to draw + let frame = this.current; + + // cache the current position and size + let xpos = this.pos.x, + ypos = this.pos.y; + + let w = frame.width, + h = frame.height; + + // frame offset in the texture/atlas + let frame_offset = frame.offset; + let g_offset = this.offset; + + + // remove image's TexturePacker/ShoeBox rotation + if (frame.angle !== 0) { + renderer.translate(-xpos, -ypos); + renderer.rotate(frame.angle); + xpos -= h; + w = frame.height; + h = frame.width; + } + + renderer.drawImage( + this.image, + g_offset.x + frame_offset.x, // sx + g_offset.y + frame_offset.y, // sy + w, h, // sw,sh + xpos, ypos, // dx,dy + w, h // dw,dh + ); + } +} + +var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAA8FBMVEUgICBrqDHRZVtqpzEhJCAjKCBurTIfHyDQZFptrDEWAB8OAB7VZ1wtIiIAEhYlISDYaF4SAB4pIiEAFhkcFh8eGyBopDAMAB5noS8kKyAAGhtjmy4bEB9lni8ZBR/HYFdPeim/XFQ9XCUaCh9flS1VhCtSfyorOSEVHh4HHB1EZyatVExhmC5ajCxHbSc0SyMuQCInMiFKcSgxRSI6VSRBYiWdTUZdki09JyZ8PzpYiSs3UCRlNjK1WE9ckC1MdShbjywyJCONRkDKYliUSUNeMzBDKShXMC2kUEl1PDeEQj1OLStnNjNxOjZsODQAAAcMh1CFAAAU4UlEQVR42uyaa3fSMBjHk5EQkgClkBZKoXblNhlswIooc2N6pp7jUb//x/FpRbnt4JWwzv7eraQvfs/zby7tUEpKSkpKSkpKSkpKSkpKSkqKTsg30P8E+FIArJllqQaglMXQt6tPuhogGSlaLWFKKU2hEB33eqPRqDemRAlhRhdbVjwIBj8xogajhpBSkNH1dOJ37mYDt1mr2UCt1mwOZned7qQfjhxPVs0WovTpRIFFNkpIU42CSWfm2phnIzjHP+DLS9hutjuL4IqZUigC9yU/CWDBhBROOJkPbBxL4swKjDf/jEvBbXe4CMeiKixKEx0EAq03JbqeDJs4Ul9a7mE5AqqAazM/pJCb5JaAUmWa42nHBflYDf8y8WC4qznv9yRKZAUIRUKO+/Maz/J1+d8ugu0rK3kVoNSTVhDZr8v/WRGyQw8lC0KJMK989+/sVzXILiRNzmrACGXSC4Z2lsf2f08GN2lyHgJCLUn6bRw1/2dim+A9hIKiJMAQ6NOJu7f5a7r8B+u/7N7BAzMZBaBIkkkz0t83sfMsgDHsgN1BOybaFNvww2qblMgEUGKqi2aU/X3u2HZnHf8iuL4aO0S1PKDVQM54dBn0F50718bfq5CwOYBQIaaDVfd37MG91u5MwhER8WHQU8qC2wCEmFJefEYUrBdedGe15b4xQasAtaqXt/wh/W87W1679YNeCxQbjNCItTchBFheRErAmHEYb575ch/Qeuz9ByXpdHH2QX2wx4NuMBbSbJCfn3IJWZ4dndBvZ6Bytt949A8AbZjT6OHftQeDTHtx2VgebhFj6KfAmGisJaS46k+mj/4sELW/N+QP6UOIXf/Sqwq0p/F7okA8KU312BcAqmTf3k1/1Hx7HlgyskfsL96h7b3XMNCRcYQzz+KH9N3FSC57fxiYUTDOWLmAjgcjpBo2d9oPKxdv95Fs0UPGl5XPinWDVYqGwdBxYFQJH/Mdfc5nQUuyw77KYYXKm/ub09PzV/Xn5SNVAOJ/B/Hf0W8HwiQUHRTwf/2slM/nS6WbN/XjZIDK6534w8zv9r1In6GDUq6/y+VzMaVTdGYg7cDj38/wHX17YknQPzSGUb8p5U5icqX7ovaZkBFk+nw7/hx3epIdvPtAufIpf7Ikl39W0B0BRpToQPy32j8IZUPPW+xC8S0E4Afv6noLwGgL3WZ32u8roetbTqF4v1aA/JdKGWmEUc8ZgP/m0j+4riKKNFEoflwrQO6D1gQwKnrulj/mXUto048XgZV+/vQMaYQ5otfc8s/Wpprav5oFz5cRgHXwo85VgFHw55nN+Ld7UvMnPOP5y2elXMRJ6VzDA7DPH2e7XstBemHl+vubfAk4efGc6SsAo9542x9fVJH+D/lQgfrnF+fn9++KWv0bdHP+z3A7rFKC9MMMo1KsVIr1ssYHgFiqvemfdUemg45EuVAuFMpIH4SI4ZZ/2xEOQ8eCAUgjVHa3/G+txuN/Z/+vYE51suU/9NT/5G8GIL3uPxfsCfwf11fyrW1FgRiGTkna0vZpYHQUXRHdVZBhvCMorP7/V+3oyprgPiy2Dxk2HzA06TknpyHz19CjVfcpf9kj+6SBtqgcMPz/q/vPdPgwLP/DsCM1f2vTf7Ifap5/hYXQ/FGnX7S16LdABADc23oqVP91kYfgrU5b1GxKHSCo7tILzR/z9eJ8nliv0zqAMZ8ATEJfaP6+7jlj3CDlXpHVfsfnH+eyn4kMzMdGQRNO7fNkGEXbGTigBkDq1lZzU07BnaXzIab6LCMAuEEmdWcD8+ax9uNTckxFqyWxwKBgKXZrzerHtAbcPhFQ0R8oAExdChXADIt1Tz0KkGi9TjML1CBLqgA0YZGIFZhZqVNUtf9GCdBbF0IF4Be/vvQYz6pyxhRwH+QC4CpXoAgELvE6iKMtfwJLzv+5YU2iDasOR0MJMBdMgFsMK6ICrppGY+rELGAdhFpAYoXYgRdBRzsLUtB3L/z+7zpITFvHYhQAdorGyQudAdCuNe8qoJjVNgYAF0M+9iFbAe9tK2w4BKIIdVJ0CLASv7jeBFo7cBwCrxcgP1IAjEv5ALipwII1gmGGMR4A2uEB+blJK4x4E1kdZhQA5xYowPe58z3lwKfH199WbQRAc/LpuwPWu17k0qaFCnANAgHSvKJcZdMCxJtgOsQuKsexG2uCwMxa8O8aUa/axHZCe/OUZA42ag0Avqi5ll2nYSAaRQEbZI+NrbKwEFFYJURCiEcpqEE0aZOmBfH/f4PLQ+OEttwxLKg3jq5Or3TG9jyOJ/FjgSIGZvBRLhB1oFvi7/3X5CIDhZHodOLtfyyEXUlh0IGzyDoQM+rbGljFRNaE2ZOXj0MT3pALxGQo8v1z1ILRBb6+hTJoZgLvBoMYRjZAeALuv/v/hZCzeTxWRIu/iwEvbqQMmKcxUekwHqF/KQSo74OCVX8rCyQoC9C/QYBZENZTcYMlRkqjWFlVZfn9OWGXwcoDVFKewD+fo33v9AwQD3HGFqH5XsXHACWVA7BObfp+YyoL4BKpLvb+MuvBlVn1q03iwIONVNFy1jPUBvGyPOaGJT4GGOPAHd9v66bIuy7Pi3p5GKoTrYSdeRXaQrk7LD02P2Gbejv2FqrYdugFxgHM5ChBEFNpIn/czxaObdMJrcXP4Z94sdxZUGZmAZmA+7ws0im4a9oenFQsKg58uE8NhBgE43+LlBysa65FmvJweIppMzobsmJKWve+EFrMsUJ3+wEqGaUKPA9XkSYNhj0xUd8xYkbBsU516lnMhv+LFs1nKCX7BZYVjIUQZ8FC830PRjG6LnSqBzCSPcloP0U9IaLZhknntlynSGhOS+yV/bWuEla1EPwSONXdAc0VKYv4ZcyoWQBGEDp/2zdI/zyrYgfyR6CAL7nm18BC18pJFnlLhuUMsScgvs9CwjrXyOgCq/Q9yIQpBa0Q/DqW6+JoJSNX9AGNT4S2uezhx8B9kBvu2AZGjpQubwLRglHKLnX6Z7DodmgBQjDHkji7O3+MoFFZgITx+pLiMdiChL1G7DUL8DWQLBDPw3dGh5Yjn38YT+TuMrhuvy71HbGiGyzRAg8DVYQQzO49evYg7ArLiP7v82/7n3OcZ8u6F36+IzjfVCqivwkTetqNCHpP2nvdfS74PJTr7zH+NM9pTflPwTMbcN1YkgEwFcL7EXIddf85LQ1SrtZ8FsO6uh13w7Abt02nZ7tjbiuR1+2Xn2COYPxaCCM3+KCqQz86fnpDSgOkPQg+i/dtb8E6P/zUt8Vln+/pF4fVD7D103Gbz8B8cIbULeJlHXqLM2ZQZDHEuGMnpsF+m0Alpfk+pKmAtZdCJNf5wUGJYAervRB8eggotSH2SlAy2myBchi14VbCxKlzka+BScWCqofBUASYCbsVKAQzD65g7CbmEl9OCTQtocEm74ysiPsq6imhilLVxANyUfR2o9i0SN7YstH8DP+9db+DYcD/iFsgqnXWd02SXAc9CrLpx124yFd2w35HlQ4tEPCHxPwO9haY7oG1NbQbMnLPYPbw2YNIMYAlxeTIDlP+WP0axAUhTrGzefUXEeK+kXetvU3DUDQtqdxKSQwJG1romIbQSLWhfuChFRioG92rsP//c3AiwbErxfKxBMoFf/am5cyPc+899/hDkTOJHZ4IKMQQrC6irDZTh+YVa9VHlsbuyK6uEe7tINCdK9hVutGkUgL/S0pox5cEchPX2X9qrXVfuIQIoAcsDN2sj+yb5XuVU8JZlgkpZ+PMzMbhvG0AwKqfteh6O3VZbqL8J4tNhggAluxxBgaNEIK7A/BNWvkWC7DCV/X+3qsMU0+LkqiS75NyMUhD+LqqrjdT51TPlQeAVTZ11nXpW1nm1sDOWhA1blBBcGEincwV1crqwV7Vq6r0U8ZxiCEevONwtzaaKnGS6X3lCGRHSwaAuyzU4Uyr5tjaLv4wL6+cm3BbxwFw9pSujJsfowBY2UfAutHeyRftZGwXb4RxY2+XDQHAgQGAlblMHI382xeRABwnSicBpyDYjS/HADYILhiYFAMA6k8DUDgANCQAfue0bPy3AeC3QD48AGK2gHLOgJFwAKhDENfgvwkArkGGCH0SDcAuEeKp8MhQYcEAtFT4EU2Fn9nB0HvJAExQHEMwRIfDogFgw2GI7eGXIhkANyESlxITvQLc/2UwAO+cLILgW4BMikIg46TF01QwAGxaHOwBuoI9uQBwhRGMPbs09nouFwCo3fAlLG6GCooFAMVRrGVaXTUz5XGxAHjK44xAQioArUBiZgskYiUyUrcAKhygdDEiqT2xPACZDS6qSe2+y04hIROAFM5aSO6F2qe5pmxDAMBJivJCydFhqsiOK9SHhQLQNb/ahTHFycsglh7EFogB4IQUSyORsqT841Aay8aBxR7VqYlQHPfK33SysAUVwY/qzF/ZO5kRfKLljAkidJMfZaEPgJXVD+ubNnUZqL0yS0upwKAOWidW7ZY++UhSIRQxp79KmAvth8sIha5Q8VZJ0B6YdquFaZlBTjyl7UMQEQcXyG8fZ93TN+MHCJv75l4bzWQ3+RhlRI8A2UzGozpEdpvjgSDRYALh7TY6qS+PWpHvBcT9nmdizk+nmQHsNq+xAHoRuLkYt21k32qlQ/01D0es0gVUCIcAZUimdbG+u7z/XOP7PQgsiu395WpbNKUKaEKqNmbyeZFoNiEKOscrDHkf1bxpmz91GdZY2HWHhjWHlt3kRc6bS/I2IoijIkyadZ7nJTNZU5PpByHAAmhXvkgfGqXUACY77fOc5h2SeXRciTNQ2Gkef56oOAsNtF1KQwCRIN/9CxqFZII8E5WXFpdFiZeW2oNHyRrIhSAfGrMHUCUfrKN8yAI+oYyUkFK2HaVFW2khtR/rPzDal+UkZGjwzOMAwRSJkReScwyi5QGdEvxI2wqZSEdNeGryRNYl018dT9X/zlIzndt0eHR4MNSnVXyPgoAGR3tKYidJ8dOa4PRCTTD2eRl7CUyEmAqirIHqbuxveuOcAjIuApwAHjNFKqmC5lsZIdH8zGuuzp8mYJQCTgGo/FARix7KMSQzYzn8vAAU8gFGcPQS+DJ8AH4rndH8PqQ3S35yd2U7isNAMFHasWw/WcopQhRBIBICQsggJCIx/P9XrTMcDWbZY5YQs36Yh4EZXNXl7vJB3Hkjd7fCkCfc3/ZGbgh4zp5xwYbuBdBWGr00pF2OrT0E6p/sIH6V1uRHTANeDv1NE/j4rB1mFYMHgTYJsJtnrGORL1W9w107NA4/u+gqjL+cFXprU2+cbSvA828GxFKImwRmLpDiji6WwCdvsuDjOU1MA7iI+WzXBj4MmfFpQKuAeC7wOdss6n8afe8qjaUaqNdRWoeEPt1g4wPGpFkMUJKuIruDAaA/ahsToVmXr4NnYanq4GI4eq4waLKJZxADYF12MvFIEO3EZKPLTMxxhADo1ztK0zgtxIND3JhieKnTeKEEhacT4F9OHOB+qRkMXHZwcCOzgwxFv76IfKszMxgg4bqNDDa26cSs01hsmKMtDlj9X8La4sfAdHkvHn6vHhngtGcGAJT+EX+3RxnwDDV+GPf7rIYUQGQa/tyj3RFA063GwN4f98cAJT6f3HaIDaukO1FS8GCuMTCveGz10yhJvIWGP+rWolKSFkMtEw7LvuaGMa/yW/y208iO8GMxXEXslnRnE8LrUyEFIpqhht8edb5aRWNeawzYLJMvnxhQsMKZw16KHw2RzoC7iF+dCOJ0PGX2a/Hj0sNFA5gIPl4zDFD+KzX8dfzhoyh0zwCzP/nrREA8MQu0HtjOSHTeAcwDxcDVPt/d1iGQVygQiKx2rq1FIPh4BX7MA/G5AOEwCNZKBN3PjuJEbCLX0cZgVL90kY6SxFcW5E4EZegTq9N+ECssdszWyZ8X/DX4UYc+n+oydFx7SgR0Z4sogEzWgc684x6s9PV1GMS6DbsmguGMc9IRBUC4HM3d+w+d9jIlAxKOIi0R2A5z85HkHWRDCiQV5YIxR8PP7KWAfiblsSxyV++P6tDhQz5dBS38emLfhV9ZkKa/Q8xknKAdu04Fiw/OLfKssFCLAJf1xEH4PZpQ3ZBvMCdddcvejxLhE3hO8KnkzQ7hX8t/LfvdnwAiiz327IoCli9jwUFxQP8l9kBgLKzNvhX/Pc/zpo+JqD4M+NpBEVzlAjeaNqkYA4Hv00s8wetswJDj6/BPfQNOKlCAsN7+rIPtSMjXKy4SIH8rBGoBEPCkqGYHx8XMfx3+wUdombE9RzhfBg8ocIPDUnHAfULgr0JP1R8Vs13kovZvEq2TqfCbsC1xMkXFzsY46RxsPxuQioRWCQC/RA5AFPhUCL9cL6JW+j+Dz1rXTfuXPzaSiNEcY3XHgT3YLRvCheSeBQR5oKpdIQfLS6WQUM4mA8e9Qa/7TWPCf/FpfLwcIgU6B0zBGe6zWVklMlQ8jD2/BX0mg3pjLkUo07jcZIsWPEP0OvwgA9l78r9vBAT5jB5QcESjYDlRvpsuN01dES/lnEupfqQeVKtmtMx2+dBhJ/APmHSdaWGW+rERPyymAVKgtRMq5rYIg2g4z/P9YbFY7PN8PoyC4wuI/QH8yUokxDIu/Ofk7YVFFmllSyfhjJCxFvIXaqa99Ah+MKnF2KzBf0dBElbrAdNk8IAKbL9/txJIlK1EajT8Yzb0hTXb2pjC/7k5X55qvqzCxHT458mL4M10iDL4bsMSEuxGifDeAv5RBcBFPDsEWMq/H3vmOttlIbhFzKt8v5SBL/hquW85QBL+Xvmuk3+W/H2CfyuDccvBIrKxsP859jb0LNqvy1RweK/gYwMCiZDVKMsDdlLCr2m4vEWBD+bTTcFFCu8XfI0Dr53XjbL9yeRh/dNgo0+yo+10s1LcJW+O/ryo05IQ8ricZYt5pGg4Wr6bxo6/taP5YTprKh624AmYavn+urVgfC6F9KpSef7JYTtQ7jcInLYFyhcP8sMkW27KwudCcA/I+4f+Tgnn+a5CKCT3SVWs6ros63q1qgg9/do7vY3+L6H/0a4dqgAAg1AULYPBsjax+P//uA3TwuJAxj3RJiYf7xJ5rBVVLNzHcA8T7fkZl6iePpchSDvs8b9XBwAAAAAAqGQCc31B4/xqSwwAAAAASUVORK5CYII="; + +// a basic progress bar object +class ProgressBar extends Renderable { + /** + * @ignore + */ + constructor(x, y, w, h) { + super(x, y, w, h); + + this.barHeight = h; + this.anchorPoint.set(0, 0); + + on(LOADER_PROGRESS, this.onProgressUpdate, this); + on(VIEWPORT_ONRESIZE, this.resize, this); + + this.anchorPoint.set(0, 0); + + // store current progress + this.progress = 0; + } + + /** + * make sure the screen is refreshed every frame + * @ignore + */ + onProgressUpdate(progress) { + this.progress = ~~(progress * this.width); + this.isDirty = true; + } + + /** + * draw function + * @ignore + */ + draw(renderer, viewport) { + // draw the progress bar + renderer.setColor("black"); + renderer.fillRect(this.pos.x, viewport.centerY, renderer.width, this.barHeight / 2); + + renderer.setColor("#55aa00"); + renderer.fillRect(this.pos.x, viewport.centerY, this.progress, this.barHeight / 2); + } + + /** + * Called by engine before deleting the object + * @ignore + */ + onDestroyEvent() { + // cancel the callback + off(LOADER_PROGRESS, this.onProgressUpdate); + off(VIEWPORT_ONRESIZE, this.resize); + } + +} + +/** + * a default loading screen + * @ignore + */ +class DefaultLoadingScreen extends Stage { + /** + * call when the loader is resetted + * @ignore + */ + onResetEvent() { + const barHeight = 8; + + // set a background color + game.world.backgroundColor.parseCSS("#202020"); + + // progress bar + game.world.addChild(new ProgressBar( + 0, + renderer.height / 2, + renderer.width, + barHeight + ), 1); + + // load the melonJS logo + load({name: "melonjs_logo", type: "image", src: img}, () => { + // melonJS logo + game.world.addChild(new Sprite( + renderer.width / 2, + renderer.height / 2, { + image : "melonjs_logo", + framewidth : 256, + frameheight : 256 + }), 2 + ); + }); + } + + /** + * Called by engine before deleting the object + * @ignore + */ + onDestroyEvent() { + // cancel the callback + unload({name: "melonjs_logo", type:"image"}); + } +} + +// current state +let _state = -1; + +// requestAnimeFrame Id +let _animFrameId = -1; + +// whether the game state is "paused" +let _isPaused = false; + +// list of stages +let _stages = {}; + +// fading transition parameters between screen +let _fade = { + color : "", + duration : 0 +}; + +// callback when state switch is done +/** @ignore */ +let _onSwitchComplete = null; + +// just to keep track of possible extra arguments +let _extraArgs = null; + +// store the elapsed time during pause/stop period +let _pauseTime = 0; + +/** + * @ignore + */ +function _startRunLoop() { + // ensure nothing is running first and in valid state + if ((_animFrameId === -1) && (_state !== -1)) { + // start the main loop + _animFrameId = globalThis.requestAnimationFrame(_renderFrame); + } +} + +/** + * Resume the game loop after a pause. + * @ignore + */ +function _resumeRunLoop() { + // ensure game is actually paused and in valid state + if (_isPaused && (_state !== -1)) { + _isPaused = false; + } +} + +/** + * Pause the loop for most stage objects. + * @ignore + */ +function _pauseRunLoop() { + // Set the paused boolean to stop updates on (most) entities + _isPaused = true; +} + +/** + * this is only called when using requestAnimFrame stuff + * @param {number} time - current timestamp in milliseconds + * @ignore + */ +function _renderFrame(time) { + emit(TICK, time); + // schedule the next frame update + if (_animFrameId !== -1) { + _animFrameId = globalThis.requestAnimationFrame(_renderFrame); + } +} + +/** + * stop the SO main loop + * @ignore + */ +function _stopRunLoop() { + // cancel any previous animationRequestFrame + globalThis.cancelAnimationFrame(_animFrameId); + _animFrameId = -1; +} + +/** + * start the SO main loop + * @ignore + */ +function _switchState(state) { + // clear previous interval if any + _stopRunLoop(); + + // call the stage destroy method + if (_stages[_state]) { + // just notify the object + _stages[_state].stage.destroy(); + } + + if (_stages[state]) { + // set the global variable + _state = state; + + // call the reset function with _extraArgs as arguments + _stages[_state].stage.reset.apply(_stages[_state].stage, _extraArgs); + + // and start the main loop of the + // new requested state + _startRunLoop(); + + // publish the pause event + emit(STATE_CHANGE); + + // execute callback if defined + if (_onSwitchComplete) { + _onSwitchComplete(); + } + } +} + +// initialize me.state on system boot +on(BOOT, () => { + // set the built-in loading stage + state.set(state.LOADING, new DefaultLoadingScreen()); + // set and enable the default stage + state.set(state.DEFAULT, new Stage()); + // enable by default as soon as the display is initialized + on(VIDEO_INIT, () => { + state.change(state.DEFAULT, true); + }); +}); + +/** + * a State Manager (state machine) + * @namespace state + */ +let state = { + + /** + * default state ID for Loading Stage + * @constant + * @name LOADING + * @memberof state + */ + LOADING : 0, + + /** + * default state ID for Menu Stage + * @constant + * @name MENU + * @memberof state + */ + MENU : 1, + + /** + * default state ID for "Ready" Stage + * @constant + * @name READY + * @memberof state + */ + READY : 2, + + /** + * default state ID for Play Stage + * @constant + * @name PLAY + * @memberof state + */ + PLAY : 3, + + /** + * default state ID for Game Over Stage + * @constant + * @name GAMEOVER + * @memberof state + */ + GAMEOVER : 4, + + /** + * default state ID for Game End Stage + * @constant + * @name GAME_END + * @memberof state + */ + GAME_END : 5, + + /** + * default state ID for High Score Stage + * @constant + * @name SCORE + * @memberof state + */ + SCORE : 6, + + /** + * default state ID for Credits Stage + * @constant + * @name CREDITS + * @memberof state + */ + CREDITS : 7, + + /** + * default state ID for Settings Stage + * @constant + * @name SETTINGS + * @memberof state + */ + SETTINGS : 8, + + /** + * default state ID for the default Stage + * (the default stage is the one running as soon as melonJS is started) + * @constant + * @name DEFAULT + * @memberof state + */ + DEFAULT : 9, + + /** + * default state ID for user defined constants
                            + * @constant + * @name USER + * @memberof state + * @example + * let STATE_INFO = me.state.USER + 0; + * let STATE_WARN = me.state.USER + 1; + * let STATE_ERROR = me.state.USER + 2; + * let STATE_CUTSCENE = me.state.USER + 3; + */ + USER : 100, + + /** + * Stop the current stage. + * @name stop + * @memberof state + * @public + * @param {boolean} [pauseTrack=false] - pause current track on screen stop. + */ + stop(pauseTrack=false) { + // only stop when we are not loading stuff + if ((_state !== this.LOADING) && this.isRunning()) { + // stop the main loop + _stopRunLoop(); + + // current music stop + if (pauseTrack === true) { + pauseTrack(); + } + + // store time when stopped + _pauseTime = globalThis.performance.now(); + + // publish the stop notification + emit(STATE_STOP); + } + }, + + /** + * pause the current stage + * @name pause + * @memberof state + * @public + * @param {boolean} [music=false] - pause current music track on screen pause + */ + pause(music=false) { + // only pause when we are not loading stuff + if ((_state !== this.LOADING) && !this.isPaused()) { + // stop the main loop + _pauseRunLoop(); + // current music stop + if (music === true) { + pauseTrack(); + } + + // store time when paused + _pauseTime = globalThis.performance.now(); + + // publish the pause event + emit(STATE_PAUSE); + } + }, + + /** + * Restart the current stage from a full stop. + * @name restart + * @memberof state + * @public + * @param {boolean} [music=false] - resume current music track on screen resume + */ + restart(music=false) { + if (!this.isRunning()) { + // restart the main loop + _startRunLoop(); + // current music stop + if (music === true) { + resumeTrack(); + } + + // calculate the elpased time + _pauseTime = globalThis.performance.now() - _pauseTime; + + // publish the restart notification + emit(STATE_RESTART, _pauseTime); + } + }, + + /** + * resume the current stage + * @name resume + * @memberof state + * @public + * @param {boolean} [music=false] - resume current music track on screen resume + */ + resume(music=false) { + if (this.isPaused()) { + // resume the main loop + _resumeRunLoop(); + // current music stop + if (music === true) { + resumeTrack(); + } + + // calculate the elpased time + _pauseTime = globalThis.performance.now() - _pauseTime; + + // publish the resume event + emit(STATE_RESUME, _pauseTime); + } + }, + + /** + * return the running state of the state manager + * @name isRunning + * @memberof state + * @public + * @returns {boolean} true if a "process is running" + */ + isRunning() { + return _animFrameId !== -1; + }, + + /** + * Return the pause state of the state manager + * @name isPaused + * @memberof state + * @public + * @returns {boolean} true if the game is paused + */ + isPaused() { + return _isPaused; + }, + + /** + * associate the specified state with a Stage + * @name set + * @memberof state + * @public + * @param {number} state - State ID (see constants) + * @param {Stage} stage - Instantiated Stage to associate with state ID + * @param {boolean} [start = false] - if true the state will be changed immediately after adding it. + * @example + * class MenuButton extends me.GUI_Object { + * onClick() { + * // Change to the PLAY state when the button is clicked + * me.state.change(me.state.PLAY); + * return true; + * } + * }; + * + * class MenuScreen extends me.Stage { + * onResetEvent() { + * // Load background image + * me.game.world.addChild( + * new me.ImageLayer(0, 0, { + * image : "bg", + * z: 0 // z-index + * } + * ); + * + * // Add a button + * me.game.world.addChild( + * new MenuButton(350, 200, { "image" : "start" }), + * 1 // z-index + * ); + * + * // Play music + * me.audio.playTrack("menu"); + * } + * + * onDestroyEvent() { + * // Stop music + * me.audio.stopTrack(); + * } + * }; + * + * me.state.set(me.state.MENU, new MenuScreen()); + */ + set(state, stage, start = false) { + if (!(stage instanceof Stage)) { + throw new Error(stage + " is not an instance of me.Stage"); + } + _stages[state] = {}; + _stages[state].stage = stage; + _stages[state].transition = true; + + if (start === true) { + this.change(state); + } + }, + + /** + * returns the stage associated with the specified state + * (or the current one if none is specified) + * @name set + * @memberof state + * @public + * @param {number} [state] - State ID (see constants) + * @returns {Stage} + */ + get(state = _state) { + if (typeof _stages[state] !== "undefined") { + return _stages[state].stage; + } else { + return undefined; + } + + }, + + /** + * return a reference to the current stage
                            + * useful to call a object specific method + * @name current + * @memberof state + * @public + * @returns {Stage} + */ + current() { + return this.get(); + }, + + /** + * specify a global transition effect + * @name transition + * @memberof state + * @public + * @param {string} effect - (only "fade" is supported for now) + * @param {Color|string} color - a CSS color value + * @param {number} [duration=1000] - expressed in milliseconds + */ + transition(effect, color, duration) { + if (effect === "fade") { + _fade.color = color; + _fade.duration = duration; + } + }, + + /** + * enable/disable the transition to a particular state (by default enabled for all) + * @name setTransition + * @memberof state + * @public + * @param {number} state - State ID (see constants) + * @param {boolean} enable + */ + setTransition(state, enable) { + _stages[state].transition = enable; + }, + + /** + * change the game/app state + * @name change + * @memberof state + * @public + * @param {number} state - State ID (see constants) + * @param {boolean} forceChange - if true the state will be changed immediately + * @param {object} [...arguments] - extra arguments to be passed to the reset functions + * @example + * // The onResetEvent method on the play screen will receive two args: + * // "level_1" and the number 3 + * me.state.change(me.state.PLAY, "level_1", 3); + */ + change(state, forceChange) { + // Protect against undefined Stage + if (typeof(_stages[state]) === "undefined") { + throw new Error("Undefined Stage for state '" + state + "'"); + } + + // do nothing if already the current state + if (!this.isCurrent(state)) { + _extraArgs = null; + if (arguments.length > 1) { + // store extra arguments if any + _extraArgs = Array.prototype.slice.call(arguments, 1); + } + // if fading effect + if (_fade.duration && _stages[state].transition) { + _onSwitchComplete = () => { + game.viewport.fadeOut(_fade.color, _fade.duration); + }; + game.viewport.fadeIn( + _fade.color, + _fade.duration, + function () { + defer(_switchState, this, state); + } + ); + + } + // else just switch without any effects + else { + // wait for the last frame to be + // "finished" before switching + if (forceChange === true) { + _switchState(state); + } else { + defer(_switchState, this, state); + } + } + } + }, + + /** + * return true if the specified state is the current one + * @name isCurrent + * @memberof state + * @public + * @param {number} state - State ID (see constants) + * @returns {boolean} true if the specified state is the current one + */ + isCurrent(state) { + return _state === state; + } + +}; +var state$1 = state; + +/** + * @classdesc + * a Timer class to manage timing related function (FPS, Game Tick, Time...) + * @see {@link timer} the default global timer instance + */ +class Timer { + + constructor() { + /** + * Last game tick value.
                            + * Use this value to scale velocities during frame drops due to slow hardware or when setting an FPS limit. + * This feature is disabled by default (Enable interpolation to use it). + * @public + * @see interpolation + * @See maxfps + * @type {number} + * @name tick + */ + this.tick = 1.0; + + /** + * Last measured fps rate.
                            + * This feature is disabled by default, unless the debugPanel is enabled/visible. + * @public + * @type {number} + * @name fps + */ + this.fps = 0; + + /** + * Set the maximum target display frame per second + * @public + * @see tick + * @type {number} + * @default 60 + */ + this.maxfps = 60; + + /** + * Enable/disable frame interpolation + * @see tick + * @type {boolean} + * @default false + */ + this.interpolation = false; + + //hold element to display fps + this.framecount = 0; + this.framedelta = 0; + + /* fps count stuff */ + this.last = 0; + this.now = 0; + this.delta = 0; + // for timeout/interval update + this.step =0; + this.minstep = 0; + + // list of defined timer function + this.timers = []; + this.timerId = 0; + + // Initialize mtimer on Boot event + on(BOOT, () => { + // reset variables to initial state + this.reset(); + this.now = this.last = 0; + // register to the game before update event + on(GAME_BEFORE_UPDATE, (time) => this.update(time)); + }); + + // reset timer + on(STATE_RESUME, () => { + this.reset(); + }); + on(STATE_RESTART, () => { + this.reset(); + }); + on(STATE_CHANGE, () => { + this.reset(); + }); + } + + + /** + * reset time (e.g. usefull in case of pause) + * @ignore + */ + reset() { + // set to "now" + this.last = this.now = globalThis.performance.now(); + this.delta = 0; + // reset delta counting variables + this.framedelta = 0; + this.framecount = 0; + this.step = Math.ceil(1000 / this.maxfps); // ROUND IT ? + // define some step with some margin + this.minstep = (1000 / this.maxfps) * 1.25; // IS IT NECESSARY?\ + } + + /** + * Calls a function once after a specified delay. See me.timer.setInterval to repeativly call a function. + * @param {Function} fn - the function you want to execute after delay milliseconds. + * @param {number} delay - the number of milliseconds (thousandths of a second) that the function call should be delayed by. + * @param {boolean} [pauseable=true] - respects the pause state of the engine. + * @param {...*} args - optional parameters which are passed through to the function specified by fn once the timer expires. + * @returns {number} a positive integer value which identifies the timer created by the call to setTimeout(), which can be used later with me.timer.clearTimeout(). + * @example + * // set a timer to call "myFunction" after 1000ms + * me.timer.setTimeout(myFunction, 1000); + * // set a timer to call "myFunction" after 1000ms (respecting the pause state) and passing param1 and param2 + * me.timer.setTimeout(myFunction, 1000, true, param1, param2); + */ + setTimeout(fn, delay, pauseable, ...args) { + this.timers.push({ + fn : fn, + delay : delay, + elapsed : 0, + repeat : false, + timerId : ++this.timerId, + pauseable : pauseable === true || true, + args : args + }); + return this.timerId; + } + + /** + * Calls a function continously at the specified interval. See setTimeout to call function a single time. + * @param {Function} fn - the function to execute + * @param {number} delay - the number of milliseconds (thousandths of a second) on how often to execute the function + * @param {boolean} [pauseable=true] - respects the pause state of the engine. + * @param {...*} args - optional parameters which are passed through to the function specified by fn once the timer expires. + * @returns {number} a numeric, non-zero value which identifies the timer created by the call to setInterval(), which can be used later with me.timer.clearInterval(). + * @example + * // set a timer to call "myFunction" every 1000ms + * me.timer.setInterval(myFunction, 1000); + * // set a timer to call "myFunction" every 1000ms (respecting the pause state) and passing param1 and param2 + * me.timer.setInterval(myFunction, 1000, true, param1, param2); + */ + setInterval(fn, delay, pauseable, ...args) { + this.timers.push({ + fn : fn, + delay : delay, + elapsed : 0, + repeat : true, + timerId : ++this.timerId, + pauseable : pauseable === true || true, + args : args + }); + return this.timerId; + } + + /** + * Cancels a timeout previously established by calling setTimeout(). + * @param {number} timeoutID - ID of the timeout to be cancelled + */ + clearTimeout(timeoutID) { + if (timeoutID > 0) { + defer(this.clearTimer.bind(this), this, timeoutID); + } + } + + /** + * cancels the timed, repeating action which was previously established by a call to setInterval(). + * @param {number} intervalID - ID of the interval to be cleared + */ + clearInterval(intervalID) { + if (intervalID > 0) { + defer(this.clearTimer.bind(this), this, intervalID); + } + } + + /** + * Return the current timestamp in milliseconds
                            + * since the game has started or since linux epoch (based on browser support for High Resolution Timer) + * @returns {number} + */ + getTime() { + return this.now; + } + + /** + * Return elapsed time in milliseconds since the last update + * @returns {number} + */ + getDelta() { + return this.delta; + } + + /** + * compute the actual frame time and fps rate + * @ignore + */ + countFPS() { + this.framecount++; + this.framedelta += this.delta; + if (this.framecount % 10 === 0) { + this.fps = clamp(Math.round((1000 * this.framecount) / this.framedelta), 0, this.maxfps); + this.framedelta = 0; + this.framecount = 0; + } + } + + /** + * update + * @ignore + */ + update(time) { + this.last = this.now; + this.now = time; + this.delta = (this.now - this.last); + + // fix for negative timestamp returned by wechat or chrome on startup + if (this.delta < 0) { + this.delta = 0; + } + + // get the game tick + this.tick = (this.delta > this.minstep && this.interpolation) ? this.delta / this.step : 1; + + this.updateTimers(); + } + + /** + * clear Timers + * @ignore + */ + clearTimer(timerId) { + for (let i = 0, len = this.timers.length; i < len; i++) { + if (this.timers[i].timerId === timerId) { + this.timers.splice(i, 1); + break; + } + } + } + + + /** + * update timers + * @ignore + */ + updateTimers() { + for (let i = 0, len = this.timers.length; i < len; i++) { + let _timer = this.timers[i]; + if (!(_timer.pauseable && state$1.isPaused())) { + _timer.elapsed += this.delta; + } + if (_timer.elapsed >= _timer.delay) { + _timer.fn.apply(null, _timer.args); + if (_timer.repeat === true) { + _timer.elapsed -= _timer.delay; + } else { + this.clearTimeout(_timer.timerId); + } + } + } + } +} + +const timer = new Timer(); + +/** + * the default global Timer instance + * @namespace timer + * @see Timer + * @example + * // set a timer to call "myFunction" after 1000ms + * timer.setTimeout(myFunction, 1000); + * // set a timer to call "myFunction" after 1000ms (respecting the pause state) and passing param1 and param2 + * timer.setTimeout(myFunction, 1000, true, param1, param2); + * // set a timer to call "myFunction" every 1000ms + * timer.setInterval(myFunction, 1000); + * // set a timer to call "myFunction" every 1000ms (respecting the pause state) and passing param1 and param2 + * timer.setInterval(myFunction, 1000, true, param1, param2); + */ +var timer$1 = timer; + +/** + * @classdesc + * a Generic Physic Body Object with some physic properties and behavior functionality, to add as a member of a Renderable. + * @see Renderable.body + */ +class Body { + /** + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} ancestor - the parent object this body is attached to + * @param {Rect|Rect[]|Polygon|Polygon[]|Line|Line[]|Ellipse|Ellipse[]|Point|Point[]|Bounds|Bounds[]|object} [shapes] - a initial shape, list of shapes, or JSON object defining the body + * @param {Function} [onBodyUpdate] - callback for when the body is updated (e.g. add/remove shapes) + */ + constructor(ancestor, shapes, onBodyUpdate) { + + /** + * a reference to the parent object that contains this body, + * or undefined if it has not been added to one. + * @public + * @type {Renderable|Container|Entity|Sprite|NineSliceSprite} + * @default undefined + */ + this.ancestor = ancestor; + + if (typeof this.bounds === "undefined") { + /** + * The AABB bounds box reprensenting this body + * @public + * @type {Bounds} + */ + this.bounds = pool.pull("Bounds"); + } + + if (typeof this.shapes === "undefined") { + /** + * The collision shapes of the body + * @ignore + * @type {Polygon[]|Line[]|Ellipse[]|Point|Point[]} + */ + this.shapes = []; + } + + /** + * The body collision mask, that defines what should collide with what.
                            + * (by default will collide with all entities) + * @ignore + * @type {number} + * @default collision.types.ALL_OBJECT + * @see collision.types + */ + this.collisionMask = collision.types.ALL_OBJECT; + + /** + * define the collision type of the body for collision filtering + * @public + * @type {number} + * @default collision.types.ENEMY_OBJECT + * @see collision.types + * @example + * // set the body collision type + * body.collisionType = me.collision.types.PLAYER_OBJECT; + */ + this.collisionType = collision.types.ENEMY_OBJECT; + + if (typeof this.vel === "undefined") { + /** + * The current velocity of the body. + * See to apply a force if you need to modify a body velocity + * @see Body.force + * @public + * @type {Vector2d} + * @default <0,0> + */ + this.vel = pool.pull("Vector2d"); + } + this.vel.set(0, 0); + + if (typeof this.force === "undefined") { + /** + * body force to apply to this the body in the current step. + * (any positive or negative force will be cancelled after every world/body update cycle) + * @public + * @type {Vector2d} + * @default <0,0> + * @see Body.setMaxVelocity + * @example + * // define a default maximum acceleration, initial force and friction + * this.body.force.set(1, 0); + * this.body.friction.set(0.4, 0); + * this.body.setMaxVelocity(3, 15); + * + * // apply a postive or negative force when pressing left of right key + * update(dt) { + * if (me.input.isKeyPressed("left")) { + * this.body.force.x = -this.body.maxVel.x; + * } else if (me.input.isKeyPressed("right")) { + * this.body.force.x = this.body.maxVel.x; + * } + * } + */ + this.force = pool.pull("Vector2d"); + } + this.force.set(0, 0); + + if (typeof this.friction === "undefined") { + /** + * body friction + * @public + * @type {Vector2d} + * @default <0,0> + */ + this.friction = pool.pull("Vector2d"); + } + this.friction.set(0, 0); + + /** + * the body bouciness level when colliding with other solid bodies : + * a value of 0 will not bounce, a value of 1 will fully rebound. + * @public + * @type {number} + * @default 0 + */ + this.bounce = 0; + + /** + * the body mass + * @public + * @type {number} + * @default 1 + */ + this.mass = 1; + + if (typeof this.maxVel === "undefined") { + /** + * max velocity (to limit body velocity) + * @public + * @type {Vector2d} + * @default <490,490> + */ + this.maxVel = pool.pull("Vector2d"); + } + // cap by default to half the default gravity force + this.maxVel.set(490, 490); + + + /** + * Either this body is a static body or not. + * A static body is completely fixed and can never change position or angle. + * @readonly + * @public + * @type {boolean} + * @default false + */ + this.isStatic = false; + + + /** + * The degree to which this body is affected by the world gravity + * @public + * @see World.gravity + * @type {number} + * @default 1.0 + */ + this.gravityScale = 1.0; + + /** + * If true this body won't be affected by the world gravity + * @public + * @see World.gravity + * @type {boolean} + * @default false + */ + this.ignoreGravity = false; + + /** + * falling state of the body
                            + * true if the object is falling
                            + * false if the object is standing on something
                            + * @readonly + * @public + * @type {boolean} + * @default false + */ + this.falling = false; + + /** + * jumping state of the body
                            + * equal true if the body is jumping
                            + * @readonly + * @public + * @type {boolean} + * @default false + */ + this.jumping = false; + + + if (typeof onBodyUpdate === "function") { + this.onBodyUpdate = onBodyUpdate; + } + + this.bounds.clear(); + + // parses the given shapes array and add them + if (typeof shapes !== "undefined") { + if (Array.isArray(shapes)) { + for (let s = 0; s < shapes.length; s++) { + this.addShape(shapes[s]); + } + } else { + this.addShape(shapes); + } + } + + // automatically enable physic when a body is added to a renderable + this.ancestor.isKinematic = false; + } + + /** + * set the body as a static body + * static body do not move automatically and do not check againt collision with others + * @param {boolean} [isStatic=true] + */ + setStatic(isStatic = true) { + this.isStatic = isStatic === true; + } + + /** + * add a collision shape to this body
                            + * (note: me.Rect objects will be converted to me.Polygon before being added) + * @param {Rect|Polygon|Line|Ellipse|Point|Point[]|Bounds|object} shape - a shape or JSON object + * @returns {number} the shape array length + * @example + * // add a rectangle shape + * this.body.addShape(new me.Rect(0, 0, image.width, image.height)); + * // add a shape from a JSON object + * this.body.addShape(me.loader.getJSON("shapesdef").banana); + */ + addShape(shape) { + if (shape instanceof Rect || shape instanceof Bounds) { + let poly = shape.toPolygon(); + this.shapes.push(poly); + // update the body bounds + this.bounds.add(poly.points); + this.bounds.translate(poly.pos); + } else if (shape instanceof Ellipse) { + if (!this.shapes.includes(shape)) { + // see removeShape + this.shapes.push(shape); + } + // update the body bounds + this.bounds.addBounds(shape.getBounds()); + // use bounds position as ellipse position is center + this.bounds.translate( + shape.getBounds().x, + shape.getBounds().y + ); + } else if (shape instanceof Polygon) { + if (!this.shapes.includes(shape)) { + // see removeShape + this.shapes.push(shape); + } + // update the body bounds + this.bounds.add(shape.points); + this.bounds.translate(shape.pos); + } else if (shape instanceof Point) { + if (!this.shapes.includes(shape)) { + // see removeShape + this.shapes.push(shape); + } + this.bounds.addPoint(shape); + } else { + // JSON object + this.fromJSON(shape); + } + + if (typeof this.onBodyUpdate === "function") { + this.onBodyUpdate(this); + } + + // return the length of the shape list + return this.shapes.length; + } + + /** + * set the body vertices to the given one + * @param {Vector2d[]} vertices - an array of me.Vector2d points defining a convex hull + * @param {number} [index=0] - the shape object for which to set the vertices + * @param {boolean} [clear=true] - either to reset the body definition before adding the new vertices + */ + setVertices(vertices, index = 0, clear = true) { + let polygon = this.getShape(index); + if (polygon instanceof Polygon) { + polygon.setShape(0, 0, vertices); + } else { + // this will replace any other non polygon shape type if defined + this.shapes[index] = pool.pull("Polygon", 0, 0, vertices); + } + + // update the body bounds to take in account the new vertices + this.bounds.add(this.shapes[index].points, clear); + + if (typeof this.onBodyUpdate === "function") { + this.onBodyUpdate(this); + } + } + + /** + * add the given vertices to the body shape + * @param {Vector2d[]} vertices - an array of me.Vector2d points defining a convex hull + * @param {number} [index=0] - the shape object for which to set the vertices + */ + addVertices(vertices, index = 0) { + this.setVertices(vertices, index, false); + } + + /** + * add collision mesh based on a JSON object + * (this will also apply any physic properties defined in the given JSON file) + * @param {object} json - a JSON object as exported from a Physics Editor tool + * @param {string} [id] - an optional shape identifier within the given the json object + * @see https://www.codeandweb.com/physicseditor + * @returns {number} how many shapes were added to the body + * @example + * // define the body based on the banana shape + * this.body.fromJSON(me.loader.getJSON("shapesdef").banana); + * // or ... + * this.body.fromJSON(me.loader.getJSON("shapesdef"), "banana"); + */ + fromJSON(json, id) { + let data = json; + + if (typeof id !== "undefined" ) { + data = json[id]; + } + + // Physic Editor Format (https://www.codeandweb.com/physicseditor) + if (typeof data === "undefined") { + throw new Error("Identifier (" + id + ") undefined for the given JSON object)"); + } + + if (data.length) { + // go through all shapes and add them to the body + for (let i = 0; i < data.length; i++) { + this.addVertices(data[i].shape, i); + } + // apply density, friction and bounce properties from the first shape + // Note : how to manage different mass or friction for all different shapes? + this.mass = data[0].density || 0; + this.friction.set(data[0].friction || 0, data[0].friction || 0); + this.bounce = data[0].bounce || 0; + } + + // return the amount of shapes added to the body + return data.length; + } + + /** + * return the collision shape at the given index + * @param {number} [index=0] - the shape object at the specified index + * @returns {Polygon|Line|Ellipse} shape a shape object if defined + */ + getShape(index) { + return this.shapes[index || 0]; + } + + /** + * returns the AABB bounding box for this body + * @returns {Bounds} bounding box Rectangle object + */ + getBounds() { + return this.bounds; + } + + /** + * remove the specified shape from the body shape list + * @param {Polygon|Line|Ellipse} shape - a shape object + * @returns {number} the shape array length + */ + removeShape(shape) { + // clear the current bounds + this.bounds.clear(); + // remove the shape from shape list + remove(this.shapes, shape); + // add everything left back + for (let s = 0; s < this.shapes.length; s++) { + this.addShape(this.shapes[s]); + } + // return the length of the shape list + return this.shapes.length; + } + + /** + * remove the shape at the given index from the body shape list + * @param {number} index - the shape object at the specified index + * @returns {number} the shape array length + */ + removeShapeAt(index) { + return this.removeShape(this.getShape(index)); + } + + /** + * By default all physic bodies are able to collide with all other bodies,
                            + * but it's also possible to specify 'collision filters' to provide a finer
                            + * control over which body can collide with each other. + * @see collision.types + * @param {number} [bitmask = collision.types.ALL_OBJECT] - the collision mask + * @example + * // filter collision detection with collision shapes, enemies and collectables + * body.setCollisionMask(me.collision.types.WORLD_SHAPE | me.collision.types.ENEMY_OBJECT | me.collision.types.COLLECTABLE_OBJECT); + * ... + * // disable collision detection with all other objects + * body.setCollisionMask(me.collision.types.NO_OBJECT); + */ + setCollisionMask(bitmask = collision.types.ALL_OBJECT) { + this.collisionMask = bitmask; + } + + /** + * define the collision type of the body for collision filtering + * @see collision.types + * @param {number} type - the collision type + * @example + * // set the body collision type + * body.collisionType = me.collision.types.PLAYER_OBJECT; + */ + setCollisionType(type) { + if (typeof type !== "undefined") { + if (typeof collision.types[type] !== "undefined") { + this.collisionType = collision.types[type]; + } else { + throw new Error("Invalid value for the collisionType property"); + } + } + } + + /** + * the built-in function to solve the collision response + * @param {object} response - the collision response object (see {@link ResponseObject}) + */ + respondToCollision(response) { + // the overlap vector + let overlap = response.overlapV; + + // FIXME: Respond proportionally to object mass + + // Move out of the other object shape + this.ancestor.pos.sub(overlap); + + // adjust velocity + if (overlap.x !== 0) { + this.vel.x = ~~(0.5 + this.vel.x - overlap.x) || 0; + if (this.bounce > 0) { + this.vel.x *= -this.bounce; + } + } + if (overlap.y !== 0) { + this.vel.y = ~~(0.5 + this.vel.y - overlap.y) || 0; + if (this.bounce > 0) { + this.vel.y *= -this.bounce; + } + + if (!this.ignoreGravity) { + // cancel the falling an jumping flags if necessary + let dir = this.falling === true ? 1 : this.jumping === true ? -1 : 0; + this.falling = overlap.y >= dir; + this.jumping = overlap.y <= -dir; + } + } + } + + /** + * The forEach() method executes a provided function once per body shape element.
                            + * the callback function is invoked with three arguments:
                            + * - The current element being processed in the array
                            + * - The index of element in the array.
                            + * - The array forEach() was called upon.
                            + * @param {Function} callback - fnction to execute on each element + * @param {object} [thisArg] - value to use as this(i.e reference Object) when executing callback. + * @example + * // iterate through all shapes of the physic body + * mySprite.body.forEach((shape) => { + * shape.doSomething(); + * }); + * mySprite.body.forEach((shape, index) => { ... }); + * mySprite.body.forEach((shape, index, array) => { ... }); + * mySprite.body.forEach((shape, index, array) => { ... }, thisArg); + */ + forEach(callback, thisArg) { + let context = this, i = 0; + let shapes = this.shapes; + + let len = shapes.length; + + if (typeof callback !== "function") { + throw new Error(callback + " is not a function"); + } + + if (arguments.length > 1) { + context = thisArg; + } + + while (i < len) { + callback.call(context, shapes[i], i, shapes); + i++; + } + } + + /** + * Returns true if the any of the shape composing the body contains the given point. + * @param {number|Vector2d} x - x coordinate or a vector point to check + * @param {number} [y] - y coordinate + * @returns {boolean} true if contains + * @example + * if (mySprite.body.contains(10, 10)) { + * // do something + * } + * // or + * if (mySprite.body.contains(myVector2d)) { + * // do something + * } + */ + contains() { + let _x, _y; + + if (arguments.length === 2) { + // x, y + _x = arguments[0]; + _y = arguments[1]; + } else { + // vector + _x = arguments[0].x; + _y = arguments[0].y; + } + + if (this.getBounds().contains(_x, _y)) { + // cannot use forEach here as cannot break out with a return + for (let i = this.shapes.length, shape; i--, (shape = this.shapes[i]);) { + if (shape.contains(_x, _y)) { + return true; + } + } + } + return false; + } + + /** + * Rotate this body (counter-clockwise) by the specified angle (in radians). + * Unless specified the body will be rotated around its center point + * @param {number} angle - The angle to rotate (in radians) + * @param {Vector2d|ObservableVector2d} [v=Body.getBounds().center] - an optional point to rotate around + * @returns {Body} Reference to this object for method chaining + */ + rotate(angle, v = this.getBounds().center) { + if (angle !== 0) { + this.bounds.clear(); + this.forEach((shape) => { + shape.rotate(angle, v); + this.bounds.addBounds(shape.getBounds()); + /* + if (!(shape instanceof Ellipse)) { + // ellipse position is center + this.bounds.translate(shape.pos); + } + */ + }); + /* + if (typeof this.onBodyUpdate === "function") { + this.onBodyUpdate(this); + } + */ + } + return this; + } + + /** + * cap the body velocity (body.maxVel property) to the specified value
                            + * @param {number} x - max velocity on x axis + * @param {number} y - max velocity on y axis + */ + setMaxVelocity(x, y) { + this.maxVel.x = x; + this.maxVel.y = y; + } + + /** + * set the body default friction + * @param {number} x - horizontal friction + * @param {number} y - vertical friction + */ + setFriction(x = 0, y = 0) { + this.friction.x = x; + this.friction.y = y; + } + + /** + * Updates the parent's position as well as computes the new body's velocity based + * on the values of force/friction. Velocity chages are proportional to the + * me.timer.tick value (which can be used to scale velocities). The approach to moving the + * parent renderable is to compute new values of the Body.vel property then add them to + * the parent.pos value thus changing the postion the amount of Body.vel each time the + * update call is made.
                            + * Updates to Body.vel are bounded by maxVel (which defaults to viewport size if not set)
                            + * At this time a call to Body.Update does not call the onBodyUpdate callback that is listed in the constructor arguments. + * @protected + * @param {number} dt - time since the last update in milliseconds. + * @returns {boolean} true if resulting velocity is different than 0 + */ + update(dt) { // eslint-disable-line no-unused-vars + // apply timer.tick to delta time for linear interpolation (when enabled) + // #761 add delta time in body update + let deltaTime = /* dt * */ timer$1.tick; + + // apply force if defined + if (this.force.x !== 0) { + this.vel.x += this.force.x * deltaTime; + } + if (this.force.y !== 0) { + this.vel.y += this.force.y * deltaTime; + } + + // apply friction if defined + if (this.friction.x > 0) { + let fx = this.friction.x * deltaTime, + nx = this.vel.x + fx, + x = this.vel.x - fx; + + this.vel.x = ( + (nx < 0) ? nx : + ( x > 0) ? x : 0 + ); + } + if (this.friction.y > 0) { + let fy = this.friction.y * deltaTime, + ny = this.vel.y + fy, + y = this.vel.y - fy; + + this.vel.y = ( + (ny < 0) ? ny : + ( y > 0) ? y : 0 + ); + } + + // cap velocity + if (this.vel.y !== 0) { + this.vel.y = clamp(this.vel.y, -this.maxVel.y, this.maxVel.y); + } + if (this.vel.x !== 0) { + this.vel.x = clamp(this.vel.x, -this.maxVel.x, this.maxVel.x); + } + + // check if falling / jumping + this.falling = (this.vel.y * Math.sign(this.force.y)) > 0; + this.jumping = (this.falling ? false : this.jumping); + + // update the body ancestor position + this.ancestor.pos.add(this.vel); + + // returns true if vel is different from 0 + return (this.vel.x !== 0 || this.vel.y !== 0); + } + + /** + * Destroy function
                            + * @ignore + */ + destroy() { + // push back instance into object pool + pool.push(this.bounds); + pool.push(this.vel); + pool.push(this.force); + pool.push(this.friction); + pool.push(this.maxVel); + this.shapes.forEach((shape) => { + pool.push(shape, false); + }); + + // set to undefined + this.onBodyUpdate = undefined; + this.ancestor = undefined; + this.bounds = undefined; + this.vel = undefined; + this.force = undefined; + this.friction = undefined; + this.maxVel = undefined; + this.shapes.length = 0; + + // reset some variable to default + this.setStatic(false); + } +} + +/* + * Tween.js - Licensed under the MIT license + * https://github.com/tweenjs/tween.js + */ + +/* eslint-disable quotes, keyword-spacing, comma-spacing, no-return-assign */ + +/** + * Easing Function :
                            + *

                            + * Easing.Linear.None
                            + * Easing.Quadratic.In
                            + * Easing.Quadratic.Out
                            + * Easing.Quadratic.InOut
                            + * Easing.Cubic.In
                            + * Easing.Cubic.Out
                            + * Easing.Cubic.InOut
                            + * Easing.Quartic.In
                            + * Easing.Quartic.Out
                            + * Easing.Quartic.InOut
                            + * Easing.Quintic.In
                            + * Easing.Quintic.Out
                            + * Easing.Quintic.InOut
                            + * Easing.Sinusoidal.In
                            + * Easing.Sinusoidal.Out
                            + * Easing.Sinusoidal.InOut
                            + * Easing.Exponential.In
                            + * Easing.Exponential.Out
                            + * Easing.Exponential.InOut
                            + * Easing.Circular.In
                            + * Easing.Circular.Out
                            + * Easing.Circular.InOut
                            + * Easing.Elastic.In
                            + * Easing.Elastic.Out
                            + * Easing.Elastic.InOut
                            + * Easing.Back.In
                            + * Easing.Back.Out
                            + * Easing.Back.InOut
                            + * Easing.Bounce.In
                            + * Easing.Bounce.Out
                            + * Easing.Bounce.InOut + *

                            + * @public + * @constant + * @enum {Function} + * @name Easing + * @memberof Tween + */ +let Easing = { + + Linear: { + /** @ignore */ + None: function ( k ) { + + return k; + + } + + }, + + Quadratic: { + /** @ignore */ + In: function ( k ) { + + return k * k; + + }, + /** @ignore */ + Out: function ( k ) { + + return k * ( 2 - k ); + + }, + /** @ignore */ + InOut: function ( k ) { + + if ( ( k *= 2 ) < 1 ) return 0.5 * k * k; + return - 0.5 * ( --k * ( k - 2 ) - 1 ); + + } + + }, + + Cubic: { + /** @ignore */ + In: function ( k ) { + + return k * k * k; + + }, + /** @ignore */ + Out: function ( k ) { + + return --k * k * k + 1; + + }, + /** @ignore */ + InOut: function ( k ) { + + if ( ( k *= 2 ) < 1 ) return 0.5 * k * k * k; + return 0.5 * ( ( k -= 2 ) * k * k + 2 ); + + } + + }, + + Quartic: { + /** @ignore */ + In: function ( k ) { + + return k * k * k * k; + + }, + /** @ignore */ + Out: function ( k ) { + + return 1 - ( --k * k * k * k ); + + }, + /** @ignore */ + InOut: function ( k ) { + + if ( ( k *= 2 ) < 1) return 0.5 * k * k * k * k; + return - 0.5 * ( ( k -= 2 ) * k * k * k - 2 ); + + } + + }, + + Quintic: { + /** @ignore */ + In: function ( k ) { + + return k * k * k * k * k; + + }, + /** @ignore */ + Out: function ( k ) { + + return --k * k * k * k * k + 1; + + }, + /** @ignore */ + InOut: function ( k ) { + + if ( ( k *= 2 ) < 1 ) return 0.5 * k * k * k * k * k; + return 0.5 * ( ( k -= 2 ) * k * k * k * k + 2 ); + + } + + }, + + Sinusoidal: { + /** @ignore */ + In: function ( k ) { + + return 1 - Math.cos( k * Math.PI / 2 ); + + }, + /** @ignore */ + Out: function ( k ) { + + return Math.sin( k * Math.PI / 2 ); + + }, + /** @ignore */ + InOut: function ( k ) { + + return 0.5 * ( 1 - Math.cos( Math.PI * k ) ); + + } + + }, + + Exponential: { + /** @ignore */ + In: function ( k ) { + + return k === 0 ? 0 : Math.pow( 1024, k - 1 ); + + }, + /** @ignore */ + Out: function ( k ) { + + return k === 1 ? 1 : 1 - Math.pow( 2, - 10 * k ); + + }, + /** @ignore */ + InOut: function ( k ) { + + if ( k === 0 ) return 0; + if ( k === 1 ) return 1; + if ( ( k *= 2 ) < 1 ) return 0.5 * Math.pow( 1024, k - 1 ); + return 0.5 * ( - Math.pow( 2, - 10 * ( k - 1 ) ) + 2 ); + + } + + }, + + Circular: { + /** @ignore */ + In: function ( k ) { + + return 1 - Math.sqrt( 1 - k * k ); + + }, + /** @ignore */ + Out: function ( k ) { + + return Math.sqrt( 1 - ( --k * k ) ); + + }, + /** @ignore */ + InOut: function ( k ) { + + if ( ( k *= 2 ) < 1) return - 0.5 * ( Math.sqrt( 1 - k * k) - 1); + return 0.5 * ( Math.sqrt( 1 - ( k -= 2) * k) + 1); + + } + + }, + + Elastic: { + /** @ignore */ + In: function ( k ) { + if (k === 0) { + return 0; + } + if (k === 1) { + return 1; + } + return -Math.pow(2, 10 * (k - 1)) * Math.sin((k - 1.1) * 5 * Math.PI); + }, + /** @ignore */ + Out: function ( k ) { + if (k === 0) { + return 0; + } + if (k === 1) { + return 1; + } + return Math.pow(2, -10 * k) * Math.sin((k - 0.1) * 5 * Math.PI) + 1; + + }, + /** @ignore */ + InOut: function ( k ) { + if (k === 0) { + return 0; + } + if (k === 1) { + return 1; + } + k *= 2; + if (k < 1) { + return -0.5 * Math.pow(2, 10 * (k - 1)) * Math.sin((k - 1.1) * 5 * Math.PI); + } + return 0.5 * Math.pow(2, -10 * (k - 1)) * Math.sin((k - 1.1) * 5 * Math.PI) + 1; + } + + }, + + Back: { + /** @ignore */ + In: function ( k ) { + + const s = 1.70158; + return k * k * ( ( s + 1 ) * k - s ); + + }, + /** @ignore */ + Out: function ( k ) { + + const s = 1.70158; + return --k * k * ( ( s + 1 ) * k + s ) + 1; + + }, + /** @ignore */ + InOut: function ( k ) { + + const s = 1.70158 * 1.525; + if ( ( k *= 2 ) < 1 ) return 0.5 * ( k * k * ( ( s + 1 ) * k - s ) ); + return 0.5 * ( ( k -= 2 ) * k * ( ( s + 1 ) * k + s ) + 2 ); + + } + + }, + + Bounce: { + /** @ignore */ + In: function ( k ) { + + return 1 - Easing.Bounce.Out( 1 - k ); + + }, + /** @ignore */ + Out: function ( k ) { + + if ( k < ( 1 / 2.75 ) ) { + + return 7.5625 * k * k; + + } else if ( k < ( 2 / 2.75 ) ) { + + return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75; + + } else if ( k < ( 2.5 / 2.75 ) ) { + + return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375; + + } else { + + return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375; + + } + + }, + /** @ignore */ + InOut: function ( k ) { + + if ( k < 0.5 ) return Easing.Bounce.In( k * 2 ) * 0.5; + return Easing.Bounce.Out( k * 2 - 1 ) * 0.5 + 0.5; + + } + + } + +}; + +/* + * Tween.js - Licensed under the MIT license + * https://github.com/tweenjs/tween.js + */ + +/** + * Interpolation Function :
                            + *

                            + * Interpolation.Linear
                            + * Interpolation.Bezier
                            + * Interpolation.CatmullRom + *

                            + * @public + * @constant + * @enum {Function} + * @name Interpolation + * @memberof Tween + */ +let Interpolation = { + /** @ignore */ + Linear: function ( v, k ) { + + let m = v.length - 1, f = m * k, i = Math.floor( f ), fn = Interpolation.Utils.Linear; + + if ( k < 0 ) return fn( v[ 0 ], v[ 1 ], f ); + if ( k > 1 ) return fn( v[ m ], v[ m - 1 ], m - f ); + + return fn( v[ i ], v[ i + 1 > m ? m : i + 1 ], f - i ); + + }, + /** @ignore */ + Bezier: function ( v, k ) { + + let b = 0, n = v.length - 1, pw = Math.pow, bn = Interpolation.Utils.Bernstein, i; + + for ( i = 0; i <= n; i++ ) { + b += pw( 1 - k, n - i ) * pw( k, i ) * v[ i ] * bn( n, i ); + } + + return b; + + }, + /** @ignore */ + CatmullRom: function ( v, k ) { + + let m = v.length - 1, f = m * k, i = Math.floor( f ), fn = Interpolation.Utils.CatmullRom; + + if ( v[ 0 ] === v[ m ] ) { + + if ( k < 0 ) i = Math.floor( f = m * ( 1 + k ) ); + + return fn( v[ ( i - 1 + m ) % m ], v[ i ], v[ ( i + 1 ) % m ], v[ ( i + 2 ) % m ], f - i ); + + } else { + + if ( k < 0 ) return v[ 0 ] - ( fn( v[ 0 ], v[ 0 ], v[ 1 ], v[ 1 ], -f ) - v[ 0 ] ); + if ( k > 1 ) return v[ m ] - ( fn( v[ m ], v[ m ], v[ m - 1 ], v[ m - 1 ], f - m ) - v[ m ] ); + + return fn( v[ i ? i - 1 : 0 ], v[ i ], v[ m < i + 1 ? m : i + 1 ], v[ m < i + 2 ? m : i + 2 ], f - i ); + + } + + }, + + Utils: { + /** @ignore */ + Linear: function ( p0, p1, t ) { + + return ( p1 - p0 ) * t + p0; + + }, + /** @ignore */ + Bernstein: function ( n, i ) { + + let fc = Interpolation.Utils.Factorial; + return fc( n ) / fc( i ) / fc( n - i ); + + }, + /* @ignore */ + Factorial: ( function () { + + let a = [ 1 ]; + + return function ( n ) { + + let s = 1, i; + if ( a[ n ] ) return a[ n ]; + for ( i = n; i > 1; i-- ) s *= i; + a[ n ] = s; + return s; + + }; + + } )(), + /** @ignore */ + CatmullRom: function ( p0, p1, p2, p3, t ) { + + let v0 = ( p2 - p0 ) * 0.5, v1 = ( p3 - p1 ) * 0.5, t2 = t * t, t3 = t * t2; + return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1; + } + } + +}; + +/* + * Tween.js - Licensed under the MIT license + * https://github.com/tweenjs/tween.js + */ + +/** + * @classdesc + * Javascript Tweening Engine

                            + * Super simple, fast and easy to use tweening engine which incorporates optimised Robert Penner's equation

                            + * https://github.com/sole/Tween.js

                            + * author sole / http://soledadpenades.com
                            + * author mr.doob / http://mrdoob.com
                            + * author Robert Eisele / http://www.xarg.org
                            + * author Philippe / http://philippe.elsass.me
                            + * author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html
                            + * author Paul Lewis / http://www.aerotwist.com/
                            + * author lechecacharro
                            + * author Josh Faul / http://jocafa.com/ + */ +class Tween { + + /** + * @param {object} object - object on which to apply the tween + * @example + * // add a tween to change the object pos.x and pos.y variable to 200 in 3 seconds + * tween = new me.Tween(myObject.pos).to({ + * x: 200, + * y: 200, + * }, { + * duration: 3000, + * easing: me.Tween.Easing.Bounce.Out, + * autoStart : true + * }).onComplete(myFunc); + */ + constructor ( object ) { + this.setProperties(object); + } + + /** + * reset the tween object to default value + * @ignore + */ + onResetEvent( object ) { + this.setProperties(object); + } + + /** + * @ignore + */ + setProperties(object) { + this._object = object; + this._valuesStart = {}; + this._valuesEnd = {}; + this._valuesStartRepeat = {}; + this._duration = 1000; + this._repeat = 0; + this._yoyo = false; + this._reversed = false; + this._delayTime = 0; + this._startTime = null; + this._easingFunction = Easing.Linear.None; + this._interpolationFunction = Interpolation.Linear; + this._chainedTweens = []; + this._onStartCallback = null; + this._onStartCallbackFired = false; + this._onUpdateCallback = null; + this._onCompleteCallback = null; + // tweens are synchronized with the game update loop + this._tweenTimeTracker = game.lastUpdate; + + // reset flags to default value + this.isPersistent = false; + // this is not really supported + this.updateWhenPaused = false; + // comply with the container contract + this.isRenderable = false; + + // Set all starting values present on the target object + for ( let field in object ) { + if (typeof object !== "object") { + this._valuesStart[ field ] = parseFloat(object[field]); + } + } + } + + /** + * @ignore + */ + _resumeCallback(elapsed) { + if (this._startTime) { + this._startTime += elapsed; + } + } + + + + /** + * subscribe to the resume event when added + * @ignore + */ + onActivateEvent() { + on(STATE_RESUME, this._resumeCallback, this); + } + + /** + * Unsubscribe when tween is removed + * @ignore + */ + onDeactivateEvent() { + off(STATE_RESUME, this._resumeCallback); + } + + /** + * object properties to be updated and duration + * @name to + * @memberof Tween + * @public + * @param {object} properties - hash of properties + * @param {object|number} [options] - object of tween properties, or a duration if a numeric value is passed + * @param {number} [options.duration] - tween duration + * @param {Tween.Easing} [options.easing] - easing function + * @param {number} [options.delay] - delay amount expressed in milliseconds + * @param {boolean} [options.yoyo] - allows the tween to bounce back to their original value when finished. To be used together with repeat to create endless loops. + * @param {number} [options.repeat] - amount of times the tween should be repeated + * @param {Tween.Interpolation} [options.interpolation] - interpolation function + * @param {boolean} [options.autoStart] - allow this tween to start automatically. Otherwise call me.Tween.start(). + * @returns {Tween} this instance for object chaining + */ + to( properties, options ) { + + this._valuesEnd = properties; + + if (typeof options !== "undefined") { + if (typeof options === "number") { + // for backward compatiblity + this._duration = options; + } else if (typeof options === "object") { + if (options.duration) { this._duration = options.duration; } + if (options.yoyo) { this.yoyo(options.yoyo); } + if (options.easing) { this.easing(options.easing); } + if (options.repeat) { this.repeat(options.repeat); } + if (options.delay) { this.delay(options.delay); } + if (options.interpolation) { this.interpolation(options.interpolation); } + + if (options.autoStart) { + this.start(); + } + } + } + + return this; + } + + /** + * start the tween + * @name start + * @memberof Tween + * @public + * @param {number} [time] - the current time when the tween was started + * @returns {Tween} this instance for object chaining + */ + start( time = timer$1.getTime() ) { + + this._onStartCallbackFired = false; + + // add the tween to the object pool on start + game.world.addChild(this); + + this._startTime = time + this._delayTime; + + for ( let property in this._valuesEnd ) { + + // check if an Array was provided as property value + if ( this._valuesEnd[ property ] instanceof Array ) { + + if ( this._valuesEnd[ property ].length === 0 ) { + + continue; + + } + + // create a local copy of the Array with the start value at the front + this._valuesEnd[ property ] = [ this._object[ property ] ].concat( this._valuesEnd[ property ] ); + + } + + this._valuesStart[ property ] = this._object[ property ]; + + if ( ( this._valuesStart[ property ] instanceof Array ) === false ) { + this._valuesStart[ property ] *= 1.0; // Ensures we're using numbers, not strings + } + + this._valuesStartRepeat[ property ] = this._valuesStart[ property ] || 0; + + } + + return this; + } + + /** + * stop the tween + * @name stop + * @memberof Tween + * @public + * @returns {Tween} this instance for object chaining + */ + stop() { + // remove the tween from the world container + game.world.removeChildNow(this); + return this; + } + + /** + * delay the tween + * @name delay + * @memberof Tween + * @public + * @param {number} amount - delay amount expressed in milliseconds + * @returns {Tween} this instance for object chaining + */ + delay( amount ) { + + this._delayTime = amount; + return this; + + } + + /** + * Repeat the tween + * @name repeat + * @memberof Tween + * @public + * @param {number} times - amount of times the tween should be repeated + * @returns {Tween} this instance for object chaining + */ + repeat( times ) { + + this._repeat = times; + return this; + + } + + /** + * Allows the tween to bounce back to their original value when finished. + * To be used together with repeat to create endless loops. + * @name yoyo + * @memberof Tween + * @public + * @see Tween#repeat + * @param {boolean} yoyo + * @returns {Tween} this instance for object chaining + */ + yoyo( yoyo ) { + + this._yoyo = yoyo; + return this; + + } + + /** + * set the easing function + * @name easing + * @memberof Tween + * @public + * @param {Tween.Easing} easing - easing function + * @returns {Tween} this instance for object chaining + */ + easing( easing ) { + if (typeof easing !== "function") { + throw new Error("invalid easing function for me.Tween.easing()"); + } + this._easingFunction = easing; + return this; + } + + /** + * set the interpolation function + * @name interpolation + * @memberof Tween + * @public + * @param {Tween.Interpolation} interpolation - interpolation function + * @returns {Tween} this instance for object chaining + */ + interpolation( interpolation ) { + this._interpolationFunction = interpolation; + return this; + } + + /** + * chain the tween + * @name chain + * @memberof Tween + * @public + * @param {...Tween} chainedTween - Tween(s) to be chained + * @returns {Tween} this instance for object chaining + */ + chain() { + this._chainedTweens = arguments; + return this; + } + + /** + * onStart callback + * @name onStart + * @memberof Tween + * @public + * @param {Function} onStartCallback - callback + * @returns {Tween} this instance for object chaining + */ + onStart( onStartCallback ) { + this._onStartCallback = onStartCallback; + return this; + } + + /** + * onUpdate callback + * @name onUpdate + * @memberof Tween + * @public + * @param {Function} onUpdateCallback - callback + * @returns {Tween} this instance for object chaining + */ + onUpdate( onUpdateCallback ) { + this._onUpdateCallback = onUpdateCallback; + return this; + } + + /** + * onComplete callback + * @name onComplete + * @memberof Tween + * @public + * @param {Function} onCompleteCallback - callback + * @returns {Tween} this instance for object chaining + */ + onComplete( onCompleteCallback ) { + this._onCompleteCallback = onCompleteCallback; + return this; + } + + /** @ignore */ + update( dt ) { + + // the original Tween implementation expect + // a timestamp and not a time delta + this._tweenTimeTracker = (game.lastUpdate > this._tweenTimeTracker) ? game.lastUpdate : this._tweenTimeTracker + dt; + let time = this._tweenTimeTracker; + + let property; + + if ( time < this._startTime ) { + + return true; + + } + + if ( this._onStartCallbackFired === false ) { + + if ( this._onStartCallback !== null ) { + + this._onStartCallback.call( this._object ); + + } + + this._onStartCallbackFired = true; + + } + + let elapsed = ( time - this._startTime ) / this._duration; + elapsed = elapsed > 1 ? 1 : elapsed; + + let value = this._easingFunction( elapsed ); + + for ( property in this._valuesEnd ) { + + let start = this._valuesStart[ property ] || 0; + let end = this._valuesEnd[ property ]; + + if ( end instanceof Array ) { + + this._object[ property ] = this._interpolationFunction( end, value ); + + } else { + + // Parses relative end values with start as base (e.g.: +10, -3) + if ( typeof(end) === "string" ) { + end = start + parseFloat(end); + } + + // protect against non numeric properties. + if ( typeof(end) === "number" ) { + this._object[ property ] = start + ( end - start ) * value; + } + + } + + } + + if ( this._onUpdateCallback !== null ) { + + this._onUpdateCallback.call( this._object, value ); + + } + + if ( elapsed === 1 ) { + + if ( this._repeat > 0 ) { + + if ( isFinite( this._repeat ) ) { + this._repeat--; + } + + // reassign starting values, restart by making startTime = now + for ( property in this._valuesStartRepeat ) { + + if ( typeof( this._valuesEnd[ property ] ) === "string" ) { + this._valuesStartRepeat[ property ] = this._valuesStartRepeat[ property ] + parseFloat(this._valuesEnd[ property ]); + } + + if (this._yoyo) { + let tmp = this._valuesStartRepeat[ property ]; + this._valuesStartRepeat[ property ] = this._valuesEnd[ property ]; + this._valuesEnd[ property ] = tmp; + } + this._valuesStart[ property ] = this._valuesStartRepeat[ property ]; + + } + + if (this._yoyo) { + this._reversed = !this._reversed; + } + + this._startTime = time + this._delayTime; + + return true; + + } else { + // remove the tween from the world container + game.world.removeChildNow(this); + + if ( this._onCompleteCallback !== null ) { + + this._onCompleteCallback.call( this._object ); + + } + + for ( let i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i ++ ) { + + this._chainedTweens[ i ].start( time ); + + } + + return false; + + } + + } + return true; + } + + // export easing function as static class property + static get Easing() { return Easing; } + static get Interpolation() { return Interpolation; } +} + +/** + * Hash map of GLSL data types to WebGL Uniform methods + * @ignore + */ +const fnHash = { + "bool" : "1i", + "int" : "1i", + "float" : "1f", + "vec2" : "2fv", + "vec3" : "3fv", + "vec4" : "4fv", + "bvec2" : "2iv", + "bvec3" : "3iv", + "bvec4" : "4iv", + "ivec2" : "2iv", + "ivec3" : "3iv", + "ivec4" : "4iv", + "mat2" : "Matrix2fv", + "mat3" : "Matrix3fv", + "mat4" : "Matrix4fv", + "sampler2D" : "1i" +}; + +/** + * @ignore + */ +function extractUniforms(gl, shader) { + let uniforms = {}, + uniRx = /uniform\s+(\w+)\s+(\w+)/g, + uniformsData = {}, + descriptor = {}, + locations = {}, + match; + + // Detect all uniform names and types + [ shader.vertex, shader.fragment ].forEach((shader) => { + while ((match = uniRx.exec(shader))) { + uniformsData[match[2]] = match[1]; + } + }); + + // Get uniform references + Object.keys(uniformsData).forEach((name) => { + let type = uniformsData[name]; + locations[name] = gl.getUniformLocation(shader.program, name); + + descriptor[name] = { + "get" : (function (name) { + /* + * A getter for the uniform location + */ + return function () { + return locations[name]; + }; + })(name), + "set" : (function (name, type, fn) { + if (type.indexOf("mat") === 0) { + /* + * A generic setter for uniform matrices + */ + return function (val) { + gl[fn](locations[name], false, val); + }; + } + else { + /* + * A generic setter for uniform vectors + */ + return function (val) { + let fnv = fn; + if (val.length && fn.slice(-1) !== "v") { + fnv += "v"; + } + gl[fnv](locations[name], val); + }; + } + })(name, type, "uniform" + fnHash[type]) + }; + }); + Object.defineProperties(uniforms, descriptor); + + return uniforms; +} + +/** + * @ignore + */ +function extractAttributes(gl, shader) { + let attributes = {}, + attrRx = /attribute\s+\w+\s+(\w+)/g, + match, + i = 0; + + // Detect all attribute names + while ((match = attrRx.exec(shader.vertex))) { + attributes[match[1]] = i++; + } + + return attributes; +} + +/** + * @ignore + */ +function compileShader(gl, type, source) { + let shader = gl.createShader(type); + gl.shaderSource(shader, source); + gl.compileShader(shader); + + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + throw new Error(gl.getShaderInfoLog(shader)); + } + + return shader; +} + +/** + * Compile GLSL into a shader object + * @ignore + */ +function compileProgram(gl, vertex, fragment, attributes) { + let vertShader = compileShader(gl, gl.VERTEX_SHADER, vertex); + let fragShader = compileShader(gl, gl.FRAGMENT_SHADER, fragment); + + let program = gl.createProgram(); + + gl.attachShader(program, vertShader); + gl.attachShader(program, fragShader); + + + // force vertex attributes to use location 0 as starting location to prevent + // browser to do complicated emulation when running on desktop OpenGL (e.g. on macOS) + for (let location in attributes) { + gl.bindAttribLocation(program, attributes[location], location); + } + + gl.linkProgram(program); + + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { + let error_msg = + "Error initializing Shader " + this + "\n" + + "gl.VALIDATE_STATUS: " + gl.getProgramParameter(program, gl.VALIDATE_STATUS) + "\n" + + "gl.getError()" + gl.getError() + "\n" + + "gl.getProgramInfoLog()" + gl.getProgramInfoLog(program); + // house cleaning + gl.deleteProgram(program); + program = null; + // throw the exception + throw new Error(error_msg); + } + + gl.useProgram(program); + + // clean-up + gl.deleteShader(vertShader); + gl.deleteShader(fragShader); + + return program; +} + +/** + * set precision for the fiven shader source + * won't do anything if the precision is already specified + * @ignore + */ +function setPrecision(src, precision) { + if (src.substring(0, 9) !== "precision") { + return "precision " + precision + " float;" + src; + } + return src; +} + +/** + * return the highest precision format supported by this device for GL Shaders + * @ignore + * @param {WebGLRenderingContext} gl - the current WebGL context + * @returns {boolean} "lowp", "mediump", or "highp" + */ +function getMaxShaderPrecision(gl) { + if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT ).precision > 0 && + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT ).precision > 0) { + return "highp"; + } + if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT ).precision > 0 && + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT ).precision > 0) { + return "mediump"; + } + return "lowp"; +} + +/** + * clean the given source from space, comments, etc... + * @ignore + */ +function minify(src) { + // remove comments + src = src.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm, "$1"); + // Remove leading and trailing whitespace from lines + src = src.replace(/(\\n\s+)|(\s+\\n)/g, ""); + // Remove line breaks + src = src.replace(/(\\r|\\n)+/g, ""); + // Remove unnecessary whitespace + src = src.replace(/\s*([;,[\](){}\\\/\-+*|^&!=<>?~%])\s*/g, "$1"); + + return src; +} + +/** + * @classdesc + * a base GL Shader object + */ +class GLShader { + /** + * @param {WebGLRenderingContext} gl - the current WebGL rendering context + * @param {string} vertex - a string containing the GLSL source code to set + * @param {string} fragment - a string containing the GLSL source code to set + * @param {string} [precision=auto detected] - float precision ('lowp', 'mediump' or 'highp'). + * @see https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders + * @example + * // create a basic shader + * let myShader = new me.GLShader( + * // WebGL rendering context + * gl, + * // vertex shader + * [ + * "void main() {", + * " gl_Position = doMathToMakeClipspaceCoordinates;", + * "}" + * ].join("\n"), + * // fragment shader + * [ + * "void main() {", + * " gl_FragColor = doMathToMakeAColor;", + * "}" + * ].join("\n") + * ) + * // use the shader + * myShader.bind(); + */ + constructor(gl, vertex, fragment, precision) { + + /** + * the active gl rendering context + * @type {WebGLRenderingContext} + */ + this.gl = gl; + + /** + * the vertex shader source code + * @type {string} + */ + this.vertex = setPrecision(minify(vertex), precision || getMaxShaderPrecision(this.gl)); + + /** + * the fragment shader source code + * @type {string} + */ + this.fragment = setPrecision(minify(fragment), precision || getMaxShaderPrecision(this.gl)); + + /** + * the location attributes of the shader + * @type {GLint[]} + */ + this.attributes = extractAttributes(this.gl, this); + + + /** + * a reference to the shader program (once compiled) + * @type {WebGLProgram} + */ + this.program = compileProgram(this.gl, this.vertex, this.fragment, this.attributes); + + /** + * the uniforms of the shader + * @type {object} + */ + this.uniforms = extractUniforms(this.gl, this); + + // destroy the shader on context lost (will be recreated on context restore) + on(ONCONTEXT_LOST, this.destroy, this); + } + + /** + * Installs this shader program as part of current rendering state + */ + bind() { + this.gl.useProgram(this.program); + } + + /** + * returns the location of an attribute variable in this shader program + * @param {string} name - the name of the attribute variable whose location to get. + * @returns {GLint} number indicating the location of the variable name if found. Returns -1 otherwise + */ + getAttribLocation(name) { + let attr = this.attributes[name]; + if (typeof attr !== "undefined") { + return attr; + } else { + return -1; + } + } + + /** + * Set the uniform to the given value + * @param {string} name - the uniform name + * @param {object|Float32Array} value - the value to assign to that uniform + * @example + * myShader.setUniform("uProjectionMatrix", this.projectionMatrix); + */ + setUniform(name, value) { + let uniforms = this.uniforms; + if (typeof uniforms[name] !== "undefined") { + if (typeof value === "object" && typeof value.toArray === "function") { + uniforms[name] = value.toArray(); + } else { + uniforms[name] = value; + } + } else { + throw new Error("undefined (" + name + ") uniform for shader " + this); + } + } + + /** + * activate the given vertex attribute for this shader + * @param {WebGLRenderingContext} gl - the current WebGL rendering context + * @param {object[]} attributes - an array of vertex attributes + * @param {number} vertexByteSize - the size of a single vertex in bytes + */ + setVertexAttributes(gl, attributes, vertexByteSize) { + // set the vertex attributes + for (let index = 0; index < attributes.length; ++index) { + let element = attributes[index]; + let location = this.getAttribLocation(element.name); + + if (location !== -1) { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexByteSize, element.offset); + } else { + gl.disableVertexAttribArray(index); + } + } + } + + /** + * destroy this shader objects resources (program, attributes, uniforms) + */ + destroy() { + this.uniforms = null; + this.attributes = null; + + this.gl.deleteProgram(this.program); + + this.vertex = null; + this.fragment = null; + } +} + +/** + * @classdesc + * a Vertex Buffer object + * @class VertexArrayBuffer + * @ignore + */ + +class VertexArrayBuffer { + + constructor(vertex_size, vertex_per_obj) { + // the size of one vertex in float + this.vertexSize = vertex_size; + // size of an object in vertex + this.objSize = vertex_per_obj; + // the maximum number of vertices the vertex array buffer can hold + this.maxVertex = 256; // (note: this seems to be the sweet spot performance-wise when using batching) + // the current number of vertices added to the vertex array buffer + this.vertexCount = 0; + + // the actual vertex data buffer + this.buffer = new ArrayBuffer(this.maxVertex * this.vertexSize * this.objSize); + // Float32 and Uint32 view of the vertex data array buffer + this.bufferF32 = new Float32Array(this.buffer); + this.bufferU32 = new Uint32Array(this.buffer); + } + + /** + * clear the vertex array buffer + * @ignore + */ + clear() { + this.vertexCount = 0; + } + + + /** + * return true if full + * @ignore + */ + isFull(vertex = this.objSize) { + return (this.vertexCount + vertex >= this.maxVertex); + } + + /** + * resize the vertex buffer, retaining its original contents + * @ignore + */ + resize(vertexCount) { + + while (vertexCount > this.maxVertex) { + // double the vertex size + this.maxVertex <<= 1; + } + + // save a reference to the previous data + let data = this.bufferF32; + + // recreate ArrayBuffer and views + this.buffer = new ArrayBuffer(this.maxVertex * this.vertexSize * this.objSize); + this.bufferF32 = new Float32Array(this.buffer); + this.bufferU32 = new Uint32Array(this.buffer); + + // copy previous data + this.bufferF32.set(data); + + return this; + } + + /** + * push a new vertex to the buffer + * @ignore + */ + push(x, y, u, v, tint) { + let offset = this.vertexCount * this.vertexSize; + + if (this.vertexCount >= this.maxVertex) { + this.resize(this.vertexCount); + } + + this.bufferF32[offset] = x; + this.bufferF32[++offset] = y; + + if (typeof u !== "undefined") { + this.bufferF32[++offset] = u; + this.bufferF32[++offset] = v; + } + + if (typeof tint !== "undefined") { + this.bufferU32[++offset] = tint; + } + + this.vertexCount++; + + return this; + } + + /** + * return a reference to the data in Float32 format + * @ignore + */ + toFloat32(begin, end) { + if (typeof end !== "undefined") { + return this.bufferF32.subarray(begin, end); + } else { + return this.bufferF32; + } + } + + /** + * return a reference to the data in Uint32 format + * @ignore + */ + toUint32(begin, end) { + if (typeof end !== "undefined") { + return this.bufferU32.subarray(begin, end); + } else { + return this.bufferU32; + } + } + + /** + * return the size of the vertex in vertex + * @ignore + */ + length() { + return this.vertexCount; + } + + /** + * return true if empty + * @ignore + */ + isEmpty() { + return this.vertexCount === 0; + } + +} + +/** + * @classdesc + * A base Compositor object. + */ +class Compositor { + /** + * @param {WebGLRenderer} renderer - the current WebGL renderer session + * @param {object} settings - additional settings to initialize this compositors + * @param {object[]} settings.attribute - an array of attributes definition + * @param {string} settings.attribute.name - name of the attribute in the vertex shader + * @param {number} settings.attribute.size - number of components per vertex attribute. Must be 1, 2, 3, or 4. + * @param {GLenum} settings.attribute.type - data type of each component in the array + * @param {boolean} settings.attribute.normalized - whether integer data values should be normalized into a certain range when being cast to a float + * @param {number} settings.attribute.offset - offset in bytes of the first component in the vertex attribute array + * @param {object} settings.shader - an array of attributes definition + * @param {string} settings.shader.vertex - a string containing the GLSL source code to set + * @param {string} settings.shader.fragment - a string containing the GLSL source code to set + */ + constructor (renderer, settings) { + this.init(renderer, settings); + } + + /** + * Initialize the compositor + * @ignore + */ + init (renderer, settings) { + // the associated renderer + this.renderer = renderer; + + // WebGL context + this.gl = renderer.gl; + + // Global fill color + this.color = renderer.currentColor; + + // Global transformation matrix + this.viewMatrix = renderer.currentTransform; + + /** + * the default shader created by this compositor + * @type {GLShader} + */ + this.defaultShader = undefined; + + /** + * the shader currently used by this compositor + * @type {GLShader} + */ + this.currentShader = undefined; + + /** + * primitive type to render (gl.POINTS, gl.LINE_STRIP, gl.LINE_LOOP, gl.LINES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN, gl.TRIANGLES) + * @type {number} + * @default gl.TRIANGLES + */ + this.mode = this.gl.TRIANGLES; + + /** + * an array of vertex attribute properties + * @see WebGLCompositor.addAttribute + * @type {Array.} + */ + this.attributes = []; + + /** + * the size of a single vertex in bytes + * (will automatically be calculated as attributes definitions are added) + * @see WebGLCompositor.addAttribute + * @type {number} + */ + this.vertexByteSize = 0; + + /** + * the size of a single vertex in floats + * (will automatically be calculated as attributes definitions are added) + * @see WebGLCompositor.addAttribute + * @type {number} + */ + this.vertexSize = 0; + + /** + * the vertex data buffer used by this compositor + * @type {VertexArrayBuffer} + */ + this.vertexData = null; + + // parse given attibrutes + if (typeof settings !== "undefined" && Array.isArray(settings.attributes)) { + settings.attributes.forEach((attr) => { + this.addAttribute(attr.name, attr.size, attr.type, attr.normalized, attr.offset); + this.vertexData = new VertexArrayBuffer(this.vertexSize, 6); + }); + } else { + throw new Error("attributes definition missing"); + } + + // parse and instantiate the default shader + if (typeof settings !== "undefined" && typeof settings.shader !== "undefined") { + this.defaultShader = new GLShader(this.gl, settings.shader.vertex, settings.shader.fragment); + } else { + throw new Error("shader definition missing"); + } + } + + /** + * Reset compositor internal state + * @ignore + */ + reset() { + // WebGL context + this.gl = this.renderer.gl; + + // clear the vertex data buffer + this.vertexData.clear(); + } + + /** + * called by the WebGL renderer when a compositor become the current one + */ + bind() { + if (this.renderer.currentProgram !== this.defaultShader.program) { + this.useShader(this.defaultShader); + } + } + + /** + * Select the shader to use for compositing + * @see GLShader + * @param {GLShader} shader - a reference to a GLShader instance + */ + useShader(shader) { + if (this.renderer.currentProgram !== shader.program) { + this.flush(); + shader.bind(); + shader.setUniform("uProjectionMatrix", this.renderer.projectionMatrix); + shader.setVertexAttributes(this.gl, this.attributes, this.vertexByteSize); + + this.currentShader = shader; + this.renderer.currentProgram = this.currentShader.program; + } + } + + /** + * add vertex attribute property definition to the compositor + * @param {string} name - name of the attribute in the vertex shader + * @param {number} size - number of components per vertex attribute. Must be 1, 2, 3, or 4. + * @param {GLenum} type - data type of each component in the array + * @param {boolean} normalized - whether integer data values should be normalized into a certain range when being cast to a float + * @param {number} offset - offset in bytes of the first component in the vertex attribute array + */ + addAttribute(name, size, type, normalized, offset) { + this.attributes.push({ + name: name, + size: size, + type: type, + normalized: normalized, + offset: offset + }); + + switch (type) { + case this.gl.BYTE: + this.vertexByteSize += size * Int8Array.BYTES_PER_ELEMENT; + break; + case this.gl.UNSIGNED_BYTE: + this.vertexByteSize += size * Uint8Array.BYTES_PER_ELEMENT; + break; + case this.gl.SHORT: + this.vertexByteSize += size * Int16Array.BYTES_PER_ELEMENT; + break; + case this.gl.UNSIGNED_SHORT: + this.vertexByteSize += size * Uint16Array.BYTES_PER_ELEMENT; + break; + case this.gl.INT: + this.vertexByteSize += size * Int32Array.BYTES_PER_ELEMENT; + break; + case this.gl.UNSIGNED_INT: + this.vertexByteSize += size * Uint32Array.BYTES_PER_ELEMENT; + break; + case this.gl.FLOAT: + this.vertexByteSize += size * Float32Array.BYTES_PER_ELEMENT; + break; + default: + throw new Error("Invalid GL Attribute type"); + } + this.vertexSize = this.vertexByteSize / Float32Array.BYTES_PER_ELEMENT; + } + + /** + * set/change the current projection matrix + * @param {Matrix3d} matrix - the new projection matrix + */ + setProjection(matrix) { + this.currentShader.setUniform("uProjectionMatrix", matrix); + } + + /** + * Flush batched vertex data to the GPU + * @param {number} [mode=gl.TRIANGLES] - the GL drawing mode + */ + flush(mode = this.mode) { + let vertex = this.vertexData; + let vertexCount = vertex.vertexCount; + + if (vertexCount > 0) { + let gl = this.gl; + let vertexSize = vertex.vertexSize; + + // Copy data into stream buffer + if (this.renderer.WebGLVersion > 1) { + gl.bufferData(gl.ARRAY_BUFFER, vertex.toFloat32(), gl.STREAM_DRAW, 0, vertexCount * vertexSize); + } else { + gl.bufferData(gl.ARRAY_BUFFER, vertex.toFloat32(0, vertexCount * vertexSize), gl.STREAM_DRAW); + } + + gl.drawArrays(mode, 0, vertexCount); + + // clear the vertex buffer + vertex.clear(); + } + } +} + +var primitiveVertex = "// Current vertex point\nattribute vec2 aVertex;\nattribute vec4 aColor;\n\n// Projection matrix\nuniform mat4 uProjectionMatrix;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n // Transform the vertex position by the projection matrix\n gl_Position = uProjectionMatrix * vec4(aVertex, 0.0, 1.0);\n // Pass the remaining attributes to the fragment shader\n vColor = vec4(aColor.bgr * aColor.a, aColor.a);\n}\n"; + +var primitiveFragment = "varying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n}\n"; + +/** + * @classdesc + * A WebGL Compositor object. This class handles all of the WebGL state
                            + * Pushes texture regions or shape geometry into WebGL buffers, automatically flushes to GPU + * @augments Compositor + */ +class PrimitiveCompositor extends Compositor { + + /** + * Initialize the compositor + * @ignore + */ + init(renderer) { + super.init(renderer, { + attributes: [ + {name: "aVertex", size: 2, type: renderer.gl.FLOAT, normalized: false, offset: 0 * Float32Array.BYTES_PER_ELEMENT}, + {name: "aColor", size: 4, type: renderer.gl.UNSIGNED_BYTE, normalized: true, offset: 2 * Float32Array.BYTES_PER_ELEMENT} + ], + shader: { + vertex: primitiveVertex, fragment: primitiveFragment + } + }); + } + + /** + * Draw an array of vertices + * @param {GLenum} mode - primitive type to render (gl.POINTS, gl.LINE_STRIP, gl.LINE_LOOP, gl.LINES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN, gl.TRIANGLES) + * @param {Point[]} verts - an array of vertices + * @param {number} [vertexCount=verts.length] - amount of points defined in the points array + */ + drawVertices(mode, verts, vertexCount = verts.length) { + let viewMatrix = this.viewMatrix; + let vertexData = this.vertexData; + let alpha = this.renderer.getGlobalAlpha(); + let colorUint32 = this.renderer.currentColor.toUint32(alpha); + + if (vertexData.isFull(vertexCount)) { + // is the vertex buffer full if we add more vertices + this.flush(); + } + + // flush if drawing vertices with a different drawing mode + if (mode !== this.mode) { + this.flush(this.mode); + this.mode = mode; + } + + if (!viewMatrix.isIdentity()) { + verts.forEach((vert) => { + viewMatrix.apply(vert); + vertexData.push(vert.x, vert.y, undefined, undefined, colorUint32); + }); + } else { + verts.forEach((vert) => { + vertexData.push(vert.x, vert.y, undefined, undefined, colorUint32); + }); + } + + // force flush for primitive using LINE_STRIP or LINE_LOOP + if (this.mode === this.gl.LINE_STRIP || this.mode === this.gl.LINE_LOOP) { + this.flush(this.mode); + } + } +} + +var quadVertex = "// Current vertex point\nattribute vec2 aVertex;\nattribute vec2 aRegion;\nattribute vec4 aColor;\n\n// Projection matrix\nuniform mat4 uProjectionMatrix;\n\nvarying vec2 vRegion;\nvarying vec4 vColor;\n\nvoid main(void) {\n // Transform the vertex position by the projection matrix\n gl_Position = uProjectionMatrix * vec4(aVertex, 0.0, 1.0);\n // Pass the remaining attributes to the fragment shader\n vColor = vec4(aColor.bgr * aColor.a, aColor.a);\n vRegion = aRegion;\n}\n"; + +var quadFragment = "uniform sampler2D uSampler;\nvarying vec4 vColor;\nvarying vec2 vRegion;\n\nvoid main(void) {\n gl_FragColor = texture2D(uSampler, vRegion) * vColor;\n}\n"; + +// a pool of resuable vectors +let V_ARRAY = [ + new Vector2d(), + new Vector2d(), + new Vector2d(), + new Vector2d() +]; + +/** + * @classdesc + * A WebGL Compositor object. This class handles all of the WebGL state
                            + * Pushes texture regions or shape geometry into WebGL buffers, automatically flushes to GPU + * @augments Compositor + */ +class QuadCompositor extends Compositor { + + /** + * Initialize the compositor + * @ignore + */ + init (renderer) { + super.init(renderer, { + attributes: [ + {name: "aVertex", size: 2, type: renderer.gl.FLOAT, normalized: false, offset: 0 * Float32Array.BYTES_PER_ELEMENT}, + {name: "aRegion", size: 2, type: renderer.gl.FLOAT, normalized: false, offset: 2 * Float32Array.BYTES_PER_ELEMENT}, + {name: "aColor", size: 4, type: renderer.gl.UNSIGNED_BYTE, normalized: true, offset: 4 * Float32Array.BYTES_PER_ELEMENT} + ], + shader: { + vertex: quadVertex, fragment: quadFragment + } + }); + + // list of active texture units + this.currentTextureUnit = -1; + this.boundTextures = []; + } + + /** + * Reset compositor internal state + * @ignore + */ + reset() { + super.reset(); + + // delete all related bound texture + for (let i = 0; i < this.renderer.maxTextures; i++) { + let texture2D = this.getTexture2D(i); + if (typeof texture2D !== "undefined") { + this.deleteTexture2D(texture2D); + } + } + this.currentTextureUnit = -1; + } + + /** + * Create a WebGL texture from an image + * @param {number} unit - Destination texture unit + * @param {Image|HTMLCanvasElement|ImageData|Uint8Array[]|Float32Array[]} [pixels=null] - Source image + * @param {number} filter - gl.LINEAR or gl.NEAREST + * @param {string} [repeat="no-repeat"] - Image repeat behavior (see {@link ImageLayer#repeat}) + * @param {number} [w=pixels.width] - Source image width (Only use with UInt8Array[] or Float32Array[] source image) + * @param {number} [h=pixels.height] - Source image height (Only use with UInt8Array[] or Float32Array[] source image) + * @param {boolean} [premultipliedAlpha=true] - Multiplies the alpha channel into the other color channels + * @param {boolean} [mipmap=true] - Whether mipmap levels should be generated for this texture + * @returns {WebGLTexture} a WebGL texture + */ + createTexture2D(unit, pixels = null, filter, repeat = "no-repeat", w = pixels.width, h = pixels.height, premultipliedAlpha = true, mipmap = true) { + let gl = this.gl; + let isPOT = isPowerOfTwo(w) && isPowerOfTwo(h); + let rs = (repeat.search(/^repeat(-x)?$/) === 0) && (isPOT || this.renderer.WebGLVersion > 1) ? gl.REPEAT : gl.CLAMP_TO_EDGE; + let rt = (repeat.search(/^repeat(-y)?$/) === 0) && (isPOT || this.renderer.WebGLVersion > 1) ? gl.REPEAT : gl.CLAMP_TO_EDGE; + + let texture = gl.createTexture(); + + this.bindTexture2D(texture, unit); + + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, rs); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, rt); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filter); + + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, premultipliedAlpha); + + if (pixels === null || typeof pixels.byteLength !== "undefined") { + // if pixels is undefined, or if it's Uint8Array/Float32Array TypedArray + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, w, h, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixels, 0); + } else if (typeof globalThis.OffscreenCanvas !== "undefined" && pixels instanceof globalThis.OffscreenCanvas) { + // convert to ImageBitmap first (else Safari 16.4 and higher will throw an TypeError exception) + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, pixels.transferToImageBitmap()); + } else { + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, pixels); + } + + // generate the sprite mimap (used when scaling) if a PowerOfTwo texture + if (isPOT && mipmap === true) { + gl.generateMipmap(gl.TEXTURE_2D); + } + + return texture; + } + + /** + * delete the given WebGL texture + * @param {WebGLTexture} [texture] - a WebGL texture to delete + */ + deleteTexture2D(texture) { + this.gl.deleteTexture(texture); + this.unbindTexture2D(texture); + } + + /** + * returns the WebGL texture associated to the given texture unit + * @param {number} unit - Texture unit to which a texture is bound + * @returns {WebGLTexture} texture a WebGL texture + */ + getTexture2D(unit) { + return this.boundTextures[unit]; + } + + /** + * assign the given WebGL texture to the current batch + * @param {WebGLTexture} texture - a WebGL texture + * @param {number} unit - Texture unit to which the given texture is bound + */ + bindTexture2D(texture, unit) { + let gl = this.gl; + + if (texture !== this.boundTextures[unit]) { + this.flush(); + if (this.currentTextureUnit !== unit) { + this.currentTextureUnit = unit; + gl.activeTexture(gl.TEXTURE0 + unit); + } + + gl.bindTexture(gl.TEXTURE_2D, texture); + this.boundTextures[unit] = texture; + + } else if (this.currentTextureUnit !== unit) { + this.flush(); + this.currentTextureUnit = unit; + gl.activeTexture(gl.TEXTURE0 + unit); + } + } + + /** + * unbind the given WebGL texture, forcing it to be reuploaded + * @param {WebGLTexture} [texture] - a WebGL texture + * @param {number} [unit] - a WebGL texture + * @returns {number} unit the unit number that was associated with the given texture + */ + unbindTexture2D(texture, unit) { + if (typeof unit === "undefined") { + unit = this.boundTextures.indexOf(texture); + } + if (unit !== -1) { + delete this.boundTextures[unit]; + if (unit === this.currentTextureUnit) { + this.currentTextureUnit = -1; + } + } + return unit; + } + + /** + * @ignore + */ + uploadTexture(texture, w, h, force = false) { + let unit = this.renderer.cache.getUnit(texture); + let texture2D = this.boundTextures[unit]; + + if (typeof texture2D === "undefined" || force) { + this.createTexture2D( + unit, + texture.getTexture(), + this.renderer.settings.antiAlias ? this.gl.LINEAR : this.gl.NEAREST, + texture.repeat, + w, + h, + texture.premultipliedAlpha + ); + } else { + this.bindTexture2D(texture2D, unit); + } + + return this.currentTextureUnit; + } + + /** + * Add a textured quad + * @param {TextureAtlas} texture - Source texture atlas + * @param {number} x - Destination x-coordinate + * @param {number} y - Destination y-coordinate + * @param {number} w - Destination width + * @param {number} h - Destination height + * @param {number} u0 - Texture UV (u0) value. + * @param {number} v0 - Texture UV (v0) value. + * @param {number} u1 - Texture UV (u1) value. + * @param {number} v1 - Texture UV (v1) value. + * @param {number} tint - tint color to be applied to the texture in UINT32 (argb) format + */ + addQuad(texture, x, y, w, h, u0, v0, u1, v1, tint) { + let vertexData = this.vertexData; + + if (vertexData.isFull(6)) { + // is the vertex buffer full if we add 6 more vertices + this.flush(); + } + + // upload and activate the texture if necessary + let unit = this.uploadTexture(texture); + + // set fragment sampler accordingly + this.currentShader.setUniform("uSampler", unit); + + // Transform vertices + let m = this.viewMatrix, + vec0 = V_ARRAY[0].set(x, y), + vec1 = V_ARRAY[1].set(x + w, y), + vec2 = V_ARRAY[2].set(x, y + h), + vec3 = V_ARRAY[3].set(x + w, y + h); + + if (!m.isIdentity()) { + m.apply(vec0); + m.apply(vec1); + m.apply(vec2); + m.apply(vec3); + } + + vertexData.push(vec0.x, vec0.y, u0, v0, tint); + vertexData.push(vec1.x, vec1.y, u1, v0, tint); + vertexData.push(vec2.x, vec2.y, u0, v1, tint); + vertexData.push(vec2.x, vec2.y, u0, v1, tint); + vertexData.push(vec1.x, vec1.y, u1, v0, tint); + vertexData.push(vec3.x, vec3.y, u1, v1, tint); + } +} + +/** + * @classdesc + * a WebGL renderer object + * @augments Renderer + */ +class WebGLRenderer extends Renderer { + /** + * @param {Application.Settings} [options] - optional parameters for the renderer + */ + constructor(options) { + // parent contructor + super(options); + + /** + * The WebGL version used by this renderer (1 or 2) + * @type {number} + * @default 1 + * @readonly + */ + this.WebGLVersion = 1; + + /** + * The vendor string of the underlying graphics driver. + * @type {string} + * @default undefined + * @readonly + */ + this.GPUVendor = undefined; + + /** + * The renderer string of the underlying graphics driver. + * @type {string} + * @default undefined + * @readonly + */ + this.GPURenderer = undefined; + + /** + * The WebGL context + * @name gl + * @type {WebGLRenderingContext} + */ + this.context = this.gl = this.getContextGL(this.getCanvas(), options.transparent, options.depthTest === "z-buffer"); + + /** + * the vertex buffer used by this WebGL Renderer + * @type {WebGLBuffer} + */ + this.vertexBuffer = this.gl.createBuffer(); + + /** + * Maximum number of texture unit supported under the current context + * @type {number} + * @readonly + */ + this.maxTextures = this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS); + + /** + * @ignore + */ + this._colorStack = []; + + /** + * @ignore + */ + this._matrixStack = []; + + /** + * @ignore + */ + this._scissorStack = []; + + /** + * @ignore + */ + this._blendStack = []; + + /** + * The current transformation matrix used for transformations on the overall scene + * @type {Matrix2d} + */ + this.currentTransform = new Matrix2d(); + + /** + * The current compositor used by the renderer + * @type {WebGLCompositor} + */ + this.currentCompositor = undefined; + + /** + * a reference to the current shader program used by the renderer + * @type {WebGLProgram} + */ + this.currentProgram = undefined; + + /** + * The list of active compositors + * @type {Map} + */ + this.compositors = new Map(); + + // bind the vertex buffer + this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.vertexBuffer); + + // Create both quad and primitive compositor + this.addCompositor(new (this.settings.compositor || QuadCompositor)(this), "quad", true); + this.addCompositor(new (this.settings.compositor || PrimitiveCompositor)(this), "primitive"); + + // depth Test settings + this.depthTest = options.depthTest; + + // default WebGL state(s) + if (this.depthTest === "z-buffer") { + this.gl.enable(this.gl.DEPTH_TEST); + // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/depthFunc + this.gl.depthFunc(this.gl.LEQUAL); + this.gl.depthMask(true); + } else { + this.gl.disable(this.gl.DEPTH_TEST); + this.gl.depthMask(false); + } + + this.gl.disable(this.gl.SCISSOR_TEST); + this.gl.enable(this.gl.BLEND); + + // set default mode + this.setBlendMode(this.settings.blendMode); + + // get GPU vendor and renderer + let debugInfo = this.gl.getExtension("WEBGL_debug_renderer_info"); + if (debugInfo !== null) { + this.GPUVendor = this.gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL); + this.GPURenderer = this.gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); + } + + // a private property that when set will make `setCompositor` + // to use this specific shader instead of the default one + this.customShader = undefined; + + // Create a texture cache + this.cache = new TextureCache(this.maxTextures); + + // set the renderer type + this.type = "WebGL" + this.WebGLVersion; + + // to simulate context lost and restore in WebGL: + // let ctx = me.video.renderer.context.getExtension('WEBGL_lose_context'); + // ctx.loseContext() + this.getCanvas().addEventListener("webglcontextlost", (e) => { + e.preventDefault(); + this.isContextValid = false; + emit(ONCONTEXT_LOST, this); + }, false ); + // ctx.restoreContext() + this.getCanvas().addEventListener("webglcontextrestored", () => { + this.reset(); + this.isContextValid = true; + emit(ONCONTEXT_RESTORED, this); + }, false ); + + // reset the renderer on game reset + on(GAME_RESET, () => { + this.reset(); + }); + + // register to the CANVAS resize channel + on(CANVAS_ONRESIZE, (width, height) => { + this.flush(); + this.setViewport(0, 0, width, height); + }); + } + + /** + * Reset context state + */ + reset() { + super.reset(); + + // clear all stacks + this._colorStack.forEach((color) => { + pool.push(color); + }); + this._matrixStack.forEach((matrix) => { + pool.push(matrix); + }); + this._colorStack.length = 0; + this._matrixStack.length = 0; + this._blendStack.length = 0; + + // clear gl context + this.clear(); + + // initial viewport size + this.setViewport(); + + // rebind the vertex buffer if required (e.g in case of context loss) + if (this.gl.getParameter(this.gl.ARRAY_BUFFER_BINDING) !== this.vertexBuffer) { + this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.vertexBuffer); + } + + this.currentCompositor = undefined; + this.currentProgram = undefined; + this.customShader = undefined; + + this.compositors.forEach((compositor) => { + if (this.isContextValid === false) { + // on context lost/restore + compositor.init(this); + } else { + compositor.reset(); + } + }); + + this.setCompositor("quad"); + + this.gl.disable(this.gl.SCISSOR_TEST); + } + + /** + * add a new compositor to this renderer + * @param {Compositor} compositor - a compositor instance + * @param {string} name - a name uniquely identifying this compositor + * @param {boolean} [activate=false] - true if the given compositor should be set as the active one + */ + addCompositor(compositor, name = "default", activate = false) { + // make sure there is no existing compositor with the same name + if (typeof this.compositors.get(name) !== "undefined") { + throw new Error("Invalid Compositor name"); + } + + // add the new compositor + this.compositors.set(name, compositor); + + if (activate === true) { + // set as active one + this.setCompositor(name); + } + } + + /** + * set the active compositor for this renderer + * @param {string} name - a compositor name + * @param {GLShader} [shader] - an optional shader program to be used, instead of the default one, when activating the compositor + * @returns {Compositor} an instance to the current active compositor + */ + setCompositor(name = "default", shader = this.customShader) { + let compositor = this.compositors.get(name); + + if (typeof compositor === "undefined") { + throw new Error("Invalid Compositor"); + } + + if (this.currentCompositor !== compositor) { + if (this.currentCompositor !== undefined) { + // flush the current compositor + this.currentCompositor.flush(); + } + // set as the active one + this.currentCompositor = compositor; + } + + if (name === "quad" && typeof shader === "object") { + this.currentCompositor.useShader(shader); + } else { + // (re)bind the compositor with the default shader (program & attributes) + this.currentCompositor.bind(); + } + + return this.currentCompositor; + } + + /** + * Reset the gl transform to identity + */ + resetTransform() { + this.currentTransform.identity(); + } + + /** + * Create a pattern with the specified repetition + * @param {HTMLImageElement|SVGImageElement|HTMLVideoElement|HTMLCanvasElement|ImageBitmap|OffscreenCanvas|VideoFrame} image - Source image to be used as the pattern's image + * @param {string} repeat - Define how the pattern should be repeated + * @returns {TextureAtlas} the patterned texture created + * @see ImageLayer#repeat + * @example + * let tileable = renderer.createPattern(image, "repeat"); + * let horizontal = renderer.createPattern(image, "repeat-x"); + * let vertical = renderer.createPattern(image, "repeat-y"); + * let basic = renderer.createPattern(image, "no-repeat"); + */ + createPattern(image, repeat) { + + this.setCompositor("quad"); + + if (renderer.WebGLVersion === 1 && (!isPowerOfTwo(image.width) || !isPowerOfTwo(image.height))) { + let src = typeof image.src !== "undefined" ? image.src : image; + throw new Error( + "[WebGL Renderer] " + src + " is not a POT texture " + + "(" + image.width + "x" + image.height + ")" + ); + } + + let texture = new TextureAtlas(createAtlas(image.width, image.height, "pattern", repeat), image); + + // FIXME: Remove old cache entry and texture when changing the repeat mode + this.currentCompositor.uploadTexture(texture); + + return texture; + } + + /** + * Flush the compositor to the frame buffer + */ + flush() { + this.currentCompositor.flush(); + } + + /** + * set/change the current projection matrix (WebGL only) + * @param {Matrix3d} matrix - the new projection matrix + */ + setProjection(matrix) { + super.setProjection(matrix); + this.currentCompositor.setProjection(matrix); + } + + /** + * Sets the WebGL viewport, which specifies the affine transformation of x and y from normalized device coordinates to window coordinates + * @param {number} [x = 0] - x the horizontal coordinate for the lower left corner of the viewport origin + * @param {number} [y = 0] - y the vertical coordinate for the lower left corner of the viewport origin + * @param {number} [w = width of the canvas] - the width of viewport + * @param {number} [h = height of the canvas] - the height of viewport + */ + setViewport(x = 0, y = 0, w = this.getCanvas().width, h = this.getCanvas().height) { + this.gl.viewport(x, y, w, h); + } + + /** + * Clear the frame buffer + */ + clear() { + let gl = this.gl; + gl.clearColor(0, 0, 0, this.settings.transparent ? 0.0 : 1.0); + if (this.depthTest === "z-buffer") { + gl.clear(gl.DEPTH_BUFFER_BIT | gl.COLOR_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); + } else { + gl.clear(gl.COLOR_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); + } + } + + /** + * Clears the gl context with the given color. + * @param {Color|string} [color="#000000"] - CSS color. + * @param {boolean} [opaque=false] - Allow transparency [default] or clear the surface completely [true] + */ + clearColor(color = "#000000", opaque = false) { + let glArray; + let gl = this.gl; + + if (color instanceof Color) { + glArray = color.toArray(); + } else { + let _color = pool.pull("me.Color"); + // reuse temporary the renderer default color object + glArray = _color.parseCSS(color).toArray(); + pool.push(_color); + } + + // clear gl context with the specified color + gl.clearColor(glArray[0], glArray[1], glArray[2], (opaque === true) ? 1.0 : glArray[3]); + gl.clear(gl.COLOR_BUFFER_BIT); + } + + /** + * Erase the pixels in the given rectangular area by setting them to transparent black (rgba(0,0,0,0)). + * @param {number} x - x axis of the coordinate for the rectangle starting point. + * @param {number} y - y axis of the coordinate for the rectangle starting point. + * @param {number} width - The rectangle's width. + * @param {number} height - The rectangle's height. + */ + clearRect(x, y, width, height) { + this.save(); + this.clipRect(x, y, width, height); + this.clearColor(); + this.restore(); + } + + /** + * Draw an image to the gl context + * @param {HTMLImageElement|SVGImageElement|HTMLVideoElement|HTMLCanvasElement|ImageBitmap|OffscreenCanvas|VideoFrame} image - An element to draw into the context. + * @param {number} sx - The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. + * @param {number} sy - The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. + * @param {number} sw - The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used. + * @param {number} sh - The height of the sub-rectangle of the source image to draw into the destination context. + * @param {number} dx - The X coordinate in the destination canvas at which to place the top-left corner of the source image. + * @param {number} dy - The Y coordinate in the destination canvas at which to place the top-left corner of the source image. + * @param {number} dw - The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn. + * @param {number} dh - The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn. + * @example + * // Position the image on the canvas: + * renderer.drawImage(image, dx, dy); + * // Position the image on the canvas, and specify width and height of the image: + * renderer.drawImage(image, dx, dy, dWidth, dHeight); + * // Clip the image and position the clipped part on the canvas: + * renderer.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight); + */ + drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) { + if (typeof sw === "undefined") { + sw = dw = image.width; + sh = dh = image.height; + dx = sx; + dy = sy; + sx = 0; + sy = 0; + } + else if (typeof dx === "undefined") { + dx = sx; + dy = sy; + dw = sw; + dh = sh; + sw = image.width; + sh = image.height; + sx = 0; + sy = 0; + } + + if (this.settings.subPixel === false) { + // clamp to pixel grid + dx |= 0; + dy |= 0; + } + + this.setCompositor("quad"); + + let texture = this.cache.get(image); + let uvs = texture.getUVs(sx + "," + sy + "," + sw + "," + sh); + this.currentCompositor.addQuad(texture, dx, dy, dw, dh, uvs[0], uvs[1], uvs[2], uvs[3], this.currentTint.toUint32(this.getGlobalAlpha())); + } + + /** + * Draw a pattern within the given rectangle. + * @param {TextureAtlas} pattern - Pattern object + * @param {number} x - x position where to draw the pattern + * @param {number} y - y position where to draw the pattern + * @param {number} width - width of the pattern + * @param {number} height - height of the pattern + * @see WebGLRenderer#createPattern + */ + drawPattern(pattern, x, y, width, height) { + let uvs = pattern.getUVs("0,0," + width + "," + height); + this.setCompositor("quad"); + this.currentCompositor.addQuad(pattern, x, y, width, height, uvs[0], uvs[1], uvs[2], uvs[3], this.currentTint.toUint32(this.getGlobalAlpha())); + } + + + /** + * starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path + * @example + * // First path + * renderer.beginPath(); + * renderer.setColor("blue"); + * renderer.moveTo(20, 20); + * renderer.lineTo(200, 20); + * renderer.stroke(); + * // Second path + * renderer.beginPath(); + * renderer.setColor("green"); + * renderer.moveTo(20, 20); + * renderer.lineTo(120, 120); + * renderer.stroke(); + */ + beginPath() { + this.path2D.beginPath(); + } + + /** + * begins a new sub-path at the point specified by the given (x, y) coordinates. + * @param {number} x - The x axis of the point. + * @param {number} y - The y axis of the point. + */ + moveTo(x, y) { + this.path2D.moveTo(x, y); + } + + /** + * adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates. + */ + lineTo(x, y) { + this.path2D.lineTo(x, y); + } + + /** + * creates a rectangular path whose starting point is at (x, y) and whose size is specified by width and height. + * @param {number} x - The x axis of the coordinate for the rectangle starting point. + * @param {number} y - The y axis of the coordinate for the rectangle starting point. + * @param {number} width - The rectangle's width. + * @param {number} height - The rectangle's height. + */ + rect(x, y, width, height) { + this.path2D.rect(x, y, width, height); + } + + /** + * adds a rounded rectangle to the current path. + * @param {number} x - The x axis of the coordinate for the rectangle starting point. + * @param {number} y - The y axis of the coordinate for the rectangle starting point. + * @param {number} width - The rectangle's width. + * @param {number} height - The rectangle's height. + * @param {number} radius - The corner radius. + */ + roundRect(x, y, width, height, radii) { + this.path2D.roundRect(x, y, width, height, radii); + } + + /** + * stroke the given shape or the current defined path + * @param {Rect|RoundRect|Polygon|Line|Ellipse} [shape] - a shape object to stroke + * @param {boolean} [fill=false] - fill the shape with the current color if true + */ + stroke(shape, fill) { + this.setCompositor("primitive"); + if (typeof shape === "undefined") { + if (fill === true) { + // draw all triangles + this.currentCompositor.drawVertices(this.gl.TRIANGLES, this.path2D.triangulatePath()); + } else { + this.currentCompositor.drawVertices(this.gl.LINES, this.path2D.points); + } + } else { + super.stroke(shape, fill); + } + } + + /** + * fill the given shape or the current defined path + * @param {Rect|RoundRect|Polygon|Line|Ellipse} [shape] - a shape object to fill + */ + fill(shape) { + this.stroke(shape, true); + } + + /** + * 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 + */ + closePath() { + this.path2D.closePath(); + } + + /** + * Returns the WebGL Context object of the given canvas element + * @param {HTMLCanvasElement} canvas - the canvas element + * @param {boolean} [transparent=false] - use true to enable transparency + * @param {boolean} [depth=false] - use true to enable depth buffer testing + * @returns {WebGLRenderingContext} the WebGL Context object + */ + getContextGL(canvas, transparent = false, depth = false) { + if (typeof canvas === "undefined" || canvas === null) { + throw new Error( + "You must pass a canvas element in order to create " + + "a GL context" + ); + } + + let attr = { + alpha : transparent, + antialias : this.settings.antiAlias, + depth : depth, + stencil: true, + preserveDrawingBuffer : false, + premultipliedAlpha: transparent ? this.settings.premultipliedAlpha : false, + powerPreference: this.settings.powerPreference, + failIfMajorPerformanceCaveat : this.settings.failIfMajorPerformanceCaveat + }; + + let gl; + + // attempt to create a WebGL2 context if requested + if (this.settings.preferWebGL1 === false) { + gl = canvas.getContext("webgl2", attr); + if (gl) { + this.WebGLVersion = 2; + } + } + + // fallback to WebGL1 + if (!gl) { + this.WebGLVersion = 1; + gl = canvas.getContext("webgl", attr) || canvas.getContext("experimental-webgl", attr); + } + + if (!gl) { + throw new Error( + "A WebGL context could not be created." + ); + } + + return gl; + } + + /** + * Returns the WebGLContext instance for the renderer + * return a reference to the system 2d Context + * @returns {WebGLRenderingContext} the current WebGL context + */ + getContext() { + return this.gl; + } + + /** + * set a blend mode for the given context.
                            + * Supported blend mode between Canvas and WebGL remderer :
                            + * - "normal" : this is the default mode and draws new content on top of the existing content
                            + *
                            + * - "multiply" : the pixels of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.
                            + *
                            + * - "additive or lighter" : where both content overlap the color is determined by adding color values.
                            + *
                            + * - "screen" : The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)
                            + *
                            + * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + * @param {string} [mode="normal"] - blend mode : "normal", "multiply", "lighter", "additive", "screen" + * @param {WebGLRenderingContext} [gl] - a WebGL context + */ + setBlendMode(mode = "normal", gl = this.gl) { + + if (this.currentBlendMode !== mode) { + this.flush(); + gl.enable(gl.BLEND); + this.currentBlendMode = mode; + + switch (mode) { + case "screen" : + gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_COLOR); + break; + + case "lighter" : + case "additive" : + gl.blendFunc(gl.ONE, gl.ONE); + break; + + case "multiply" : + gl.blendFunc(gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA); + break; + + default : + gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA); + this.currentBlendMode = "normal"; + break; + } + } + } + + /** + * restores the most recently saved renderer state by popping the top entry in the drawing state stack + * @example + * // Save the current state + * renderer.save(); + * + * // apply a transform and draw a rect + * renderer.tranform(matrix); + * renderer.fillRect(10, 10, 100, 100); + * + * // Restore to the state saved by the most recent call to save() + * renderer.restore(); + */ + restore() { + // do nothing if there is no saved states + if (this._matrixStack.length !== 0) { + let color = this._colorStack.pop(); + let matrix = this._matrixStack.pop(); + + // restore the previous context + this.currentColor.copy(color); + this.currentTransform.copy(matrix); + + this.setBlendMode(this._blendStack.pop()); + + // recycle objects + pool.push(color); + pool.push(matrix); + } + + if (this._scissorStack.length !== 0) { + // FIXME : prevent `scissor` object realloc and GC + this.currentScissor.set(this._scissorStack.pop()); + } else { + // turn off scissor test + this.gl.disable(this.gl.SCISSOR_TEST); + this.currentScissor[0] = 0; + this.currentScissor[1] = 0; + this.currentScissor[2] = this.getCanvas().width; + this.currentScissor[3] = this.getCanvas().height; + } + } + + /** + * saves the entire state of the renderer by pushing the current state onto a stack. + * @example + * // Save the current state + * renderer.save(); + * + * // apply a transform and draw a rect + * renderer.tranform(matrix); + * renderer.fillRect(10, 10, 100, 100); + * + * // Restore to the state saved by the most recent call to save() + * renderer.restore(); + */ + save() { + this._colorStack.push(this.currentColor.clone()); + this._matrixStack.push(this.currentTransform.clone()); + + if (this.gl.isEnabled(this.gl.SCISSOR_TEST)) { + // FIXME avoid slice and object realloc + this._scissorStack.push(this.currentScissor.slice()); + } + + this._blendStack.push(this.getBlendMode()); + } + + /** + * adds a rotation to the transformation matrix. + * @param {number} angle - the rotation angle, clockwise in radians + * @example + * // Rotated rectangle + * renderer.rotate((45 * Math.PI) / 180); + * renderer.setColor("red"); + * renderer.fillRect(10, 10, 100, 100); + * + * // Reset transformation matrix to the identity matrix + * renderer.setTransform(1, 0, 0, 1, 0, 0); + */ + rotate(angle) { + this.currentTransform.rotate(angle); + } + + /** + * adds a scaling transformation to the renderer units horizontally and/or vertically + * @param {number} x - Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of 1 results in no horizontal scaling. + * @param {number} y - Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results in no vertical scaling + */ + scale(x, y) { + this.currentTransform.scale(x, y); + } + + /** + * not used by this renderer? + * @ignore + */ + setAntiAlias(context, enable) { + super.setAntiAlias(context, enable); + // TODO: perhaps handle GLNEAREST or other options with texture binding + } + + /** + * Set the global alpha + * @param {number} alpha - 0.0 to 1.0 values accepted. + */ + setGlobalAlpha(alpha) { + this.currentColor.alpha = alpha; + } + + /** + * Return the global alpha + * @returns {number} global alpha value + */ + getGlobalAlpha() { + return this.currentColor.alpha; + } + + /** + * Set the current fill & stroke style color. + * By default, or upon reset, the value is set to #000000. + * @param {Color|string} color - css color string. + */ + setColor(color) { + let alpha = this.currentColor.alpha; + this.currentColor.copy(color); + this.currentColor.alpha *= alpha; + } + + /** + * Set the line width + * @param {number} width - Line width + */ + setLineWidth(width) { + this.getContext().lineWidth(width); + } + + /** + * Stroke an arc at the specified coordinates with given radius, start and end points + * @param {number} x - arc center point x-axis + * @param {number} y - arc center point y-axis + * @param {number} radius - arc radius + * @param {number} start - start angle in radians + * @param {number} end - end angle in radians + * @param {boolean} [antiClockwise=false] - draw arc anti-clockwise + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokeArc(x, y, radius, start, end, antiClockwise = false, fill = false) { + this.setCompositor("primitive"); + this.path2D.beginPath(); + this.path2D.arc(x, y, radius, start, end, antiClockwise); + if (fill === false) { + this.currentCompositor.drawVertices(this.gl.LINES, this.path2D.points); + } else { + this.currentCompositor.drawVertices(this.gl.TRIANGLES, this.path2D.triangulatePath()); + } + } + + /** + * Fill an arc at the specified coordinates with given radius, start and end points + * @param {number} x - arc center point x-axis + * @param {number} y - arc center point y-axis + * @param {number} radius - arc radius + * @param {number} start - start angle in radians + * @param {number} end - end angle in radians + * @param {boolean} [antiClockwise=false] - draw arc anti-clockwise + */ + fillArc(x, y, radius, start, end, antiClockwise = false) { + this.strokeArc(x, y, radius, start, end, antiClockwise, true); + } + + /** + * Stroke an ellipse at the specified coordinates with given radius + * @param {number} x - ellipse center point x-axis + * @param {number} y - ellipse center point y-axis + * @param {number} w - horizontal radius of the ellipse + * @param {number} h - vertical radius of the ellipse + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokeEllipse(x, y, w, h, fill = false) { + this.setCompositor("primitive"); + this.path2D.beginPath(); + this.path2D.ellipse(x, y, w, h, 0, 0, 360); + if (fill === false) { + this.currentCompositor.drawVertices(this.gl.LINES, this.path2D.points); + } else { + this.currentCompositor.drawVertices(this.gl.TRIANGLES, this.path2D.triangulatePath()); + } + } + + /** + * Fill an ellipse at the specified coordinates with given radius + * @param {number} x - ellipse center point x-axis + * @param {number} y - ellipse center point y-axis + * @param {number} w - horizontal radius of the ellipse + * @param {number} h - vertical radius of the ellipse + */ + fillEllipse(x, y, w, h) { + this.strokeEllipse(x, y, w, h, false); + } + + /** + * Stroke a line of the given two points + * @param {number} startX - the start x coordinate + * @param {number} startY - the start y coordinate + * @param {number} endX - the end x coordinate + * @param {number} endY - the end y coordinate + */ + strokeLine(startX, startY, endX, endY) { + this.setCompositor("primitive"); + this.path2D.beginPath(); + this.path2D.moveTo(startX, startY); + this.path2D.lineTo(endX, endY); + this.currentCompositor.drawVertices(this.gl.LINES, this.path2D.points); + } + + + /** + * Fill a line of the given two points + * @param {number} startX - the start x coordinate + * @param {number} startY - the start y coordinate + * @param {number} endX - the end x coordinate + * @param {number} endY - the end y coordinate + */ + fillLine(startX, startY, endX, endY) { + this.strokeLine(startX, startY, endX, endY); + } + + /** + * Stroke a me.Polygon on the screen with a specified color + * @param {Polygon} poly - the shape to draw + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokePolygon(poly, fill = false) { + const points = poly.points; + const len = points.length; + + this.setCompositor("primitive"); + + this.translate(poly.pos.x, poly.pos.y); + + this.path2D.beginPath(); + for (let i = 0; i < len - 1; i++) { + const curPoint = points[i]; + const nextPoint = points[i+1]; + this.path2D.moveTo(curPoint.x, curPoint.y); + this.path2D.lineTo(nextPoint.x, nextPoint.y); + } + this.path2D.closePath(); + + if (fill === false) { + this.currentCompositor.drawVertices(this.gl.LINES, this.path2D.points); + } else { + // draw all triangles + this.currentCompositor.drawVertices(this.gl.TRIANGLES, this.path2D.triangulatePath()); + } + + this.translate(-poly.pos.x, -poly.pos.y); + } + + /** + * Fill a me.Polygon on the screen + * @param {Polygon} poly - the shape to draw + */ + fillPolygon(poly) { + this.strokePolygon(poly, true); + } + + /** + * Draw a stroke rectangle at the specified coordinates + * @param {number} x - x axis of the coordinate for the rectangle starting point. + * @param {number} y - y axis of the coordinate for the rectangle starting point. + * @param {number} width - The rectangle's width. + * @param {number} height - The rectangle's height. + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokeRect(x, y, width, height, fill = false) { + this.setCompositor("primitive"); + this.path2D.beginPath(); + this.path2D.rect(x, y, width, height); + if (fill === false) { + this.currentCompositor.drawVertices(this.gl.LINES, this.path2D.points); + } else { + this.currentCompositor.drawVertices(this.gl.TRIANGLES, this.path2D.triangulatePath()); + } + } + + /** + * Draw a filled rectangle at the specified coordinates + * @param {number} x - x axis of the coordinate for the rectangle starting point. + * @param {number} y - y axis of the coordinate for the rectangle starting point. + * @param {number} width - The rectangle's width. + * @param {number} height - The rectangle's height. + */ + fillRect(x, y, width, height) { + this.strokeRect(x, y, width, height, true); + } + + /** + * Stroke a rounded rectangle at the specified coordinates + * @param {number} x - x axis of the coordinate for the rounded rectangle starting point. + * @param {number} y - y axis of the coordinate for the rounded rectangle starting point. + * @param {number} width - The rounded rectangle's width. + * @param {number} height - The rounded rectangle's height. + * @param {number} radius - The rounded corner's radius. + * @param {boolean} [fill=false] - also fill the shape with the current color if true + */ + strokeRoundRect(x, y, width, height, radius, fill = false) { + this.setCompositor("primitive"); + this.path2D.beginPath(); + this.path2D.roundRect(x, y, width, height, radius); + if (fill === false) { + this.currentCompositor.drawVertices(this.gl.LINES, this.path2D.points); + } else { + this.currentCompositor.drawVertices(this.gl.TRIANGLES, this.path2D.triangulatePath()); + } + } + + /** + * Draw a rounded filled rectangle at the specified coordinates + * @param {number} x - x axis of the coordinate for the rounded rectangle starting point. + * @param {number} y - y axis of the coordinate for the rounded rectangle starting point. + * @param {number} width - The rounded rectangle's width. + * @param {number} height - The rounded rectangle's height. + * @param {number} radius - The rounded corner's radius. + */ + fillRoundRect(x, y, width, height, radius) { + this.strokeRoundRect(x, y, width, height, radius, true); + } + + /** + * Stroke a Point at the specified coordinates + * @param {number} x - x axis of the coordinate for the point. + * @param {number} y - y axis of the coordinate for the point. + */ + strokePoint(x, y) { + this.strokeLine(x, y, x + 1, y + 1); + } + + /** + * Draw a a point at the specified coordinates + * @param {number} x - x axis of the coordinate for the point. + * @param {number} y - y axis of the coordinate for the point. + */ + fillPoint(x, y) { + this.strokePoint(x, y); + } + + /** + * Reset (overrides) the renderer transformation matrix to the + * identity one, and then apply the given transformation matrix. + * @param {Matrix2d|number} a - a matrix2d to transform by, or a the a component to multiply the current matrix by + * @param {number} b - the b component to multiply the current matrix by + * @param {number} c - the c component to multiply the current matrix by + * @param {number} d - the d component to multiply the current matrix by + * @param {number} e - the e component to multiply the current matrix by + * @param {number} f - the f component to multiply the current matrix by + */ + setTransform(a, b, c, d, e, f) { + this.resetTransform(); + this.transform(a, b, c, d, e, f); + } + + /** + * Multiply given matrix into the renderer tranformation matrix + * @see {@link WebGLRenderer.setTransform} which will reset the current transform matrix prior to performing the new transformation + * @param {Matrix2d|number} a - a matrix2d to transform by, or a the a component to multiply the current matrix by + * @param {number} b - the b component to multiply the current matrix by + * @param {number} c - the c component to multiply the current matrix by + * @param {number} d - the d component to multiply the current matrix by + * @param {number} e - the e component to multiply the current matrix by + * @param {number} f - the f component to multiply the current matrix by + */ + transform(a, b, c, d, e, f) { + if (typeof a === "object") { + this.currentTransform.multiply(a); + } else { + // indivudual component + this.currentTransform.transform(a, b, c, d, e, f); + } + if (this.settings.subPixel === false) { + // snap position values to pixel grid + let a = this.currentTransform.toArray(); + a[6] |= 0; + a[7] |= 0; + } + } + + /** + * adds a translation transformation to the current matrix. + * @param {number} x - Distance to move in the horizontal direction. Positive values are to the right, and negative to the left. + * @param {number} y - Distance to move in the vertical direction. Positive values are down, and negative are up. + */ + translate(x, y) { + let currentTransform = this.currentTransform; + currentTransform.translate(x, y); + if (this.settings.subPixel === false) { + // snap position values to pixel grid + let a = currentTransform.toArray(); + a[6] |= 0; + a[7] |= 0; + } + } + + /** + * clip the given region from the original canvas. Once a region is clipped, + * all future drawing will be limited to the clipped region. + * You can however save the current region using the save(), + * and restore it (with the restore() method) any time in the future. + * (this is an experimental feature !) + * @param {number} x - x axis of the coordinate for the upper-left corner of the rectangle to start clipping from. + * @param {number} y - y axis of the coordinate for the upper-left corner of the rectangle to start clipping from. + * @param {number} width - the width of the rectangle to start clipping from. + * @param {number} height - the height of the rectangle to start clipping from. + */ + clipRect(x, y, width, height) { + let canvas = this.getCanvas(); + let gl = this.gl; + // if requested box is different from the current canvas size + if (x !== 0 || y !== 0 || width !== canvas.width || height !== canvas.height) { + let currentScissor = this.currentScissor; + if (gl.isEnabled(gl.SCISSOR_TEST)) { + // if same as the current scissor box do nothing + if (currentScissor[0] === x && currentScissor[1] === y && + currentScissor[2] === width && currentScissor[3] === height) { + return; + } + } + // flush the compositor + this.flush(); + // turn on scissor test + gl.enable(this.gl.SCISSOR_TEST); + // set the scissor rectangle (note : coordinates are left/bottom) + gl.scissor( + // scissor does not account for currentTransform, so manually adjust + x + this.currentTransform.tx, + canvas.height -height -y -this.currentTransform.ty, + width, + height + ); + // save the new currentScissor box + currentScissor[0] = x; + currentScissor[1] = y; + currentScissor[2] = width; + currentScissor[3] = height; + } else { + // turn off scissor test + gl.disable(gl.SCISSOR_TEST); + } + } + + /** + * A mask limits rendering elements to the shape and position of the given mask object. + * If the drawing or rendering area is larger than the mask, only the intersecting part of the renderable will be visible. + * (Note Mask are not preserved through renderer context save and restore and need so be manually cleared) + * @see CanvasRenderer#clearMask + * @param {Rect|RoundRect|Polygon|Line|Ellipse} [mask] - a shape defining the mask to be applied + * @param {boolean} [invert=false] - either the given shape should define what is visible (default) or the opposite + */ + setMask(mask, invert = false) { + let gl = this.gl; + + // flush the compositor + this.flush(); + + if (this.maskLevel === 0) { + // Enable and setup GL state to write to stencil buffer + gl.enable(gl.STENCIL_TEST); + gl.clear(gl.STENCIL_BUFFER_BIT); + } + + this.maskLevel++; + + gl.colorMask(false, false, false, false); + gl.stencilFunc(gl.EQUAL, this.maskLevel, 1); + gl.stencilOp(gl.REPLACE, gl.REPLACE, gl.REPLACE); + + + // fill the given mask shape + this.fill(mask); + + // flush the compositor + this.flush(); + + gl.colorMask(true, true, true, true); + + // Use stencil buffer to affect next rendering object + if (invert === true) { + gl.stencilFunc(gl.EQUAL, this.maskLevel + 1, 1); + } else { + gl.stencilFunc(gl.NOTEQUAL, this.maskLevel + 1, 1); + } + gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + } + + /** + * disable (remove) the rendering mask set through setMask. + * @see WebGLRenderer#setMask + */ + clearMask() { + if (this.maskLevel > 0) { + // flush the compositor + this.flush(); + this.maskLevel = 0; + this.gl.disable(this.gl.STENCIL_TEST); + } + } +} + +// default canvas settings +let defaultAttributes = { + offscreenCanvas : false, + willReadFrequently : false, + antiAlias : false, + context: "2d" +}; + +/** + * Creates a Canvas Texture of the given size + * (when using WebGL, use `invalidate` to force a reupload of the corresponding texture) + */ +class CanvasTexture { + /** + * @param {number} width - the desired width of the canvas + * @param {number} height - the desired height of the canvas + * @param {object} attributes - The attributes to create both the canvas and context + * @param {boolean} [attributes.context="2d"] - the context type to be created ("2d", "webgl", "webgl2") + * @param {boolean} [attributes.offscreenCanvas=false] - will create an offscreenCanvas if true instead of a standard canvas + * @param {boolean} [attributes.willReadFrequently=false] - Indicates whether or not a lot of read-back operations are planned + * @param {boolean} [attributes.antiAlias=false] - Whether to enable anti-aliasing, use false (default) for a pixelated effect. + */ + constructor(width, height, attributes = defaultAttributes) { + + // clean up the given attributes + attributes = Object.assign(defaultAttributes, attributes || {}); + + /** + * the canvas created for this CanvasTexture + * @type {HTMLCanvasElement|OffscreenCanvas} + */ + this.canvas = createCanvas(width, height, attributes.offscreenCanvas); + + /** + * the rendering context of this CanvasTexture + * @type {CanvasRenderingContext2D} + */ + this.context = this.canvas.getContext(attributes.context, { willReadFrequently: attributes.willReadFrequently }); + + // enable or disable antiAlias if specified + this.setAntiAlias(attributes.antiAlias); + } + + /** + * @ignore + */ + onResetEvent(width, height) { + this.clear(); + this.resize(width, height); + } + + /** + * Clears the content of the canvas texture + */ + clear() { + this.context.setTransform(1, 0, 0, 1, 0, 0); + this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); + } + + /** + * enable/disable image smoothing (scaling interpolation) + * @param {boolean} [enable=false] - whether to enable or not image smoothing (scaling interpolation) + */ + setAntiAlias(enable = false) { + let canvas = this.canvas; + + // enable/disable antialias on the given Context2d object + setPrefixed("imageSmoothingEnabled", enable, this.context); + + // set antialias CSS property on the main canvas + if (typeof canvas.style !== "undefined") { + if (enable !== true) { + // https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering + canvas.style["image-rendering"] = "optimizeSpeed"; // legal fallback + canvas.style["image-rendering"] = "-moz-crisp-edges"; // Firefox + canvas.style["image-rendering"] = "-o-crisp-edges"; // Opera + canvas.style["image-rendering"] = "-webkit-optimize-contrast"; // Safari + canvas.style["image-rendering"] = "optimize-contrast"; // CSS 3 + canvas.style["image-rendering"] = "crisp-edges"; // CSS 4 + canvas.style["image-rendering"] = "pixelated"; // CSS 4 + canvas.style.msInterpolationMode = "nearest-neighbor"; // IE8+ + } else { + canvas.style["image-rendering"] = "auto"; + } + } + } + + /** + * Resizes the canvas texture to the given width and height. + * @param {number} width - the desired width + * @param {number} height - the desired height + */ + resize(width, height) { + this.canvas.width = Math.round(width); + this.canvas.height = Math.round(height); + } + + /** + * Returns an ImageData object representing the underlying pixel data for a specified portion of this canvas texture. + * (Note: when using getImageData(), it is highly recommended to use the `willReadFrequently` attribute when creatimg the corresponding canvas texture) + * @param {number} x - The x-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted + * @param {number} y - The y-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted + * @param {number} width - The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left + * @param {number} height - The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up + * @returns {ImageData} The ImageData extracted from this CanvasTexture. + */ + getImageData(x, y, width, height) { + // clamp values + x = clamp(Math.floor(x), 0, this.canvas.width - 1); + y = clamp(Math.floor(y), 0, this.canvas.height - 1); + width = clamp(width, 1, this.canvas.width - x); + height = clamp(height, 1, this.canvas.height - y); + // return imageData + return this.context.getImageData(x, y, width, height); + } + + /** + * creates a Blob object representing the image contained in this canvas texture + * @param {object} [options] - An object with the following properties: + * @param {string} [options.type="image/png"] - A string indicating the image format + * @param {number} [options.quality] - A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support lossy compression (such as image/jpeg or image/webp). A user agent will use its default quality value if this option is not specified, or if the number is outside the allowed range. + * @returns {Promise} A Promise returning a Blob object representing the image contained in this canvas texture + * @example + * canvasTexture.convertToBlob().then((blob) => console.log(blob)); + */ + toBlob(options) { + if (typeof this.canvas.convertToBlob === "function") { + return this.canvas.convertToBlob(options); + } else { + return new Promise(function(resolve) { + this.canvas.toBlob((blob) => { + resolve(blob); + }, options ? options.type : undefined, options ? options.quality : undefined); + }); + } + } + + /** + * creates an ImageBitmap object from the most recently rendered image of this canvas texture + * @param {object} [options] - An object with the following properties: + * @param {string} [options.type="image/png"] - A string indicating the image format + * @param {number} [options.quality] - A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support lossy compression (such as image/jpeg or image/webp). A user agent will use its default quality value if this option is not specified, or if the number is outside the allowed range. + * @returns {Promise} A Promise returning an ImageBitmap. + * @example + * canvasTexture.transferToImageBitmap().then((bitmap) => console.log(bitmap)); + */ + toImageBitmap(options) { + return new Promise((resolve) => { + if (typeof this.canvas.transferToImageBitmap === "function") { + resolve(this.canvas.transferToImageBitmap()); + } else { + let image = new Image(); + image.src = this.canvas.toDataURL(options); + image.onload = () => { + createImageBitmap(image).then((bitmap) => resolve(bitmap)); + }; + } + }); + } + + /** + * returns a data URL containing a representation of the most recently rendered image of this canvas texture + * (not supported by OffscreenCanvas) + * @param {object} [options] - An object with the following properties: + * @param {string} [options.type="image/png"] - A string indicating the image format + * @param {number} [options.quality] - A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support lossy compression (such as image/jpeg or image/webp). A user agent will use its default quality value if this option is not specified, or if the number is outside the allowed range. + * @returns {Promise} A Promise returning a string containing the requested data URL. + * @example + * renderer.toDataURL().then((dataURL) => console.log(dataURL)); + */ + toDataURL(options) { + return new Promise((resolve) => { + resolve(this.canvas.toDataURL(options)); + }); + } + + /** + * invalidate the current CanvasTexture, and force a reupload of the corresponding texture + * (call this if you modify the canvas content between two draw calls) + * @param {CanvasRenderer|WebGLRenderer} renderer - the renderer to which this canvas texture is attached + */ + invalidate(renderer) { + if (typeof renderer.gl !== "undefined") { + // make sure the right compositor is active + renderer.setCompositor("quad"); + // invalidate the previous corresponding texture so that it can reuploaded once changed + this.glTextureUnit = renderer.cache.getUnit(renderer.cache.get(this.canvas)); + renderer.currentCompositor.unbindTexture2D(null, this.glTextureUnit); + } + } + + /** + * @ignore + */ + destroy() { + this.context = undefined; + this.canvas = undefined; + } + + /** + * The width of this canvas texture in pixels + * @public + * @type {number} + */ + get width() { + return this.canvas.width; + } + + set width(val) { + this.canvas.width = Math.round(val); + } + + /** + * The height of this canvas texture in pixels + * @public + * @type {number} + */ + get height() { + return this.canvas.height; + } + + set height(val) { + this.canvas.height = Math.round(val); + } +} + +/** + * @classdesc + * a generic Color Layer Object. Fills the entire Canvas with the color not just the container the object belongs to. + * @augments Renderable + */ +class ColorLayer extends Renderable { + /** + * @param {string} name - Layer name + * @param {Color|string} color - CSS color + * @param {number} [z = 0] - z-index position + */ + constructor(name, color, z) { + // parent constructor + super(0, 0, Infinity, Infinity); + + /** + * the layer color component + * @public + * @type {Color} + * @name color + * @memberof ColorLayer# + */ + this.color = pool.pull("Color").parseCSS(color); + + this.onResetEvent(name, color, z); + + } + + onResetEvent(name, color, z = 0) { + // apply given parameters + this.name = name; + this.pos.z = z; + this.floating = true; + // string (#RGB, #ARGB, #RRGGBB, #AARRGGBB) + this.color.parseCSS(color); + } + + /** + * draw this color layer (automatically called by melonJS) + * @name draw + * @memberof ColorLayer + * @protected + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance + * @param {Camera2d} [viewport] - the viewport to (re)draw + */ + draw(renderer, viewport) { + renderer.save(); + renderer.clipRect( + 0, 0, + viewport.width, viewport.height + ); + renderer.clearColor(this.color); + renderer.restore(); + } + + /** + * Destroy function + * @ignore + */ + destroy() { + pool.push(this.color); + this.color = undefined; + super.destroy(); + } + +} + +/** + * @classdesc + * a generic Image Layer Object + * @augments Sprite + */ +class ImageLayer extends Sprite { + /** + * @param {number} x - x coordinate + * @param {number} y - y coordinate + * @param {object} settings - ImageLayer properties + * @param {HTMLImageElement|HTMLCanvasElement|string} settings.image - Image reference. See {@link loader.getImage} + * @param {string} [settings.name="me.ImageLayer"] - layer name + * @param {number} [settings.z=0] - z-index position + * @param {number|Vector2d} [settings.ratio=1.0] - Scrolling ratio to be applied. See {@link ImageLayer#ratio} + * @param {"repeat"|"repeat-x"|"repeat-y"|"no-repeat"} [settings.repeat="repeat"] - define if and how an Image Layer should be repeated. See {@link ImageLayer#repeat} + * @param {number|Vector2d} [settings.anchorPoint=<0.0,0.0>] - Define how the image is anchored to the viewport bound. By default, its upper-left corner is anchored to the viewport bounds upper left corner. + * @example + * // create a repetitive background pattern on the X axis using the citycloud image asset + * me.game.world.addChild(new me.ImageLayer(0, 0, { + * image:"citycloud", + * repeat :"repeat-x" + * }), 1); + */ + constructor(x, y, settings) { + // call the constructor + super(x, y, settings); + + // render in screen coordinates + this.floating = true; + + // image drawing offset + this.offset.set(x, y); + + /** + * Define the image scrolling ratio
                            + * Scrolling speed is defined by multiplying the viewport delta position by the specified ratio. + * Setting this vector to <0.0,0.0> will disable automatic scrolling.
                            + * To specify a value through Tiled, use one of the following format :
                            + * - a number, to change the value for both axis
                            + * - a json expression like `json:{"x":0.5,"y":0.5}` if you wish to specify a different value for both x and y + * @type {Vector2d} + * @default <1.0,1.0> + */ + this.ratio = pool.pull("Vector2d", 1.0, 1.0); + + if (typeof(settings.ratio) !== "undefined") { + // little hack for backward compatiblity + if (isNumeric(settings.ratio)) { + this.ratio.set(settings.ratio, +settings.ratio); + } else /* vector */ { + this.ratio.setV(settings.ratio); + } + } + + if (typeof(settings.anchorPoint) === "undefined") { + this.anchorPoint.set(0, 0); + } + else { + if (typeof(settings.anchorPoint) === "number") { + this.anchorPoint.set(settings.anchorPoint, settings.anchorPoint); + } + else /* vector */ { + this.anchorPoint.setV(settings.anchorPoint); + } + } + + this.repeat = settings.repeat || "repeat"; + + // on context lost, all previous textures are destroyed + on(ONCONTEXT_RESTORED, this.createPattern, this); + } + + /** + * Define if and how an Image Layer should be repeated.
                            + * By default, an Image Layer is repeated both vertically and horizontally.
                            + * Acceptable values :
                            + * - 'repeat' - The background image will be repeated both vertically and horizontally
                            + * - 'repeat-x' - The background image will be repeated only horizontally.
                            + * - 'repeat-y' - The background image will be repeated only vertically.
                            + * - 'no-repeat' - The background-image will not be repeated.
                            + * @type {string} + * @default 'repeat' + */ + get repeat() { + return this._repeat; + } + + set repeat(value) { + this._repeat = value; + switch (this._repeat) { + case "no-repeat" : + this.repeatX = false; + this.repeatY = false; + break; + case "repeat-x" : + this.repeatX = true; + this.repeatY = false; + break; + case "repeat-y" : + this.repeatX = false; + this.repeatY = true; + break; + default : // "repeat" + this.repeatX = true; + this.repeatY = true; + break; + } + this.resize(game.viewport.width, game.viewport.height); + this.createPattern(); + } + + + // called when the layer is added to the game world or a container + onActivateEvent() { + // register to the viewport change notification + on(VIEWPORT_ONCHANGE, this.updateLayer, this); + on(VIEWPORT_ONRESIZE, this.resize, this); + // force a first refresh when the level is loaded + on(LEVEL_LOADED, this.updateLayer, this); + // in case the level is not added to the root container, + // the onActivateEvent call happens after the LEVEL_LOADED event + // so we need to force a first update + if (this.ancestor.root !== true) { + this.updateLayer(); + } + } + + /** + * resize the Image Layer to match the given size + * @param {number} w - new width + * @param {number} h - new height + */ + resize(w, h) { + return super.resize( + this.repeatX ? Infinity : w, + this.repeatY ? Infinity : h + ); + } + + /** + * createPattern function + * @ignore + */ + createPattern() { + this._pattern = renderer.createPattern(this.image, this._repeat); + } + + /** + * updateLayer function + * @ignore + */ + updateLayer() { + const rx = this.ratio.x, + ry = this.ratio.y; + + const viewport = game.viewport; + + if (rx === 0 && ry === 0) { + // static image + return; + } + + const width = this.width, + height = this.height, + bw = viewport.bounds.width, + bh = viewport.bounds.height, + ax = this.anchorPoint.x, + ay = this.anchorPoint.y, + + /* + * Automatic positioning + * + * See https://github.com/melonjs/melonJS/issues/741#issuecomment-138431532 + * for a thorough description of how this works. + */ + x = ax * (rx - 1) * (bw - viewport.width) + this.offset.x - rx * viewport.pos.x, + y = ay * (ry - 1) * (bh - viewport.height) + this.offset.y - ry * viewport.pos.y; + + + // Repeat horizontally; start drawing from left boundary + if (this.repeatX) { + this.pos.x = x % width; + } + else { + this.pos.x = x; + } + + // Repeat vertically; start drawing from top boundary + if (this.repeatY) { + this.pos.y = y % height; + } + else { + this.pos.y = y; + } + + this.isDirty = true; + } + + /** + * override the default predraw function + * as repeat and anchor are managed directly in the draw method + * @ignore + */ + preDraw(renderer) { + // save the context + renderer.save(); + + // apply the defined alpha value + renderer.setGlobalAlpha(renderer.globalAlpha() * this.getOpacity()); + + // apply the defined tint, if any + renderer.setTint(this.tint); + + // apply blending if different from "normal" + if (this.blendMode !== renderer.getBlendMode()) { + renderer.setBlendMode(this.blendMode); + } + } + + /** + * draw this ImageLayer (automatically called by melonJS) + * @protected + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance + * @param {Camera2d} [viewport] - the viewport to (re)draw + */ + draw(renderer, viewport) { + const width = this.width, + height = this.height, + bw = viewport.bounds.width, + bh = viewport.bounds.height, + ax = this.anchorPoint.x, + ay = this.anchorPoint.y; + + let x = this.pos.x, + y = this.pos.y; + + if (this.ratio.x === 0 && this.ratio.y === 0) { + // static image + x = x + ax * (bw - width); + y = y + ay * (bh - height); + } + + renderer.translate(x, y); + renderer.drawPattern( + this._pattern, + 0, + 0, + viewport.width * 2, + viewport.height * 2 + ); + } + + // called when the layer is removed from the game world or a container + onDeactivateEvent() { + // cancel all event subscriptions + off(VIEWPORT_ONCHANGE, this.updateLayer); + off(VIEWPORT_ONRESIZE, this.resize); + off(LEVEL_LOADED, this.updateLayer); + } + + /** + * Destroy function + * @ignore + */ + destroy() { + pool.push(this.ratio); + this.ratio = undefined; + off(ONCONTEXT_RESTORED, this.createPattern); + super.destroy(); + } + +} + +/** + * @classdesc + * A NineSliceSprite is similar to a Sprite, but it uses 9-slice scaling to strech its inner area to fit the size of the Renderable, + * by proportionally scaling a sprite by splitting it in a grid of nine parts (with only parts 1, 3, 7, 9 not being scaled).
                            + *
                            + * @see https://en.wikipedia.org/wiki/9-slice_scaling + * @augments Sprite + */ +class NineSliceSprite extends Sprite { + /** + * @param {number} x - the x coordinates of the sprite object + * @param {number} y - the y coordinates of the sprite object + * @param {object} settings - Configuration parameters for the Sprite object + * @param {number} settings.width - the width of the Renderable over which the sprite needs to be stretched + * @param {number} settings.height - the height of the Renderable over which the sprite needs to be stretched + * @param {number} [settings.insetx] - the width of a corner over which the sprite is unscaled (default is a quarter of the sprite width) + * @param {number} [settings.insety] - the height of a corner over which the sprite is unscaled (default is a quarter of the sprite height) + * @param {HTMLImageElement|HTMLCanvasElement|TextureAtlas|string} settings.image - reference to spritesheet image, a texture atlas or to a texture atlas + * @param {string} [settings.name=""] - name of this object + * @param {string} [settings.region] - region name of a specific region to use when using a texture atlas, see {@link TextureAtlas} + * @param {number} [settings.framewidth] - Width of a single frame within the spritesheet + * @param {number} [settings.frameheight] - Height of a single frame within the spritesheet + * @param {string|Color} [settings.tint] - a tint to be applied to this sprite + * @param {number} [settings.flipX] - flip the sprite on the horizontal axis + * @param {number} [settings.flipY] - flip the sprite on the vertical axis + * @param {Vector2d} [settings.anchorPoint={x:0.5, y:0.5}] - Anchor point to draw the frame at (defaults to the center of the frame). + * @example + * this.panelSprite = new me.NineSliceSprite(0, 0, { + * image : game.texture, + * region : "grey_panel", + * width : this.width, + * height : this.height + * }); + */ + constructor(x, y, settings) { + // call the super constructor + super(x, y, settings); + + // ensure mandatory properties are defined + if ((typeof settings.width !== "number") || (typeof settings.height !== "number")) { + throw new Error("height and width properties are mandatory"); + } + + // adjust the nss sprite size accordingly to the target "expanded" size + this.width = Math.floor(settings.width); + this.height = Math.floor(settings.height); + + // nine slice sprite specific internal variables + this.nss_width = this.width; + this.nss_height = this.height; + + this.insetx = settings.insetx; + this.insety = settings.insety; + } + + /** + * width of the NineSliceSprite + * @public + * @type {number} + * @name width + */ + get width() { + return super.width; + } + set width(value) { + super.width = this.nss_width = value; + } + + /** + * height of the NineSliceSprite + * @public + * @type {number} + * @name height + */ + get height() { + return super.height; + } + set height(value) { + super.height = this.nss_height = value; + } + + /** + * @ignore + */ + draw(renderer) { + // the frame to draw + let frame = this.current; + + // cache the current position and size + let dx = this.pos.x, + dy = this.pos.y; + + let w = frame.width, + h = frame.height; + + // frame offset in the texture/atlas + let frame_offset = frame.offset; + let g_offset = this.offset; + + + // remove image's TexturePacker/ShoeBox rotation + if (frame.angle !== 0) { + renderer.translate(-dx, -dy); + renderer.rotate(frame.angle); + dx -= h; + w = frame.height; + h = frame.width; + } + + let sx = g_offset.x + frame_offset.x, + sy = g_offset.y + frame_offset.y; + + // should this be configurable ? + let corner_width = this.insetx || w / 4, + corner_height = this.insety || h / 4; + + // OPTIMIZE ME ! + + // DRAW CORNERS + + // Top Left + renderer.drawImage( + this.image, + sx, // sx + sy, // sy + corner_width, corner_height, // sw,sh + dx, dy, // dx,dy + corner_width, corner_height // dw,dh + ); + + // Top Right + renderer.drawImage( + this.image, + sx + w - corner_width, // sx + sy, // sy + corner_width, corner_height, // sw,sh + dx + this.nss_width - corner_width, // dx + dy, // dy + corner_width, corner_height // dw,dh + ); + // Bottom Left + renderer.drawImage( + this.image, + sx, // sx + sy + h - corner_height, // sy + corner_width, corner_height, // sw,sh + dx, // dx + dy + this.nss_height - corner_height, // dy + corner_width, corner_height // dw,dh + ); + // Bottom Right + renderer.drawImage( + this.image, + sx + w - corner_width, // sx + sy + h - corner_height, // sy + corner_width, corner_height, // sw,sh + dx + this.nss_width - corner_width, //dx + dy + this.nss_height - corner_height, // dy + corner_width, corner_height // dw,dh + ); + + + // DRAW SIDES and CENTER + let image_center_width = w - (corner_width << 1); + let image_center_height = h - (corner_height << 1); + + let target_center_width = this.nss_width - (corner_width << 1); + let target_center_height = this.nss_height - (corner_height << 1); + + //Top center + renderer.drawImage( + this.image, + sx + corner_width, // sx + sy, // sy + image_center_width, // sw + corner_height, // sh + dx + corner_width, // dx + dy, // dy + target_center_width, // dw + corner_height // dh + ); + + //Bottom center + renderer.drawImage( + this.image, + sx + corner_width, // sx + sy + h - corner_height, // sy + image_center_width, // sw + corner_height, // sh + dx + corner_width, // dx + dy + this.nss_height - corner_height, // dx + target_center_width, // dw + corner_height // dh + ); + + // Middle Left + renderer.drawImage( + this.image, + sx, // sx + sy + corner_height, // sy + corner_width, // sw + image_center_height, // sh + dx, // dx + dy + corner_height, // dy + corner_width, // dw + target_center_height // dh + ); + + // Middle Right + renderer.drawImage( + this.image, + sx + w - corner_width, // sx + sy + corner_height, // sy + corner_width, // sw + image_center_height, // sh + dx + this.nss_width - corner_width, // dx + dy + corner_height, // dy + corner_width, // dw + target_center_height // dh + ); + + // Middle Center + renderer.drawImage( + this.image, + sx + corner_width, // sx + sy + corner_height, // sy + image_center_width, // sw + image_center_height, // sh + dx + corner_width, // dx + dy + corner_height, // dy + target_center_width, // dw + target_center_height // dh + ); + } +} + +/** + * @classdesc + * This is a basic clickable and draggable container which you can use in your game UI. + * Use this for example if you want to display a panel that contains text, images or other UI elements. + * @augments Container + */ +class UIBaseElement extends Container { + /** + * + * @param {number} x - The x position of the container + * @param {number} y - The y position of the container + * @param {number} w - width of the container + * @param {number} h - height of the container + */ + constructor(x, y, w, h) { + super(x, y, w, h); + /** + * object can be clicked or not + * @type {boolean} + * @default true + */ + this.isClickable = true; + + /** + * object can be clicked or not + * @type {boolean} + * @default false + */ + this.isDraggable = false; + + /** + * Tap and hold threshold timeout in ms + * @type {number} + * @default 250 + */ + this.holdThreshold = 250; + + /** + * object can be tap and hold + * @type {boolean} + * @default false + */ + this.isHoldable = false; + + /** + * true if the pointer is over the object + * @type {boolean} + * @default false + */ + this.hover = false; + + /** + * false if the pointer is down, or true when the pointer status is up + * @type {boolean} + * @default false + */ + this.released = true; + + /** + * UI base elements use screen coordinates by default + * (Note: any child elements added to a UIBaseElement should have their floating property to false) + * @see Renderable.floating + * @type {boolean} + * @default true + */ + this.floating = true; + + // object has been updated (clicked,etc..) + this.holdTimeout = -1; + + // enable event detection + this.isKinematic = false; + + // update container and children bounds automatically + this.enableChildBoundsUpdate = true; + } + + /** + * function callback for the pointerdown event + * @ignore + */ + clicked(event) { + // Check if left mouse button is pressed + if (event.button === 0 && this.isClickable) { + this.isDirty = true; + this.released = false; + if (this.isHoldable) { + timer$1.clearTimeout(this.holdTimeout); + this.holdTimeout = timer$1.setTimeout( + () => this.hold(), + this.holdThreshold, + false + ); + this.released = false; + } + if (this.isDraggable) { + this.grabOffset.set(event.gameX, event.gameY); + this.grabOffset.sub(this.pos); + } + return this.onClick(event); + } + } + + /** + * function called when the object is pressed (to be extended) + * @param {Pointer} event - the event object + * @returns {boolean} return false if we need to stop propagating the event + */ + onClick(event) { // eslint-disable-line no-unused-vars + return true; + } + + /** + * function callback for the pointerEnter event + * @ignore + */ + enter(event) { + this.hover = true; + this.isDirty = true; + if (this.isDraggable === true) { + on(POINTERMOVE, this.pointerMove, this); + // to memorize where we grab the object + this.grabOffset = pool.pull("Vector2d", 0, 0); + } + return this.onOver(event); + } + + /** + * pointermove function + * @ignore + */ + pointerMove(event) { + if (this.hover === true && this.released === false) { + // follow the pointer + this.pos.set(event.gameX, event.gameY, this.pos.z); + this.pos.sub(this.grabOffset); + // mark the container for redraw + this.isDirty = true; + return this.onMove(event); + } + } + + /** + * function called when the pointer is moved over the object + * @param {Pointer} event - the event object + */ + onMove(event) { // eslint-disable-line no-unused-vars + // to be extended + } + + /** + * function called when the pointer is over the object + * @param {Pointer} event - the event object + */ + onOver(event) { // eslint-disable-line no-unused-vars + // to be extended + } + + /** + * function callback for the pointerLeave event + * @ignore + */ + leave(event) { + this.hover = false; + this.isDirty = true; + if (this.isDraggable === true) { + // unregister on the global pointermove event + off(POINTERMOVE, this.pointerMove); + pool.push(this.grabOffset); + this.grabOffset = undefined; + } + this.release(event); + return this.onOut(event); + } + + /** + * function called when the pointer is leaving the object area + * @param {Pointer} event - the event object + */ + onOut(event) { // eslint-disable-line no-unused-vars + // to be extended + } + + /** + * function callback for the pointerup event + * @ignore + */ + release(event) { + if (this.released === false) { + this.released = true; + this.isDirty = true; + timer$1.clearTimeout(this.holdTimeout); + this.holdTimeout = -1; + return this.onRelease(event); + } + } + + /** + * function called when the object is pressed and released (to be extended) + * @returns {boolean} return false if we need to stop propagating the event + */ + onRelease() { + return true; + } + + /** + * function callback for the tap and hold timer event + * @ignore + */ + hold() { + timer$1.clearTimeout(this.holdTimeout); + this.holdTimeout = -1; + this.isDirty = true; + if (!this.released) { + this.onHold(); + } + } + + /** + * function called when the object is pressed and held
                            + * to be extended
                            + */ + onHold() {} + + /** + * function called when added to the game world or a container + * @ignore + */ + onActivateEvent() { + // register pointer events + registerPointerEvent("pointerdown", this, (e) => this.clicked(e)); + registerPointerEvent("pointerup", this, (e) => this.release(e)); + registerPointerEvent("pointercancel", this, (e) => this.release(e)); + registerPointerEvent("pointerenter", this, (e) => this.enter(e)); + registerPointerEvent("pointerleave", this, (e) => this.leave(e)); + + // call the parent function + super.onActivateEvent(); + } + + /** + * function called when removed from the game world or a container + * @ignore + */ + onDeactivateEvent() { + // release pointer events + releasePointerEvent("pointerdown", this); + releasePointerEvent("pointerup", this); + releasePointerEvent("pointercancel", this); + releasePointerEvent("pointerenter", this); + releasePointerEvent("pointerleave", this); + timer$1.clearTimeout(this.holdTimeout); + this.holdTimeout = -1; + + // unregister on the global pointermove event + // note: this is just a precaution, in case + // the object is being remove from his parent + // container before the leave function is called + if (this.isDraggable === true) { + off(POINTERMOVE, this.pointerMove); + if (typeof this.grabOffset !== "undefined") { + pool.push(this.grabOffset); + this.grabOffset = undefined; + } + } + + // call the parent function + super.onDeactivateEvent(); + } +} + +/** + * apply the current text style to the given context + * @ignore + */ +function setContextStyle(context, style) { + context.font = style.font; + context.fillStyle = style.fillStyle.toRGBA(); + context.strokeStyle = style.strokeStyle.toRGBA(); + context.lineWidth = style.lineWidth; + context.textAlign = style.textAlign; + context.textBaseline = style.textBaseline; +} + +/* +* ASCII Table +* http://www.asciitable.com/ +* [ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz] +* +* -> first char " " 32d (0x20); +*/ + +const runits = ["ex", "em", "pt", "px"]; +const toPX = [12, 24, 0.75, 1]; + +/** + * @classdesc + * a generic system font object. + * @augments Renderable + */ +class Text extends Renderable { + /** + * @param {number} x - position of the text object + * @param {number} y - position of the text object + * @param {object} settings - the text configuration + * @param {string} settings.font - a CSS family font name + * @param {number|string} settings.size - size, or size + suffix (px, em, pt) + * @param {Color|string} [settings.fillStyle="#000000"] - a CSS color value + * @param {Color|string} [settings.strokeStyle="#000000"] - a CSS color value + * @param {number} [settings.lineWidth=0] - line width, in pixels, when drawing stroke + * @param {string} [settings.textAlign="left"] - horizontal text alignment + * @param {string} [settings.textBaseline="top"] - the text baseline + * @param {number} [settings.lineHeight=1.0] - line spacing height + * @param {Vector2d} [settings.anchorPoint={x:0.0, y:0.0}] - anchor point to draw the text at + * @param {number} [settings.wordWrapWidth] - the maximum length in CSS pixel for a single segment of text + * @param {(string|string[])} [settings.text=""] - a string, or an array of strings + * @example + * let font = new me.Text(0, 0, {font: "Arial", size: 8, fillStyle: this.color}); + */ + constructor(x, y, settings) { + // call the parent constructor + super(x, y, settings.width || 0, settings.height || 0); + + /** + * defines the color used to draw the font. + * @type {Color} + * @default black + */ + this.fillStyle = pool.pull("Color", 0, 0, 0); + + /** + * defines the color used to draw the font stroke.
                            + * @type {Color} + * @default black + */ + this.strokeStyle = pool.pull("Color", 0, 0, 0); + + /** + * sets the current line width, in pixels, when drawing stroke + * @type {number} + * @default 0 + */ + this.lineWidth = 0; + + /** + * Set the default text alignment (or justification),
                            + * possible values are "left", "right", and "center".
                            + * @type {string} + * @default "left" + */ + this.textAlign = "left"; + + /** + * Set the text baseline (e.g. the Y-coordinate for the draw operation),
                            + * possible values are "top", "hanging, "middle, "alphabetic, "ideographic, "bottom"
                            + * @type {string} + * @default "top" + */ + this.textBaseline = "top"; + + /** + * Set the line spacing height (when displaying multi-line strings).
                            + * Current font height will be multiplied with this value to set the line height. + * @type {number} + * @default 1.0 + */ + this.lineHeight = 1.0; + + /** + * the maximum length in CSS pixel for a single segment of text. + * (use -1 to disable word wrapping) + * @type {number} + * @default -1 + */ + this.wordWrapWidth = -1; + + /** + * the font size (in px) + * @type {number} + * @default 10 + */ + this.fontSize = 10; + + /** + * the text to be displayed + * @private + */ + this._text = []; + + // initalize the object based on the given settings + this.onResetEvent(x, y, settings); + } + + /** @ignore */ + onResetEvent(x, y, settings) { + + if (typeof this.fillStyle === "undefined") { + this.fillStyle = pool.pull("Color", 0, 0, 0); + } + + if (typeof this.strokeStyle === "undefined") { + this.strokeStyle = pool.pull("Color", 0, 0, 0); + } + + if (typeof settings.fillStyle !== "undefined") { + if (settings.fillStyle instanceof Color) { + this.fillStyle.copy(settings.fillStyle); + } else { + // string (#RGB, #ARGB, #RRGGBB, #AARRGGBB) + this.fillStyle.parseCSS(settings.fillStyle); + } + } + + if (typeof settings.strokeStyle !== "undefined") { + if (settings.strokeStyle instanceof Color) { + this.strokeStyle.copy(settings.strokeStyle); + } else { + // string (#RGB, #ARGB, #RRGGBB, #AARRGGBB) + this.strokeStyle.parseCSS(settings.strokeStyle); + } + } + + this.lineWidth = settings.lineWidth || 0; + this.textAlign = settings.textAlign || "left"; + this.textBaseline = settings.textBaseline || "top"; + this.lineHeight = settings.lineHeight || 1.0; + this.wordWrapWidth = settings.wordWrapWidth || -1; + this.fontSize = 10; + + // anchor point + if (typeof settings.anchorPoint !== "undefined") { + this.anchorPoint.setV(settings.anchorPoint); + } else { + this.anchorPoint.set(0, 0); + } + + // if floating was specified through settings + if (typeof settings.floating !== "undefined") { + this.floating = !!settings.floating; + } + + // font name and type + this.setFont(settings.font, settings.size); + + // aditional + if (settings.bold === true) { + this.bold(); + } + if (settings.italic === true) { + this.italic(); + } + + // the canvas Texture used to render this text + // XXX: offscreenCanvas is currently disabled for text rendering due to issue in WebGL mode + this.canvasTexture = pool.pull("CanvasTexture", 2, 2, { offscreenCanvas: false }); + + // instance to text metrics functions + this.metrics = new TextMetrics(this); + + // set the text + this.setText(settings.text); + } + + /** + * make the font bold + * @returns {Text} this object for chaining + */ + bold() { + this.font = "bold " + this.font; + this.isDirty = true; + return this; + } + + /** + * make the font italic + * @returns {Text} this object for chaining + */ + italic() { + this.font = "italic " + this.font; + this.isDirty = true; + return this; + } + + /** + * set the font family and size + * @param {string} font - a CSS font name + * @param {number|string} [size=10] - size in px, or size + suffix (px, em, pt) + * @returns {Text} this object for chaining + * @example + * font.setFont("Arial", 20); + * font.setFont("Arial", "1.5em"); + */ + setFont(font, size = 10) { + // font name and type + let font_names = font.split(",").map((value) => { + value = value.trim(); + return ( + !/(^".*"$)|(^'.*'$)/.test(value) + ) ? "\"" + value + "\"" : value; + }); + + // font size + if (typeof size === "number") { + this.fontSize = size; + size += "px"; + } else /* string */ { + // extract the units and convert if necessary + let CSSval = size.match(/([-+]?[\d.]*)(.*)/); + this.fontSize = parseFloat(CSSval[1]); + if (CSSval[2]) { + this.fontSize *= toPX[runits.indexOf(CSSval[2])]; + } else { + // no unit define, assume px + size += "px"; + } + } + this.height = this.fontSize; + this.font = size + " " + font_names.join(","); + + this.isDirty = true; + + return this; + } + + /** + * change the text to be displayed + * @param {number|string|string[]} value - a string, or an array of strings + * @returns {Text} this object for chaining + */ + setText(value = "") { + let bounds = this.getBounds(); + + // set the next text + if (this._text.toString() !== value.toString()) { + if (!Array.isArray(value)) { + this._text = ("" + value).split("\n"); + } else { + this._text = value; + } + } + + // word wrap if necessary + if (this._text.length > 0 && this.wordWrapWidth > 0) { + this._text = this.metrics.wordWrap(this._text, this.wordWrapWidth, this.canvasTexture.context); + } + + // calculcate the text size and update the bounds accordingly + bounds.addBounds(this.metrics.measureText(this._text, this.canvasTexture.context), true); + + // update the offScreenCanvas texture if required + let width = Math.ceil(this.metrics.width), + height = Math.ceil(this.metrics.height); + + if (renderer.WebGLVersion === 1) { + // round size to next Pow2 + width = nextPowerOfTwo(this.metrics.width); + height = nextPowerOfTwo(this.metrics.height); + } + + // invalidate the texture + this.canvasTexture.invalidate(renderer); + + // resize the cache canvas if necessary + if (this.canvasTexture.width < width || this.canvasTexture.height < height) { + this.canvasTexture.resize(width, height); + } + + this.canvasTexture.clear(); + this._drawFont(this.canvasTexture.context, this._text, this.pos.x - this.metrics.x, this.pos.y - this.metrics.y); + + this.isDirty = true; + + return this; + } + + /** + * measure the given text size in pixels + * @param {CanvasRenderer|WebGLRenderer} renderer - reference to the active renderer + * @param {string} [text] - the text to be measured + * @returns {TextMetrics} a TextMetrics object defining the dimensions of the given piece of text + */ + measureText(renderer, text = this._text) { + return this.metrics.measureText(text, this.canvasTexture.context); + } + + + /** + * draw a text at the specified coord + * @param {CanvasRenderer|WebGLRenderer} renderer - Reference to the destination renderer instance + * @param {string} [text] + * @param {number} [x] + * @param {number} [y] + */ + draw(renderer, text, x = this.pos.x, y = this.pos.y) { + // "hacky patch" for backward compatibilty + if (typeof this.ancestor === "undefined") { + + // update position if changed + if (this.pos.x !== x || this.pos.y !== y) { + this.pos.x = x; + this.pos.y = y; + this.isDirty = true; + } + + // update text cache + this.setText(text); + + // save the previous context + renderer.save(); + + // apply the defined alpha value + renderer.setGlobalAlpha(renderer.globalAlpha() * this.getOpacity()); + + } + + // adjust x,y position based on the bounding box + x = this.metrics.x; + y = this.metrics.y; + + // clamp to pixel grid if required + if (renderer.settings.subPixel === false) { + x = ~~x; + y = ~~y; + } + + // draw the text + renderer.drawImage(this.canvasTexture.canvas, x, y); + + // for backward compatibilty + if (typeof this.ancestor === "undefined") { + // restore previous context + renderer.restore(); + } + } + + /** + * draw a stroke text at the specified coord, as defined by the `lineWidth` and `fillStroke` properties. + * @deprecated since 15.0.0 + * @param {CanvasRenderer|WebGLRenderer} renderer - Reference to the destination renderer instance + * @param {string} text + * @param {number} x + * @param {number} y + */ + drawStroke(renderer, text, x, y) { + this.draw(renderer, text, x, y); + } + + /** + * @ignore + */ + _drawFont(context, text, x, y) { + setContextStyle(context, this); + + for (let i = 0; i < text.length; i++) { + const string = text[i].trimEnd(); + // draw the string + if (this.fillStyle.alpha > 0) { + context.fillText(string, x, y); + } + // stroke the text + if (this.lineWidth > 0 && this.strokeStyle.alpha > 0) { + context.strokeText(string, x, y); + } + // add leading space + y += this.metrics.lineHeight(); + } + return this.metrics; + } + + /** + * Destroy function + * @ignore + */ + destroy() { + if (typeof renderer.gl !== "undefined") { + // make sure the right compositor is active + renderer.setCompositor("quad"); + renderer.currentCompositor.deleteTexture2D(renderer.currentCompositor.getTexture2D(this.glTextureUnit)); + this.glTextureUnit = undefined; + } + renderer.cache.delete(this.canvasTexture.canvas); + pool.push(this.canvasTexture); + this.canvasTexture = undefined; + pool.push(this.fillStyle); + pool.push(this.strokeStyle); + this.fillStyle = this.strokeStyle = undefined; + this.metrics = undefined; + this._text.length = 0; + super.destroy(); + } +} + +/** + * @classdesc + * a Text Metrics object that contains helper for text manipulation + * @augments Bounds + */ +class TextMetrics extends Bounds { + + /** + * @param {Text|BitmapText} ancestor - the parent object that contains this TextMetrics object + */ + constructor(ancestor) { + + // parent constructor + super(); + + /** + * a reference to the parent object that contains this TextMetrics object + * @public + * @type {Renderable} + * @default undefined + */ + this.ancestor = ancestor; + + this.setMinMax(0, 0, 0, 0); + } + + /** + * Returns the height of a segment of inline text in CSS pixels. + * @returns {number} the height of a segment of inline text in CSS pixels. + */ + lineHeight() { + if (this.ancestor instanceof Text) { + return this.ancestor.fontSize * this.ancestor.lineHeight; + } else { // it's a BitmapText + return this.ancestor.fontData.capHeight * this.ancestor.lineHeight * this.ancestor.fontScale.y; + } + } + + /** + * Returns the width of the given segment of inline text in CSS pixels. + * @param {string} text - the text to be measured + * @param {CanvasRenderingContext2D} [context] - reference to an active 2d context for canvas rendering + * @returns {number} the width of the given segment of inline text in CSS pixels. + */ + lineWidth(text, context) { + if (this.ancestor instanceof Text) { + return context.measureText(text).width; + } else { // it's a BitmapText + let characters = text.split(""); + const charactersLength = characters.length; + let width = 0; + let lastGlyph = null; + for (let i = 0; i < charactersLength; i++) { + let ch = characters[i].charCodeAt(0); + let glyph = this.ancestor.fontData.glyphs[ch]; + if (typeof glyph !== "undefined") { + let kerning = (lastGlyph && lastGlyph.kerning) ? lastGlyph.getKerning(ch) : 0; + width += (glyph.xadvance + kerning) * this.ancestor.fontScale.x; + lastGlyph = glyph; + } + } + return width; + } + } + + /** + * measure the given text size in CSS pixels + * @param {string} text - the text to be measured + * @param {CanvasRenderingContext2D} [context] - reference to an active 2d context for canvas rendering + * @returns {TextMetrics} this + */ + measureText(text, context) { + let strings; + + if (!Array.isArray(text)) { + strings = ("" + text).split("\n"); + } else { + strings = text; + } + + if (typeof context !== "undefined") { + // save the previous context + context.save(); + + // apply the style font + setContextStyle(context, this.ancestor); + } + + // compute the bounding box size + this.width = this.height = 0; + + for (let i = 0; i < strings.length; i++) { + this.width = Math.max(this.lineWidth(strings[i].trimEnd(), context), this.width); + this.height += this.lineHeight(); + } + this.width = Math.ceil(this.width); + this.height = Math.ceil(this.height); + + // compute the bounding box position + this.x = Math.floor((this.ancestor.textAlign === "right" ? this.ancestor.pos.x - this.width : ( + this.ancestor.textAlign === "center" ? this.ancestor.pos.x - (this.width / 2) : this.ancestor.pos.x + ))); + this.y = Math.floor((this.ancestor.textBaseline.search(/^(top|hanging)$/) === 0) ? this.ancestor.pos.y : ( + this.ancestor.textBaseline === "middle" ? this.ancestor.pos.y - (this.lineHeight() / 2) : this.ancestor.pos.y - this.lineHeight() + )); + + if (typeof context !== "undefined") { + // restore the context + context.restore(); + } + + return this; + } + + /** + * wrap the given text based on the given width + * @param {string|string[]} text - the text to be wrapped + * @param {number} width - maximum width of one segment of text in css pixel + * @param {CanvasRenderingContext2D} [context] - reference to an active 2d context for canvas rendering + * @returns {string[]} an array of string representing wrapped text + */ + wordWrap(text, width, context) { + let words; + let currentLine = ""; + let output = []; + + if (Array.isArray(text)) { + // join into a single string + text = text.join(" "); + } + // word splitting to be improved as it replaces \n by space if present + words = text.replace(/[\r\n]+/g, " ").split(" "); + + if (typeof context !== "undefined") { + // save the previous context + context.save(); + + // apply the style font + setContextStyle(context, this.ancestor); + } + + for (let i = 0; i < words.length; i++) { + let word = words[i]; + let lineWidth = this.lineWidth(currentLine + word + " ", context); + if (lineWidth < width) { + // add the word to the current line + currentLine += word + " "; + } else { + output.push(currentLine + "\n"); + currentLine = word + " "; + } + } + // last line + output.push(currentLine); + + if (typeof context !== "undefined") { + // restore the context + context.restore(); + } + + return output; + } +} + +/** + * @classdesc + * a bitmap font object + * @augments Renderable + */ +class BitmapText extends Renderable { + /** + * @param {number} x - position of the text object + * @param {number} y - position of the text object + * @param {object} settings - the text configuration + * @param {string|Image} settings.font - a font name to identify the corresponing source image + * @param {string} [settings.fontData=settings.font] - the bitmap font data corresponding name, or the bitmap font data itself + * @param {number} [settings.size] - size a scaling ratio + * @param {Color|string} [settings.fillStyle] - a CSS color value used to tint the bitmapText (@see BitmapText.tint) + * @param {number} [settings.lineWidth=1] - line width, in pixels, when drawing stroke + * @param {string} [settings.textAlign="left"] - horizontal text alignment + * @param {string} [settings.textBaseline="top"] - the text baseline + * @param {number} [settings.lineHeight=1.0] - line spacing height + * @param {Vector2d} [settings.anchorPoint={x:0.0, y:0.0}] - anchor point to draw the text at + * @param {number} [settings.wordWrapWidth] - the maximum length in CSS pixel for a single segment of text + * @param {(string|string[])} [settings.text] - a string, or an array of strings + * @example + * // Use me.loader.preload or me.loader.load to load assets + * me.loader.preload([ + * { name: "arial", type: "binary" src: "data/font/arial.fnt" }, + * { name: "arial", type: "image" src: "data/font/arial.png" }, + * ]) + * // Then create an instance of your bitmap font: + * let myFont = new me.BitmapText(x, y, {font:"arial", text:"Hello"}); + * // two possibilities for using "myFont" + * // either call the draw function from your Renderable draw function + * myFont.draw(renderer, "Hello!", 0, 0); + * // or just add it to the word container + * me.game.world.addChild(myFont); + */ + constructor(x, y, settings) { + // call the parent constructor + super(x, y, settings.width || 0, settings.height || 0); + + /** + * Set the default text alignment (or justification),
                            + * possible values are "left", "right", and "center". + * @public + * @type {string} + * @default "left" + */ + this.textAlign = settings.textAlign || "left"; + + /** + * Set the text baseline (e.g. the Y-coordinate for the draw operation),
                            + * possible values are "top", "hanging, "middle, "alphabetic, "ideographic, "bottom"
                            + * @public + * @type {string} + * @default "top" + */ + this.textBaseline = settings.textBaseline || "top"; + + /** + * Set the line spacing height (when displaying multi-line strings).
                            + * Current font height will be multiplied with this value to set the line height. + * @public + * @type {number} + * @default 1.0 + */ + this.lineHeight = settings.lineHeight || 1.0; + + /** + * the maximum length in CSS pixel for a single segment of text. + * (use -1 to disable word wrapping) + * @public + * @type {number} + * @default -1 + */ + this.wordWrapWidth = settings.wordWrapWidth || -1; + + /** + * the text to be displayed + * @private + */ + this._text = []; + + /** + * scaled font size + * @private + */ + this.fontScale = pool.pull("Vector2d", 1.0, 1.0); + + /** + * font image + * @private + */ + this.fontImage = (typeof settings.font === "object") ? settings.font : getImage(settings.font); + + if (typeof settings.fontData !== "string") { + /** + * font data + * @private + */ + // use settings.font to retreive the data from the loader + this.fontData = pool.pull("BitmapTextData", getBinary(settings.font)); + } else { + this.fontData = pool.pull("BitmapTextData", + // if starting/includes "info face" the whole data string was passed as parameter + (settings.fontData.includes("info face")) ? settings.fontData : getBinary(settings.fontData) + ); + } + + // if floating was specified through settings + if (typeof settings.floating !== "undefined") { + this.floating = !!settings.floating; + } + + // apply given fillstyle + if (typeof settings.fillStyle !== "undefined") { + this.fillStyle = settings.fillStyle; + } + + // update anchorPoint if provided + if (typeof settings.anchorPoint !== "undefined") { + this.anchorPoint.set(settings.anchorPoint.x, settings.anchorPoint.y); + } else { + this.anchorPoint.set(0, 0); + } + + // instance to text metrics functions + this.metrics = new TextMetrics(this); + + // resize if necessary + if (typeof settings.size === "number" && settings.size !== 1.0) { + this.resize(settings.size); + } + + // set the text + this.setText(settings.text); + } + + /** + * change the font settings + * @param {string} textAlign - ("left", "center", "right") + * @param {number} [scale] + * @returns {BitmapText} this object for chaining + */ + set(textAlign, scale) { + this.textAlign = textAlign; + // updated scaled Size + if (scale) { + this.resize(scale); + } + this.isDirty = true; + + return this; + } + + /** + * change the text to be displayed + * @param {number|string|string[]} value - a string, or an array of strings + * @returns {BitmapText} this object for chaining + */ + setText(value = "") { + if (this._text.toString() !== value.toString()) { + if (!Array.isArray(value)) { + this._text = ("" + value).split("\n"); + } else { + this._text = value; + } + this.isDirty = true; + } + + if (this._text.length > 0 && this.wordWrapWidth > 0) { + this._text = this.metrics.wordWrap(this._text, this.wordWrapWidth); + } + + this.updateBounds(); + + return this; + } + + /** + * update the bounding box for this Bitmap Text. + * @param {boolean} [absolute=true] - update the bounds size and position in (world) absolute coordinates + * @returns {Bounds} this Bitmap Text bounding box Rectangle object + */ + updateBounds(absolute = true) { + let bounds = this.getBounds(); + + bounds.clear(); + + if (typeof this.metrics !== "undefined") { + let ax, ay; + + bounds.addBounds(this.metrics.measureText(this._text)); + + switch (this.textAlign) { + case "right": + ax = this.metrics.width * 1.0; + break; + + case "center": + ax = this.metrics.width * 0.5; + break; + + default : + ax = 0; //this.metrics.width * 0.0; + break; + } + + // adjust y pos based on alignment value + switch (this.textBaseline) { + case "middle": + ay = this.metrics.height * 0.5; + break; + + case "ideographic": + case "alphabetic": + case "bottom": + ay = this.metrics.height * 1.0; + break; + + default : + ay = 0; //this.metrics.height * 0.0; + break; + } + + // translate the bounds accordingly + bounds.translate(ax, ay); + } + + if (absolute === true) { + if (typeof this.ancestor !== "undefined" && typeof this.ancestor.getAbsolutePosition === "function" && this.floating !== true) { + bounds.translate(this.ancestor.getAbsolutePosition()); + } + } + + return bounds; + } + + /** + * defines the color used to tint the bitmap text + * @public + * @type {Color} + * @see Renderable#tint + */ + get fillStyle() { + return this.tint; + } + set fillStyle(value) { + if (value instanceof Color) { + this.tint.copy(value); + } else { + // string (#RGB, #ARGB, #RRGGBB, #AARRGGBB) + this.tint.parseCSS(value); + } + } + + /** + * change the font display size + * @param {number} scale - ratio + * @returns {BitmapText} this object for chaining + */ + resize(scale) { + this.fontScale.set(scale, scale); + + this.updateBounds(); + + this.isDirty = true; + + return this; + } + + /** + * measure the given text size in pixels + * @param {string} [text] + * @returns {TextMetrics} a TextMetrics object with two properties: `width` and `height`, defining the output dimensions + */ + measureText(text = this._text) { + return this.metrics.measureText(text); + } + + /** + * draw the bitmap font + * @param {CanvasRenderer|WebGLRenderer} renderer - Reference to the destination renderer instance + * @param {string} [text] + * @param {number} [x] + * @param {number} [y] + */ + draw(renderer, text, x, y) { + // save the previous global alpha value + let _alpha = renderer.globalAlpha(); + + // allows to provide backward compatibility when + // adding Bitmap Font to an object container + if (typeof this.ancestor === "undefined") { + // update cache + this.setText(text); + renderer.setGlobalAlpha(_alpha * this.getOpacity()); + } else { + // added directly to an object container + x = this.pos.x; + y = this.pos.y; + } + + let lX = x; + let stringHeight = this.metrics.lineHeight(); + let maxWidth = 0; + + for (let i = 0; i < this._text.length; i++) { + x = lX; + const string = this._text[i].trimEnd(); + // adjust x pos based on alignment value + let stringWidth = this.metrics.lineWidth(string); + switch (this.textAlign) { + case "right": + x -= stringWidth; + break; + + case "center": + x -= stringWidth * 0.5; + break; + + default : + break; + } + + // adjust y pos based on alignment value + switch (this.textBaseline) { + case "middle": + y -= stringHeight * 0.5; + break; + + case "ideographic": + case "alphabetic": + case "bottom": + y -= stringHeight; + break; + + default : + break; + } + + // update initial position if required + if (this.isDirty === true && typeof this.ancestor === "undefined") { + if (i === 0) { + this.pos.y = y; + } + if (maxWidth < stringWidth) { + maxWidth = stringWidth; + this.pos.x = x; + } + } + + // draw the string + let lastGlyph = null; + for (let c = 0, len = string.length; c < len; c++) { + // calculate the char index + let ch = string.charCodeAt(c); + let glyph = this.fontData.glyphs[ch]; + + if (typeof glyph !== "undefined") { + let glyphWidth = glyph.width; + let glyphHeight = glyph.height; + let kerning = (lastGlyph && lastGlyph.kerning) ? lastGlyph.getKerning(ch) : 0; + let scaleX = this.fontScale.x; + let scaleY = this.fontScale.y; + + // draw it + if (glyphWidth !== 0 && glyphHeight !== 0) { + // some browser throw an exception when drawing a 0 width or height image + renderer.drawImage(this.fontImage, + glyph.x, glyph.y, + glyphWidth, glyphHeight, + x + glyph.xoffset * scaleX, + y + glyph.yoffset * scaleY, + glyphWidth * scaleX, glyphHeight * scaleY + ); + } + + // increment position + x += (glyph.xadvance + kerning) * scaleX; + lastGlyph = glyph; + } else { + console.warn("BitmapText: no defined Glyph in for " + String.fromCharCode(ch)); + } + } + // increment line + y += stringHeight; + } + + if (typeof this.ancestor === "undefined") { + // restore the previous global alpha value + renderer.setGlobalAlpha(_alpha); + } + + // clear the dirty flag here for + // backward compatibility + this.isDirty = false; + } + + /** + * Destroy function + * @ignore + */ + destroy() { + pool.push(this.fontScale); + this.fontScale = undefined; + pool.push(this.fontData); + this.fontData = undefined; + this._text.length = 0; + this.metrics = undefined; + super.destroy(); + } + +} + +/** + * @classdesc + * This is a basic base text button which you can use in your Game UI. + * @augments UIBaseElement + */ +class UITextButton extends UIBaseElement { + /** + * A Bitmap Text Button with an outlined background border, filled with background color. + * It uses a RoundRect as background and changes the background color on hovering over. + * The background will be drawn with 0.5 opacity, so that the background of the button is + * slightly shining through. + * @param {number} x - x pos of the button + * @param {number} y - y pos of the button + * @param {string} [settings.font] - The name of the BitmapText font to use + * @param {number} [settings.size=1] - The scale factor of the BitmapText + * @param {string} [settings.text] - The text to display + * @param {string} [settings.bindKey] - The key to bind the action to (default: none) + * @param {string} [settings.hoverOffColor="#00aa0080"] - The css value of a color to be used if the pointer is not hovering over the button + * @param {string} [settings.hoverOnColor="#00ff00ff"] - The css value of a color to be used if the pointer hovers over the button + * @param {string} [settings.borderStrokeColor="#000000"] - The css value of a color to be used to draw the border + * @param {string} [settings.fillStyle] - The css value of a tint color to be used to tint the BitmapText + * @param {string} [settings.textAlign="center"] - horizontal text alignment + * @param {string} [settings.textBaseline="middle"] - the text baseline + * @param {number} [settings.borderWidth] - Width of the button + * @param {number} [settings.borderHeight] - Height of the button + * @example + * // Create a new Button + * class PlayButton extends UITextButton { + * constructor(x,y) { + * super(x,y, { + * font: 'my-font', + * text: 'Play', + * // if you omit the next two, size is calculated by the size of the text + * borderWidth: 200, + * borderHeight: 20, + * backgroundColor: '#00aa0080', + * hoverColor: '#00ff00ff' + * }); + * } + * + * onClick(){ + * state.change(state.PLAY); + * } + * } + * + * world.addChild(new PlayButton(15,200)); + */ + constructor(x, y, settings) { + super(x, y); + + /** + * The key to bind the action to + * @type {string} + */ + this.bindKey = settings.bindKey || -1; + + /** + * The css value of a color to be used if the pointer is nothovering over the button + * @type {string} + */ + // keep settings.backgroundColor for backward compatibility + this.hoverOffColor = settings.hoverOffColor || settings.backgroundColor || "#00aa0080"; + + /** + * The css value of a color to be used if the pointer hovers over the button + * @type {string} + */ + // keep settings.hoverColor for backward compatibility + this.hoverOnColor = settings.hoverOnColor || settings.hoverColor || "#00ff00ff"; + + /** + * The css value of a color to be used to draw the border + * @type {string} + */ + this.borderStrokeColor = settings.borderStrokeColor || "#000000"; + + /** + * Set the default text alignment (or justification),
                            + * possible values are "left", "right", and "center". + * @public + * @type {string} + * @default "center" + */ + this.textAlign = settings.textAlign = settings.textAlign || "center"; + + /** + * Set the text baseline (e.g. the Y-coordinate for the draw operation),
                            + * possible values are "top", "hanging, "middle, "alphabetic, "ideographic, "bottom"
                            + * @public + * @type {string} + * @default "middle" + */ + this.textBaseline = settings.textBaseline = settings.textBaseline || "middle"; + + /** + * the bitmapText used by the UITextButton class + * @type {BitmapText} + */ + this.bitmapText = new BitmapText(0, 0, settings); + + // "detect" the button size + this.dimensions = this.bitmapText.measureText(); + settings.borderWidth = settings.borderWidth || this.dimensions.width + 16; + settings.borderHeight = settings.borderHeight || this.dimensions.height + 16; + + // create the round rect button + this.border = new RoundRect(x, y, settings.borderWidth, settings.borderHeight); + + // resize the container accordingly + this.resize( + this.border.getBounds().width, + this.border.getBounds().height + ); + + // adjust size position + this.bitmapText.pos.set(this.width / 2, this.height / 2); + + // add bitmapText to the UI container + this.addChild(this.bitmapText); + } + + draw(renderer) { + if (this.hover === true) { + renderer.setColor(this.hoverOnColor); + } else { + renderer.setColor(this.hoverOffColor); + } + renderer.fill(this.border); + renderer.setColor(this.borderStrokeColor); + renderer.stroke(this.border); + super.draw(renderer); + } +} + +/** + * @classdesc + * This is a basic sprite based button which you can use in your Game UI. + * @augments Sprite + */ +class UISpriteElement extends Sprite { + /** + * @param {number} x - the x coordinate of the UISpriteElement Object + * @param {number} y - the y coordinate of the UISpriteElement Object + * @param {object} settings - See {@link Sprite} + * @example + * // create a basic GUI Object + * class myButton extends UISpriteElement { + * constructor(x, y) { + * // call the UISpriteElement parent constructor + * super(x, y, { + * image: "button", + * framewidth: 100, + * frameheight: 50 + * }); + * } + * + * // output something in the console + * // when the object is clicked + * onClick(event) { + * console.log("clicked!"); + * // don't propagate the event + * return false; + * } + * }); + * + * // add the object at pos (10,10) + * world.addChild(new myButton(10,10)); + */ + constructor(x, y, settings) { + + // call the parent constructor + super(x, y, settings); + + /** + * object can be clicked or not + * @type {boolean} + * @default true + */ + this.isClickable = true; + + /** + * Tap and hold threshold timeout in ms + * @type {number} + * @default 250 + */ + this.holdThreshold = 250; + + /** + * object can be tap and hold + * @type {boolean} + * @default false + */ + this.isHoldable = false; + + /** + * true if the pointer is over the object + * @type {boolean} + * @default false + */ + this.hover = false; + + // object has been updated (clicked,etc..) + this.holdTimeout = -1; + this.released = true; + + /** + * if this UISpriteElement should use screen coordinates or local coordinates + * (Note: any UISpriteElement elements added to a floating parent container should have their floating property to false) + * @see Renderable.floating + * @type {boolean} + * @default true + */ + this.floating = true; + + // enable event detection + this.isKinematic = false; + } + + /** + * function callback for the pointerdown event + * @ignore + */ + clicked(event) { + // Check if left mouse button is pressed + if (event.button === 0 && this.isClickable) { + this.isDirty = true; + this.released = false; + if (this.isHoldable) { + timer$1.clearTimeout(this.holdTimeout); + this.holdTimeout = timer$1.setTimeout(() => this.hold(), this.holdThreshold, false); + this.released = false; + } + return this.onClick(event); + } + } + + /** + * function called when the object is pressed (to be extended) + * @param {Pointer} event - the event object + * @returns {boolean} return false if we need to stop propagating the event + */ + onClick(event) { // eslint-disable-line no-unused-vars + return false; + } + + /** + * function callback for the pointerEnter event + * @ignore + */ + enter(event) { + this.hover = true; + this.isDirty = true; + return this.onOver(event); + } + + /** + * function called when the pointer is over the object + * @param {Pointer} event - the event object + */ + onOver(event) { // eslint-disable-line no-unused-vars + // to be extended + } + + /** + * function callback for the pointerLeave event + * @ignore + */ + leave(event) { + this.hover = false; + this.isDirty = true; + this.release(event); + return this.onOut(event); + } + + /** + * function called when the pointer is leaving the object area + * @param {Pointer} event - the event object + */ + onOut(event) { // eslint-disable-line no-unused-vars + // to be extended + } + + /** + * function callback for the pointerup event + * @ignore + */ + release(event) { + if (this.released === false) { + this.released = true; + this.isDirty = true; + timer$1.clearTimeout(this.holdTimeout); + this.holdTimeout = -1; + return this.onRelease(event); + } + } + + /** + * function called when the object is pressed and released (to be extended) + * @returns {boolean} return false if we need to stop propagating the event + */ + onRelease() { + return false; + } + + /** + * function callback for the tap and hold timer event + * @ignore + */ + hold() { + timer$1.clearTimeout(this.holdTimeout); + this.holdTimeout = -1; + this.isDirty = true; + if (!this.released) { + this.onHold(); + } + } + + /** + * function called when the object is pressed and held
                            + * to be extended
                            + */ + onHold() { + } + + /** + * function called when added to the game world or a container + * @ignore + */ + onActivateEvent() { + // register pointer events + registerPointerEvent("pointerdown", this, (e) => this.clicked(e)); + registerPointerEvent("pointerup", this, (e) => this.release(e)); + registerPointerEvent("pointercancel", this, (e) => this.release(e)); + registerPointerEvent("pointerenter", this, (e) => this.enter(e)); + registerPointerEvent("pointerleave", this, (e) => this.leave(e)); + } + + /** + * function called when removed from the game world or a container + * @ignore + */ + onDeactivateEvent() { + // release pointer events + releasePointerEvent("pointerdown", this); + releasePointerEvent("pointerup", this); + releasePointerEvent("pointercancel", this); + releasePointerEvent("pointerenter", this); + releasePointerEvent("pointerleave", this); + timer$1.clearTimeout(this.holdTimeout); + this.holdTimeout = -1; + } +} + +/** + * @classdesc + * a basic collectable helper class for immovable object (e.g. a coin) + * @augments Sprite + */ +class Collectable extends Sprite { + /** + * @param {number} x - the x coordinates of the collectable + * @param {number} y - the y coordinates of the collectable + * @param {object} settings - See {@link Sprite} + */ + constructor(x, y, settings) { + + // call the super constructor + super(x, y, settings); + + this.name = settings.name; + this.type = settings.type; + this.id = settings.id; + + // add and configure the physic body + let shape = settings.shapes; + if (typeof shape === "undefined") { + shape = pool.pull("Polygon", 0, 0, [ + pool.pull("Vector2d", 0, 0), + pool.pull("Vector2d", this.width, 0), + pool.pull("Vector2d", this.width, this.height) + ]); + } + this.body = new Body(this, shape); + this.body.collisionType = collision.types.COLLECTABLE_OBJECT; + // by default only collides with PLAYER_OBJECT + this.body.setCollisionMask(collision.types.PLAYER_OBJECT); + this.body.setStatic(true); + + // Update anchorPoint + if (settings.anchorPoint) { + this.anchorPoint.set(settings.anchorPoint.x, settings.anchorPoint.y); + } else { + // for backward compatibility + this.anchorPoint.set(0, 0); + } + + } + +} + +/** + * @classdesc + * trigger an event when colliding with another object + * @augments Renderable + */ +class Trigger extends Renderable { + /** + * @param {number} x - the x coordinates of the trigger area + * @param {number} y - the y coordinates of the trigger area + * @param {number} [settings.width] - width of the trigger area + * @param {number} [settings.height] - height of the trigger area + * @param {Rect[]|Polygon[]|Line[]|Ellipse[]} [settings.shapes] - collision shape(s) that will trigger the event + * @param {string} [settings.duration] - Fade duration (in ms) + * @param {string|Color} [settings.color] - Fade color + * @param {string} [settings.event="level"] - the type of event to trigger (only "level" supported for now) + * @param {string} [settings.to] - level to load if level trigger + * @param {string|Container} [settings.container] - Target container. See {@link level.load} + * @param {Function} [settings.onLoaded] - Level loaded callback. See {@link level.load} + * @param {boolean} [settings.flatten] - Flatten all objects into the target container. See {@link level.load} + * @param {boolean} [settings.setViewportBounds] - Resize the viewport to match the level. See {@link level.load} + * @example + * world.addChild(new me.Trigger( + * x, y, { + * shapes: [new me.Rect(0, 0, 100, 100)], + * "duration" : 250, + * "color" : "#000", + * "to" : "mymap2" + * } + * )); + */ + constructor(x, y, settings) { + // call the parent constructor + super(x, y, settings.width || 0, settings.height || 0); + + // for backward compatibility + this.anchorPoint.set(0, 0); + + this.fade = settings.fade; + this.duration = settings.duration; + this.fading = false; + + // Tiled Settings + this.name = "Trigger"; + this.type = settings.type; + this.id = settings.id; + + // a temp variable + this.gotolevel = settings.to; + + // Collect the defined trigger settings + this.triggerSettings = { + // the default (and only for now) action + event: "level" + }; + + [ "type", "container", "onLoaded", "flatten", "setViewportBounds", "to" ].forEach((property) => { + if (typeof settings[property] !== "undefined") { + this.triggerSettings[property] = settings[property]; + } + }); + + // add and configure the physic body + let shape = settings.shapes; + if (typeof shape === "undefined") { + shape = pool.pull("Polygon", 0, 0, [ + pool.pull("Vector2d", 0, 0), + pool.pull("Vector2d", this.width, 0), + pool.pull("Vector2d", this.width, this.height) + ]); + } + this.body = new Body(this, shape); + this.body.collisionType = collision.types.ACTION_OBJECT; + // by default only collides with PLAYER_OBJECT + this.body.setCollisionMask(collision.types.PLAYER_OBJECT); + this.body.setStatic(true); + this.resize(this.body.getBounds().width, this.body.getBounds().height); + } + + /** + * @ignore + */ + getTriggerSettings() { + let world = this.ancestor.getRootAncestor(); + // Lookup for the container instance + if (typeof(this.triggerSettings.container) === "string") { + this.triggerSettings.container = world.getChildByName(this.triggerSettings.container)[0]; + } + return this.triggerSettings; + } + + /** + * @ignore + */ + onFadeComplete() { + let world = this.ancestor.getRootAncestor(); + level.load(this.gotolevel, this.getTriggerSettings()); + world.app.viewport.fadeOut(this.fade, this.duration); + } + + /** + * trigger this event + * @name triggerEvent + * @memberof Trigger + * @protected + */ + triggerEvent() { + let triggerSettings = this.getTriggerSettings(); + let world = this.ancestor.getRootAncestor(); + + if (triggerSettings.event === "level") { + this.gotolevel = triggerSettings.to; + // load a level + //console.log("going to : ", to); + if (this.fade && this.duration) { + if (!this.fading) { + this.fading = true; + world.app.viewport.fadeIn(this.fade, this.duration, + () => this.onFadeComplete()); + } + } else { + level.load(this.gotolevel, triggerSettings); + } + } else { + throw new Error("Trigger invalid type"); + } + } + + /** + * onCollision callback, triggered in case of collision with this trigger + * @name onCollision + * @memberof Trigger + * @param {ResponseObject} response - the collision response object + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} other - the other renderable touching this one (a reference to response.a or response.b) + * @returns {boolean} true if the object should respond to the collision (its position and velocity will be corrected) + */ + onCollision(response, other) { // eslint-disable-line no-unused-vars + if (this.name === "Trigger") { + this.triggerEvent.apply(this); + } + return false; + } + +} + +/** @ignore */ +function createGradient(light) { + let context = light.texture.context; + + let x1 = light.texture.width / 2, + y1 = light.texture.height / 2; + + let radiusX = light.radiusX, + radiusY = light.radiusY; + + let scaleX, scaleY, invScaleX, invScaleY; + let gradient; + + + light.texture.clear(); + + if (radiusX >= radiusY) { + scaleX = 1; + invScaleX = 1; + scaleY = radiusY/radiusX; + invScaleY = radiusX/radiusY; + gradient = context.createRadialGradient(x1, y1 * invScaleY, 0, x1, radiusY * invScaleY, radiusX); + } + else { + scaleY = 1; + invScaleY = 1; + scaleX = radiusX/radiusY; + invScaleX = radiusY/radiusX; + gradient = context.createRadialGradient(x1 * invScaleX, y1, 0, x1 * invScaleX, y1, radiusY); + } + + gradient.addColorStop( 0, light.color.toRGBA(light.intensity)); + gradient.addColorStop( 1, light.color.toRGBA(0.0)); + + context.fillStyle = gradient; + + context.setTransform(scaleX, 0, 0, scaleY, 0, 0); + context.fillRect(0, 0, light.texture.width * invScaleX, light.texture.height * invScaleY); +} + +/** + * @classdesc + * A 2D point light. + * Note: this is a very experimental and work in progress feature, that provides a simple spot light effect. + * The light effect is best rendered in WebGL, as they are few limitations when using the Canvas Renderer + * (multiple lights are not supported, alpha component of the ambient light is ignored) + * @see stage.lights + */ +class Light2d extends Renderable { + /** + * @param {number} x - The horizontal position of the light. + * @param {number} y - The vertical position of the light. + * @param {number} radiusX - The horizontal radius of the light. + * @param {number} [radiusY=radiusX] - The vertical radius of the light. + * @param {Color|string} [color="#FFF"] - the color of the light + * @param {number} [intensity=0.7] - The intensity of the light. + */ + constructor(x, y, radiusX, radiusY = radiusX, color = "#FFF", intensity = 0.7) { + // call the parent constructor + super(x, y, radiusX * 2, radiusY * 2); + + /** + * the color of the light + * @type {Color} + * @default "#FFF" + */ + this.color = pool.pull("Color").parseCSS(color); + + /** + * The horizontal radius of the light + * @type {number} + */ + this.radiusX = radiusX; + + /** + * The vertical radius of the light + * @type {number} + */ + this.radiusY = radiusY; + + /** + * The intensity of the light + * @type {number} + * @default 0.7 + */ + this.intensity = intensity; + + /** + * the default blend mode to be applied when rendering this light + * @type {string} + * @default "lighter" + * @see CanvasRenderer#setBlendMode + * @see WebGLRenderer#setBlendMode + */ + this.blendMode = "lighter"; + + /** @ignore */ + this.visibleArea = pool.pull("Ellipse", this.centerX, this.centerY, this.width, this.height); + + /** @ignore */ + this.texture = pool.pull("CanvasTexture", this.width, this.height, { offscreenCanvas: false }); + + this.anchorPoint.set(0, 0); + + createGradient(this); + } + + /** + * returns a geometry representing the visible area of this light + * @name getVisibleArea + * @memberof Light2d + * @returns {Ellipse} the light visible mask + */ + getVisibleArea() { + return this.visibleArea.setShape(this.getBounds().centerX, this.getBounds().centerY, this.width, this.height); + } + + /** + * draw this Light2d (automatically called by melonJS) + * @name draw + * @memberof Light2d + * @protected + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance + * @param {Camera2d} [viewport] - the viewport to (re)draw + */ + draw(renderer, viewport) { // eslint-disable-line no-unused-vars + renderer.drawImage(this.texture.canvas, this.getBounds().x, this.getBounds().y); + } + + /** + * Destroy function
                            + * @ignore + */ + destroy() { + pool.push(this.color); + this.color = undefined; + pool.push(this.texture); + this.texture = undefined; + pool.push(this.visibleArea); + this.visibleArea = undefined; + super.destroy(); + } +} + +// bitmap constants +const LOG2_PAGE_SIZE = 9; +const PAGE_SIZE = 1 << LOG2_PAGE_SIZE; + +/** + * a glyph representing a single character in a font + * @ignore + */ +class Glyph { + /** + * @ignore + */ + constructor() { + this.id = 0; + this.x = 0; + this.y = 0; + this.width = 0; + this.height = 0; + this.u = 0; + this.v = 0; + this.u2 = 0; + this.v2 = 0; + this.xoffset = 0; + this.yoffset = 0; + this.xadvance = 0; + this.fixedWidth = false; + } + + /** + * @ignore + */ + getKerning(ch) { + if (this.kerning) { + let page = this.kerning[ch >>> LOG2_PAGE_SIZE]; + if (page) { + return page[ch & PAGE_SIZE - 1] || 0; + } + } + return 0; + } + + /** + * @ignore + */ + setKerning(ch, value) { + if (!this.kerning) { + this.kerning = {}; + } + let page = this.kerning[ch >>> LOG2_PAGE_SIZE]; + if (typeof page === "undefined") { + this.kerning[ch >>> LOG2_PAGE_SIZE] = {}; + page = this.kerning[ch >>> LOG2_PAGE_SIZE]; + } + page[ch & PAGE_SIZE - 1] = value; + } +} + +// bitmap constants +const capChars = ["M", "N", "B", "D", "C", "E", "F", "K", "A", "G", "H", "I", "J", "L", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; + +/** + * Gets the value from a string of pairs. + * @ignore + */ +function getValueFromPair(string, pattern) { + let value = string.match(pattern); + if (!value) { + throw new Error("Could not find pattern " + pattern + " in string: " + string); + } + + return value[0].split("=")[1]; +} + +/** + * Gets the first glyph in the map that is not a space character + * @ignore + * @name _getFirstGlyph + * @memberof BitmapTextData + * @param {object} glyphs - the map of glyphs, each key is a char code + * @returns {Glyph} + */ +function getFirstGlyph(glyphs) { + let keys = Object.keys(glyphs); + for (let i = 0; i < keys.length; i++) { + if (keys[i] > 32) { + return glyphs[keys[i]]; + } + } + return null; +} + +/** + * Creates a glyph to use for the space character + * @ignore + * @name createSpaceGlyph + * @memberof BitmapTextData + * @param {object} glyphs - the map of glyphs, each key is a char code + */ +function createSpaceGlyph(glyphs) { + let spaceCharCode = " ".charCodeAt(0); + let glyph = glyphs[spaceCharCode]; + if (!glyph) { + glyph = new Glyph(); + glyph.id = spaceCharCode; + glyph.xadvance = getFirstGlyph(glyphs).xadvance; + glyphs[spaceCharCode] = glyph; + } +} + +/** + * Class for storing relevant data from the font file. + * @ignore + */ +class BitmapTextData { + + /** + * @param {string} data - The bitmap font data pulled from the resource loader using me.loader.getBinary() + */ + constructor(data) { + this.onResetEvent(data); + } + + /** + * @ignore + */ + onResetEvent(data) { + this.padTop = 0; + this.padRight = 0; + this.padBottom = 0; + this.padLeft = 0; + this.lineHeight = 0; + // The distance from the top of most uppercase characters to the baseline. Since the drawing position is the cap height of + // the first line, the cap height can be used to get the location of the baseline. + this.capHeight = 1; + // The distance from the bottom of the glyph that extends the lowest to the baseline. This number is negative. + this.descent = 0; + + /** + * The map of glyphs, each key is a char code. + * @name glyphs + * @type {object} + * @memberof BitmapTextData + */ + this.glyphs = {}; + + // parse the data + this.parse(data); + } + + /** + * This parses the font data text and builds a map of glyphs containing the data for each character + * @name parse + * @memberof BitmapTextData + * @param {string} fontData + */ + parse(fontData) { + if (!fontData) { + throw new Error("File containing font data was empty, cannot load the bitmap font."); + } + let lines = fontData.split(/\r\n|\n/); + let padding = fontData.match(/padding\=\d+,\d+,\d+,\d+/g); + if (!padding) { + throw new Error("Padding not found in first line"); + } + let paddingValues = padding[0].split("=")[1].split(","); + this.padTop = parseFloat(paddingValues[0]); + this.padLeft = parseFloat(paddingValues[1]); + this.padBottom = parseFloat(paddingValues[2]); + this.padRight = parseFloat(paddingValues[3]); + + this.lineHeight = parseFloat(getValueFromPair(lines[1], /lineHeight\=\d+/g)); + + let baseLine = parseFloat(getValueFromPair(lines[1], /base\=\d+/g)); + let padY = this.padTop + this.padBottom; + let glyph = null; + + + for (let i = 4; i < lines.length; i++) { + let line = lines[i]; + let characterValues = line.split(/=|\s+/); + if (!line || /^kernings/.test(line)) { + continue; + } + if (/^kerning\s/.test(line)) { + let first = parseFloat(characterValues[2]); + let second = parseFloat(characterValues[4]); + let amount = parseFloat(characterValues[6]); + + glyph = this.glyphs[first]; + if (glyph !== null && typeof glyph !== "undefined") { + glyph.setKerning(second, amount); + } + } else { + glyph = new Glyph(); + + let ch = parseFloat(characterValues[2]); + glyph.id = ch; + glyph.x = parseFloat(characterValues[4]); + glyph.y = parseFloat(characterValues[6]); + glyph.width = parseFloat(characterValues[8]); + glyph.height = parseFloat(characterValues[10]); + glyph.xoffset = parseFloat(characterValues[12]); + glyph.yoffset = parseFloat(characterValues[14]); + glyph.xadvance = parseFloat(characterValues[16]); + + if (glyph.width > 0 && glyph.height > 0) { + this.descent = Math.min(baseLine + glyph.yoffset, this.descent); + } + + this.glyphs[ch] = glyph; + } + } + + this.descent += this.padBottom; + + createSpaceGlyph(this.glyphs); + + let capGlyph = null; + for (let i = 0; i < capChars.length; i++) { + let capChar = capChars[i]; + capGlyph = this.glyphs[capChar.charCodeAt(0)]; + if (capGlyph) { + break; + } + } + if (!capGlyph) { + for (let charCode in this.glyphs) { + if (this.glyphs.hasOwnProperty(charCode)) { + glyph = this.glyphs[charCode]; + if (glyph.height === 0 || glyph.width === 0) { + continue; + } + this.capHeight = Math.max(this.capHeight, glyph.height); + } + } + } else { + this.capHeight = capGlyph.height; + } + this.capHeight -= padY; + } +} + +/** + * @classdesc + * A Draggable base object + * @see DropTarget + * @augments Renderable + */ +class Draggable extends Renderable { + /** + * @param {number} x - the x coordinates of the draggable object + * @param {number} y - the y coordinates of the draggable object + * @param {number} width - draggable object width + * @param {number} height - draggable object height + */ + constructor(x, y, width, height) { + super(x, y, width, height); + this.isKinematic = false; + this.dragging = false; + this.dragId = null; + this.grabOffset = new Vector2d(0, 0); + this.initEvents(); + } + + /** + * Initializes the events the modules needs to listen to + * It translates the pointer events to me.events + * in order to make them pass through the system and to make + * this module testable. Then we subscribe this module to the + * transformed events. + * @name initEvents + * @memberof Draggable + * @private + */ + initEvents() { + registerPointerEvent("pointerdown", this, (e) => emit(DRAGSTART, e, this)); + registerPointerEvent("pointerup", this, (e) => emit(DRAGEND, e, this)); + registerPointerEvent("pointercancel", this, (e) => emit(DRAGEND, e, this)); + on(POINTERMOVE, (e) => this.dragMove(e)); + on(DRAGSTART, (e, draggable) => { + if (draggable === this) { + this.dragStart(e); + } + }); + on(DRAGEND, (e, draggable) => { + if (draggable === this) { + this.dragEnd(e); + } + }); + } + + /** + * Gets called when the user starts dragging the entity + * @name dragStart + * @memberof Draggable + * @param {object} e - the pointer event + * @returns {boolean} false if the object is being dragged + */ + dragStart(e) { + if (this.dragging === false) { + this.dragging = true; + this.grabOffset.set(e.gameX, e.gameY); + this.grabOffset.sub(this.pos); + return false; + } + } + + /** + * Gets called when the user drags this entity around + * @name dragMove + * @memberof Draggable + * @param {object} e - the pointer event + */ + dragMove(e) { + if (this.dragging === true) { + this.pos.set(e.gameX, e.gameY, this.pos.z); //TODO : z ? + this.pos.sub(this.grabOffset); + } + } + + /** + * Gets called when the user stops dragging the entity + * @name dragEnd + * @memberof Draggable + * @returns {boolean} false if the object stopped being dragged + */ + dragEnd() { + if (this.dragging === true) { + this.dragging = false; + return false; + } + } + + /** + * Destructor + * @name destroy + * @memberof Draggable + * @ignore + */ + destroy() { + off(POINTERMOVE, this.dragMove); + off(DRAGSTART, this.dragStart); + off(DRAGEND, this.dragEnd); + releasePointerEvent("pointerdown", this); + releasePointerEvent("pointerup", this); + releasePointerEvent("pointercancel", this); + super.destroy(); + } +} + +/** + * @classdesc + * a base drop target object + * @see Draggable + * @augments Renderable + */ +class DropTarget extends Renderable { + /** + * @param {number} x - the x coordinates of the drop target + * @param {number} y - the y coordinates of the drop target + * @param {number} width - drop target width + * @param {number} height - drop target height + */ + constructor(x, y, width, height) { + super(x, y, width, height); + + this.isKinematic = false; + + /** + * constant for the overlaps method + * @public + * @constant + * @type {string} + * @name CHECKMETHOD_OVERLAP + * @memberof DropTarget + */ + this.CHECKMETHOD_OVERLAP = "overlaps"; + + /** + * constant for the contains method + * @public + * @constant + * @type {string} + * @name CHECKMETHOD_CONTAINS + * @memberof DropTarget + */ + this.CHECKMETHOD_CONTAINS = "contains"; + + /** + * the checkmethod we want to use + * @public + * @constant + * @type {string} + * @name checkMethod + * @default "overlaps" + * @memberof DropTarget + */ + this.checkMethod = this.CHECKMETHOD_OVERLAP; + + on(DRAGEND, this.checkOnMe, this); + + } + + /** + * Sets the collision method which is going to be used to check a valid drop + * @name setCheckMethod + * @memberof DropTarget + * @param {string} checkMethod - the checkmethod (defaults to CHECKMETHOD_OVERLAP) + */ + setCheckMethod(checkMethod) { + // We can improve this check, + // because now you can use every method in theory + if (typeof(this.getBounds()[this.checkMethod]) === "function") { + this.checkMethod = checkMethod; + } + } + + /** + * Checks if a dropped entity is dropped on the current entity + * @name checkOnMe + * @memberof DropTarget + * @param {object} e - the triggering event + * @param {Draggable} draggable - the draggable object that is dropped + */ + checkOnMe(e, draggable) { + if (draggable && this.getBounds()[this.checkMethod](draggable.getBounds())) { + // call the drop method on the current entity + this.drop(draggable); + } + } + + /** + * Gets called when a draggable entity is dropped on the current entity + * @name drop + * @memberof DropTarget + * @param {Draggable} draggable - the draggable object that is dropped + */ + drop(draggable) { // eslint-disable-line no-unused-vars + + } + + /** + * Destructor + * @name destroy + * @memberof DropTarget + * @ignore + */ + destroy() { + off(DRAGEND, this.checkOnMe); + super.destroy(); + } +} + +/* +* Separating Axis Theorem implementation, based on the SAT.js library by Jim Riecken +* Available under the MIT License - https://github.com/jriecken/sat-js +*/ + + +/** + * Constants for Vornoi regions + * @ignore + */ +const LEFT_VORNOI_REGION = -1; + +/** + * Constants for Vornoi regions + * @ignore + */ +const MIDDLE_VORNOI_REGION = 0; + +/** + * Constants for Vornoi regions + * @ignore + */ +const RIGHT_VORNOI_REGION = 1; + + +/** + * A pool of `Vector` objects that are used in calculations to avoid allocating memory. + * @type {Array.} + * @ignore + */ +let T_VECTORS = []; +for (let v = 0; v < 10; v++) { T_VECTORS.push(new Vector2d()); } + +/** + * A pool of arrays of numbers used in calculations to avoid allocating memory. + * @type {Array.>} + * @ignore + */ +let T_ARRAYS = []; +for (let a = 0; a < 5; a++) { T_ARRAYS.push([]); } + + +/** + * Flattens the specified array of points onto a unit vector axis, + * resulting in a one dimensional range of the minimum and + * maximum value on that axis. + * @ignore + * @param {Array.} points - The points to flatten. + * @param {Vector2d} normal - The unit vector axis to flatten on. + * @param {Array.} result - An array. After calling this function, + * result[0] will be the minimum value, + * result[1] will be the maximum value. + */ +function flattenPointsOn(points, normal, result) { + let min = Number.MAX_VALUE; + let max = -Number.MAX_VALUE; + let len = points.length; + for (let i = 0; i < len; i++) { + // The magnitude of the projection of the point onto the normal + const dot = points[i].dot(normal); + if (dot < min) { min = dot; } + if (dot > max) { max = dot; } + } + result[0] = min; + result[1] = max; +} + +/** + * Check whether two convex polygons are separated by the specified + * axis (must be a unit vector). + * @ignore + * @param {Vector2d} aPos - The position of the first polygon. + * @param {Vector2d} bPos - The position of the second polygon. + * @param {Array.} aPoints - The points in the first polygon. + * @param {Array.} bPoints - The points in the second polygon. + * @param {Vector2d} axis - The axis (unit sized) to test against. The points of both polygons + * will be projected onto this axis. + * @param {Response=} response - A Response object (optional) which will be populated + * if the axis is not a separating axis. + * @returns {boolean} true if it is a separating axis, false otherwise. If false, + * and a response is passed in, information about how much overlap and + * the direction of the overlap will be populated. + */ +function isSeparatingAxis(aPos, bPos, aPoints, bPoints, axis, response) { + let rangeA = T_ARRAYS.pop(); + let rangeB = T_ARRAYS.pop(); + // The magnitude of the offset between the two polygons + let offsetV = T_VECTORS.pop().copy(bPos).sub(aPos); + let projectedOffset = offsetV.dot(axis); + + // Project the polygons onto the axis. + flattenPointsOn(aPoints, axis, rangeA); + flattenPointsOn(bPoints, axis, rangeB); + // Move B's range to its position relative to A. + rangeB[0] += projectedOffset; + rangeB[1] += projectedOffset; + // Check if there is a gap. If there is, this is a separating axis and we can stop + if (rangeA[0] > rangeB[1] || rangeB[0] > rangeA[1]) { + T_VECTORS.push(offsetV); + T_ARRAYS.push(rangeA); + T_ARRAYS.push(rangeB); + return true; + } + + // This is not a separating axis. If we're calculating a response, calculate the overlap. + if (response) { + let overlap = 0; + // A starts further left than B + if (rangeA[0] < rangeB[0]) { + response.aInB = false; + // A ends before B does. We have to pull A out of B + if (rangeA[1] < rangeB[1]) { + overlap = rangeA[1] - rangeB[0]; + response.bInA = false; + // B is fully inside A. Pick the shortest way out. + } else { + let option1 = rangeA[1] - rangeB[0]; + let option2 = rangeB[1] - rangeA[0]; + overlap = option1 < option2 ? option1 : -option2; + } + // B starts further left than A + } else { + response.bInA = false; + // B ends before A ends. We have to push A out of B + if (rangeA[1] > rangeB[1]) { + overlap = rangeA[0] - rangeB[1]; + response.aInB = false; + // A is fully inside B. Pick the shortest way out. + } else { + let option11 = rangeA[1] - rangeB[0]; + let option22 = rangeB[1] - rangeA[0]; + overlap = option11 < option22 ? option11 : -option22; + } + } + + // If this is the smallest amount of overlap we've seen so far, set it as the minimum overlap. + let absOverlap = Math.abs(overlap); + if (absOverlap < response.overlap) { + response.overlap = absOverlap; + response.overlapN.copy(axis); + if (overlap < 0) { + response.overlapN.negateSelf(); + } + } + } + T_VECTORS.push(offsetV); + T_ARRAYS.push(rangeA); + T_ARRAYS.push(rangeB); + return false; +} + + +/** + * Calculates which Vornoi region a point is on a line segment.
                            + * It is assumed that both the line and the point are relative to `(0,0)`
                            + *
                            + *             |       (0)      |
                            + *      (-1)  [S]--------------[E]  (1)
                            + *             |       (0)      |
                            + * 
                            + * + * @ignore + * @param {Vector2d} line - The line segment. + * @param {Vector2d} point - The point. + * @returns {number} LEFT_VORNOI_REGION (-1) if it is the left region, + * MIDDLE_VORNOI_REGION (0) if it is the middle region, + * RIGHT_VORNOI_REGION (1) if it is the right region. + */ +function vornoiRegion(line, point) { + let len2 = line.length2(); + let dp = point.dot(line); + if (dp < 0) { + // If the point is beyond the start of the line, it is in the + // left vornoi region. + return LEFT_VORNOI_REGION; + } else if (dp > len2) { + // If the point is beyond the end of the line, it is in the + // right vornoi region. + return RIGHT_VORNOI_REGION; + } else { + // Otherwise, it's in the middle one. + return MIDDLE_VORNOI_REGION; + } +} + +/** + * Checks whether polygons collide. + * @ignore + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A. + * @param {Polygon} polyA - a reference to the object A Polygon to be tested + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B. + * @param {Polygon} polyB - a reference to the object B Polygon to be tested + * @param {Response=} response - Response object (optional) that will be populated if they intersect. + * @returns {boolean} true if they intersect, false if they don't. + */ +function testPolygonPolygon(a, polyA, b, polyB, response) { + // specific point for + let aPoints = polyA.points; + let aNormals = polyA.normals; + let aLen = aNormals.length; + let bPoints = polyB.points; + let bNormals = polyB.normals; + let bLen = bNormals.length; + // aboslute shape position + let posA = T_VECTORS.pop().copy(a.pos).add(a.ancestor.getAbsolutePosition()).add(polyA.pos); + let posB = T_VECTORS.pop().copy(b.pos).add(b.ancestor.getAbsolutePosition()).add(polyB.pos); + + // If any of the edge normals of A is a separating axis, no intersection. + for (let i = 0; i < aLen; i++) { + if (isSeparatingAxis(posA, posB, aPoints, bPoints, aNormals[i], response)) { + T_VECTORS.push(posA); + T_VECTORS.push(posB); + return false; + } + } + + // If any of the edge normals of B is a separating axis, no intersection. + for (let i = 0; i < bLen; i++) { + if (isSeparatingAxis(posA, posB, aPoints, bPoints, bNormals[i], response)) { + T_VECTORS.push(posA); + T_VECTORS.push(posB); + return false; + } + } + + // Since none of the edge normals of A or B are a separating axis, there is an intersection + // and we've already calculated the smallest overlap (in isSeparatingAxis). Calculate the + // final overlap vector. + if (response) { + response.a = a; + response.b = b; + response.overlapV.copy(response.overlapN).scale(response.overlap); + } + T_VECTORS.push(posA); + T_VECTORS.push(posB); + return true; +} + +/** + * Check if two Ellipse collide. + * @ignore + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A. + * @param {Ellipse} ellipseA - a reference to the object A Ellipse to be tested + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B. + * @param {Ellipse} ellipseB - a reference to the object B Ellipse to be tested + * @param {Response=} response - Response object (optional) that will be populated if + * the circles intersect. + * @returns {boolean} true if the circles intersect, false if they don't. + */ +function testEllipseEllipse(a, ellipseA, b, ellipseB, response) { + // Check if the distance between the centers of the two + // circles is greater than their combined radius. + let differenceV = T_VECTORS.pop().copy(b.pos).add(b.ancestor.getAbsolutePosition()).add(ellipseB.pos) + .sub(a.pos).add(a.ancestor.getAbsolutePosition()).sub(ellipseA.pos); + let radiusA = ellipseA.radius; + let radiusB = ellipseB.radius; + let totalRadius = radiusA + radiusB; + let totalRadiusSq = totalRadius * totalRadius; + let distanceSq = differenceV.length2(); + // If the distance is bigger than the combined radius, they don't intersect. + if (distanceSq > totalRadiusSq) { + T_VECTORS.push(differenceV); + return false; + } + // They intersect. If we're calculating a response, calculate the overlap. + if (response) { + let dist = Math.sqrt(distanceSq); + response.a = a; + response.b = b; + response.overlap = totalRadius - dist; + response.overlapN.copy(differenceV.normalize()); + response.overlapV.copy(differenceV).scale(response.overlap); + response.aInB = radiusA <= radiusB && dist <= radiusB - radiusA; + response.bInA = radiusB <= radiusA && dist <= radiusA - radiusB; + } + T_VECTORS.push(differenceV); + return true; +} + +/** + * Check if a polygon and an ellipse collide. + * @ignore + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A. + * @param {Polygon} polyA - a reference to the object A Polygon to be tested + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B. + * @param {Ellipse} ellipseB - a reference to the object B Ellipse to be tested + * @param {Response=} response - Response object (optional) that will be populated if they intersect. + * @returns {boolean} true if they intersect, false if they don't. + */ +function testPolygonEllipse(a, polyA, b, ellipseB, response) { + // Get the position of the circle relative to the polygon. + let circlePos = T_VECTORS.pop().copy(b.pos).add(b.ancestor.getAbsolutePosition()).add(ellipseB.pos) + .sub(a.pos).add(a.ancestor.getAbsolutePosition()).sub(polyA.pos); + let radius = ellipseB.radius; + let radius2 = radius * radius; + let points = polyA.points; + let edges = polyA.edges; + let len = edges.length; + let edge = T_VECTORS.pop(); + let normal = T_VECTORS.pop(); + let point = T_VECTORS.pop(); + let dist = 0; + + // For each edge in the polygon: + for (let i = 0; i < len; i++) { + const next = i === len - 1 ? 0 : i + 1; + const prev = i === 0 ? len - 1 : i - 1; + let overlap = 0; + let overlapN = null; + + // Get the edge. + edge.copy(edges[i]); + // Calculate the center of the circle relative to the starting point of the edge. + point.copy(circlePos).sub(points[i]); + + // If the distance between the center of the circle and the point + // is bigger than the radius, the polygon is definitely not fully in + // the circle. + if (response && point.length2() > radius2) { + response.aInB = false; + } + + // Calculate which Vornoi region the center of the circle is in. + let region = vornoiRegion(edge, point); + let inRegion = true; + // If it's the left region: + if (region === LEFT_VORNOI_REGION) { + let point2 = null; + if (len > 1) { + // We need to make sure we're in the RIGHT_VORNOI_REGION of the previous edge. + edge.copy(edges[prev]); + // Calculate the center of the circle relative the starting point of the previous edge + point2 = T_VECTORS.pop().copy(circlePos).sub(points[prev]); + region = vornoiRegion(edge, point2); + if (region !== RIGHT_VORNOI_REGION) { + inRegion = false; + } + } + + if (inRegion) { + // It's in the region we want. Check if the circle intersects the point. + dist = point.length(); + if (dist > radius) { + // No intersection + T_VECTORS.push(circlePos); + T_VECTORS.push(edge); + T_VECTORS.push(normal); + T_VECTORS.push(point); + if (point2) { + T_VECTORS.push(point2); + } + return false; + } else if (response) { + // It intersects, calculate the overlap. + response.bInA = false; + overlapN = point.normalize(); + overlap = radius - dist; + } + } + + if (point2) { + T_VECTORS.push(point2); + } + // If it's the right region: + } else if (region === RIGHT_VORNOI_REGION) { + if (len > 1) { + // We need to make sure we're in the left region on the next edge + edge.copy(edges[next]); + // Calculate the center of the circle relative to the starting point of the next edge. + point.copy(circlePos).sub(points[next]); + region = vornoiRegion(edge, point); + if (region !== LEFT_VORNOI_REGION) { + inRegion = false; + } + } + + if (inRegion) { + // It's in the region we want. Check if the circle intersects the point. + dist = point.length(); + if (dist > radius) { + // No intersection + T_VECTORS.push(circlePos); + T_VECTORS.push(edge); + T_VECTORS.push(normal); + T_VECTORS.push(point); + return false; + } else if (response) { + // It intersects, calculate the overlap. + response.bInA = false; + overlapN = point.normalize(); + overlap = radius - dist; + } + } + // Otherwise, it's the middle region: + } else { + // Need to check if the circle is intersecting the edge, + // Get the normal. + normal.copy(polyA.normals[i]); + // Find the perpendicular distance between the center of the + // circle and the edge. + dist = point.dot(normal); + let distAbs = Math.abs(dist); + // If the circle is on the outside of the edge, there is no intersection. + if ((len === 1 || dist > 0) && distAbs > radius) { + // No intersection + T_VECTORS.push(circlePos); + T_VECTORS.push(edge); + T_VECTORS.push(normal); + T_VECTORS.push(point); + return false; + } else if (response) { + // It intersects, calculate the overlap. + overlapN = normal; + overlap = radius - dist; + // If the center of the circle is on the outside of the edge, or part of the + // circle is on the outside, the circle is not fully inside the polygon. + if (dist >= 0 || overlap < 2 * radius) { + response.bInA = false; + } + } + } + + // If this is the smallest overlap we've seen, keep it. + // (overlapN may be null if the circle was in the wrong Vornoi region). + if (overlapN && response && Math.abs(overlap) < Math.abs(response.overlap)) { + response.overlap = overlap; + response.overlapN.copy(overlapN); + } + } + + // Calculate the final overlap vector - based on the smallest overlap. + if (response) { + response.a = a; + response.b = b; + response.overlapV.copy(response.overlapN).scale(response.overlap); + } + T_VECTORS.push(circlePos); + T_VECTORS.push(edge); + T_VECTORS.push(normal); + T_VECTORS.push(point); + return true; +} + +/** + * Check if an ellipse and a polygon collide.
                            + * **NOTE:** This is slightly less efficient than testPolygonEllipse as it just + * runs testPolygonEllipse and reverses the response at the end. + * @ignore + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A. + * @param {Ellipse} ellipseA - a reference to the object A Ellipse to be tested + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B. + * @param {Polygon} polyB - a reference to the object B Polygon to be tested + * @param {Response=} response - Response object (optional) that will be populated if + * they intersect. + * @returns {boolean} true if they intersect, false if they don't. + */ +function testEllipsePolygon(a, ellipseA, b, polyB, response) { + // Test the polygon against the circle. + let result = testPolygonEllipse(b, polyB, a, ellipseA, response); + if (result && response) { + // Swap A and B in the response. + let resa = response.a; + let aInB = response.aInB; + response.overlapN.negateSelf(); + response.overlapV.negateSelf(); + response.a = response.b; + response.b = resa; + response.aInB = response.bInA; + response.bInA = aInB; + } + return result; +} + +var SAT = { + __proto__: null, + testEllipseEllipse: testEllipseEllipse, + testEllipsePolygon: testEllipsePolygon, + testPolygonEllipse: testPolygonEllipse, + testPolygonPolygon: testPolygonPolygon +}; + +/** + * @classdesc + * An object representing the result of an intersection. + * @property {Renderable} a The first object participating in the intersection + * @property {Renderable} b The second object participating in the intersection + * @property {number} overlap Magnitude of the overlap on the shortest colliding axis + * @property {Vector2d} overlapV The overlap vector (i.e. `overlapN.scale(overlap, overlap)`). If this vector is subtracted from the position of a, a and b will no longer be colliding + * @property {Vector2d} overlapN The shortest colliding axis (unit-vector) + * @property {boolean} aInB Whether the first object is entirely inside the second + * @property {boolean} bInA Whether the second object is entirely inside the first + * @property {number} indexShapeA The index of the colliding shape for the object a body + * @property {number} indexShapeB The index of the colliding shape for the object b body + * @name ResponseObject + * @public + */ +class ResponseObject { + constructor() { + this.a = null; + this.b = null; + this.overlapN = new Vector2d(); + this.overlapV = new Vector2d(); + this.aInB = true; + this.bInA = true; + this.indexShapeA = -1; + this.indexShapeB = -1; + this.overlap = Number.MAX_VALUE; + } + + /** + * Set some values of the response back to their defaults.
                            + * Call this between tests if you are going to reuse a single
                            + * Response object for multiple intersection tests
                            + * (recommended as it will avoid allocating extra memory)
                            + * @name clear + * @public + * @returns {object} this object for chaining + */ + clear () { + this.aInB = true; + this.bInA = true; + this.overlap = Number.MAX_VALUE; + this.indexShapeA = -1; + this.indexShapeB = -1; + return this; + } +} + +// a dummy object when using Line for raycasting +let dummyObj = { + pos : new Vector2d(0, 0), + ancestor : { + _absPos : new Vector2d(0, 0), + getAbsolutePosition : function () { + return this._absPos; + } + } +}; + +// some cache bounds object used for collision detection +let boundsA = new Bounds(); +let boundsB = new Bounds(); + +/** + * the Detector class contains methods for detecting collisions between bodies using a broadphase algorithm. + */ +class Detector { + /** + * @param {Container} world - the physic world this detector is bind to + */ + constructor(world) { + // @ignore + this.world = world; + + /** + * the default response object used for collisions + * (will be automatically populated by the collides functions) + * @type {ResponseObject} + */ + this.response = new ResponseObject(); + } + + /** + * determine if two objects should collide (based on both respective objects body collision mask and type).
                            + * you can redefine this function if you need any specific rules over what should collide with what. + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} a - a reference to the object A. + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} b - a reference to the object B. + * @returns {boolean} true if they should collide, false otherwise + */ + shouldCollide(a, b) { + let bodyA = a.body, + bodyB = b.body; + return ( + (typeof bodyA === "object" && typeof bodyB === "object") && + a !== b && + a.isKinematic !== true && b.isKinematic !== true && + bodyA.shapes.length > 0 && bodyB.shapes.length > 0 && + !(bodyA.isStatic === true && bodyB.isStatic === true) && + (bodyA.collisionMask & bodyB.collisionType) !== 0 && + (bodyA.collisionType & bodyB.collisionMask) !== 0 + ); + } + + /** + * detect collision between two bodies. + * @param {Body} bodyA - a reference to body A. + * @param {Body} bodyB - a reference to body B. + * @returns {boolean} true if colliding + */ + collides(bodyA, bodyB, response = this.response) { + // for each shape in body A + for (let indexA = bodyA.shapes.length, shapeA; indexA--, (shapeA = bodyA.shapes[indexA]);) { + // for each shape in body B + for (let indexB = bodyB.shapes.length, shapeB; indexB--, (shapeB = bodyB.shapes[indexB]);) { + // full SAT collision check + if (SAT["test" + shapeA.type + shapeB.type].call( + this, + bodyA.ancestor, // a reference to the object A + shapeA, + bodyB.ancestor, // a reference to the object B + shapeB, + // clear response object before reusing + response.clear()) === true + ) { + + // set the shape index + response.indexShapeA = indexA; + response.indexShapeB = indexB; + + return true; + } + } + } + return false; + } + + /** + * find all the collisions for the specified object using a broadphase algorithm + * @ignore + * @param {Renderable|Container|Entity|Sprite|NineSliceSprite} objA - object to be tested for collision + * @returns {boolean} in case of collision, false otherwise + */ + collisions(objA) { + let collisionCounter = 0; + // retreive a list of potential colliding objects from the game world + let candidates = this.world.broadphase.retrieve(objA); + + boundsA.addBounds(objA.getBounds(), true); + boundsA.addBounds(objA.body.getBounds()); + + candidates.forEach((objB) => { + // check if both objects "should" collide + if (this.shouldCollide(objA, objB)) { + + boundsB.addBounds(objB.getBounds(), true); + boundsB.addBounds(objB.body.getBounds()); + + // fast AABB check if both bounding boxes are overlaping + if (boundsA.overlaps(boundsB)) { + + if (this.collides(objA.body, objB.body)) { + // we touched something ! + collisionCounter++; + + // execute the onCollision callback + if (objA.onCollision && objA.onCollision(this.response, objB) !== false && objA.body.isStatic === false) { + objA.body.respondToCollision.call(objA.body, this.response); + } + if (objB.onCollision && objB.onCollision(this.response, objA) !== false && objB.body.isStatic === false) { + objB.body.respondToCollision.call(objB.body, this.response); + } + } + } + } + }); + // we could return the amount of objects we collided with ? + return collisionCounter > 0; + } + + /** + * Checks for object colliding with the given line + * @ignore + * @param {Line} line - line to be tested for collision + * @param {Array.} [result] - a user defined array that will be populated with intersecting physic objects. + * @returns {Array.} an array of intersecting physic objects + * @example + * // define a line accross the viewport + * let ray = new me.Line( + * // absolute position of the line + * 0, 0, [ + * // starting point relative to the initial position + * new me.Vector2d(0, 0), + * // ending point + * new me.Vector2d(me.game.viewport.width, me.game.viewport.height) + * ]); + * + * // check for collition + * result = me.collision.rayCast(ray); + * + * if (result.length > 0) { + * // ... + * } + */ + rayCast(line, result = []) { + let collisionCounter = 0; + + // retrieve a list of potential colliding objects from the game world + let candidates = this.world.broadphase.retrieve(line); + + for (let i = candidates.length, objB; i--, (objB = candidates[i]);) { + + // fast AABB check if both bounding boxes are overlaping + if (objB.body && line.getBounds().overlaps(objB.getBounds())) { + + // go trough all defined shapes in B (if any) + const bLen = objB.body.shapes.length; + if ( objB.body.shapes.length === 0) { + continue; + } + + let shapeA = line; + + // go through all defined shapes in B + let indexB = 0; + do { + let shapeB = objB.body.getShape(indexB); + + // full SAT collision check + if (SAT["test" + shapeA.type + shapeB.type] + .call( + this, + dummyObj, // a reference to the object A + shapeA, + objB, // a reference to the object B + shapeB + )) { + // we touched something ! + result[collisionCounter] = objB; + collisionCounter++; + } + indexB++; + } while (indexB < bLen); + } + } + + // cap result in case it was not empty + result.length = collisionCounter; + + // return the list of colliding objects + return result; + } +} + +/** + * @classdesc + * an object representing the physic world, and responsible for managing and updating all childs and physics + * @augments Container + */ +class World extends Container { + /** + * @param {number} [x=0] - position of the container (accessible via the inherited pos.x property) + * @param {number} [y=0] - position of the container (accessible via the inherited pos.y property) + * @param {number} [width=game.viewport.width] - width of the container + * @param {number} [height=game.viewport.height] - height of the container + */ + constructor(x = 0, y = 0, width = Infinity, height = Infinity) { + // call the super constructor + super(x, y, width, height, true); + + // world is the root container + this.name = "rootContainer"; + + // to mimic the previous behavior + this.anchorPoint.set(0, 0); + + /** + * the application (game) this physic world belong to + * @type {Application} + */ + this.app = undefined; + + /** + * the physic engine used by melonJS + * @see Application.Settings.physic + * @type {string} + * @default "builtin" + * @example + * // disable builtin physic + * me.game.world.physic = "none"; + */ + this.physic = "builtin"; + + /** + * the rate at which the game world is updated, + * may be greater than or lower than the display fps + * @default 60 + * @see timer.maxfps + */ + this.fps = 60; + + /** + * world gravity + * @type {Vector2d} + * @default <0,0.98> + */ + this.gravity = new Vector2d(0, 0.98); + + /** + * Enabled pre-rendering for all tile layers.
                            + * If false layers are rendered dynamically, if true layers are first fully rendered into an offscreen canvas.
                            + * the "best" rendering method depends of your game (amount of layer, layer size, amount of tiles per layer, etc.)
                            + * Note : rendering method is also configurable per layer by adding a boolean "preRender" property to your layer in Tiled ({@link https://doc.mapeditor.org/en/stable/manual/custom-properties/#adding-properties}). + * @type {boolean} + * @default false + */ + this.preRender = false; + + /** + * the active physic bodies in this simulation + * @type {Set} + */ + this.bodies = new Set(); + + /** + * the instance of the game world quadtree used for broadphase (used by the builtin physic and pointer event implementation) + * @type {QuadTree} + */ + this.broadphase = new QuadTree(this, this.getBounds().clone(), collision.maxChildren, collision.maxDepth); + + /** + * the collision detector instance used by this world instance + * @type {Detector} + */ + this.detector = new Detector(this); + + // reset the world container on the game reset signal + on(GAME_RESET, this.reset, this); + + // update the broadband world bounds if a new level is loaded + on(LEVEL_LOADED, () => { + // reset the quadtree + this.broadphase.clear(this.getBounds()); + }); + } + + /** + * reset the game world + */ + reset() { + // clear the quadtree + this.broadphase.clear(); + + // reset the anchorPoint + this.anchorPoint.set(0, 0); + + // call the parent method + super.reset(); + + // empty the list of active physic bodies + // Note: this should be empty already when calling the parent method + this.bodies.clear(); + } + + /** + * Add a physic body to the game world + * @see Container.addChild + * @param {Body} body + * @returns {World} this game world + */ + addBody(body) { + //add it to the list of active body if builtin physic is enabled + if (this.physic === "builtin") { + this.bodies.add(body); + } + return this; + } + + /** + * Remove a physic body from the game world + * @see Container.removeChild + * @param {Body} body + * @returns {World} this game world + */ + removeBody(body) { + //remove from the list of active body if builtin physic is enabled + if (this.physic === "builtin") { + this.bodies.delete(body); + } + return this; + } + + /** + * Apply gravity to the given body + * @private + * @param {Body} body + */ + bodyApplyGravity(body) { + // apply gravity to the current velocity + if (!body.ignoreGravity && body.gravityScale !== 0) { + let gravity = this.gravity; + + // apply gravity if defined + body.force.x += (body.mass * gravity.x) * body.gravityScale; + body.force.y += (body.mass * gravity.y) * body.gravityScale; + } + } + + /** + * update the game world + * @param {number} dt - the time passed since the last frame update + * @returns {boolean} true if the world is dirty + */ + update(dt) { + // only update the quadtree if necessary + if (this.physic === "builtin" || hasRegisteredEvents() === true) { + // clear the quadtree + this.broadphase.clear(); + // insert the world container (children) into the quadtree + this.broadphase.insertContainer(this); + } + + // update the builtin physic simulation + this.step(dt); + + // call the super constructor + return super.update(dt); + } + + /** + * update the builtin physic simulation by one step (called by the game world update method) + * @param {number} dt - the time passed since the last frame update + */ + step(dt) { + if (this.physic === "builtin") { + let isPaused = state$1.isPaused(); + // iterate through all bodies + this.bodies.forEach((body) => { + if (!body.isStatic) { + let ancestor = body.ancestor; + // if the game is not paused, and ancestor can be updated + if (!(isPaused && (!ancestor.updateWhenPaused)) && (ancestor.inViewport || ancestor.alwaysUpdate)) { + // apply gravity to this body + this.bodyApplyGravity(body); + // body update function (this moves it) + if (body.update(dt) === true) { + // mark ancestor as dirty + ancestor.isDirty = true; + } + // handle collisions against other objects + this.detector.collisions(ancestor); + // clear body force + body.force.set(0, 0); + } + } + }); + } + emit(WORLD_STEP, dt); + } +} + +/** + * ParticleEmitterSettings contains the default settings for ParticleEmitter + * @see ParticleEmitter + * @namespace ParticleEmitterSettings + */ +const ParticleEmitterSettings = { + /** + * Width of the particle spawn area. + * @type {number} + * @name width + * @memberof ParticleEmitterSettings + * @default 1 + */ + width : 1, + + /** + * Height of the particle spawn area + * @public + * @type {number} + * @name height + * @memberof ParticleEmitterSettings + * @default 1 + */ + height : 1, + + /** + * image used for particles texture + * (by default melonJS will create an white 8x8 texture image) + * @public + * @type {HTMLCanvasElement} + * @name image + * @memberof ParticleEmitterSettings + * @default undefined + * @see ParticleEmitterSettings.textureSize + */ + image : undefined, + + /** + * default texture size used for particles if no image is specified + * (by default melonJS will create an white 8x8 texture image) + * @public + * @type {number} + * @name textureSize + * @memberof ParticleEmitterSettings + * @default 8 + * @see ParticleEmitterSettings.image + */ + textureSize : 8, + + /** + * tint to be applied to particles + * @public + * @type {string} + * @name tint + * @memberof ParticleEmitterSettings + * @default "#fff" + */ + tint : "#fff", + + /** + * Total number of particles in the emitter + * @public + * @type {number} + * @name totalParticles + * @default 50 + * @memberof ParticleEmitterSettings + */ + totalParticles : 50, + + /** + * Start angle for particle launch in Radians + * @public + * @type {number} + * @name angle + * @default Math.PI / 2 + * @memberof ParticleEmitterSettings + */ + angle : Math.PI / 2, + + /** + * letiation in the start angle for particle launch in Radians. + * @public + * @type {number} + * @name angleVariation + * @default 0 + * @memberof ParticleEmitterSettings + */ + angleVariation : 0, + + /** + * Minimum time each particle lives once it is emitted in ms. + * @public + * @type {number} + * @name minLife + * @default 1000 + * @memberof ParticleEmitterSettings + */ + minLife : 1000, + + /** + * Maximum time each particle lives once it is emitted in ms. + * @public + * @type {number} + * @name maxLife + * @default 3000 + * @memberof ParticleEmitterSettings + */ + maxLife : 3000, + + /** + * Start speed of particles.
                            + * @public + * @type {number} + * @name speed + * @default 2 + * @memberof ParticleEmitterSettings + */ + speed : 2, + + /** + * letiation in the start speed of particles + * @public + * @type {number} + * @name speedVariation + * @default 1 + * @memberof ParticleEmitterSettings + */ + speedVariation : 1, + + /** + * Minimum start rotation for particles sprites in Radians + * @public + * @type {number} + * @name minRotation + * @default 0 + * @memberof ParticleEmitterSettings + */ + minRotation : 0, + + /** + * Maximum start rotation for particles sprites in Radians + * @public + * @type {number} + * @name maxRotation + * @default 0 + * @memberof ParticleEmitterSettings + */ + maxRotation : 0, + + /** + * Minimum start scale ratio for particles (1 = no scaling) + * @public + * @type {number} + * @name minStartScale + * @default 1 + * @memberof ParticleEmitterSettings + */ + minStartScale : 1, + + /** + * Maximum start scale ratio for particles (1 = no scaling) + * @public + * @type {number} + * @name maxStartScale + * @default 1 + * @memberof ParticleEmitterSettings + */ + maxStartScale : 1, + + /** + * Minimum end scale ratio for particles + * @public + * @type {number} + * @name minEndScale + * @default 0 + * @memberof ParticleEmitterSettings + */ + minEndScale : 0, + + /** + * Maximum end scale ratio for particles + * @public + * @type {number} + * @name maxEndScale + * @default 0 + * @memberof ParticleEmitterSettings + */ + maxEndScale : 0, + + /** + * Vertical force (Gravity) for each particle + * @public + * @type {number} + * @name gravity + * @default 0 + * @memberof ParticleEmitterSettings + * @see game.world.gravity + */ + gravity : 0, + + /** + * Horizontal force (like a Wind) for each particle + * @public + * @type {number} + * @name wind + * @default 0 + * @memberof ParticleEmitterSettings + */ + wind : 0, + + /** + * Update the rotation of particle in accordance the particle trajectory.
                            + * The particle sprite should aim at zero angle (draw from left to right).
                            + * Override the particle minRotation and maxRotation.
                            + * @public + * @type {boolean} + * @name followTrajectory + * @default false + * @memberof ParticleEmitterSettings + */ + followTrajectory : false, + + /** + * Enable the Texture Additive by composite operation ("additive" blendMode) + * @public + * @type {boolean} + * @name textureAdditive + * @default false + * @memberof ParticleEmitterSettings + * @see ParticleEmitterSettings.blendMode + */ + textureAdditive : false, + + /** + * the blend mode to be applied when rendering particles. + * (note: this will superseed the `textureAdditive` setting if different than "normal") + * @public + * @type {string} + * @name blendMode + * @default normal + * @memberof ParticleEmitterSettings + * @see CanvasRenderer#setBlendMode + * @see WebGLRenderer#setBlendMode + */ + blendMode : "normal", + + /** + * Update particles only in the viewport, remove it when out of viewport. + * @public + * @type {boolean} + * @name onlyInViewport + * @default true + * @memberof ParticleEmitterSettings + */ + onlyInViewport : true, + + /** + * Render particles in screen space. + * @public + * @type {boolean} + * @name floating + * @default false + * @memberof ParticleEmitterSettings + */ + floating : false, + + /** + * Maximum number of particles launched each time in this emitter (used only if emitter is Stream). + * @public + * @type {number} + * @name maxParticles + * @default 10 + * @memberof ParticleEmitterSettings + */ + maxParticles : 10, + + /** + * How often a particle is emitted in ms (used only if emitter is a Stream). + * @public + * @type {number} + * @name frequency + * @default 100 + * @memberof ParticleEmitterSettings + */ + frequency : 100, + + /** + * Duration that the emitter releases particles in ms (used only if emitter is Stream). + * After this period, the emitter stop the launch of particles. + * @public + * @type {number} + * @name duration + * @default Infinity + * @memberof ParticleEmitterSettings + */ + duration : Infinity, + + /** + * Skip n frames after updating the particle system once. + * This can be used to reduce the performance impact of emitters with many particles. + * @public + * @type {number} + * @name framesToSkip + * @default 0 + * @memberof ParticleEmitterSettings + */ + framesToSkip : 0 +}; + +/** + * @ignore + */ +function createDefaultParticleTexture(w = 8, h = 8) { + let defaultParticleTexture = pool.pull("CanvasTexture", w, h, { offscreenCanvas: true }); + + defaultParticleTexture.context.fillStyle = "#fff"; + defaultParticleTexture.context.fillRect(0, 0, w, h); + + return defaultParticleTexture; +} + +/** + * @classdesc + * Particle Emitter Object. + * @augments Container + */ +class ParticleEmitter extends Container { + /** + * @param {number} x - x position of the particle emitter + * @param {number} y - y position of the particle emitter + * @param {ParticleEmitterSettings} [settings=ParticleEmitterSettings] - the settings for the particle emitter. + * @example + * // Create a particle emitter at position 100, 100 + * let emitter = new ParticleEmitter(100, 100, { + * width: 16, + * height : 16, + * tint: "#f00", + * totalParticles: 32, + * angle: 0, + * angleVariation: 6.283185307179586, + * maxLife: 5, + * speed: 3 + * }); + * + * // Add the emitter to the game world + * me.game.world.addChild(emitter); + * + * // Launch all particles one time and stop, like a explosion + * emitter.burstParticles(); + * + * // Launch constantly the particles, like a fountain + * emitter.streamParticles(); + * + * // At the end, remove emitter from the game world + * // call this in onDestroyEvent function + * me.game.world.removeChild(emitter); + */ + constructor(x, y, settings = {}) { + // call the super constructor + super( + x, y, + settings.width | 1, + settings.height | 1 + ); + + /** + * the current (active) emitter settings + * @public + * @type {ParticleEmitterSettings} + * @name settings + * @memberof ParticleEmitter + */ + this.settings = {}; + + // center the emitter around the given coordinates + this.centerOn(x, y); + + // Emitter is Stream, launch particles constantly + /** @ignore */ + this._stream = false; + + // Frequency timer (in ms) for emitter launch new particles + // used only in stream emitter + /** @ignore */ + this._frequencyTimer = 0; + + // Time of live (in ms) for emitter launch new particles + // used only in stream emitter + /** @ignore */ + this._durationTimer = 0; + + // Emitter is emitting particles + /** @ignore */ + this._enabled = false; + + // Emitter will always update + this.alwaysUpdate = true; + + // don't sort the particles by z-index + this.autoSort = false; + + // count the updates + this._updateCount = 0; + + // internally store how much time was skipped when frames are skipped + this._dt = 0; + + //this.anchorPoint.set(0, 0); + + // Reset the emitter to defaults + this.reset(settings); + } + + /** + * Reset the emitter with particle emitter settings. + * @param {ParticleEmitterSettings} settings - [optional] object with emitter settings. See {@link ParticleEmitterSettings} + */ + reset(settings = {}) { + Object.assign(this.settings, ParticleEmitterSettings, settings); + + if (typeof this.settings.image === "undefined") { + this._defaultParticle = createDefaultParticleTexture(settings.textureSize, settings.textureSize); + this.settings.image = this._defaultParticle.canvas; + } + + this.floating = this.settings.floating; + + this.isDirty = true; + } + + /** + * returns a random point on the x axis within the bounds of this emitter + * @returns {number} + */ + getRandomPointX() { + return randomFloat(0, this.getBounds().width); + } + + /** + * returns a random point on the y axis within the bounds this emitter + * @returns {number} + */ + getRandomPointY() { + return randomFloat(0, this.getBounds().height); + } + + // Add count particles in the game world + /** @ignore */ + addParticles(count) { + for (let i = 0; i < count; i++) { + // Add particle to the container + this.addChild(pool.pull("Particle", this), this.pos.z); + } + this.isDirty = true; + } + + /** + * Emitter is of type stream and is launching particles + * @returns {boolean} Emitter is Stream and is launching particles + */ + isRunning() { + return this._enabled && this._stream; + } + + /** + * Launch particles from emitter constantly (e.g. for stream) + * @param {number} [duration] - time that the emitter releases particles in ms + */ + streamParticles(duration) { + this._enabled = true; + this._stream = true; + this.settings.frequency = Math.max(1, this.settings.frequency); + this._durationTimer = (typeof duration === "number") ? duration : this.settings.duration; + } + + /** + * Stop the emitter from generating new particles (used only if emitter is Stream) + */ + stopStream() { + this._enabled = false; + } + + /** + * Launch all particles from emitter and stop (e.g. for explosion) + * @param {number} [total] - number of particles to launch + */ + burstParticles(total) { + this._enabled = true; + this._stream = false; + this.addParticles((typeof total === "number") ? total : this.settings.totalParticles); + this._enabled = false; + } + + /** + * @ignore + */ + update(dt) { + // skip frames if necessary + if (++this._updateCount > this.settings.framesToSkip) { + this._updateCount = 0; + } + if (this._updateCount > 0) { + this._dt += dt; + return this.isDirty; + } + + // apply skipped delta time + dt += this._dt; + this._dt = 0; + + // Update particles + this.isDirty |= super.update(dt); + + // Launch new particles, if emitter is Stream + if ((this._enabled) && (this._stream)) { + // Check if the emitter has duration set + if (this._durationTimer !== Infinity) { + this._durationTimer -= dt; + + if (this._durationTimer <= 0) { + this.stopStream(); + return this.isDirty; + } + } + + // Increase the emitter launcher timer + this._frequencyTimer += dt; + + // Check for new particles launch + const particlesCount = this.children.length; + if ((particlesCount < this.settings.totalParticles) && (this._frequencyTimer >= this.settings.frequency)) { + if ((particlesCount + this.settings.maxParticles) <= this.settings.totalParticles) { + this.addParticles(this.settings.maxParticles); + } + else { + this.addParticles(this.settings.totalParticles - particlesCount); + } + this._frequencyTimer = 0; + this.isDirty = true; + } + } + return this.isDirty; + } + + /** + * Destroy function + * @ignore + */ + destroy() { + // call the parent destroy method + super.destroy(arguments); + // clean emitter specific Properties + if (typeof this._defaultParticle !== "undefined") { + pool.push(this._defaultParticle); + this._defaultParticle = undefined; + } + this.settings.image = undefined; + this.settings = undefined; + } +} + +/** + * @classdesc + * Single Particle Object. + * @augments Renderable + */ +class Particle extends Renderable { + /** + * @param {ParticleEmitter} emitter - the particle emitter + */ + constructor(emitter) { + // Call the super constructor + super( + emitter.getRandomPointX(), + emitter.getRandomPointY(), + emitter.settings.image.width, + emitter.settings.image.height + ); + this.onResetEvent(emitter, true); + } + + /** + * @ignore + */ + onResetEvent(emitter, newInstance = false) { + if (newInstance === false) { + this.pos.set( + emitter.getRandomPointX(), + emitter.getRandomPointY() + ); + this.resize( + emitter.settings.image.width, + emitter.settings.image.height + ); + this.currentTransform.identity(); + } else { + // particle velocity + this.vel = pool.pull("Vector2d"); + } + + this.image = emitter.settings.image; + + // Particle will always update + this.alwaysUpdate = true; + + if (typeof emitter.settings.tint === "string") { + this.tint.parseCSS(emitter.settings.tint); + } + + if (emitter.settings.textureAdditive === true) { + this.blendMode = "additive"; + } + + if (emitter.settings.blendMode !== "normal") { + this.blendMode = emitter.settings.blendMode; + } + + // Set the start particle Angle and Speed as defined in emitter + let angle = emitter.settings.angle + ((emitter.settings.angleVariation > 0) ? (randomFloat(0, 2) - 1) * emitter.settings.angleVariation : 0); + let speed = emitter.settings.speed + ((emitter.settings.speedVariation > 0) ? (randomFloat(0, 2) - 1) * emitter.settings.speedVariation : 0); + + // Set the start particle Velocity + this.vel.set(speed * Math.cos(angle), -speed * Math.sin(angle)); + + // Set the start particle Time of Life as defined in emitter + this.life = randomFloat(emitter.settings.minLife, emitter.settings.maxLife); + this.startLife = this.life; + + // Set the start and end particle Scale as defined in emitter + // clamp the values as minimum and maximum scales range + this.startScale = clamp( + randomFloat(emitter.settings.minStartScale, emitter.settings.maxStartScale), + emitter.settings.minStartScale, + emitter.settings.maxStartScale + ); + this.endScale = clamp( + randomFloat(emitter.settings.minEndScale, emitter.settings.maxEndScale), + emitter.settings.minEndScale, + emitter.settings.maxEndScale + ); + + // Set the particle Gravity and Wind (horizontal gravity) as defined in emitter + this.gravity = emitter.settings.gravity; + this.wind = emitter.settings.wind; + + // Set if the particle update the rotation in accordance the trajectory + this.followTrajectory = emitter.settings.followTrajectory; + + // Set if the particle update only in Viewport + this.onlyInViewport = emitter.settings.onlyInViewport; + + // cache inverse of the expected delta time + this._deltaInv = timer$1.maxfps / 1000; + + // Set the start particle rotation as defined in emitter + // if the particle not follow trajectory + if (!emitter.settings.followTrajectory) { + this.angle = randomFloat(emitter.settings.minRotation, emitter.settings.maxRotation); + } + } + + /** + * Update the Particle
                            + * This is automatically called by the game manager {@link game} + * @ignore + * @param {number} dt - time since the last update in milliseconds + */ + update(dt) { + // move things forward independent of the current frame rate + let skew = dt * this._deltaInv; + + // Decrease particle life + this.life = this.life > dt ? this.life - dt : 0; + + if (this.life <= 0) { + this.ancestor.removeChild(this); + return false; + } + + // Calculate the particle Age Ratio + let ageRatio = this.life / this.startLife; + + // Resize the particle as particle Age Ratio + let scale = this.startScale; + if (this.startScale > this.endScale) { + scale *= ageRatio; + scale = (scale < this.endScale) ? this.endScale : scale; + } + else if (this.startScale < this.endScale) { + scale /= ageRatio; + scale = (scale > this.endScale) ? this.endScale : scale; + } + + // Set the particle opacity as Age Ratio + this.alpha = ageRatio; + + // Adjust the particle velocity + this.vel.x += this.wind * skew; + this.vel.y += this.gravity * skew; + + // If necessary update the rotation of particle in accordance the particle trajectory + let angle = this.followTrajectory ? Math.atan2(this.vel.y, this.vel.x) : this.angle; + + this.pos.x += this.vel.x * skew; + this.pos.y += this.vel.y * skew; + + // Update particle transform + this.currentTransform.setTransform( + scale, 0, 0, + 0, scale, 0, + this.pos.x, this.pos.y, 1 + ).rotate(angle); + + // mark as dirty if the particle is not dead yet + this.isDirty = this.inViewport || !this.onlyInViewport; + + return super.update(dt); + } + + /** + * @ignore + */ + draw(renderer) { + let w = this.width, h = this.height; + renderer.drawImage( + this.image, + 0, 0, + w, h, + -w / 2, -h / 2, + w, h + ); + } +} + +/** + * @classdesc + * a Generic Object Entity + * @augments Renderable + */ +class Entity extends Renderable { + /** + * @param {number} x - the x coordinates of the entity object + * @param {number} y - the y coordinates of the entity object + * @param {object} settings - Entity properties, to be defined through Tiled or when calling the entity constructor + * + * @param {number} settings.width - the physical width the entity takes up in game + * @param {number} settings.height - the physical height the entity takes up in game + * @param {string} [settings.name] - object entity name + * @param {string} [settings.id] - object unique IDs + * @param {Image|string} [settings.image] - resource name of a spritesheet to use for the entity renderable component + * @param {Vector2d} [settings.anchorPoint=0.0] - Entity anchor point + * @param {number} [settings.framewidth=settings.width] - width of a single frame in the given spritesheet + * @param {number} [settings.frameheight=settings.width] - height of a single frame in the given spritesheet + * @param {string} [settings.type] - object type + * @param {number} [settings.collisionMask] - Mask collision detection for this object + * @param {Rect[]|Polygon[]|Line[]|Ellipse[]} [settings.shapes] - the initial list of collision shapes (usually populated through Tiled) + */ + constructor(x, y, settings) { + + // ensure mandatory properties are defined + if ((typeof settings.width !== "number") || (typeof settings.height !== "number")) { + throw new Error("height and width properties are mandatory when passing settings parameters to an object entity"); + } + + // call the super constructor + super(x, y, settings.width, settings.height); + + /** + * The array of renderable children of this entity. + * @ignore + */ + this.children = []; + + if (settings.image) { + // set the frame size to the given entity size, if not defined in settings + settings.framewidth = settings.framewidth || settings.width; + settings.frameheight = settings.frameheight || settings.height; + this.renderable = new Sprite(0, 0, settings); + } + + // Update anchorPoint + if (settings.anchorPoint) { + this.anchorPoint.setMuted(settings.anchorPoint.x, settings.anchorPoint.y); + } else { + // for backward compatibility + this.anchorPoint.setMuted(0, 0); + } + + // set the sprite name if specified + if (typeof (settings.name) === "string") { + this.name = settings.name; + } + + /** + * object type (as defined in Tiled) + * @type {string} + */ + this.type = settings.type || ""; + + /** + * object unique ID (as defined in Tiled) + * @type {number} + */ + this.id = settings.id || ""; + + /** + * dead/living state of the entity
                            + * default value : true + * @type {boolean} + */ + this.alive = true; + + // initialize the default body + if (typeof settings.shapes === "undefined") { + settings.shapes = pool.pull("Polygon", 0, 0, [ + pool.pull("Vector2d", 0, 0), + pool.pull("Vector2d", this.width, 0), + pool.pull("Vector2d", this.width, this.height), + pool.pull("Vector2d", 0, this.height) + ]); + } + + /** + * the entity body object + * @type {Body} + */ + this.body = new Body(this, settings.shapes, () => this.onBodyUpdate()); + + // resize the entity if required + if (this.width === 0 && this.height === 0) { + this.resize(this.body.getBounds().width, this.body.getBounds().height); + } + + // set the collision mask and type (if defined) + this.body.setCollisionMask(settings.collisionMask); + this.body.setCollisionType(settings.collisionType); + + // disable for entities + this.autoTransform = false; + } + + + /** + * The entity renderable component (can be any objects deriving from me.Renderable, like me.Sprite for example) + * @type {Renderable} + */ + + get renderable() { + return this.children[0]; + } + + set renderable(value) { + if (value instanceof Renderable) { + this.children[0] = value; + this.children[0].ancestor = this; + this.updateBounds(); + } else { + throw new Error(value + "should extend me.Renderable"); + } + } + + /** @ignore */ + update(dt) { + if (this.renderable) { + this.isDirty |= this.renderable.update(dt); + } + return super.update(dt); + } + + /** + * update the bounding box for this entity. + * @param {boolean} [absolute=true] - update the bounds size and position in (world) absolute coordinates + * @returns {Bounds} this entity bounding box Rectangle object + */ + updateBounds(absolute = true) { + let bounds = this.getBounds(); + + bounds.clear(); + bounds.addFrame( + 0, + 0, + this.width, + this.height + ); + + // add each renderable bounds + if (this.children && this.children.length > 0) { + bounds.addBounds(this.children[0].getBounds()); + } + + if (this.body) { + bounds.addBounds(this.body.getBounds()); + } + + if (absolute === true) { + let absPos = this.getAbsolutePosition(); + bounds.centerOn(absPos.x + bounds.x + bounds.width / 2, absPos.y + bounds.y + bounds.height / 2); + } + + return bounds; + } + + /** + * update the bounds when the body is modified + */ + onBodyUpdate() { + this.updateBounds(); + } + + preDraw(renderer) { + renderer.save(); + + // translate to the entity position + renderer.translate( + this.pos.x + this.body.getBounds().x, + this.pos.y + this.body.getBounds().y + ); + + if (this.renderable instanceof Renderable) { + // draw the child renderable's anchorPoint at the entity's + // anchor point. the entity's anchor point is a scale from + // body position to body width/height + renderer.translate( + this.anchorPoint.x * this.body.getBounds().width, + this.anchorPoint.y * this.body.getBounds().height + ); + } + } + + /** + * draw this entity (automatically called by melonJS) + * @protected + * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance + * @param {Camera2d} [viewport] - the viewport to (re)draw + */ + draw(renderer, viewport) { + let renderable = this.renderable; + if (renderable instanceof Renderable) { + // predraw (apply transforms) + renderable.preDraw(renderer); + + // draw the object + renderable.draw(renderer, viewport); + + // postdraw (clean-up); + renderable.postDraw(renderer); + } + } + + /** + * Destroy function + * @ignore + */ + destroy() { + // free some property objects + if (this.renderable) { + this.renderable.destroy.apply(this.renderable, arguments); + this.children.splice(0, 1); + } + + // call the parent destroy method + super.destroy(arguments); + } + + /** + * onDeactivateEvent Notification function + */ + onDeactivateEvent() { + if (this.renderable && this.renderable.onDeactivateEvent) { + this.renderable.onDeactivateEvent(); + } + } + +} + +/** + * Auto-detect the best renderer to use + * @ignore + */ +function autoDetectRenderer(options) { + try { + if (isWebGLSupported(options)) { + return new WebGLRenderer(options); + } + } catch (e) { + console.log("Error creating WebGL renderer :" + e.message); + } + return new CanvasRenderer(options); +} + +/** + * scale the "displayed" canvas by the given scalar. + * this will modify the size of canvas element directly. + * Only use this if you are not using the automatic scaling feature. + * @private + * @param {Application} game - the game application instance triggering the resize + * @param {number} x - x scaling multiplier + * @param {number} y - y scaling multiplier + */ +function scale(game, x, y) { + let renderer = game.renderer; + let canvas = renderer.getCanvas(); + let context = renderer.getContext(); + let settings = renderer.settings; + let pixelRatio = devicePixelRatio; + + let w = settings.zoomX = canvas.width * x * pixelRatio; + let h = settings.zoomY = canvas.height * y * pixelRatio; + + // update the global scale variable + renderer.scaleRatio.set(x * pixelRatio, y * pixelRatio); + + // adjust CSS style based on device pixel ratio + canvas.style.width = (w / pixelRatio) + "px"; + canvas.style.height = (h / pixelRatio) + "px"; + + // if anti-alias and blend mode were resetted (e.g. Canvas mode) + renderer.setAntiAlias(context, settings.antiAlias); + renderer.setBlendMode(settings.blendMode, context); + + // force repaint + game.repaint(); +} + +/** + * callback for window resize event + * @private + * @param {Application} game - the game application instance triggering the resize + */ +function onresize(game) { + let renderer = game.renderer; + let settings = renderer.settings; + let scaleX = settings.scale, scaleY = settings.scale; + let nodeBounds; + + if (settings.autoScale) { + + // set max the canvas max size if CSS values are defined + let canvasMaxWidth = Infinity; + let canvasMaxHeight = Infinity; + + if (globalThis.getComputedStyle) { + let style = globalThis.getComputedStyle(renderer.getCanvas(), null); + canvasMaxWidth = parseInt(style.maxWidth, 10) || Infinity; + canvasMaxHeight = parseInt(style.maxHeight, 10) || Infinity; + } + + if (typeof game.settings.scaleTarget !== "undefined") { + // get the bounds of the given scale target + nodeBounds = getElementBounds(game.settings.scaleTarget); + } else { + // get the maximum canvas size within the parent div containing the canvas container + nodeBounds = getParentBounds(game.getParentElement()); + } + + let _max_width = Math.min(canvasMaxWidth, nodeBounds.width); + let _max_height = Math.min(canvasMaxHeight, nodeBounds.height); + + // calculate final canvas width & height + let screenRatio = _max_width / _max_height; + + if ((settings.scaleMethod === "fill-min" && screenRatio > renderer.designRatio) || + (settings.scaleMethod === "fill-max" && screenRatio < renderer.designRatio) || + (settings.scaleMethod === "flex-width") + ) { + // resize the display canvas to fill the parent container + let sWidth = Math.min(canvasMaxWidth, settings.height * screenRatio); + scaleX = scaleY = _max_width / sWidth; + renderer.resize(Math.floor(sWidth), settings.height); + } + else if ((settings.scaleMethod === "fill-min" && screenRatio < renderer.designRatio) || + (settings.scaleMethod === "fill-max" && screenRatio > renderer.designRatio) || + (settings.scaleMethod === "flex-height") + ) { + // resize the display canvas to fill the parent container + let sHeight = Math.min(canvasMaxHeight, settings.width * (_max_height / _max_width)); + scaleX = scaleY = _max_height / sHeight; + renderer.resize(settings.width, Math.floor(sHeight)); + } + else if (settings.scaleMethod === "flex") { + // resize the display canvas to fill the parent container + renderer.resize(Math.floor(_max_width), Math.floor(_max_height)); + } + else if (settings.scaleMethod === "stretch") { + // scale the display canvas to fit with the parent container + scaleX = _max_width / settings.width; + scaleY = _max_height / settings.height; + } + else { + // scale the display canvas to fit the parent container + // make sure we maintain the original aspect ratio + if (screenRatio < renderer.designRatio) { + scaleX = scaleY = _max_width / settings.width; + } + else { + scaleX = scaleY = _max_height / settings.height; + } + } + } + // adjust scaling ratio + scale(game, scaleX, scaleY); +} + +// default settings +const defaultSettings = { + parent : undefined, + renderer : 2, // AUTO + autoScale : false, + scale : 1.0, + scaleMethod : "manual", + scaleTarget : undefined, + transparent : false, + premultipliedAlpha: true, + blendMode : "normal", + physic : "builtin", + antiAlias : false, + failIfMajorPerformanceCaveat : true, + subPixel : false, + preferWebGL1 : false, + powerPreference : "default", + verbose : false, + consoleHeader : true, + legacy : false +}; + +/** + * Application & Renderer Settings definition. + * @typedef {object} Settings + * @property {string|HTMLElement} [parent=document.body] - the DOM parent element to hold the canvas in the HTML file + * @property {number|Renderer} [renderer=AUTO] - renderer to use (CANVAS, WEBGL, AUTO), or a custom renderer class + * @property {number|string} [scale=1.0] - enable scaling of the canvas ('auto' for automatic scaling) + * @property {"fit"|"fill-min"|"fill-max"|"flex"|"flex-width"|"flex-height"|"stretch"} [scaleMethod="fit"] - screen scaling modes :
                            + * - `fit` : Letterboxed; content is scaled to design aspect ratio
                            + *

                            + * - `fill-min` : Canvas is resized to fit minimum design resolution; content is scaled to design aspect ratio
                            + *

                            + * - `fill-max` : Canvas is resized to fit maximum design resolution; content is scaled to design aspect ratio
                            + *

                            + * - `flex`< : Canvas width & height is resized to fit; content is scaled to design aspect ratio
                            + *

                            + * - `flex-width` : Canvas width is resized to fit; content is scaled to design aspect ratio
                            + *

                            + * - `flex-height` : Canvas height is resized to fit; content is scaled to design aspect ratio
                            + *

                            + * - `stretch` : Canvas is resized to fit; content is scaled to screen aspect ratio
                            + *
                            + * @property {string|HTMLElement} [scaleTarget] - the HTML Element to be used as the reference target when using automatic scaling (by default melonJS will use the parent container of the div element containing the canvas) + * @property {boolean} [preferWebGL1=false] - if true the renderer will only use WebGL 1 + * @property {"sorting"|"z-buffer"} [depthTest="sorting"] - ~Experimental~ the default method to sort object on the z axis in WebGL + * @property {("default"|"high-performance"|"low-power")} [powerPreference="default"] - a hint to the user agent indicating what configuration of GPU is suitable for the WebGL context. To be noted that Safari and Chrome (since version 80) both default to "low-power" to save battery life and improve the user experience on these dual-GPU machines. + * @property {boolean} [transparent=false] - whether to allow transparent pixels in the front buffer (screen). + * @property {boolean} [antiAlias=false] - whether to enable or not video scaling interpolation + * @property {boolean} [consoleHeader=true] - whether to display melonJS version and basic device information in the console + * @param {number} [options.zoomX=width] - The actual width of the canvas with scaling applied + * @param {number} [options.zoomY=height] - The actual height of the canvas with scaling applied + * @param {Compositor} [options.compositor] - a custom compositor class (WebGL only) + * @param {string} [option.physic="builtin"] - the physic system to use (default: "builtin", or "none" to disable builtin physic) + * @see Application + * @memberof Application + */ + +/** + * display information + * @param {Application} app - the game application instance calling this function + */ +function consoleHeader(app) { + let renderType = app.renderer.type; + let gpu_renderer = (typeof app.renderer.GPURenderer === "string") ? " (" + app.renderer.GPURenderer + ")" : ""; + let depthTesting = renderType.includes("WebGL") && app.renderer.depthTest === "z-buffer" ? "Depth Test | " : ""; + let audioType = hasWebAudio ? "Web Audio" : "HTML5 Audio"; + + // output video information in the console + console.log( + renderType + " renderer" + gpu_renderer + " | " + depthTesting + + audioType + " | " + + "pixel ratio " + devicePixelRatio + " | " + + (platform.nodeJS ? "node.js" : platform.isMobile ? "mobile" : "desktop") + " | " + + getScreenOrientation() + " | " + + language + ); + + console.log( "resolution: " + "requested " + app.settings.width + "x" + app.settings.height + + ", got " + app.renderer.width + "x" + app.renderer.height + ); +} + +/** + * @classdesc + * An Application represents a single melonJS game, and is responsible for updating (each frame) all the related object status and draw them. + * @see game + */ +class Application { + /** + * @param {number} width - The width of the canvas viewport + * @param {number} height - The height of the canvas viewport + * @param {Application.Settings} [options] - The optional parameters for the application and default renderer + * @throws Will throw an exception if it fails to instantiate a renderer + */ + constructor(width, height, options) { + + /** + * the parent HTML element holding the main canvas of this application + * @type {HTMLElement} + */ + this.parentElement = undefined; + + /** + * a reference to the active Canvas or WebGL active renderer renderer + * @type {CanvasRenderer|WebGLRenderer} + */ + this.renderer = undefined; + + /** + * the active stage "default" camera + * @type {Camera2d} + */ + this.viewport = undefined; + + /** + * a reference to the game world,
                            + * a world is a virtual environment containing all the game objects + * @type {World} + */ + this.world = undefined; + + /** + * when true, all objects will be added under the root world container.
                            + * When false, a `me.Container` object will be created for each corresponding groups + * @type {boolean} + * @default true + */ + this.mergeGroup = true; + + /** + * Last time the game update loop was executed.
                            + * Use this value to implement frame prediction in drawing events, + * for creating smooth motion while running game update logic at + * a lower fps. + * @type {DOMHighResTimeStamp} + */ + this.lastUpdate = 0; + + /** + * true when this app instance has been initialized + * @type {boolean} + * @default false + */ + this.isInitialized = false; + + /** + * the given settings used when creating this application + * @type {Application.settings} + */ + this.settings = undefined; + + /** + * Specify whether to pause this app when losing focus + * @type {boolean} + * @default true + * @example + * // keep the default game instance running even when loosing focus + * me.game.pauseOnBlur = false; + */ + this.pauseOnBlur = true; + + /** + * Specify whether to unpause this app when gaining back focus + * @type {boolean} + * @default true + */ + this.resumeOnFocus = true; + + /** + * Specify whether to stop this app when losing focus + * @type {boolean} + * @default false + */ + this.stopOnBlur = false; + + // to know when we have to refresh the display + this.isDirty = true; + + // always refresh the display when updatesPerSecond are lower than fps + this.isAlwaysDirty = false; + + // frame counter for frameSkipping + // reset the frame counter + this.frameCounter = 0; + this.frameRate = 1; + + // time accumulation for multiple update calls + this.accumulator = 0.0; + this.accumulatorMax = 0.0; + this.accumulatorUpdateDelta = 0; + + // min update step size + this.stepSize = 1000 / 60; + this.updateDelta = 0; + this.lastUpdateStart = null; + this.updateAverageDelta = 0; + + // when using the default game application, legacy is set to true + // and init is called through the legacy video.init() call + if (options.legacy !== true) { + this.init(width, height, options); + } + } + + /** + * init the game instance (create a physic world, update starting time, etc..) + * @param {number} width - The width of the canvas viewport + * @param {number} height - The height of the canvas viewport + * @param {Application.Settings} [options] - The optional parameters for the application and default renderer + */ + init(width, height, options) { + + this.settings = Object.assign(defaultSettings, options || {}); + + // sanitize potential given parameters + this.settings.width = width; + this.settings.height = height; + this.settings.transparent = !!(this.settings.transparent); + this.settings.antiAlias = !!(this.settings.antiAlias); + this.settings.failIfMajorPerformanceCaveat = !!(this.settings.failIfMajorPerformanceCaveat); + this.settings.depthTest = this.settings.depthTest === "z-buffer" ? "z-buffer" : "sorting"; + this.settings.subPixel = !!(this.settings.subPixel); + this.settings.verbose = !!(this.settings.verbose); + if (this.settings.scaleMethod.search(/^(fill-(min|max)|fit|flex(-(width|height))?|stretch)$/) !== -1) { + this.settings.autoScale = (this.settings.scale === "auto") || true; + } else { + // default scaling method + this.settings.scaleMethod = "fit"; + this.settings.autoScale = (this.settings.scale === "auto") || false; + } + + // override renderer settings if &webgl or &canvas is defined in the URL + let uriFragment = getUriFragment(); + if (uriFragment.webgl === true || uriFragment.webgl1 === true || uriFragment.webgl2 === true) { + this.settings.renderer = WEBGL; + if (uriFragment.webgl1 === true) { + this.settings.preferWebGL1 = true; + } + } else if (uriFragment.canvas === true) { + this.settings.renderer = CANVAS; + } + + // normalize scale + this.settings.scale = (this.settings.autoScale) ? 1.0 : (+this.settings.scale || 1.0); + + // default scaled size value + this.settings.zoomX = width * this.settings.scale; + this.settings.zoomY = height * this.settings.scale; + + // identify parent element and/or the html target for resizing + this.parentElement = getElement(this.settings.parent); + if (typeof this.settings.scaleTarget !== "undefined" ) { + this.settings.scaleTarget = getElement(this.settings.scaleTarget); + } + + if (typeof this.settings.renderer === "number") { + switch (this.settings.renderer) { + case AUTO: + case WEBGL: + this.renderer = autoDetectRenderer(this.settings); + break; + default: + this.renderer = new CanvasRenderer(this.settings); + break; + } + } else { + let CustomRenderer = this.settings.renderer; + // a renderer class + this.renderer = new CustomRenderer(this.settings); + } + + // register to the channel + on(WINDOW_ONRESIZE, () => onresize(this), this); + on(WINDOW_ONORIENTATION_CHANGE, () => onresize(this), this); + + // add our canvas (default to document.body if settings.parent is undefined) + this.parentElement.appendChild(this.renderer.getCanvas()); + + // Mobile browser hacks + if (platform.isMobile) { + // Prevent the webview from moving on a swipe + enableSwipe(false); + } + + // trigger an initial resize(); + onresize(this); + + // add an observer to detect when the dom tree is modified + if ("MutationObserver" in globalThis) { + // Create an observer instance linked to the callback function + let observer = new MutationObserver(() => onresize(this)); + + // Start observing the target node for configured mutations + observer.observe(this.parentElement, { + attributes: false, childList: true, subtree: true + }); + } + + if (this.settings.consoleHeader !== false) { + consoleHeader(this); + } + + // create a new physic world + this.world = new World(0, 0, this.settings.width, this.settings.height); + + // set the reference to this application instance + this.world.app = this; + // set the reference to this application instance + this.world.physic = this.settings.physic; + + // app starting time + this.lastUpdate = globalThis.performance.now(); + // manually sort child if depthTest setting is "sorting" + this.world.autoSort = !(this.renderer.type === "WEBGL" && this.settings.depthTest === "z-buffer"); + + this.isInitialized = true; + + emit(GAME_INIT, this); + on(STATE_CHANGE, this.repaint, this); + on(STATE_RESTART, this.repaint, this); + on(STATE_RESUME, this.repaint, this); + on(STAGE_RESET, this.reset, this); + on(TICK, (time) => { + // update all game objects + this.update(time); + // render all game objects + this.draw(); + }, this); + + + // on blur event, pause the current + on(BLUR, () => { + if (this.stopOnBlur === true) { + state$1.stop(true); + } + if (this.pauseOnBlur === true) { + state$1.pause(true); + } + }); + + // on focus event, restart or resume the current + on(FOCUS, () => { + if (this.stopOnBlur === true) { + state$1.restart(true); + } + if (this.resumeOnFocus === true) { + state$1.resume(true); + } + }); + } + + /** + * reset the game Object manager + * destroy all current objects + */ + reset() { + // point to the current active stage "default" camera + let current = state$1.get(); + if (typeof current !== "undefined") { + this.viewport = current.cameras.get("default"); + } + + // publish reset notification + emit(GAME_RESET); + + // Refresh internal variables for framerate limiting + this.updateFrameRate(); + } + + /** + * Specify the property to be used when sorting renderables for this application game world. + * Accepted values : "x", "y", "z", "depth" + * @type {string} + * @see World.sortOn + */ + get sortOn() { + return this.world.sortOn; + } + set sortOn(value) { + this.world.sortOn = value; + } + + /** + * Fired when a level is fully loaded and all renderable instantiated.
                            + * Additionnaly the level id will also be passed to the called function. + * @example + * // call myFunction () everytime a level is loaded + * me.game.onLevelLoaded = this.myFunction.bind(this); + */ + onLevelLoaded() {} + + /** + * Update the renderer framerate using the system config variables. + * @see timer.maxfps + * @see World.fps + */ + updateFrameRate() { + // reset the frame counter + this.frameCounter = 0; + this.frameRate = ~~(0.5 + 60 / timer$1.maxfps); + + // set step size based on the updatesPerSecond + this.stepSize = (1000 / this.world.fps); + this.accumulator = 0.0; + this.accumulatorMax = this.stepSize * 10; + + // display should always re-draw when update speed doesn't match fps + // this means the user intends to write position prediction drawing logic + this.isAlwaysDirty = (timer$1.maxfps > this.world.fps); + } + + /** + * Returns the parent HTML Element holding the main canvas of this application + * @returns {HTMLElement} the parent HTML element + */ + getParentElement() { + return this.parentElement; + } + + /** + * force the redraw (not update) of all objects + */ + repaint() { + this.isDirty = true; + } + + /** + * update all objects related to this game active scene/stage + * @param {number} time - current timestamp as provided by the RAF callback + */ + update(time) { + // handle frame skipping if required + if ((++this.frameCounter % this.frameRate) === 0) { + // reset the frame counter + this.frameCounter = 0; + + // publish notification + emit(GAME_BEFORE_UPDATE, time); + + this.accumulator += timer$1.getDelta(); + this.accumulator = Math.min(this.accumulator, this.accumulatorMax); + + this.updateDelta = (timer$1.interpolation) ? timer$1.getDelta() : this.stepSize; + this.accumulatorUpdateDelta = (timer$1.interpolation) ? this.updateDelta : Math.max(this.updateDelta, this.updateAverageDelta); + + while (this.accumulator >= this.accumulatorUpdateDelta || timer$1.interpolation) { + this.lastUpdateStart = globalThis.performance.now(); + + // game update event + if (state$1.isPaused() !== true) { + emit(GAME_UPDATE, time); + } + + // update all objects (and pass the elapsed time since last frame) + this.isDirty = this.world.update(this.updateDelta); + this.isDirty = state$1.current().update(this.updateDelta) || this.isDirty; + + this.lastUpdate = globalThis.performance.now(); + this.updateAverageDelta = this.lastUpdate - this.lastUpdateStart; + + this.accumulator -= this.accumulatorUpdateDelta; + if (timer$1.interpolation) { + this.accumulator = 0; + break; + } + } + + // publish notification + emit(GAME_AFTER_UPDATE, this.lastUpdate); + } + } + + /** + * draw the active scene/stage associated to this game + */ + draw() { + if (this.renderer.isContextValid === true && (this.isDirty || this.isAlwaysDirty)) { + // publish notification + emit(GAME_BEFORE_DRAW, globalThis.performance.now()); + + // prepare renderer to draw a new frame + this.renderer.clear(); + + // render the stage + state$1.current().draw(this.renderer, this.world); + + // set back to flag + this.isDirty = false; + + // flush/render our frame + this.renderer.flush(); + + // publish notification + emit(GAME_AFTER_DRAW, globalThis.performance.now()); + } + } +} + +/** + * Contains all registered plugins. + * @name cache + * @memberof plugin + */ +let cache = {}; + +/** + * @namespace plugin + */ + +/** + * a base Object class for plugin + * (plugin must be installed using the register function) + * @class + * @name BasePlugin + * @memberof plugin + */ +class BasePlugin { + + /** + * @param {Application} [app] - a reference to the app/game that registered this plugin + */ + constructor(app = game) { + /** + * define the minimum required version of melonJS
                            + * this can be overridden by the plugin + * @type {string} + * @default "15.15.0" + */ + this.version = "15.15.0"; + + /** + * a reference to the app/game that registered this plugin + * @type {Application} + */ + this.app = app; + } +} + +/** + * @class + * @name Base + * @memberof plugin + * @deprecated since 15.1.6, see {@link plugin.BasePlugin} + */ +class Base extends BasePlugin { + + constructor() { + warning("plugin.Base", "plugin.BasePlugin", "15.1.6"); + super(); + } +} + +/** + * patch a melonJS function + * @name patch + * @memberof plugin + * @param {object} proto - target object + * @param {string} name - target function + * @param {Function} fn - replacement function + * @example + * // redefine the me.game.update function with a new one + * me.plugin.patch(me.game, "update", function () { + * // display something in the console + * console.log("duh"); + * // call the original me.game.update function + * this._patched(); + * }); + */ +function patch(proto, name, fn) { + // use the object prototype if possible + if (typeof proto.prototype !== "undefined") { + proto = proto.prototype; + } + // reuse the logic behind object extends + if (typeof(proto[name]) === "function") { + // save the original function + let _parent = proto[name]; + // override the function with the new one + Object.defineProperty(proto, name, { + "configurable" : true, + "value" : (function (name, fn) { + return function () { + this._patched = _parent; + let ret = fn.apply(this, arguments); + this._patched = null; + return ret; + }; + })(name, fn) + }); + } + else { + throw new Error(name + " is not an existing function"); + } +} + +/** + * Register a plugin. + * @name register + * @memberof plugin + * @param {plugin.BasePlugin} plugin - Plugin object to instantiate and register + * @param {string} [name=plugin.constructor.name] - a unique name for this plugin + * @param {object} [...arguments] - all extra parameters will be passed to the plugin constructor + * @example + * // register a new plugin + * me.plugin.register(TestPlugin, "testPlugin"); + * // the `testPlugin` class instance can also be accessed through me.plugin.cache + * me.plugin.cache.testPlugin.myfunction (); + */ +function register(plugin, name = plugin.toString().match(/ (\w+)/)[1]) { + // ensure me.plugins[name] is not already "used" + if (cache[name]) { + throw new Error("plugin " + name + " already registered"); + } + + // get extra arguments + let _args = []; + if (arguments.length > 2) { + // store extra arguments if any + _args = Array.prototype.slice.call(arguments, 1); + } + + // try to instantiate the plugin + _args[0] = plugin; + let instance = new (plugin.bind.apply(plugin, _args))(); + + // inheritance check + if (typeof instance === "undefined" || !(instance instanceof BasePlugin)) { + throw new Error("Plugin should extend the BasePlugin Class !"); + } + + // compatibility testing + if (checkVersion(instance.version, version) > 0) { + throw new Error("Plugin version mismatch, expected: " + instance.version + ", got: " + version); + } + + // create a reference to the new plugin + cache[name] = instance; +} + +/** + * returns the the plugin instance with the specified class type or registered name + * @name get + * @memberof plugin + * @param {object|string} classType - the Class Object or registered name of the plugin to retreive + * @returns {BasePlugin} a plugin instance or undefined + */ +function get(classType) { + for (const name in cache) { + if ((typeof classType === "string" && classType === name) || cache[name] instanceof classType) { + return cache[name]; + } + } +} + +var plugin = { + __proto__: null, + Base: Base, + BasePlugin: BasePlugin, + cache: cache, + get: get, + patch: patch, + register: register +}; + +/* + * placeholder for all deprecated classes and corresponding alias for backward compatibility + */ + +/** + * Alias of {@link TextureAtlas} + * @public + * @name Texture + * @class + * @memberof Renderer# + * @deprecated since 10.4.0 + * @see TextureAtlas + */ +Object.defineProperty(Renderer.prototype, "Texture", { + /** + * @ignore + */ + get : function () { + warning("me.video.renderer.Texture", "me.TextureAtlas", "10.4.0"); + return TextureAtlas; + } +}); + +/** + * @classdesc + * Used to make a game entity draggable + * @augments Entity + * @deprecated since 10.5.0 + * @see Draggable + */ +class DraggableEntity extends Draggable { + /** + * @param {number} x - the x coordinates of the draggable object + * @param {number} y - the y coordinates of the draggable object + * @param {object} settings - Entity properties (see {@link Entity}) + */ + constructor(x, y, settings) { + warning("DraggableEntity", "Draggable", "10.5.0"); + super(x, y, settings.width, settings.height); + } +} + +/** + * @classdesc + * Used to make a game entity a droptarget + * @augments Entity + * @deprecated since 10.5.0 + * @see DropTarget + */ +class DroptargetEntity extends DropTarget { + /** + * @param {number} x - the x coordinates of the draggable object + * @param {number} y - the y coordinates of the draggable object + * @param {object} settings - Entity properties (see {@link Entity}) + */ + constructor(x, y, settings) { + warning("DroptargetEntity", "DropTarget", "10.5.0"); + super(x, y, settings.width, settings.height); + } +} + +/** + * return a reference to the screen canvas + * @name getScreenCanvas + * @memberof Renderer + * @returns {HTMLCanvasElement} + * @deprecated since 13.1.0 + * @see getCanvas(); + */ +Renderer.prototype.getScreenCanvas = function() { + warning("getScreenCanvas", "getCanvas", "13.1.0"); + return this.getCanvas(); +}; + +/** + * return a reference to the screen canvas corresponding 2d Context
                            + * (will return buffered context if double buffering is enabled, or a reference to the Screen Context) + * @name getScreenContext + * @memberof Renderer + * @returns {CanvasRenderingContext2D} + * @deprecated since 13.1.0 + * @see getContext(); + */ +Renderer.prototype.getScreenContext = function() { + warning("getScreenContext", "getContext", "13.1.0"); + return this.getContext(); +}; + +/** + * @classdesc + * A very basic object to manage GUI elements + * @augments Sprite + * @deprecated since 14.0.0 + * @see UISpriteElement + */ +class GUI_Object extends UISpriteElement { + /** + * @param {number} x - the x coordinate of the GUI Object + * @param {number} y - the y coordinate of the GUI Object + * @param {object} settings - See {@link Sprite} + */ + constructor(x, y, settings) { + warning("GUI_Object", "UISpriteElement or UITextButton", "14.0.0"); + super(x, y, settings); + } +} + + +/** + * return the width of the system Canvas + * @public + * @name getWidth + * @class + * @memberof Renderer# + * @deprecated since 15.12.0 + * @see width + */ +Renderer.prototype.getWidth = function() { + warning("getWidth", "width", "15.12.0"); + return this.width; +}; + +/** + * return the height of the system Canvas + * @public + * @name getHeight + * @class + * @memberof Renderer# + * @deprecated since 15.12.0 + * @see height + */ +Renderer.prototype.getHeight = function() { + warning("getHeight", "height", "15.12.0"); + return this.height; +}; + +// ES5/ES6 polyfills + + +/** + * current melonJS version + * @static + * @constant + * @name version + * @type {string} + */ +const version = "15.15.0"; + +/** + * a flag indicating that melonJS is fully initialized + * @type {boolean} + * @default false + * @readonly + */ +let initialized = false; + +/** + * disable melonJS auto-initialization + * @type {boolean} + * @default false + * @see boot + */ +let skipAutoInit = false; + +/** + * game is a default instance of a melonJS Application and represents your current game, + * it contains all the objects, tilemap layers, current viewport, collision map, etc...
                            + * @namespace game + * @see Application + */ +const game = new Application(0, 0, {legacy:true}); + +/** + * initialize the melonJS library. + * this is automatically called unless me.skipAutoInit is set to true, + * to allow asynchronous loaders to work. + * @name boot + * @see skipAutoInit + * @public + */ +function boot() { + // don't do anything if already initialized (should not happen anyway) + if (initialized === true) { + return; + } + + // output melonJS version in the console + console.log("melonJS 2 (v" + version + ") | http://melonjs.org" ); + + // register all built-ins objects into the object pool + pool.register("me.Entity", Entity); + pool.register("me.Collectable", Collectable); + pool.register("me.Trigger", Trigger); + pool.register("me.Light2d", Light2d); + pool.register("me.Tween", Tween, true); + pool.register("me.Color", Color, true); + pool.register("me.Particle", Particle, true); + pool.register("me.Sprite", Sprite); + pool.register("me.NineSliceSprite", NineSliceSprite); + pool.register("me.Renderable", Renderable); + pool.register("me.Text", Text, true); + pool.register("me.BitmapText", BitmapText); + pool.register("me.BitmapTextData", BitmapTextData, true); + pool.register("me.ImageLayer", ImageLayer); + pool.register("me.ColorLayer", ColorLayer, true); + pool.register("me.Vector2d", Vector2d, true); + pool.register("me.Vector3d", Vector3d, true); + pool.register("me.ObservableVector2d", ObservableVector2d, true); + pool.register("me.ObservableVector3d", ObservableVector3d, true); + pool.register("me.Matrix2d", Matrix2d, true); + pool.register("me.Matrix3d", Matrix3d, true); + pool.register("me.Rect", Rect, true); + pool.register("me.RoundRect", RoundRect, true); + pool.register("me.Polygon", Polygon, true); + pool.register("me.Line", Line, true); + pool.register("me.Point", Point, true); + pool.register("me.Ellipse", Ellipse, true); + pool.register("me.Bounds", Bounds, true); + + // duplicate all entries if use with no namespace (e.g. es6) + pool.register("Entity", Entity); + pool.register("Collectable", Collectable); + pool.register("Trigger", Trigger); + pool.register("Light2d", Light2d); + pool.register("Tween", Tween, true); + pool.register("Color", Color, true); + pool.register("Particle", Particle, true); + pool.register("Sprite", Sprite); + pool.register("NineSliceSprite", NineSliceSprite); + pool.register("Renderable", Renderable); + pool.register("Text", Text, true); + pool.register("BitmapText", BitmapText); + pool.register("BitmapTextData", BitmapTextData, true); + pool.register("ImageLayer", ImageLayer); + pool.register("ColorLayer", ColorLayer, true); + pool.register("Vector2d", Vector2d, true); + pool.register("Vector3d", Vector3d, true); + pool.register("ObservableVector2d", ObservableVector2d, true); + pool.register("ObservableVector3d", ObservableVector3d, true); + pool.register("Matrix2d", Matrix2d, true); + pool.register("Matrix3d", Matrix3d, true); + pool.register("Rect", Rect, true); + pool.register("RoundRect", RoundRect, true); + pool.register("Polygon", Polygon, true); + pool.register("Line", Line, true); + pool.register("Point", Point, true); + pool.register("Ellipse", Ellipse, true); + pool.register("Bounds", Bounds, true); + pool.register("CanvasTexture", CanvasTexture, true); + + // publish Boot notification + emit(BOOT); + + // enable/disable the cache + setNocache( getUriFragment().nocache || false ); + + // automatically enable keyboard events + initKeyboardEvent(); + + // mark melonJS as initialized + initialized = true; + + /// if auto init is disable and this function was called manually + if (skipAutoInit === true) { + emit(DOM_READY); + } +} + +// call the library init function when ready +onReady(() => { + if (skipAutoInit === false) { + boot(); + } +}); + +export { AUTO, Application, BitmapText, BitmapTextData, Body, Bounds, CANVAS, Camera2d, CanvasRenderer, CanvasTexture, Collectable, Color, ColorLayer, Compositor, Container, Draggable, DraggableEntity, DropTarget, DroptargetEntity, Ellipse, Entity, GLShader, GUI_Object, ImageLayer, Light2d, Line, math as Math, Matrix2d, Matrix3d, NineSliceSprite, ObservableVector2d, ObservableVector3d, Particle, ParticleEmitter, ParticleEmitterSettings, Point, Pointer, Polygon, PrimitiveCompositor, QuadCompositor, QuadTree, Rect, Renderable, Renderer, RoundRect, Sprite, Stage, TMXHexagonalRenderer, TMXIsometricRenderer, TMXLayer, TMXOrthogonalRenderer, TMXRenderer, TMXStaggeredRenderer, TMXTileMap, TMXTileset, TMXTilesetGroup, TMXUtils, Text, TextureAtlas, Tile, Trigger, Tween, UIBaseElement, UISpriteElement, UITextButton, Vector2d, Vector3d, WEBGL, WebGLRenderer, World, audio, boot, collision, device, event, game, initialized, input, level, loader, plugin, cache as plugins, pool, save, skipAutoInit, state$1 as state, timer$1 as timer, utils, version, video };